- From: Costello, Roger L. <costello@mitre.org>
- Date: Mon, 20 Jun 2011 07:25:30 -0400
- To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Michael Kay wrote: > In XSD 1.1 therefore the usage has been > changed so that "derived" means "derived by restriction": so saying "A > is derived from B" is the same as saying "B is the base type of A", and > the new term "constructed from" is used for the more general relationship. Ah! That's it. Let's recap. Consider this LotteryNumbers simpleType: <xsd:simpleType name="LotteryNumbers"> <xsd:restriction> <xsd:simpleType> <xsd:list itemType="OneToNinetyNine"/> </xsd:simpleType> <xsd:length value="6"/> </xsd:restriction> </xsd:simpleType> LotteryNumbers "base type" is the anonymous list simpleType: <xsd:simpleType> <xsd:list itemType="OneToNinetyNine"/> </xsd:simpleType> LotteryNumbers is "constructed from" the named OneToNintyNine simpleType: <xsd:simpleType name="OneToNinetyNine"> <xsd:restriction base="xsd:positiveInteger"> <xsd:maxInclusive value="99"/> </xsd:restriction> </xsd:simpleType> Do you agree? Thus, this function: base-type(LotteryNumbers) returns <xsd:simpleType> <xsd:list itemType="OneToNinetyNine"/> </xsd:simpleType> And this function: constructed-from(LotteryNumbers) returns <xsd:simpleType name="OneToNinetyNine"> <xsd:restriction base="xsd:positiveInteger"> <xsd:maxInclusive value="99"/> </xsd:restriction> </xsd:simpleType> Do those seem like reasonable function names for a standard XSD function library? /Roger
Received on Monday, 20 June 2011 11:25:58 UTC