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] Schematron and rule of least power (was Re: [xml-dev] 2007Predictions)

Yes, I agree that Schematron is a fine example of the Rule of Least Power 
well applied, though IMO not quite because it builds on existing standards 
like XSLT (a good thing for other reasons in any case).  I think the ROLP 
asks of a language like Schematron:  "if you send me a document or program 
in your language, can a straightforward tool extract the essence of what 
the document is conveying?"  If you send me a Schematron schema, can my 
tool easily grok the constraints that it is imposing?  In the case of 
Schematron, you have basically assert(XPath) and/or report(XPath).  XPath 
is a declarative language.  It doesn't take a lot of fancy reasoning or 
unbounded processing time to figure out what the meaning of an arbitrary 
XPath is.  So if I ask the question:  "Does Schematron Schema S report an 
error if any "A" elements have descendents named "B", you can usually 
answer that question quite easily.  If you were instead handed a 
Javascript, C or Java program that checked your XML, it would probably be 
a lot harder to answer that question.  So, that's why I think Schematron 
is indeed a fine example of the ROLP.

> And if this means that only low-order logic is used, or there 
> are some constraints that cannot be expressed, that is OK.

From the point of view of the ROLP, the use of low-order logic is more 
than OK or tolerable, it's a key advantage, I think.  FWIW, XML Schema 
content models are similarly "low power", and though I'm less expert with 
them, I expect the same is true of RelaxNG grammars.


Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142

Rick Jelliffe <rjelliffe@allette.com.au>
01/22/2007 02:30 AM
        To:     "'XML Developers List'" <xml-dev@lists.xml.org>
        cc:     (bcc: Noah Mendelsohn/Cambridge/IBM)
        Subject:        [xml-dev] Schematron and rule of least power (was 
Re: [xml-dev] 2007 Predictions)

noah_mendelsohn@us.ibm.com wrote:
> A key point is that information captured in declarative form is 
> much easier to extract and repurpose than information encoded 
> procedurally. 
> These points are all made somewhat more carefully in the recent TAG 
> finding titled: "The Rule of Least Power"[1]. 
Off-topic, but Schematron fits in pretty exactly with the Rule of Least 
Power, at least
if it is understood to be related to Tim Bray's "The Minimum to Declare 
Victory" and the Agile/Extreme "YAGNI" principle.

It comes down to habit of thought. If you made a constraint language for 
the web, what would you do?:

1) Invent the perfect language, allowing all sorts of edge cases and 
computer-theoretical completeness, with your own syntax and higher-order 
logic.  (I think this is the XLinkIt approach.)

2) Refuse to re-invent any wheels: look at XSLT stylesheets made for the 
purpose of validating, then abstract out all the XSLT-specific 
machinery, so that what was left was as declarative as possible. And if 
this means that only low-order logic is used, or there are some 
constraints that cannot be expressed, that is OK.

Rick Jelliffe


XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php

[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