Attribute error - a bug or a feature?

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 UTC