C
Christian Reiser
Hi,
i have two schema validators:
http://tools.decisionsoft.com/cgi-bin/schemaValidate.cgi
http://apps.gotdotnet.com/xmltools/xsdvalidator/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
i have two schema validators:
http://tools.decisionsoft.com/cgi-bin/schemaValidate.cgi
http://apps.gotdotnet.com/xmltools/xsdvalidator/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