[yelp-xsl] [mal-link.xsl] Implement #first and #last implicit topic link groups



commit cf9a4b5ed38f6c34aece45f656639b881fa6e626
Author: Shaun McCance <shaunm gnome org>
Date:   Wed Jun 9 11:58:45 2010 -0500

    [mal-link.xsl] Implement #first and #last implicit topic link groups

 xslt/mallard/common/mal-link.xsl |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/xslt/mallard/common/mal-link.xsl b/xslt/mallard/common/mal-link.xsl
index b5eb525..835d15d 100644
--- a/xslt/mallard/common/mal-link.xsl
+++ b/xslt/mallard/common/mal-link.xsl
@@ -396,9 +396,16 @@ The output is a result tree fragment.  To use these results, call
     </xsl:call-template>
   </xsl:variable>
   <xsl:variable name="groups">
-    <xsl:value-of select="$node/@groups"/>
-    <xsl:if test="not(contains(concat(' ', $node/@groups, ' '), ' #default '))">
-      <xsl:text> #default</xsl:text>
+    <xsl:variable name="_groups" select="concat(' ', $node/@groups, ' ')"/>
+    <xsl:if test="not(contains($_groups, ' #first '))">
+      <xsl:text>#first</xsl:text>
+    </xsl:if>
+    <xsl:value-of select="$_groups"/>
+    <xsl:if test="not(contains($_groups, ' #default '))">
+      <xsl:text>#default </xsl:text>
+    </xsl:if>
+    <xsl:if test="not(contains($_groups, ' #last '))">
+      <xsl:text>#last </xsl:text>
     </xsl:if>
   </xsl:variable>
   <xsl:variable name="groupslist" select="str:split($groups)"/>



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