yoshimura Posted February 7, 2011 Share Posted February 7, 2011 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 More sharing options...
boen_robot Posted February 7, 2011 Share Posted February 7, 2011 Instead of preceding-sibling::1 use preceding-sibling::*[1] same for the following ones. Link to comment Share on other sites More sharing options...
yoshimura Posted February 7, 2011 Author Share Posted February 7, 2011 Thanks boen, it worked! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.