Altova Mailing List Archives


Re: attributes on complexType from other namespace

From: "Takuki & Miki Kamiya" <takuki@-------.--->
To: "Eddie Robertsson" <eddie@-------.---.-->
Date: 1/29/2002 11:16:00 PM
Hi,

What you are saying is true for attribute use, but I am talking about
attribute wildcard which has quite different inheritance rule.

Regards,

-taki


> No, I don't think that's necessary. Remember that attribute declarations
> are carried forward in a derivation by restriction without having to be
> declared in the restricted type. To remove an attribute in a restriction
> you have to specify use="prohibited"
> 
> Cheers,
> /Eddie
> 
> >
> >
> > -Takuki Kamiya
> >
> > Following is an excerpt from schema for schemas.
> >
> >  <xs:complexType name="openAttrs">
> >    <xs:annotation>
> >      <xs:documentation>
> >        This type is extended by almost all schema types
> >        to allow attributes from other namespaces to be
> >        added to user schemas.
> >      </xs:documentation>
> >    </xs:annotation>
> >    <xs:complexContent>
> >      <xs:restriction base="xs:anyType">
> >        <xs:anyAttribute namespace="##other" processContents="lax"/>
> >      </xs:restriction>
> >    </xs:complexContent>
> >  </xs:complexType>
> >
> >  <xs:complexType name="annotated">
> >    <xs:annotation>
> >      <xs:documentation>
> >        This type is extended by all types which allow annotation
> >        other than &lt;schema&gt; itself
> >      </xs:documentation>
> >    </xs:annotation>
> >    <xs:complexContent>
> >      <xs:extension base="xs:openAttrs">
> >        <xs:sequence>
> >   <xs:element ref="xs:annotation" minOccurs="0"/>
> >        </xs:sequence>
> >        <xs:attribute name="id" type="xs:ID"/>
> >      </xs:extension>
> >    </xs:complexContent>
> >  </xs:complexType>
> >
> >  <xs:complexType name="complexType" abstract="true">
> >   <xs:complexContent>
> >    <xs:extension base="xs:annotated">
> >     <xs:group ref="xs:complexTypeModel"/>
> >     <xs:attribute name="name" type="xs:NCName">
> >      <xs:annotation>
> >       <xs:documentation>
> >       Will be restricted to required or forbidden</xs:documentation>
> >      </xs:annotation>
> >     </xs:attribute>
> >     <xs:attribute name="mixed" type="xs:boolean" use="optional"
> > default="false">
> >      <xs:annotation>
> >       <xs:documentation>
> >       Not allowed if simpleContent child is chosen.
> >       May be overriden by setting on complexContent
> > child.</xs:documentation>
> >     </xs:annotation>
> >     </xs:attribute>
> >     <xs:attribute name="abstract" type="xs:boolean" use="optional"
> > default="false"/>
> >     <xs:attribute name="final" type="xs:derivationSet"/>
> >     <xs:attribute name="block" type="xs:derivationSet"/>
> >    </xs:extension>
> >   </xs:complexContent>
> >  </xs:complexType>
> >
> >  <xs:complexType name="topLevelComplexType">
> >   <xs:complexContent>
> >    <xs:restriction base="xs:complexType">
> >     <xs:sequence>
> >      <xs:element ref="xs:annotation" minOccurs="0"/>
> >      <xs:group ref="xs:complexTypeModel"/>
> >     </xs:sequence>
> >     <xs:attribute name="name" type="xs:NCName" use="required"/>
> >    </xs:restriction>
> >   </xs:complexContent>
> >  </xs:complexType>
> 

From xmlschema-dev-request@t...  Wed Jan 30 11:49:08 2002
Received: from tux.w3.org (tux.w3.org [18.29.0.27])
	by ww

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.