- From: Costello, Roger L. <costello@mitre.org>
- Date: Wed, 27 Apr 2011 05:41:20 -0400
- To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
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
Received on Wednesday, 27 April 2011 09:41:48 UTC