Hi Dave, See below.
Dave Pawson wrote: > On 24/10/05, George Cristian Bina <[EMAIL PROTECTED]> wrote: > > >> For nsName see >> >> http://www.relaxng.org/spec-20011203.html#IDAEBZR > >> As you see the ns attribute is not required, in the process of >> simplification if it is not present on name or on nsName then it is >> computed looking up the ancestor axis. > > OK, it is optional, and I've marked it as such. > Pragmatically, I don't expect to see an nsName elements without the > ns attribute though, > would you? Well, it is present like that two times in the Relax NG schema for Relax NG, see the "other" and "common-atts" named patterns. The common use for this is in constructs that define a name-class containing any name from other namespace than the current one. >> For parentRef see: >> http://www.relaxng.org/spec-20011203.html#IDASNZR > >> The proposed description: >> "Defines a reference to a named pattern in the parent grammar" seems >> close to the above. > This tells me what it refers to > >> While the current description: >> "Extends the scope of a named pattern to that of a pattern in >> the parent grammar" > > This tells me what that reference does... for my schema? > (though in all honesty I must confess to not understanding either of them?) > It's the 'scope' term that confuses me? > Eric also says, > > The parentRef pattern provides a way to extend this scope and refer to > a named pattern defined in the parent grammar. > >>From the example, it would appear to be re-using a pattern in this grammar > from a definition in the including grammar. > http://books.xmlschemata.org/relaxng/ch17-77195.html > > Does that make a more pragmatic definition? > > "Allows the re-use of a pattern from a grammar which includes the > current grammar, within > the current grammar" > E.g. if pattern A is included in grammar A, which includes grammar B > then grammar B may reference pattern A using > <parentRef name="A"/> > > I think that's it? > Any improvement? I would not emphasize the term re-use as that may imply that this is the only use case for parentRef. Imagine that you have the grammar that uses parentRef and this grammar is placed in a file and that it is referred using externalRef from two different parent grammars. Each of these two parent grammars must define the referred pattern but they can define it differently. So the parentRef in this case acts like calling an abstract pattern that is implemented/defined in the parent grammar. Maybe changing a little Eric's description like below? "Extends the scope of a pattern reference to that of a pattern in the parent grammar" (As I see it a parentRef does not affect the referred pattern so I would apply the action of the extends verb to the reference itself rather than to the referred pattern). Best Regards, George --------------------------------------------------------------------- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com ------------------------ Yahoo! Groups Sponsor --------------------~--> Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/2U_rlB/TM --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/rng-users/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
