This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newbie] What is the problem with preceding::simplesect/@id ?


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:&#160;
 <a>
  <xsl:attribute name="href">
   <xsl:text>romans.php?book=</xsl:text>
   <xsl:value-of select="$filename"/>
   <xsl:text>&amp;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:&#160;
 <a>
  <xsl:attribute name="href">
   <xsl:text>romans.php?book=</xsl:text>
   <xsl:value-of select="$filename"/>
   <xsl:text>&amp;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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]