W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2003

RE: Restricting Wildcards

From: Ashok Malhotra <ashokma@microsoft.com>
Date: Wed, 26 Feb 2003 05:00:24 -0800
Message-ID: <E5B814702B65CB4DA51644580E4853FB03DA791B@red-msg-12.redmond.corp.microsoft.com>
To: "Henry S. Thompson" <ht@cogsci.ed.ac.uk>, "Dare Obasanjo" <dareo@microsoft.com>
Cc: <xmlschema-dev@w3.org>

I'm really confused about this now.  The base has an "any" that allows
one element.  The derived type replaces this with two elements.  How is
this a valid restriction?  I guess I'm missing a concept here.

All the best, Ashok

-----Original Message-----
From: Henry S. Thompson [mailto:ht@cogsci.ed.ac.uk] 
Sent: Wednesday, February 26, 2003 1:14 AM
To: Dare Obasanjo
Cc: xmlschema-dev@w3.org; www-xml-schema-comments@w3.org
Subject: Re: Restricting Wildcards

"Dare Obasanjo" <dareo@microsoft.com> writes:

> Is the following restriction valid: 
> BASE: 
> <xs:sequence minOccurs="0" maxOccurs="1"> 
>   <xs:any namespace="##any" processContents="skip" minOccurs="1"
> </xs:sequence> 
>      <xs:sequence minOccurs="0" maxOccurs="1"> 
>            <xs:element name="A" minOccurs="1" maxOccurs="unbounded" />

>            <xs:element name="B" minOccurs="1" maxOccurs="unbounded" />

>      </xs:sequence>
> 2 There is a complete *order-preserving* functional mapping from the
particles in the {particles} of R to the particles in the {particles} of
B such that all of the following must be true: 

> [Definition:]  A complete functional mapping is order-preserving if
each particle r in the domain R maps to a particle b in the range B
which follows (not necessarily immediately) the particle in the range B
mapped to by the predecessor of r, if any, where "predecessor" and
"follows" are defined with respect to the order of the lists which
constitute R and B. " 

Yup, that looks like a bug to me.  A similar problem would arise with
substitution groups, which are also an implicit disjunction, were it
not for the explicit statement that they are treated _as_ a
disjunction for checking restriction.  We should have said something
similar for wildcards.

I say 'bug' because I think it's clear the _intention_ was that this
should be valid -- certainly the set of valid instances of the
'derived' type def. is a (proper) subset of the set of valid instances
the base type def.

  Henry S. Thompson, HCRC Language Technology Group, University of
                      Half-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
 [mail really from me _always_ has this .sig -- mail without it is
forged spam]
Received on Wednesday, 26 February 2003 08:00:27 UTC

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