Jump to content

Creating an href to next and previous sibling


yoshimura

Recommended Posts

Hey there,I'm trying to create a link: one that select the previous sibling (not all) and one that selects the next sibling (not all).I think there's something wrong with the axis part part.Edit: Oooh! I forgot to mention that it's in relation to the current node.

 <xsl:template match="/Lexpress/*">	 <br/> | <a href="{preceding-sibling::1}">Previous</a> | <a href="{follwing-sibling::1}">Next</a> |	 <hr/>	 <xsl:apply-templates select="@* | node()"/> </xsl:template>

Link to comment
Share on other sites

Instead of

preceding-sibling::1

use

preceding-sibling::*[1]

same for the following ones.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...