You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Jean-Louis Vila <jl...@cosmosbay.com> on 2000/06/07 14:39:05 UTC
XercesJ 1.1.1 - XMLSchema experience
Hi,
I just try to validate an xml with a schema but I couldn't
get valid results (both with xerces data samples and my own
xml/xsd files) !!
My files are:
---- [begin :mini.xsd] ----
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/1999/XMLSchema"
xmlns="http://www.mySite.com/OOO"
targetNamespace="http://www.mySite.com/OOO">
<xsd:element name="theRoot">
<xsd:complexType>
<xsd:element name="name" type="xsd:string" minOccurs="1"/>
<xsd:element name="number" type="xsd:unsignedShort" minOccurs="1"/>
</xsd:complexType>
</xsd:element>
</xsd:schema>
---- [end:mini.xsd] ----
---- [begin :mini.xml] ----
<?xml version="1.0" encoding="UTF-8"?>
<theRoot xmlns="http://www.mySite.com/OOO"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xsi:schemaLocation="http://www.mySite.com/OOO mini.xsd">
<name>Mon nom</name>
<number>123</number>
</theRoot>
---- [end:mini.xml] -----
Here my results :
SAXParser,