On 24/10/05, George Cristian Bina <[EMAIL PROTECTED]> wrote:
> >> For nsName see
>
> 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.
<element>
<anyName>
<except>
<nsName ns="http://www.dpawson.co.uk/rss/ns#"/>
<nsName ns="http://www.dpawson.co.uk/rss/rlns#"/>
<nsName/>
</except>
</anyName>
(this is my only use)
:-) Ditto. OK. Point taken.
>
> >> 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?
>
> 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'?
<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
------------------------ Yahoo! Groups Sponsor --------------------~-->
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/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/