On 12/03/17 18:18, Syd Bauman wrote:
I have altered the P5/Scripts/purify.xml to turn rng:interleave into <sequence preserveOrder="false">. My question for the group is "should I check it in"?
My answer is "no". The correct translation for rng:interleave into ODD is <interleave>. If we decide to remove that concept from the ODD language (as we seem rather hastily to have done) providing an alternative which doesn't mean the same thing is just silly. Whether or not you like <sequence preserveOrder=false> it's not the same as <interleave>. Redefining it to mean <interleave> would be just reintroducing the functionality we've already decided we don't want by a back door. Better by far to remove both of them. Better yet to keep it, and bring back interleave! Also, as far as I am aware, the purify.xsl script is intended for use when converting existing pre-5.0 ODD as used in the Guidelines source or ODDs referencing them to use the new syntax, not as a general purpose RNG conversion tool.
The Pure ODD @preserveOrder on <sequence> does not define which of these behaviors, or something else, is intended. AFAIK the plan is that the Stylesheets should produce <interleave> in the output RELAX NG schema, although they do not do so correctly yet.[1] (There is no equivalent construct in XML DTDs or W3C Schema 1.0, and I don't know about W3C Schema 1.1.)
Why do you think that "the plan is to produce <interleave>" ? Might an implementor not decide equally well to treat e.g. <sequence preserveOrder="false"> <elementRef key="foo"/><elementRef key="bar"/> </sequence> as a shortcut for <alternate> <sequence> <elementRef key="foo"/><elementRef key="bar"/> </sequence> <sequence> <elementRef key="bar"/><elementRef key="foo"/> </sequence> </alternate> With the obvious proviso that the number of possible children in the disordered sequence can't be greater than some manageable maximum.