I recommend the following changes to XML Schema simpleType facets

"Costello, Roger L." <[email protected]>
Newsgroups gmane.text.xml.schema.devel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.