This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
[newbie] What is the problem with preceding::simplesect/@id ?
- From: Thomas Dupouy <moz at gmx dot fr>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Mon, 25 Feb 2002 09:27:09 +0100
- Subject: [xsl] [newbie] What is the problem with preceding::simplesect/@id ?
- References: <95B3DC792A040C45807C9CFA11B7B1AF032B778F@OHISV4.nikonoa.net>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hello,
I'm new to xslt, and there are some problems I cannot understand. This
one : two navigation links following "simple sections" of an XML
docbook.
<!-- ----------------------- start ---------------------- -->
<tr><td align="left" nowrap="0">
Previous: 
<a>
<xsl:attribute name="href">
<xsl:text>romans.php?book=</xsl:text>
<xsl:value-of select="$filename"/>
<xsl:text>&section=</xsl:text>
<xsl:value-of select="preceding::simplesect/@id"/>
</xsl:attribute>
<xsl:value-of select="preceding::simplesect/title"/>
</a>
</td><td align="right" nowrap="0">
Next: 
<a>
<xsl:attribute name="href">
<xsl:text>romans.php?book=</xsl:text>
<xsl:value-of select="$filename"/>
<xsl:text>&section=</xsl:text>
<xsl:value-of select="following::simplesect/@id"/>
</xsl:attribute>
<xsl:value-of select="following::simplesect/title"/>
</a>
<!-- ----------------------- end ---------------------- -->
The problem is that if the "Next" link go well to the following
simplesect, and through chapters, the "Previous" link always give the
first simplesect of the current chapter, instead of just the preceding
simplesect. I'm using PHP4+Sablotron if it makes a difference.
Thanks in advance for your solutions.
Regards,
--
Thomas Dupouy
moz@gmx.fr
"J'ai lu dernièrement une préface (la préface de Mademoiselle La
Quintinie) où elle prétend qu'un vrai chrétien ne peut pas croire à
l'Enfer. Elle a de bonnes raisons pour vouloir supprimer l'Enfer."
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list