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: error-checking algorithm for the redefinition


You're right.  You've found a bug in my proposal.  I described this as
pairwise syntactic combination of definitions.  But you've shown this
doesn't work.

<define name="a">x</>
<define name="a" combine="choice">y</>
<define name="a">..</>

As I described it, you would combine the first two into:

<define name="a" combine="choice">x|y</define>

But that's wrong, because it allows you to combine with the third, whereas
if you combined the first and last directly you would get an error.  This
means the spec will need to describe things a bit differently.

----- Original Message -----
From: "Kohsuke KAWAGUCHI" <kohsuke.kawaguchi@eng.sun.com>
To: <relax-ng@lists.oasis-open.org>
Sent: Wednesday, June 06, 2001 12:22 AM
Subject: 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                   kohsuke.kawaguchi@sun.com
>
>
> ------------------------------------------------------------------
> To unsubscribe from this elist send a message with the single word
> "unsubscribe" in the body to: relax-ng-request@lists.oasis-open.org
>
>
>



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


Powered by eList eXpress LLC