Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: any validation for elements

From: "Michael Kay" <mike@--------.--->
To: "'Shlomo Yona'" <S.Yona@--.--->, <xmlschema-dev@--.--->
Date: 3/6/2007 9:26:00 PM
I think your interpretation is pretty close.
 
Why use strict? It's useful when you are writing a schema that you expect to
be imported into another schema. It says "at this point you can insert any
element that has been defined in the importing schema".
 
With lax, if you find an element that has a definition in the schema, then
you validate it according to that definition (that is, you validate the
whole subtree). There's some debate about what you do with elements that
don't have a definition in the schema, the usual view seems to be that you
carry on doing lax validation to the grandchildren and so on.
 
Michael Kay
http://www.saxonica.com/



  _____  

From: xmlschema-dev-request@w... [mailto:xmlschema-dev-request@w...] On
Behalf Of Shlomo Yona
Sent: 06 March 2007 15:56
To: xmlschema-dev@w...
Subject: xsd:any validation for elements



Hello,

 

I'm not sure that I'm clear about the parsing instructions for xsd:any. Your
help in interpretation of the standard is most appreciated:

 

The "skip" parser instruction in xsd:any says (I think) - only perform well
formedness and namespace checks but don't try to validate element names and
types.

The "lax" parser instruction in xsd:any says (I think) - same as skip but if
you encounter an element name that is defined in your schema, then validate
it against the schema.

The "strict" says (I think) - same as "lax" but if you don't know the
element name - it is a validation error.

 

The following things make me think that I misinterpret the standard
correctly:

*	Why use "strict"? you might as well not defined your content group
as xsd:any. 

*	The "lax" confuses me because I'm not sure if when I encounter <a> I
should make sure that all its child elements and attributes conform with the
schema or just <a> itself with its attributes 

 

Actually, there are a few more unclear things, but I might resolve them if I
get the above stuff straight.

 

Thanks in advance for your help.

 

 

Shlomo.



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent