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] XML Schema considered harmful?

[ Lists Home | Date Index | Thread Index ]


> 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


[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


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

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