[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Re: Assignment no, dynamic scoping si (was: Re: RE

Subject: Re: Re: Assignment no, dynamic scoping si (was: Re: RE: Wishes for XSL revisions ...
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Thu, 3 Jan 2002 00:25:18 -0800 (PST)
 Re: Re: Assignment no
Wendell Piez <wapiez at mulberrytech dot com> wrote:

> Gunther,
> Is there a reason I missed why
> <xsl:template match='paragraph'>
>    <p class='ancestor-or-self::*[@source][last()]/@source'>
>      <xsl:apply-templates/>
>    </p>
> </xsl:template>
> wouldn't work for your example?
> (And just checking ... XPath experts ... 
> ancestor-or-self::*[@source][last()] will give me the *closest* 'source' 
> attribute on an ancestor or self ... not the most distant, won't it?)

Just to make it a little bit more precise -- in the original example it was said
only the "source" attribute of a "section" element was relevant:

"Every section represents one source in their world. On the
other hand, for reasons of the HTML CSS stylesheet, they need
the CSS class to be attached to every paragraph element in
the output."


"This template would only touch the section and paragraph elements
of bigbucksbooks and would leave everything else untouched."

So, the following XPath expression will evaluate exactly to the source of a


Dimitre Novatchev.

Do You Yahoo!?
Send your FREE holiday greetings online!

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.