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: Issue: redefinition without the original



> > The <define> inside the include only replaces the definitions in C.rng,
not
> > the definitions in B.rng, so your example is equivalent to:
>
> That's what I wanted to hear. So the implementation is responsible to
> detect this as an error. Right?

Yes.

> I thought about this a little bit and reached the conclusion that it
> would be hard to implement.

Hmm.  How about this?

Have a redefinition field on a definition with 3 values:
a) this definition is not being redefined
b) this is being redefined and no original has yet been seen
c) this is being redefined and an original has been seen

When you see an <include>, first process the <define>s inside it; if the
current value of the redefinition field is a), process the definition
normally, add the definition to a temporary list associated with this
include, and set the redefinition flag to b).

Then process the hrefed file.

Then run over the temporary list; if there are any definitions with the
redefinition field equal to b), given an error.  In any case, change the
redefinition field back to a).

Normal processing of a definition: if the redefinition field is b), change
it to c) and ignore it; if the redefinition field is c), ignore it; if the
redefinition field is a), combine it according to the combine value.

James







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


Powered by eList eXpress LLC