|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: (SOLVED) Re: xsl != not working?
Hi Joe, What I don't get is that you try to check the position of the h2 element by testing the text value of the element. I would guess something like: <xsl:if test="preceding::h2"> ... </xsl:if> You could prehaps split them up into two different templates: One: <xsl:template match="h2[not(preceding::h2]" name="h2_general"> <!-- Do the code that does not have a back-to-top link --> ... </xsl:template> <xsl:template match="h2"> <!-- This will match all that are not first in the hierarchy --> <!-- Do the code that creates a back-to-top link --> <xsl:call-template name="h2_general"/> </xsl:template> Untested! Regards, Ragulf Pickaxe :-) On 6/21/05, Joe Stump <joe@xxxxxxxxxxxx> wrote: > Doing: > > <xsl:if test="normalize-space(//h2[1]/text()) != normalize-space(text > ())"> > > Fixed it. Quite annoying ... > > --Joe > > On Jun 21, 2005, at 10:56 AM, Joe Stump wrote: > > > I've got a bunch of h2's in a document that I want to group at the > > top with jumps to the actual h2's in the body, which I have working > > without incident. The problem I have is with links back to the top. > > Basically, if it's NOT the first h2, it should show a "Back to Top" > > link above the h2. I have a test that appears to be exactly what I > > need, but it's not working. The basic test is: <Snip/> > > --Joe
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








