- From: Michael Leditschke <mike@ammd.com.au>
- Date: Wed, 19 Jun 2002 23:42:41 +1000
- To: "Jeni Tennison" <jeni@jenitennison.com>
- Cc: <xmlschema-dev@w3.org>
<snip /> > If you want to restrict the lexical representation, use a pattern as > well (or instead, but as well is better because it enables other > applications to get access to the enumerated values without having to > have a fairly sophisticated regular expression parser): > > <xs:simpleType name="AFewNumbers"> > <xs:restriction base="xs:decimal"> > <xs:enumeration value="1.2" /> > <xs:enumeration value="5.5" /> > <xs:pattern value="1\.2" /> > <xs:pattern value="5\.5" /> > </xs:restriction> > </xs:simpleType> > Hi Jeni. Thanks for the clarification. Its interesting to me that you added pattern facts and framed them in terms of restricting the *lexical* representation. I have thought of pattern as operating in the lexical space as well. However the REC seems slightly at odds with this. The definition of the pattern facet suggests it operates primarily in the lexical space, and thus affects the value space as a secondary effect. However the definition of a facets suggests it must operate primarily on the value space "A facet is a single defining aspect of a .value space.." I guess it comes down to interpretation of language - a problem with all specs - but to me a pattern is "a single defining aspect" of the lexical space, not the value space. In which case, shouldn't the definition of a facet be a bit broader (as it is by implication in the definition of a datatype)? Regards Michael
Received on Wednesday, 19 June 2002 09:43:13 UTC