Jeremy Quinn wrote:

yours code is quite different than mine because I use a different approach: this is the xml data I Xinclude in all files:

<structure>
<chapter><title>Index</title><href>index.html</href></chapter>
<chapter><title>Tools</title><href>tools.html</href></chapter>
<chapter><title>Parts</title><href>parts.html</href></chapter>
<chapter><title>Circuit</title><href>circuit.html</href></chapter>
<chapter><title>01</title><href>01.html</href></chapter>
<chapter><title>02</title><href>02.html</href></chapter>
<chapter><title>03</title><href>03.html</href></chapter>
<chapter><title>04</title><href>04.html</href></chapter>
<chapter><title>05</title><href>05.html</href></chapter>
<chapter><title>Links</title><href>links.html</href></chapter>
</structure>

and this is the xsl code wich generates the link rel things:

<!-- if this page is not the first, we write link rel=first and link rel=prev -->
<xsl:if test="not(//structure/chapter[1]/href=$myself)">
<link rel="first" href="{//structure/chapter[1]/href}" title="{//structure/chapter[1]/title}"/>
<link rel="prev" href="{//structure/chapter[href=$myself]/preceding-sibling::chapter[1]/href}" title="{//structure/chapter[href=$myself]/preceding-sibling::chapter[1]/title}"/>
</xsl:if>
<!-- if this page is not the last, we write link rel=last and link rel=next -->
<xsl:if test="not(//structure/chapter[last()]/href=$myself)">
<link rel="last" href="{//structure/chapter[last()]/href}" title="{//structure/chapter[last()]/title}"/>
<link rel="next" href="{//structure/chapter[href=$myself]/following-sibling::chapter[1]/href}" title="{//structure/chapter[href=$myself]/following-sibling::chapter[1]/title}"/>
</xsl:if>



bye! and thank you you example gave me inspiration (is it the correct english word? boh)

bye
as





---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to