Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Re: Combining maxOccurs="unbounded" with all indicator >Thread Next - Re: Understanding anyAttribute namespace="##any" and anyAttribute namespace="##local" Understanding anyAttribute namespace="##any" and anyAttribute namespace="##local"To: xmlschema-dev@--.--- Date: 11/1/2004 8:55:00 AM
I'm trying to understand how anyAttribute works and I'm getting a result
that seems to be incorrect but I'm sure it's my lack of understanding.
What I have in my schema is this declaration:
<xs:complexType name="metadata">
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element name="metadata" type="mtbitopic:metadata"/>
<xs:element name="metadataitem" type="mtbitopic:metadataitem"/>
<xs:any namespace="##other"/>
</xs:choice>
<xs:anyAttribute namespace="##local"/>
</xs:complexType>
Note the "##local" for anyAttribute. The attributeFormDefault is set to
"unqualified".
In my instance governed by this schema, I have this markup:
<metadata foo="bar"/>
However, when I validate the document, both oXygen and Stylus Studio
report that the attribute "foo" is not allowed for the element metadata.
What basic but subtle aspect of XSD am I missing here.
Also, is there a way to say that you want to allow any qualified or
unqualified attributes? It doesn't appear to be the case but I have such
a hard time decoding the spec itself that I'm not sure what the actual
syntax of the namespace= attribute is, so I'm going off what I've
learned from the various tutorials I could find online.
Thanks,
Eliot
--
W. Eliot Kimber
Professional Services
Innodata Isogen
9390 Research Blvd, #410
Austin, TX 78759
(512) 372-8122
eliot@i...
www.innodata-isogen.com
From george@o... Mon Nov 01 21:39:38 2004
Received: from bart.w3.org ([ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
