[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: [relax-ng-comment] Re: Circular includes/imports in RELAX NG
Hi James Thank you for the explanation: > In RELAX NG, definitions are named by a local name alone, not by a namespace > URI + local name. If you have two modules which reference each other and do > not fall into a hierarchy, then both those modules need to share the same > grammar. Thus the best you can do in your scenario is to have a root schema > that includes schemas a and b, and then manually manage the names of > definitions in a and b to ensure there is no conflict (or adopt some > convention to ensure no conflict). I recognize this is not ideal and would > like to have something better in RELAX NG 2.0 (though I haven't been able to > come up with a good solution yet). I understand that multiple includes of the same file in a "cluster" of schemas are not ok This means your suggestion to include multiply works for me, but the consequence is that dependencies must be managed externally. I would like to largely withdraw the allegation in my previous post of inconsistencies between Jing and MSV. They seem to treat whitespace the same (I got confused with the distinction between <text> and a regular-expression to do the equivalent in XSD). The nearest I can get to a counter-example illustrates your point about the schema namespace: Jing and MSV -strict reject (for like reasons), but MSV (non-strict) accepts the following as a valid schema ------------------------------------------------------------------------------- <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns:a="http://www.example.com/address" xmlns:ab="http://www.example.com/addressBook"> <start> <element name="example"> <zeroOrMore> <choice> <element name="ab:addressBook"><ref name="ab:addressBook"/></element> <element name="comment"><text/></element> </choice> </zeroOrMore> </element> </start> <define name="ab:addressBook"> <zeroOrMore> <element name="ab:card"> <element name="a:name"> <text/> </element> <element name="a:email"> <text/> </element> </element> </zeroOrMore> </define> </grammar> ------------------------------------------------------------------------------- However, further investigation revealed that MSV (non-strict) doesn't really use this "feature" (allowing URI + Local names) in an effective way. I look forward with keen anticipation to your arriving at a satisfactory solution, because my current project involves automated translation to RELAX NG (& XSD) of interdependent modules that may contain the occasional name-clash, and it would be really nice to be able to bring to bear the XML namespace machinery to resolve these clashes -- <spur> that can already be accomplished with XSD import! </spur> BTW: What are the issues / solution fragments? When is RELAX NG 2.0 coming? On a positive note, I would like to add that on this project I have found the interoperability and completeness of implementation of Jing and MSV -strict to be excellent, in contrast to the various XSD implementations. [In fact I am currently using MSV as my preferred validator for testing XSD schemas.] Daniel
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC