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

Validation with <xs:anyAttribute namespace="##other"/>

From: Max Voskob <Max.Voskob@telecom.co.nz>
Date: Wed, 6 Mar 2002 16:13:43 -0500 (EST)
Message-ID: <sc873d2c.022@akmailgw1.telecom.co.nz>
To: xmlschema-dev@w3.org
Hello people,

XML Spy 4.3 doesn't try to obtain the schema for the required
namespaces and validate any element and attribute from non-target
namespaces. It always says that the document is valid whatever you place
in the document. 

Example: 

<?xml version="1.0" encoding="UTF-8"?>
<root xmlns="myNS" xmlns:zzz="myNS-zzz"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="myNS faultxsd.xsd" validAtt="aaa"
undeclared:invalid="bbb" justInvalid="ccc">
	<zzz:invalid>ddd</zzz:invalid>
</root>


The document above is valid for the schema below according to XML Spy
4.3 with MS XML 4. 
To my understanding the document is not valid.

Please, tell me if it is correct that the document above is valid for
the schema below.


<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="myNS" xmlns="myNS"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:element name="root">
		<xs:complexType>
			<xs:sequence>
				<xs:any minOccurs="0"
maxOccurs="unbounded" namespace="##other" processContents="strict"/>
			</xs:sequence>
			<xs:attribute name="validAtt"/>
			<xs:anyAttribute namespace="##other"
processContents="strict"/>
		</xs:complexType>
	</xs:element>
</xs:schema>

Attributes undeclared:invalid and justInvalid are not declared in the
schema above.
Element 	<zzz:invalid>ddd</zzz:invalid> wasn't declared either.
processContent is strict in both cases.


Thanx,
Max 














------------------------------------------------------------------------------
"This communication, including any attachments, is confidential. If you are not the intended recipient, you should not read it - please contact me immediately, destroy it, and do not copy or use any part of this communication or disclose anything about it. Thank you."


==============================================================================
Received on Wednesday, 6 March 2002 17:53:06 GMT

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