J
jh3an
Please give me your advice!
I made two files according to xml book, but when validating these two
files,
it gives me an error that I totally don't understand.
Is there a problem in these codes?
I checked xml and schema files through these following sites:
http://tools.decisionsoft.com/schemaValidate/
http://www.xmlme.com/Validator.aspx
XML file:
<?xml version="1.0" encoding="utf-8"?>
<document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="kool" xsi:schemaLocation="test.xsd">
<number>89</number>
</document>
Schema file:
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns="kool" targetNamespace="kool" xmlns:xsd="http://
www.w3.org/2001/XMLSchema">
<xsd:element name="document" type="documentType"/>
<xsd:complexType name="documentType">
<xsd:sequence>
<xsd:element name="number" type="CustomNumber"/>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="CustomNumber">
<xsd:restriction base="xsd:integer">
<xsd:maxInclusive value="1000"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
I made two files according to xml book, but when validating these two
files,
it gives me an error that I totally don't understand.
Is there a problem in these codes?
I checked xml and schema files through these following sites:
http://tools.decisionsoft.com/schemaValidate/
http://www.xmlme.com/Validator.aspx
XML file:
<?xml version="1.0" encoding="utf-8"?>
<document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="kool" xsi:schemaLocation="test.xsd">
<number>89</number>
</document>
Schema file:
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns="kool" targetNamespace="kool" xmlns:xsd="http://
www.w3.org/2001/XMLSchema">
<xsd:element name="document" type="documentType"/>
<xsd:complexType name="documentType">
<xsd:sequence>
<xsd:element name="number" type="CustomNumber"/>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="CustomNumber">
<xsd:restriction base="xsd:integer">
<xsd:maxInclusive value="1000"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>