|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Schematron and rule of least power (was Re: 2007
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 -------------------------------------- Noah Mendelsohn IBM Corporation One Rogers Street Cambridge, MA 02142 1-617-693-4036 -------------------------------------- Rick Jelliffe <rjelliffe@a...> 01/22/2007 02:30 AM To: "'XML Developers List'" <xml-dev@l...> cc: (bcc: Noah Mendelsohn/Cambridge/IBM) Subject: Schematron and rule of least power (was Re: 2007 Predictions) noah_mendelsohn@u... wrote: > A key point is that information captured in declarative form is typically > 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. Cheers 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@l... subscribe: xml-dev-subscribe@l... 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] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Cast Your Vote
We need your help – Vote for DataDirect XML Products!
Winners and finalists announced at SOA World Conference in November. 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
|
|||||||||







