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

Re: (SOLVED) Re: xsl != not working?

Subject: Re: (SOLVED) Re: xsl != not working?
From: Ragulf Pickaxe <ragulf.pickaxe@xxxxxxxxx>
Date: Tue, 21 Jun 2005 22:22:59 +0200
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.