Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Schema for IPv4: valid or not?

Reply
Thread Tools

Schema for IPv4: valid or not?

 
 
Christian Reiser
Guest
Posts: n/a
 
      08-13-2004
Hi,

i have two schema validators:
http://tools.decisionsoft.com/cgi-bi...maValidate.cgi
http://apps.gotdotnet.com/xmltools/x...r/Default.aspx

And an snippet from my schema:
<xsd:simpleType name="ipv4">
<xsd:restriction base="xsd:token">
<xsdattern
value="((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9]))"/>
</xsd:restriction>
</xsd:simpleType>


My xml:
<loopback> 10.0.0.1 </loopback>

I expect this to be valid... decisionsoft.com thinks so to -
gotdotnet.com disagrees. I would like to have a valid schema also with
leading and trailing spaces/tabs. I know, that by using token as
restriction-base also "10.1. 12.34" is valid - is there a better way?

Ciao
Christian

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
using XPATH on XSD schema to get valid XML tags Kev Java 1 12-22-2005 04:36 PM
Valid an XML document with XSD schema member@duretz.net XML 5 11-23-2005 01:04 AM
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM
Cannot create a valid instance from my schema wooks XML 1 08-12-2004 01:03 PM
[XML Schema] Creating valid string values... kelvSYC XML 0 11-11-2003 08:35 PM



Advertisments