W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2006

Re: xsd:any processContents strict

From: Sandy Gao <sandygao@ca.ibm.com>
Date: Wed, 25 Jan 2006 09:38:27 -0500
To: Bryan Rasmussen <brs@itst.dk>
Cc: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Message-ID: <OFF1BE2601.49EB943D-ON85257101.004F1B9B-85257101.00507097@ca.ibm.com>
> If I send an instance to a validator and it encounters content it does 
not
> understand it is up to the processor if it defaults to validate strict, 
lax,
> skip....

Lax or skip, not strict. See [1].

> But if I have an xsd:any and set the processContents to be strict then 
the
> processor must follow the strict validation model for everything that 
within
> the element that can hold 'any', correct? Or is it just that the child
> elements of the element that can hold any must be processed strict?

If an element matches <xsd:any processContents="strict">, then either an 
element declaration or a type definition must be found to validate such 
element. If none can be found, it's a validation error on the *parent* 
element, not the element itself. If this happens, the element may be laxly 
assessed, also see [1]. This doesn't affect content (sub-elements or 
attributes) of this element.

[1] http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#key-lva

Thanks,
Sandy Gao
XML Parser Development, IBM Canada
(1-905) 413-3255
sandygao@ca.ibm.com
Received on Wednesday, 25 January 2006 14:38:39 GMT

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