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

Re: XML Schema considered harmful?


xsd2schtrn.xsl
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


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.