467,910 Members | 1,524 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,910 developers. It's quick & easy.

Schema for IPv4: valid or not?

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">
<xsd:pattern
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

Jul 20 '05 #1
  • viewed: 1297
Share:

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Antony | last post: by
8 posts views Thread by UndoMiel | last post: by
15 posts views Thread by qazmlp | last post: by
5 posts views Thread by hello | last post: by
6 posts views Thread by Grant Robertson | last post: by
14 posts views Thread by Simon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.