[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 Thu, 2002-06-20 at 02:11, James Clark wrote: > > > 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. Sure :-) It's not because it's difficult or complex than it's usefull though (think of WXS for instance). > > 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. I guess it depends on the proportion of issues which will be raised during the conversion (will it be rather 10% or rather 90%). And I also guess that nobody can tell before such a tool is available... Thanks to carry on this task! Eric > > James > > -- See you in San Diego. http://conferences.oreillynet.com/os2002/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC