Hi Dave, >>>> For parentRef > > >>> >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 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. > > Which would be an error since I can't have two conflicting > patterns?
No because they can be in different scopes, see the sample from my previous reply. >> 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). > > > I find that too complex, basically unusable IMHO? > I've no idea how the scope impacts a grammar I'm defining? > > 'Allows a user to reference a pattern in the parent grammar'? That sounds ok to me, it sounds similar however with my initial description: "Defines a reference to a named pattern in the parent grammar". > <grin/> Still implies re-use? ... > But no, you are right, it could be first use too! > I.e. defined in parent but unused, referenced in this grammar. > > I'm going to play with that a little... if I can dream up a way of getting > it all to work! > > regards > -- > Dave Pawson > XSLT XSL-FO FAQ. > http://www.dpawson.co.uk 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/
