[yelp-xsl] mal2html-links: Strip links from descs in linkdivs



commit c613c13394c65bd22283de93fbf084a331109487
Author: Shaun McCance <shaunm gnome org>
Date:   Fri Nov 4 11:44:30 2011 -0400

    mal2html-links: Strip links from descs in linkdivs

 xslt/mallard/html/mal2html-links.xsl |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/xslt/mallard/html/mal2html-links.xsl b/xslt/mallard/html/mal2html-links.xsl
index 91061a6..34dd056 100644
--- a/xslt/mallard/html/mal2html-links.xsl
+++ b/xslt/mallard/html/mal2html-links.xsl
@@ -869,11 +869,26 @@ when determining which links to output.
         <xsl:text> &#x2014; </xsl:text>
       </span>
       <span class="desc">
-        <xsl:apply-templates mode="mal2html.inline.mode"
-                             select="$target/mal:info/mal:desc[1]/node()"/>
+        <xsl:variable name="desc">
+          <xsl:apply-templates mode="mal2html.inline.mode"
+                               select="$target/mal:info/mal:desc[1]/node()"/>
+        </xsl:variable>
+        <xsl:apply-templates mode="_mal2html.links.divs.nolink.mode"
+                             select="exsl:node-set($desc)"/>
       </span>
     </xsl:if>
   </a>
 </xsl:template>
 
+<xsl:template mode="_mal2html.links.divs.nolink.mode" match="*">
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates mode="_mal2html.links.divs.nolink.mode" select="node()"/>
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template mode="_mal2html.links.divs.nolink.mode" match="*[ href]">
+  <xsl:apply-templates mode="_mal2html.links.divs.nolink.mode" select="node()"/>
+</xsl:template>
+
 </xsl:stylesheet>



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