ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> xml-dev
xml-dev
Re: [xml-dev] XML Schema considered harmful?
by Eddie Robertsson other posts by this author
Jun 5 2002 5:40AM messages near this date
Re: [xml-dev] XML Schema considered harmful? | Re: [xml-dev] XML Schema considered harmful?
Hi,

>  To my mind, the bigger issue to decide is how many schema langauges
>  the IETF want appearing in RFCs. Simply allowing both means that RFC
>  readers have to learn both. And since RELAX NG focusses on structure,
>  what will be used to express content based co-constraints? Perhaps it
>  would be better to be arguing for DSDL.

As long as your application isn't highly time critical you can always embedd
Schematron rules within a RELAX-NG schema. Sun's MSV [1] will support
Schematron like rules in RELAX-NG schemas and I've just finished an
RNG2Schtrn.xsl [2] XSLT stylesheet that will extract Schematron rules from a
RELAX-NG schema and create a Schematron schema that can be used for validation.
It works similar to the XSD2Schtrn.xsl [3] stylesheet that extracts Schematron
rules from a W3C XML Schema with one difference:

1) Schematron rules in a RELAX-NG schema can appear anywhere between elements
in the RELAX-NG namespace (in W3C XML Schema they have to be declared inside
the xs:appinfo element)

Like the XSD2Schtrn.xsl stylesheet the RNG2Schtrn.xsl stylesheet will also
extract Schematron rules that are included in RELAX-NG modules from the main
RNG schema by either <include>  or <externalRef>.

I'm currently modifying my previous article on how to embedd Schematron rules
in W3C XML Schema to add a new section on how this is done in RELAX-NG and it
will be available shortly. If you're interested in embedding Schematron rules
in a RELAX-NG schema you can still have a look at the original article [4]
because the technique used for both W3C XML Schema and RELAX-NG is exactly the
same.

Cheers,
/Eddie

[1] http://wwws.sun.com/software/xml/developers/schematronaddon/
[2] http://www.topologi.com/public/Schtrn_XSD/RNG2Schtrn.zip
[3] http://www.topologi.com/public/Schtrn_XSD/XSD2Schtrn.zip
[4] http://www.topologi.com/public/Schtrn_XSD/Paper.html


-----------------------------------------------------------------
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> 
Thread:
Tim Bray
Michael Leditschke
Rick Jelliffe
Michael Leditschke
Rick Jelliffe
Cyril Jandia
Thomas B. Passin
Murali Mani
John Cowan
John Cowan
Eddie Robertsson
James Clark
Murali Mani
Simon St.Laurent
Don Park
Murali Mani
Joe English

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved