- From: Pete Cordell <petexmldev@tech-know-ware.com>
- Date: Tue, 5 Sep 2006 21:27:43 +0100
- To: <xmlschema-dev@w3.org>
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)
=============================================
Received on Tuesday, 5 September 2006 20:28:23 UTC