[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

  • From: "Michael Kay" <mike@s...>
  • To: "'Costello, Roger L.'" <costello@m...>,<xml-dev@l...>
  • Date: Sun, 11 Nov 2007 15:22:04 -0000

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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.