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


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] How to redesign W3C XML Schema (Water Contract)

[ Lists Home | Date Index | Thread Index ]

Correct, the Schematron example is more complex.  For example, you
didn't include the definition for 'tr' or the definition for 'table'.

The closest comparable for your snipet:
<rule context="tr"><assert test="count(td) &lt;=

Would be:
<maximum rest=rows.<for_each> value.<length/> </> />

Notice how the Schematron snipet has the following symbols
for encoding of various parts:

Elements: <assert .../>
String attributes that represent tags:  context="tr"
String attributes containing expressions:
   test="count(td) &lt;= ../table/@cols"
Function calls using parenthesis for arguments: count(td)
In-fix comparators: &lt;=
Entity references using &:  &lt;
Path separator using "/":  ../table/
Special symbol for marking an attribute: @cols

Here's the simple rules for Water:
Elements (calls): using <
Paths: use dot (.)

I know that many people on this list have been used
to the complexity for so long, that they forget how
difficult this stuff is to new users.  I've had people
that tell me that I cover more XML functionality in
20 minutes using Water, than 3-day courses that
they have taken in XML.


----- Original Message -----
From: "Rick Jelliffe" <ricko@allette.com.au>
To: "xml-dev" <xml-dev@lists.xml.org>
Sent: Wednesday, February 19, 2003 12:06 AM
Subject: Re: [xml-dev] How to redesign W3C XML Schema (Water Contract)

So Schematron's

<rule context="tr"><assert test="count(td) &lt;=

is more complex than Water's

<defclass table cols=rows.<max_length/> rows='from_content' />
<defmethod max_length>
 <maximum rest=rows.<for_each> value.<length/> </> />
<defclass table cols rows='from_content'
   _precond=<assert> .cols.<more_or_equal rows.<max_length/> </>


Rick Jelliffe

The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>


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

Copyright 2001 XML.org. This site is hosted by OASIS