[yelp-xsl] mal-link: Get rid of unnecessary keys



commit 4ed5e73d2e3dee4b671665add38afce99b7596b0
Author: Shaun McCance <shaunm gnome org>
Date:   Wed Jan 25 19:33:28 2012 -0500

    mal-link: Get rid of unnecessary keys
    
    I already had mal.cache.link.key to get any sort of link
    element from the cache. There was no need to introduce
    special keys for topic, guide, and seealso links.

 xslt/mallard/common/mal-link.xsl |   33 +++------------------------------
 1 files changed, 3 insertions(+), 30 deletions(-)
---
diff --git a/xslt/mallard/common/mal-link.xsl b/xslt/mallard/common/mal-link.xsl
index bcd6368..63cf424 100644
--- a/xslt/mallard/common/mal-link.xsl
+++ b/xslt/mallard/common/mal-link.xsl
@@ -104,33 +104,6 @@ mal.facet.all.key
          use="''"/>
 
 
-<!--============================================================================
-mal.link.guide.key
--->
-<xsl:key name="mal.link.guide.key"
-         match="mal:page/mal:info/mal:link[ type = 'guide'] |
-                mal:section/mal:info/mal:link[ type = 'guide']"
-         use="@xref"/>
-
-
-<!--============================================================================
-mal.link.topic.key
--->
-<xsl:key name="mal.link.topic.key"
-         match="mal:page/mal:info/mal:link[ type = 'topic'] |
-                mal:section/mal:info/mal:link[ type = 'topic']"
-         use="@xref"/>
-
-
-<!--============================================================================
-mal.link.seealso.key
--->
-<xsl:key name="mal.link.seealso.key"
-         match="mal:page/mal:info/mal:link[ type = 'seealso'] |
-                mal:section/mal:info/mal:link[ type = 'seealso']"
-         use="@xref"/>
-
-
 <!--@@==========================================================================
 mal.link.prefix
 A prefix for link targets.
@@ -583,7 +556,7 @@ The output is a result tree fragment.  To use these results, call
   <xsl:copy-of select="$links"/>
   <xsl:variable name="linknodes" select="exsl:node-set($links)/*"/>
   <xsl:for-each select="$mal.cache">
-    <xsl:for-each select="key('mal.link.topic.key', $linkid)/../..">
+    <xsl:for-each select="key('mal.cache.link.key', concat('topic:', $linkid))/../..">
       <xsl:variable name="linklinkid">
         <xsl:call-template name="mal.link.linkid"/>
       </xsl:variable>
@@ -727,7 +700,7 @@ The output is a result tree fragment.  To use these results, call
   <xsl:copy-of select="$links"/>
   <xsl:variable name="linknodes" select="exsl:node-set($links)/*"/>
   <xsl:for-each select="$mal.cache">
-    <xsl:for-each select="key('mal.link.guide.key', $linkid)">
+    <xsl:for-each select="key('mal.cache.link.key', concat('guide:', $linkid))">
       <xsl:variable name="source" select="../.."/>
       <xsl:variable name="linklinkid">
         <xsl:call-template name="mal.link.xref.linkid">
@@ -824,7 +797,7 @@ The output is a result tree fragment.  To use these results, call
   <xsl:copy-of select="$links"/>
   <xsl:variable name="linknodes" select="exsl:node-set($links)/*"/>
   <xsl:for-each select="$mal.cache">
-    <xsl:for-each select="key('mal.link.seealso.key', $linkid)/../..">
+    <xsl:for-each select="key('mal.cache.link.key', concat('seealso:', $linkid))/../..">
       <xsl:variable name="linklinkid">
         <xsl:call-template name="mal.link.linkid"/>
       </xsl:variable>



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