Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Question about validating schema with xml file

From: jh3an <jh3ang@-----.--->
To: NULL
Date: 7/2/2008 4:43:00 AM
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>


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent