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:10 UTC