Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: difference between two schema difference between two schemaTo: NULL Date: 11/8/2009 12:55:00 PM Hello,
I would like to understand the difference between FIRST
<?xml version="1.0" encoding="iso-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://domaine.tld"
xmlns="http://domaine.tld">
<xsd:element name="serveur" type="xsd:string" />
<xsd:element name="definition">
<xsd:complexType>
<xsd:all>
<xsd:element ref="serveur" minOccurs
="1" maxOccurs ="1" />
</xsd:all>
</xsd:complexType>
</xsd:element>
</xsd:schema>
which validate
<?xml version="1.0" encoding="utf-8"?>
<definition xmlns="http://domaine.tld">
<serveur>serveur1</serveur>
</definition>
AND SECOND
<?xml version="1.0" encoding="iso-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://domaine.tld"
xmlns="http://domaine.tld">
<xsd:element name="definition">
<xsd:complexType>
<xsd:all>
<xsd:element name="serveur" minOccurs
="1" maxOccurs ="1" />
</xsd:all>
</xsd:complexType>
</xsd:element>
</xsd:schema>
which validate
<?xml version="1.0" encoding="utf-8"?>
<definition xmlns="http://domaine.tld">
<serveur xmlns="">anyType</serveur>
</definition>
The difference is the xmlns attribute in the serveur tag of the second
xml file.
thank you in advance
thierry
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
