[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)
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) <= ../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) <= ../table/@cols" Function calls using parenthesis for arguments: count(td) In-fix comparators: <= Entity references using &: < 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) <= ../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! 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
|