Validation of schema element with non-schema attribute

Suppose I have the following two schemas, where the first defines an attribute, and the second uses the first:

NS.xsd:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:attribute name="att" type="xs:integer"/>
</xs:schema>


AttValidation.xsd:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:p="NS"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:import  namespace="NS" schemaLocation="NS.xsd"/>
	<xs:element name="myElement">
		<xs:complexType>
			<xs:sequence></xs:sequence>
			<xs:attribute name="myAttribute" type="xs:string" p:att="value"/>
		</xs:complexType>
	</xs:element>
</xs:schema>


According to XML Schema spec - should this attribute be validated by parsers? 
It is defined as : <xs:anyAttribute namespace="##other" processContents="lax" />
And the specification says that:
 lax 
	If the item, or any items among its [children] <http://www.w3.org/TR/xml-infoset/> if it's an element information item, has a uniquely determined declaration available, it must be ·valid· with respect to that definition, that is, ·validate· where you can, don't worry when you can't

It is not being validated in parsers I am using.... (XmlSpy, for instance). Is it a parser bug, or should I do something else in order for this attribute to be validated?
(Currently, even its name is not being validated)


 
 

Received on Thursday, 19 February 2004 05:23:12 UTC