- From: Takuki Kamiya <takuki@pacbell.net>
- Date: Wed, 30 Jan 2002 16:14:46 -0800
- To: <xmlschema-dev@w3.org>
Hi Eddie, Thanks for confirming the spec. For now I fixed my local copy of schema for schema for my purposes, but in general I have diffculties in understanding why it stops short of taking that of base type into account for derivation by restriction. It would seem more natural to use the intersection of the two in the case of restriction. -taki ----- Original Message ----- From: "Eddie Robertsson" <eddie@allette.com.au> To: "Takuki & Miki Kamiya" <takuki@pacbell.net> Cc: <xmlschema-dev@w3.org> Sent: Wednesday, January 30, 2002 2:49 PM Subject: Re: attributes on complexType from other namespace > Hi, > > > What you are saying is true for attribute use, but I am talking about > > attribute wildcard which has quite different inheritance rule. > > Yes, I hadn't read that part of the spec but after reading the relevant > section which I think(??) is [1] I believe you are correct. The > topLevelComplexType seems to be missing the attribute wildcard. Maybe someone > else has some more info about this? > > Cheers, > /Eddie > > [1] http://www.w3.org/TR/xmlschema-1/#declare-type (in the table with the > heading: "Complex Type Definition with simple content Schema Component" under > {attribute wildcard}) > > > > > > > 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 <schema> 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> > > > >
Received on Wednesday, 30 January 2002 19:12:00 UTC