[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Is Schematron (using XPath 2.0) functionally a superset of
> > Since one of the major goals and benefits of Schematron is good > > diagnostics, reducing a content model to a regular > expression doesn't > > seem a particularly smart idea. > > The example below shows Schematron expressing data > requirements in a much more elegant and natural fashion than > XML Schemas. (1) you make it look as if you are answering my point. My point was about content models, that is, constraints on the sequence of element children, whereas your example has nothing to do with content models at all. (2) your XSDL solution to the problem you have set yourself is a very poor one. I would do it like this: <element name="latitude"> <simpleType> <restriction base="decimal"> <minInclusive value="-90"/> <maxInclusive value="+90"/> <pattern value=".*\.[0-9]{6}"/> </restriction> </simpleType> </element> (3) I don't think it's a good document design anyway. I cannot think of any legitimate reason for imposing the artificial restriction that the XML author should write 90.0 as 90.000000. There are many criticisms one can make of XML Schema, but I think it handles this particular requirement perfectly well. Michael Kay http://www.saxonica.com/
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|