[gimp-help-2] Fix minor bug in generating <help-item>s



commit da92f1c88f5cd916ef5957ad7d0fef5b9f6508b8
Author: Ulf-D. Ehlert <ulfehlert svn gnome org>
Date:   Sat Jun 26 18:55:33 2010 +0200

    Fix minor bug in generating <help-item>s
    
    Getting the parent element was broken, and some entries appeared at
    the top level of the help browser's doc tree (bug reported via
    gimp-docs mailinglist by SimaMoto,RyÅ?Ta <rsimamoto src gnome org>).

 stylesheets/makeindex.xsl |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/stylesheets/makeindex.xsl b/stylesheets/makeindex.xsl
index fb1c99b..f6a425b 100644
--- a/stylesheets/makeindex.xsl
+++ b/stylesheets/makeindex.xsl
@@ -42,7 +42,7 @@
             </xsl:choose>
           </xsl:attribute>
           <xsl:attribute name="parent">
-            <xsl:value-of select="../@targetptr" />
+            <xsl:value-of select="ancestor::div[ targetptr][1]/@targetptr"/>
           </xsl:attribute>
         </help-item>
       </xsl:when>
@@ -110,14 +110,7 @@
           </xsl:choose>
         </xsl:attribute> <!--title-->
         <xsl:attribute name="parent">
-          <xsl:choose>
-            <xsl:when test="../@targetptr">
-              <xsl:value-of select="../@targetptr" />
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:value-of select="../../@targetptr" />
-            </xsl:otherwise>
-          </xsl:choose>
+          <xsl:value-of select="ancestor::*[ targetptr][1]/@targetptr"/>
         </xsl:attribute>
       </help-item>
     </xsl:if>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]