W3C home > Mailing lists > Public > public-xml-schema-testsuite@w3.org > December 2008

RE: question regarding test case msData/wildcards/wildZ006

From: Michael Kay <mike@saxonica.com>
Date: Tue, 30 Dec 2008 09:45:29 -0000
To: "'Tobias Koenig'" <tobias.koenig@trolltech.com>, <public-xml-schema-testsuite@w3.org>
Message-ID: <772F147EC70B44269F01716EF8D9B80F@Sealion>

> 				<xsd:any namespace="##other" 
> processContents="lax" maxOccurs="100"/>
> 
> ... so the schema says that <foo> can contain any element that is 
> not in namespace "urn:target".

No, it say that <foo> can contain any element that is in a namespace other
than "urn:target". An element that is in no namespace does not match a
##other wildcard. Well-known gotcha, a consequence of XSD's rigid adherence
to the unfortunate rule that the "null namespace" is not considered to be a
namespace.

More technically, ##other leads to a Wildcard schema component in which the
{namespace constraint} is "not urn:target", and the validation rule
"Validation Rule: Wildcard allows Namespace Name" clause 2 then says the
namespace is valid only if (clause 2.3) it is not .absent.

Michael Kay
http://www.saxonica.com/
Received on Tuesday, 30 December 2008 09:46:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 30 December 2008 09:46:09 GMT