[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Whitespace normalization for union types

From: Xan Gregg <xan.gregg@jmp.com>
Date: Thu, 2 Jun 2005 09:50:06 -0400
Message-Id: <f62cac71c30a690442c4bf0729dec356@jmp.com>
Cc: www-xml-schema-comments@w3.org, Kasimier Buchcik <kbuchcik@4commerce.de>, xmlschema-dev@w3.org
To: ht@inf.ed.ac.uk (Henry S. Thompson)
Re: Whitespace normalization for union types

On Jun 2, 2005, at 8:10 AM, Henry S. Thompson wrote:
> [First, it has to be noted that the definition of Datatype Valid [1]
> is broken -- it implies that if there's a *pattern* facet, the string
> being checked need not be in the lexical space of the type!]

I noticed that, too, but assumed the missing part of the validation 
must be covered somewhere else...

> This actually interacts with an existing issue, regarding the
> semantics of a type allowed as the type of e.g. an attribute as part
> of a complex type derived by restriction from a base type with a
> restricted union for that attribute (whew!) -- example:
>
>  <xs:complexType name="base">
>   <xs:attribute name="foo" type="fooSubType"/>
>  </xs:complexType>
>
>  <xs:complexType name="restr">
>   <xs:attribute name="foo" type="xs:token"/>
>  </xs:complexType>
>
> Currently this is a) allowed but b) means that the restricted type
> allows _more_ than the base type, which is not supposed to happen.
>
> We should probably solve both these problems together (and the latter
> issue suggests we'll go in Xan's direction, that is, we'll push the
> facets down onto all the member types. . .)

I think a reasonable solution for this problem would be to disallow 
such restrictions when the union type is not a "pure" facetless union.  
Anything that breaks as a result is already broken (relying on a broken 
feature).  Such a solution would allow the pattern/union problem to be 
considered independently, possibly taking Kasimier's direction.

xan
Received on Thursday, 2 June 2005 13:50:09 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.