Algorithm for merging the pattern facets in a base simpleType with a subtype?

"Costello, Roger L." <[email protected]>
Newsgroups gmane.text.xml.schema.devel
Message-ID <[email protected]>
Hi Folks,

Suppose that simpleType "A" is the base or simpleType "B":

------------------------------------
<xs:simpleType name="A">
    <xs:restriction base="...">
        ...
    </xs:restriction>
</xs:simpleType>
------------------------------------

------------------------------------
<xs:simpleType name="B">
    <xs:restriction base="A">
        ...
    </xs:restriction>
</xs:simpleType>
------------------------------------

Suppose that "A" contains one or more pattern facets:

------------------------------------
<xs:simpleType name="A">
    <xs:restriction base="...">
        <xs:pattern value="..." />
        ...
    </xs:restriction>
</xs:simpleType>
------------------------------------

What patterns apply to "B"?

I believe there are only two cases to consider:

CASE 1: "B" does not have any pattern facets.

Therefore, the patterns that apply to "B" are the pattern(s) contained in "A". Do you agree?


CASE 2: "B" has one or more pattern facets.

The patterns in "B" must be a restriction of the patterns in "A". Therefore, the patterns that apply to "B" are just the patterns contained in "B". Effectively the patterns in "A" may be ignored. Do you agree?

/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.