[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: How to redesign W3C XML Schema (Water Contract)


xml schema water
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;=
../table/@cols"/></rule>

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.

_Mike

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



So Schematron's

<rule context="tr"><assert test="count(td) &lt;=
../table/@cols"/></rule>

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/> </> />
</defmethod>
<defclass table cols rows='from_content'
   _precond=<assert> .cols.<more_or_equal rows.<max_length/> </>
/>

?

Cheers
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>



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.