XML Schema Validation - Lax Validation Support

enrique_aeo used Ask the Experts™
Hi experts, i am reading about  XML Schema Validation
but i do not understand: Lax Validation Support.
can they support the definition and an example
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Information Architect
Top Expert 2006
lax validation is something that can happen on an xs:any element

xs:any indicates that a content model can have any content.
This "wildcard" can give hints about how to process the content, or validate the content, to the processor/parser

the attribute hinting this is teh processContents attribute
its value can be
skip: the parser will not try to perform any validation on te content, even if it knows the content restriction of the elements used as a child
strict: allthough the content of the element can be anything, the parser expects to find only elements it knows, so it can validate the content of the xs:any
lax: is in between. The parser will only validate the content of the child elements it knows and will skip validating the elements it is unaware of

<xs:element name="my-example">
         <xs:any processContents="lax"/>

the my-example element can have anything as a content.
Only the elements inside my-example, that are known to the schema processor (so described in teh schema)
will be validate, all others will be ignored for validation

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial