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

Re: attribute use="prohibited"

From: Bob Schloss <rschloss@us.ibm.com>
Date: Wed, 21 Feb 2001 08:57:54 -0500
To: xMLSchema-dev@w3.org
Message-ID: <OFB20B4400.5E2C0CE0-ON852569FA.004BCEDB@pok.ibm.com>
message prohibited
Michael Anderson asks:
> what will be the behaviour for the following definition:
> <complexType>
>   <attribute name="foo" use="prohibited"/>
>   <anyAttribute/>
> </complexType>

I think one can only use <attribute ... use="prohibited"/> in a
restriction,
and <anyAttribute> in the base definition of the complexType or in an
extension,
if you do not specify namespace.
Therefore, if the <anyAttribute> occurs later in the type deriviation
chain,
even "foo" will be legal.  If the <attribute use="prohibited"> occurs later
in the
type derivation chain, foo will not be legal.  I do not think you can
specify
both the <anyAttribute> without namespace and the <attribute .. use
="prohibited"> at the same
level of the type derivation hierarchy.

However, the question still remains, what if this is a restriction, the
base complexType had anyAttribute with no namespace, and this type is
<complexType name="derivedType">
 <complexContent>
   <restriction base="baseType">
      ...
    </restriction>
    <attribute name="foo" use="prohibited"/>
    <anyAttribute namespace="##targetNamespace"/>
 </complexContent>
</complexType>

Bob Schloss
Received on Wednesday, 21 February 2001 08:58:54 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.