Re: error-checking algorithm for the redefinition

From
Kohsuke KAWAGUCHI <>
Date
2001-06-05T17:24:16+00:00
ID
Thread
Re: error-checking algorithm for the redefinition
> > fields of RefPattern (of JTREX)
> > -------------------------------
> >
> > combineMethod: (none/interleave/choice)
> >     specifies what method is used to combine patterns.
> >
> > haveHead: boolean
> >     true if this named pattern already has a "head".
> >     a "head" is a <define> declaration without @combine.
> 
> Why do you need haveHead? Isn't haveHead true iff the ref is defined and
> combineMethod="none"?

No.

A.rng
<define name="foo" combine="choice"/>

After parsing the above definition, combineMethod="choice" and ref is
defined, but haveHead is false.

Then if we see the next definition,

<define name="foo"/>

combineMethod is still "choice" and ref is defined, and this time
haveHead is changed to true.

So I think we need three fields.


--
Kohsuke KAWAGUCHI                          +1 650 786 0721
Sun Microsystems