OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: [xml-dev] Is Schematron (using XPath 2.0) functionally a superset of XML Schemas?

> > 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">
        <restriction base="decimal">
           <minInclusive value="-90"/>
           <maxInclusive value="+90"/>
           <pattern value=".*\.[0-9]{6}"/>

(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

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS