Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


difference between two schema

From: thierry <thierry.schmit@-----.--->
To: 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


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