W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2002

Attribute error - a bug or a feature?

From: Mark Feblowitz <mfeblowitz@frictionless.com>
Date: Thu, 10 Jan 2002 12:49:59 -0500
Message-ID: <4DBDB4044ABED31183C000508BA0E97F024D56CD@fcpostal.frictionless.com>
To: "Xmlschema-Dev (E-mail)" <xmlschema-dev@w3.org>
Xerces reports the following error:

[Error] ToonWorldProcessPurchaseOrder.xml:57:42: cvc-complex-type.3.2.2:
Attribute 'qualifyingAgency' is not valid respect to the attribute wildcard
of Elment 'AddressId'

when a particular element derives its type by extension:

	<xs:element name="AddressId" minOccurs="0" maxOccurs="unbounded">
		<xs:complexType>
			<xs:simpleContent>
				<xs:extension base="AddressId"/>
			</xs:simpleContent>
		</xs:complexType>
	</xs:element>

but the error goes away when that type is merely referenced:

	<xs:element name="AddressId" type="AddressId" minOccurs="0"
maxOccurs="unbounded">


Does this problem arise due to the attempt to derive by extension, or does
it look legit?

Note that there is nothing there that actually extends the type AddressId -
the derivation by extension is there only as the result of inadvertently
setting XML Spy's derivedBy to extension (that one gesture transforms the
source from the latter to the former).

FYI, the AddressId type is defined as:

	<xs:complexType name="AddressId">
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attribute name="qualifyingAgency"
type="AddressQualifyingAgency"/>
				<xs:attribute name="qualifyingAgencyOther"
type="xs:string"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>

Thanks,

Mark

----------------------------------------------------------------------------
----
 
Mark Feblowitz                                   [t] 617.715.7231
Frictionless Commerce Incorporated     [f] 617.495.0188 
XML Architect                                     [e]
mfeblowitz@frictionless.com
400 Technology Square, 9th Floor 
Cambridge, MA 02139 
www.frictionless.com  
 
Received on Thursday, 10 January 2002 12:50:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:26 GMT