Subject: Re: [xsl] (SOLVED) Re: [xsl] xsl != not working? From: Ragulf Pickaxe <ragulf.pickaxe@xxxxxxxxx> Date: Tue, 21 Jun 2005 22:22:59 +0200 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] (SOLVED) Re: [xsl] xsl != not, Joe Stump | Thread | RE: [xsl] xsl != not working?, Michael Kay |
RE: [xsl] function-available() prob, Arian Hojat | Date | Re: [xsl] xsl != not working?, Dimitre Novatchev |
Month |