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: combine proposal



Just one point -- about the point 2.

> 2. Restrict combine="group" to cases where the order of the patterns being
> combined is irrelevant (eg two <attribute> patterns).

I think the function "allowsChildren" is difficult to implement although
possible to implement. Because it is sometimes impossible to
de-reference named pattern when we are processing combine="group".  

Consider the following example.

Grammar A:
<define name="X">
  <element />
</define>

<define name="Z" combine="group">
  <element/>
</define>



Grammar B:
<integrate href="A.rng"/>

<define name="X" combine="group">
  <ref name="Z" />
</define>

<define name="Z">
  <empty/>
</define>


Z is undefined when we are parsing combine="group". So if we want to
implement your proposal, combining of groups has to be postponed until
we read all patterns. Also, as you see, you have to be really careful
when checking this constraint otherwise you can't detect errors like
above.


This may not be a problem for JTREX --- just store all pattern pairs to
be tested and combine it first without error checking, then perform
actual error check at the last.

--
Kohsuke KAWAGUCHI                          +1 650 786 0721
Sun Microsystems                   kohsuke.kawaguchi@eng.sun.com



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


Powered by eList eXpress LLC