OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: RE: [relax-ng] converting relax ng schema to w3c schema?



> On Wed, 2002-06-19 at 23:35, Michael Fitzgerald wrote:
>> Future plans for Trang [http://www.thaiopensource.com/relaxng/trang.html]
>> include an output module for XML Schema.

I am implementing this at the moment.

> The problem with this approach is that Relax NG is more "free style"
> than W3C XML Schema and that many Relax NG schemas cannot be easily
> translated into WXS.

If it was easy, it wouldn't be any fun.

> In other words, if you want to be compatible with both technologies, WXS
> will be the limiting factor and you need to take it into account first.

I don't agree.  It's the job of the user to express their intent as simply 
and clearly as possible; RELAX NG is ideal for this.  It's the job of the 
machine to go through all the bizarre contortions that are required to turn 
this into a W3C XML Schema.  If the user writes something that cannot be 
expressed in W3C XML Schema, then the machine should do what a human would 
do: find the constructs that permits everything that they want to permit 
and permits as few things as possible that they don't want to permit.   For 
example, if a user wants a choice of attribute A or attribute B, then they 
should express that intent in RELAX NG.  The machine can tell that this 
cannot be expressed in W3C XML Schema, can inform the user of this and turn 
it into optionally attribute A and optionally attribute B.  One could even 
imagine it automatically generating an annotation containing a Schematron 
rule that checked that exactly one of A and B was present.  When W3C XML 
Schema 1.1 or 2.0 adds support for this, they will be able to take 
advantage of this without changing their schemas.

Completely realizing the above vision is no trivial task and the first 
version of XSD support in Trang will fall short in many ways.  However, I 
think it's important not to get too hung up on technical details that to 
most users are obscure and unimportant.  Many users make relatively simple 
use of schemas.

James



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC