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] W3C schema, RelaxNG, and Schematron

[ Lists Home | Date Index | Thread Index ]

On mar, 2005-04-19 at 07:27 -0700, Dan Vint wrote:
> At 12:13 AM 4/19/2005, Eric van der Vlist wrote:
> >On lun, 2005-04-18 at 10:16 -0700, Dan Vint wrote:
> >
> >.../...
> >
> > > 4) The extension methods should be supported at least by the core tools on
> > > Java and MS platforms. So we test with Xerces-J and MS-XML parsers.
> >
> >Since MSXML does not support RELAX NG, that means that if you were using
> >RNG, you'd be using it to generate W3C XML Schema, doesn't it?
> 
> Ok hadn't considered that, but right now I'm searching for any ideas. Is 
> there a parser that works in the MS environment that supports RNG? It would 
> be best if it was the MS tool, but as long as there is something that plugs 
> into their environment that would work as well.

You'll find some validators for the MS environment listed at
http://relaxng.org/#validators, but, working almost exclusively on
Linux, I have never got the opportunity to use them.

> > > We have not found a way to do all of the above, we can answer different
> > > parts but  not all the requirements. We essentially have two approaches
> > > currently and would like to find the ultimate solution that answered 
> > all of
> > > the above. I'm wondering  if RelaxNG or Schematron might help some of this
> > > without creating too much of a burden maintaining these other environments.
> >
> >If you need to limit yourselves to using RNG as an authoring language to
> >generate WXS schemas, that won't buy you the support of non
> >deterministic models that you're mentioning below.
> >
> >.../...
> >
> > > Any ideas?
> >
> >You could explore the fact that XML schemas are XML documents and can be
> >generated. Bob DuCharme has published a nice description of some of the
> >things you can do in this domain:
> >http://www.snee.com/xml/schemaStages.html
> 
> Our schemas are actually generated fro a core model/design. I don't have 
> the extension information because that will change with the members. If I 
> could plug "any" into the right spots I could generate a schema for that 
> purpose and use our current design for the tight validation.

Here, using RELAX NG instead of W3C XML Schema would help since RNG has
none of the limitations related to deterministic data models. In other
words, you could plug the "any" content models in the right spots with
almost no restrictions at all.  

> >Also, you could consider doing double validations (ie a validation
> >against the core schema and a validation against the derived schema).
> >That would give you more flexibility than using the derivation methods
> >allowed by W3C XML Schema; you could leave the schema designer do miore
> >or less what he/she wants assuming you'd always be validating to the
> >core schema in addition to validating against the derived one.
> 
> What you are describing is what I hoped RNG or schematron would do form me. 

RNG's derivations are very different from WXS ones; so different that
it's not easy to do the comparison.

There is no such thing as derivation by restrictions in RNG, OTH you can
redefine a pattern without any control and can thus do the equivalent of
redefinitions by restrictions or extensions but won't have the control
that WXS provides. That's much more flexible but you don't have any
control.

You can also combine existing patterns with new ones either by choice or
by interleave and that gives you results that can't be achieved with
WXS. WXS derivation by extension would be in RNG terms a "combine by
group" but this is a feature that doesn't exist!

Schematron is more complementary to WXS or RNG than a competition. 

> Maybe I could push one of the two validation requirements over to one of 
> the other tools.
> 
Yes, that would be an option.
> 
> >Finally, you can apply schemas to W3C XML schemas. These schemas can use
> >any schema languages (you could restrict the W3C XML Schema schema for
> >WXS, but also the RELAX NG one for WXS or write Schematron constraints
> >to check your good practices).
> 
> Schematron and/or XSLT seem to be the way for managing the business rules 
> or internal constraints. I'll be researching that aspect soon, I was hoping 
> that one of these tools might have some added advantage that I wasn't aware of.

What I meant is that you can apply business rules to your schemas (for
instance if you were using the very flexible redefinition mechanism of
RNG), not only to your instance documents...

Eric

-- 
Le premier annuaire des apiculteurs 100% XML!
                                                http://apiculteurs.info/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------





 

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

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