OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   XSD question

[ Lists Home | Date Index | Thread Index ]

First, is there any mailing list dedicated to just W3C schema questions? I
may have a few in the near future and don't want to clutter up xml-dev. 

My question us about the use of processContents="lax" with xs:any. The
schema Rec part 1 says that for a processContents value of "lax", "If the
item, or any items among its [children] if it's an element information item,
has a uniquely determined declaration available, it must be ·valid· with
respect to that definition, that is, ·validate·  where you can, don't worry
when you can't." I was trying to use a combination of xs:any elements and
more specific declarations write a schema that would accept any document,
validating only certain elements if they were found, *wherever* they were
found. I can do this in RELAX NG, but I'm giving up hope on doing it in XSD,
and I think it's because of the "[children]" (as opposed to descendants)
part above. 

Let's say I declare element alpha to have a sequence of one or more xs:any
children with processContents="lax". Then I declare element beta to have a
specific content model. I can put beta elements and anything else as
children of alpha, and if any of those beta elements violate the declared
content model, a schema-validating parser will flag it as an error. However,
if a beta element that violates the declared content model is a *grandchild*
of alpha instead of being a direct child, the schema-validating parser isn't
supposed to flag it. 

Do I understand this correctly?

thanks,

Bob DuCharme          www.snee.com/bob           <bob@  
snee.com>  "The elements be kind to thee, and make thy
spirits all of comfort!" Anthony and Cleopatra, III ii





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS