Altova Mailing List Archives>Archive Index >xml-dev Archive Home >Recent entries >Thread Prev - >Thread Next - RE: [xml-dev] Elements declaration with same name in same complexType and name qualification Elements declaration with same name in same complexType and name qualificationTo: <xml-dev@-----.---.---> Date: 5/29/2007 1:13:00 PM <span style='font-size:
10.0pt;font-family:Arial;color:navy'>Hello,<o:p></o:p>
<span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p>
<span style='font-size:
10.0pt;font-family:Arial;color:navy'>Is the following considered valid or not?<o:p></o:p>
<span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p>
<span style='font-size:
10.0pt;font-family:Arial;color:navy'>Schema:<o:p></o:p>
<span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p>
<?xml
version="1.0" encoding="UTF-8"?><o:p></o:p>
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" targetNamespace="foo"
xmlns="foo"><o:p></o:p>
<xsd:element name="a"><o:p></o:p>
<xsd:complexType><o:p></o:p>
<xsd:sequence><o:p></o:p>
<xsd:element name="b"/><o:p></o:p>
<xsd:element name="c"/><o:p></o:p>
<xsd:element name="b" form="unqualified"/><o:p></o:p>
</xsd:sequence><o:p></o:p>
</xsd:complexType><o:p></o:p>
</xsd:element><o:p></o:p>
</xsd:schema><o:p></o:p>
<o:p> </o:p>
<span style='font-size:9.0pt;font-family:"Courier New";
color:navy'><o:p> </o:p>
Instance:<o:p></o:p>
<o:p> </o:p>
<bar:a
xmlns:bar="foo"><o:p></o:p>
<bar:b/><o:p></o:p>
<bar:c/><o:p></o:p>
<b/><o:p></o:p>
</bar:a><o:p></o:p>
<o:p> </o:p>
I think
it should be valid because the two local declarations of the element b have the
same data type, anyType, in this case. I could not feel confident with my
understanding, though, as I did not read that this is OK in the standard.<o:p></o:p>
<o:p> </o:p>
Thanks.<o:p></o:p>
<o:p> </o:p>
Shlomo.<o:p></o:p> | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
