- From: <noah_mendelsohn@us.ibm.com>
- Date: Sat, 24 Mar 2007 12:34:36 -0400
- To: "Pete Cordell" <petexmldev@tech-know-ware.com>
- Cc: xmlschema-dev@w3.org
- Message-ID: <OF5D7C8709.53C80F49-ON852572A8.0059BC0A-852572A8.005B0FC4@lotus.com>
Pete Cordell writes: > If not the default, then what I'm looking for is something like: > > notQName="##localElements" > > which does not conflict with any of the elements that have already been > defined in the particle (and non-elemental child particles, and parents of > non-elemental particles etc. etc.) Let me get this straight. You have a schema that validates instances like: <root> <l1a/> <l1b/> <l1c> <l2a> </l2a> <l2b> <l3a/> <l3b/> </l2b> <l2c> </l2c> </l1c> <l1d/> </root In case it's not clear, <lxy> decodes as nesting level=x. Presume these are defined with the obvious sequences and global element decls in the schema. Let's assume that type CT12b is the complex type of the element named "l1c". If I use a wildcard in that type: <complexType name="ctlic"> <sequence> <element ref="l12a"/> <element ref="l12b"/> <element ref="l12c"/> <any notQname="##defined"/> </sequence> </complesType> You want that wildcard to disallow <root> <l12a> <li12b> <l12c> and maybe <l13a> and <l13b> (not sure if you meant descendents or children), but you would not disallow <l1a> or <l1b> which are siblings? Let's take an example from the schema language itself. If we used an NIS wildcard in the declaration of the <xsd:sequence> element, for example, it would not match <xsd:element>, because that's already directly referenced as a legal child of <xsd:sequence>. It would, however, allow <xsd:import>, since that is neither a legal ancestor or declared descendent. So, it would validate: <xsd:sequence> <xsd:element ref="x"/> <xsd:import namespace="n"/> </xsd:sequence> Interestingly, I do not think it would validate <xsd:sequence> <xsd:element ref="x"/> <xsd:redefine ... /> </xsd:sequence> because I believe that <xsd:sequence> is a legal descendent of <xsd:redefine>. Is that really what you want? Could you please clarify what you think is desirable? Thank you. Noah -------------------------------------- Noah Mendelsohn IBM Corporation One Rogers Street Cambridge, MA 02142 1-617-693-4036 --------------------------------------
Received on Saturday, 24 March 2007 16:34:45 UTC