You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by tv...@apache.org on 2009/12/05 04:25:38 UTC
svn commit: r887488 - /incubator/pivot/trunk/tutorials/xsl/tutorial.xsl
Author: tvolkert
Date: Sat Dec 5 03:25:36 2009
New Revision: 887488
URL: http://svn.apache.org/viewvc?rev=887488&view=rev
Log:
Fixes library-dependent XSLT bug
Modified:
incubator/pivot/trunk/tutorials/xsl/tutorial.xsl
Modified: incubator/pivot/trunk/tutorials/xsl/tutorial.xsl
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/xsl/tutorial.xsl?rev=887488&r1=887487&r2=887488&view=diff
==============================================================================
--- incubator/pivot/trunk/tutorials/xsl/tutorial.xsl (original)
+++ incubator/pivot/trunk/tutorials/xsl/tutorial.xsl Sat Dec 5 03:25:36 2009
@@ -56,14 +56,15 @@
<xsl:variable name="index" select="document('../www/index.xml')/document"/>
<xsl:variable name="id" select="@id"/>
+ <xsl:variable name="index-node" select="$index//document-item[@id=$id]"/>
<xsl:variable name="next-id">
<xsl:choose>
- <xsl:when test="$index//document-item[@id=$id]/document-item">
- <xsl:value-of select="$index//document-item[@id=$id]/document-item/@id"/>
+ <xsl:when test="$index-node/document-item">
+ <xsl:value-of select="$index-node/document-item/@id"/>
</xsl:when>
- <xsl:when test="$index//document-item[@id=$id]/following::document-item">
- <xsl:value-of select="$index//document-item[@id=$id]/following::document-item/@id"/>
+ <xsl:when test="$index-node/following::document-item">
+ <xsl:value-of select="$index-node/following::document-item/@id"/>
</xsl:when>
</xsl:choose>
</xsl:variable>