[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

prohibited attributes in an attributeGroup

From: Zafar Abbas <zafara@microsoft.com>
Date: Tue, 17 May 2005 12:27:09 -0700
Message-ID: <563BD3496D37BB4B9F4E8F896A58F2B305055ACD@RED-MSG-50.redmond.corp.microsoft.com>
To: <xmlschema-dev@w3.org>
prohibited attributes

My question is regarding having prohibited attributes in an
attributeGroup which is referenced from a complex type derived from
restriction from a base type which has the same attribute as optional.

Base Type:

<xsd:complexType name="base">
	<xsd:attribute name="a" />
</xsd:complexType>

Derived Type:

<xsd:complexType name="derived">
  <xsd:complexContent>
    <xsd:restriction base="base">
      <xsd:attributeGroup ref="attG"/>
    </xsd:restriction>
  </xsd:complexContent>
</xsd:complexType>

<xsd:attributeGroup name="attG">
 <xsd:attribute name="a" use="prohibited"/>
</xsd:attributeGroup>

Should the complex type "derived" still have attribute "a"? 

>From the spec, it seems that it would allow attribute "a", since the
attribute-uses of the attributeGroup "attG" does not contain "a".

If the above understanding is correct. Having a prohibited attribute in
an attributeGroup is useless and does nothing, and it could be argued
that such attributes should be disallowed from attribute groups.


Thanks,
Zafar
Received on Tuesday, 17 May 2005 20:30:14 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.