Re: xsd:any processContents strict

> 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 UTC