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 
> understand it is up to the processor if it defaults to validate strict, 
> skip....

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

> But if I have an xsd:any and set the processContents to be strict then 
> processor must follow the strict validation model for everything that 
> 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

Sandy Gao
XML Parser Development, IBM Canada
(1-905) 413-3255
Received on Wednesday, 25 January 2006 14:38:39 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:32 UTC