![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - RE: XML schema for ordinal/nominal variables >Thread Next - Re: Use of global attrbutes Use of global attrbutesTo: <xmlschema-dev@--.---> Date: 9/5/2006 10:28:00 PM
I've found the wording about global attributes confusing for a while and
thought I'd better clarify it!
If a global attribute is declared in an XSD file, then in an XML instance
conforming to that XSD is it automatically valid for an instance of that
global attribute to appear in any instance of a complex type, or is it
necessary for the XSD to define an attribute use of the global attribute
within the complex type definition.
i.e. if you have an XSD along the lines of:
<xs:attribute name='x' type='xs:int'/>
<xs:element name='e' type='t'/>
<xs:complexType name='t'>
<xs:sequence>
<xs:element name='le' type='xs:string'/>
</xs:sequence>
</xs:complexType>
Is the following valid:
<e x='123'><le>OK?</le></e>
Many thanks in advance.
Pete.
--
=============================================
Pete Cordell
Tech-Know-Ware Ltd
for XML to C++ data binding visit
http://www.tech-know-ware.com/lmx
(or http://www.xml2cpp.com)
=============================================
From mike@s... Tue Sep 05 22:23:58 2006
Received: from aji.w3.org ([ | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
