changing context node within XPATH problem

John Fitzgibbon jfitzgibbon at
Thu Mar 11 10:33:33 EST 2004


As one moves through XPATH the context node changes. Is it possible to retrieve the node before the current XPATH expression for example

<xsl:for-each select="subject">

<xsl:value-of select="ancestor::book/preceding-sibling::book/subject[not(.=

I would now like to add the text value of the subject I had before beginning this XPATH expression. Is there an axis that will allow me to do this? I have other ways of solving this particular problem like passing the original subject as a parameter to a template but I thought there might be a more elegant way of solving such a problem.

Any ideas would be much appreciated.


More information about the xml4lib mailing list