[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: [relax-ng] Combining RELAX NG Grammars
On Thu, 2003-01-02 at 17:02, John Cowan wrote: > Eric van der Vlist scripsit: > > > It's often the case with embedded structures (in programming languages) > > that each level inherits the definitions done in its "ancestors" (with > > the possibility to overide them) and I am wondering why this is not the > > case with Relax NG. > > I can't say specifically, but I've always considered this automatic > import to be a bug in Algol 60 that propagated to its intellectual descendants. > References to outer scopes should IMHO be explicit ones. That's a strong POV :-) ... > > Also, while it is possible to refer to named patterns of the parent > > grammar, it doesn't seem to be possible to refer to named patterns of > > other ancestors and I am wondering what's the reason for this. > > I proposed this at the time, but it was difficult to find use cases > outside the simple parent-child relationship. Yes, I agree, but the whole point of nested grammars is to be a convenience to facilitate the combination of grammars and it's difficult to see the full scope in which it will be used... I guess that if this was really needed, "relais" could be defined in each of the intermediate grammars to give access to named patterns in their parents like: grammar { my-pattern=... grammar { my-parent-pattern = parent my-pattern grammar { ... parent my-parent-pattern that's verbose and requires an adaptation of the intermediate grammars but should do the trick in some cases. Thanks Eric -- Curious about Relax NG? My book in progress is waiting for your review! http://books.xmlschemata.org/relaxng/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC