W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2007

Re: Permit (greedy) conflicting wildcards

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 
> non-elemental particles etc. etc.)

Let me get this straight.  You have a schema that validates instances 


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">
               <element ref="l12a"/>
               <element ref="l12b"/>
               <element ref="l12c"/>
                   <any notQname="##defined"/>

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:element ref="x"/>
               <xsd:import namespace="n"/>

Interestingly, I do not think it would validate

               <xsd:element ref="x"/>
               <xsd:redefine ... />

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 Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
Received on Saturday, 24 March 2007 16:34:45 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:41 UTC