[Home] [By Thread] [By Date] [Recent Entries]
Hi, To combine two schemas in Relax NG to form a union one will use a choice of two externalRef patterns, each pointing to a schema. The externalRef basically creates a new context and pattern Y from one schema is different from pattern Y from the other, thus the union in your example will generate only {a z, b}. Best Regards, George -- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 19/01/17 19:28, Henry S. Thompson wrote: John Cowan <johnwcowan@g...> writes:On Wed, Jan 18, 2017 at 4:17 PM, Henry S. Thompson <ht@m...> wrote: I understood Murata to have proved for RELAX NG that given two XMLlanguages, each (weakly) generated by a RELAX NG schema, the union _of the languages_ would be generated by the union of the schemata.Indeed, the proof is trivial. Let a be the root pattern of schema A, and b be the root pattern of schema B. Then <choice><ref name="a"/><ref name="b"/></choice> matches any document that matches either a or b or both. And since there are no constraints on the subpatterns of a choice pattern other than those inherited from the context of the choice pattern (which here is null), all such patterns are valid.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |

Cart



