XML Schema programming idiom: gathering up all the constraints on a simpleType

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

One activity that I frequently perform when processing XML Schemas is this:

     I have a simpleType and I need to know 
     all the constraints on it.

Example: consider this simpleType:

    <xsd:simpleType name="BostonAreaSurfaceElevation">
        <xsd:restriction base="elev:EarthSurfaceElevation">
            <xsd:minInclusive value="0"/>
            <xsd:maxInclusive value="120"/>
        </xsd:restriction>
    </xsd:simpleType>

What are all the constraints on it? Well, it identifies a base type, elev:EarthSurfaceElevation. That base type may contain some constraints that must be considered. Further, that base type may have a base type, which has a base type, etc. That entire dependency tree must be considered.

Determining all the constraints on a simpleType is an important programming idiom (at least, it is for my applications).

What would you name this programming idiom? I have been naming it "simpleType accumulated restrictions" but wonder if there is a better name? 

Even better, is there a functional programming language (e.g., Haskell) function that does this kind of activity, or an analogous activity?

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