[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: Issue: adding a shortcut for grammar-level inclusion
> The current grammar-level inclusion proposal allows us to write: > > <externalRef href="XHTML.rng"> > <start> > <ref name="div"/> > </start> > </externalRef> It is not intended to. Only grammar-level include's can contain <start>, and <externalRef> was propsed as an alternative name for the pattern-level include. What the proposal we adopted allows is: <grammar> <include href="XHTML.rng"> <start> <ref name="div"/> </start> </include> </grammar> Is that what you meant? > I believe this kind of simple references is quite common. > For this purpose, I'd like to propose an optional attribute "name" for > the <externalRef> element. > > > By using this attribute, the above pattern can be simply written as: > > <externalRef href="XHTML.rng" name="div"/> > > > Also, this makes <externalRef> look closer to <ref>. At the moment externalRef (pattern-level include) doesn't care what kind of pattern you reference; it might be a <grammar> pattern, or it might not. When externalRef has a name attribute, then it would have to be referencing a <grammar> pattern. One advantage of this proposal is an implementation one. With externalRef, it's easy for an implementation to maintain a table mapping URIs to patterns, so that it doesn't have to reread a a file every time it is externalRef'ed. Adding a name attribute wouldn't break this. However, for a grammar-level include, an implementation will typically need to reprocess the include every time it is encountered, because the included grammar gets merged with the including grammar. James
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC