Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - RE: any validation for elements >Thread Next - Re: Attributes from a different namespace RE: any validation for elementsTo: "Michael Kay" <mike@--------.--->, <xmlschema-dev@--.---> Date: 3/6/2007 12:34:00 PM Hello, Thanks for the explanation. I understand. Also, I=92m happy you used the = tern =93the usual view=94 as it does seem that the standard has allowed = some room for different interpretations regarding how to process = =93lax=94. Do you agree with the exceptions mentioned with regards to xsi:type = mentioned in a previous reply to my question? Thanks. Shlomo. ________________________________ From: Michael Kay [mailto:mike@s...] Sent: =E2 06 =EE=F8=F5 2007 23:26 To: Shlomo Yona; xmlschema-dev@w... Subject: RE: any validation for elements 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/ =09 ________________________________ 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=92m not sure that I=92m clear about the parsing instructions for = xsd:any. Your help in interpretation of the standard is most = appreciated: The =93skip=94 parser instruction in xsd:any says (I think) =96 only = perform well formedness and namespace checks but don=92t try to validate = element names and types. The =93lax=94 parser instruction in xsd:any says (I think) =96 same as = skip but if you encounter an element name that is defined in your = schema, then validate it against the schema. The =93strict=94 says (I think) =96 same as =93lax=94 but if you = don=92t know the element name =96 it is a validation error. The following things make me think that I misinterpret the standard = correctly: * Why use =93strict=94? you might as well not defined your content = group as xsd:any. * The =93lax=94 confuses me because I=92m 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. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
