W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2011

I recommend the following changes to XML Schema simpleType facets

From: Costello, Roger L. <costello@mitre.org>
Date: Fri, 22 Apr 2011 12:51:54 -0400
To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Message-ID: <9E51F88D5247B648908850C35A3BBB50053922EA3D@IMCMBX3.MITRE.ORG>
Hi Folks,

I recommend the following changes to XML Schema simpleTypes.

1. Each simpleType may have only one enumeration facet. The value of its "value" attribute can be a list of pipe-separated values. E.g., do not do this:

<simpleType name="Colors">
    <restriction base="string">
        <enumeration value="red" />
        <enumeration value="white" />
        <enumeration value="blue" />
    </restriction>
</simpleType>

Instead, do this:

<simpleType name="Colors">
    <restriction base="string">
        <enumeration value="red|white|blue" />
    </restriction>
</simpleType>

2. If a simpleType contains multiple pattern facets, they should be AND-ed together (instead of OR-ed together).

3. If a simpleType contains multiple facets, they should be AND-ed together.

Here's why I recommend these changes: 

a. Uniform processing of multiple facets within a simpleType - all facets are AND-ed together. Today, some facets are OR-ed together while others are AND-ed together.

b. A simpleType dependency change can be "folded" (in the functional programming language sense - see Haskell's foldr and foldl functions) to yield a single, consolidated (merged) simpleType.

/Roger
Received on Friday, 22 April 2011 16:52:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 April 2011 16:52:22 GMT