W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2008

RE: Validation errors on xsd:anyType

From: Michael Kay <mike@saxonica.com>
Date: Tue, 9 Dec 2008 22:53:22 -0000
To: "'Arshad Noor'" <arshad.noor@strongauth.com>, <xmlschema-dev@w3.org>
Message-ID: <B1B337A6CA13487D9AA669E12732A1CE@Sealion>


xs:anyType allows any content in any namespace.

The children are subjected to lax validation, which means that an error
could occur if there is an element declaration for <comment> and your
element doesn't match it; but if there is no element declaration, there
should be no error.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: xmlschema-dev-request@w3.org 
> [mailto:xmlschema-dev-request@w3.org] On Behalf Of Arshad Noor
> Sent: 09 December 2008 22:15
> To: xmlschema-dev@w3.org
> Subject: Validation errors on xsd:anyType
> 
> 
> Hi,
> 
> I have an element, <enml:SignerSignature> defined as <xsd:anyType>.
> 
> When I create an instance of the document, there is a 
> sub-element within it that is not qualified by any namespace:
> 
> 	<enml:SignerSignature>
> 		<comment> ......</comment>
> 		<ds:KeyInfo>....<ds:KeyInfo>
> 	</enml:SignerSignature>
> 
> NetBeans 6.x does not complain about this; but apparently 
> Microsoft's Visual Studio Express 2008 and the .NET 3.5 
> framework do about the <comment> element.
> 
> Who is right on this?  TIA.
> 
> Arshad Noor
> StrongAuth, Inc.
> 
Received on Tuesday, 9 December 2008 22:54:06 GMT

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