[yelp-xsl] mal2html: Allow the role attribute on the links element



commit 854768f73aa2e1fbc84f30e25766ee5d49fd4ffb
Author: Shaun McCance <shaunm gnome org>
Date:   Thu Aug 1 09:59:31 2013 -0400

    mal2html: Allow the role attribute on the links element
    
    To accomplish this, the role parameter for mal.link.content
    now accepts a space-separated list of roles to try.

 xslt/mallard/common/mal-link.xsl      |   50 ++++++++++++++++++------------
 xslt/mallard/html/mal2html-api.xsl    |    1 +
 xslt/mallard/html/mal2html-gloss.xsl  |    1 +
 xslt/mallard/html/mal2html-inline.xsl |    1 +
 xslt/mallard/html/mal2html-links.xsl  |   55 +++++++++++++++++++++++---------
 xslt/mallard/html/mal2html-page.xsl   |    3 +-
 xslt/mallard/html/mal2html-ui.xsl     |    1 +
 7 files changed, 75 insertions(+), 37 deletions(-)
---
diff --git a/xslt/mallard/common/mal-link.xsl b/xslt/mallard/common/mal-link.xsl
index 73ef119..a9aec34 100644
--- a/xslt/mallard/common/mal-link.xsl
+++ b/xslt/mallard/common/mal-link.xsl
@@ -198,18 +198,20 @@ See *{mal.link.linkid} for more on link IDs.
 <!--**==========================================================================
 mal.link.content
 Output the content for a #{link} element.
-:Revision:version="3.4" date="2012-01-17" status="final"
+:Revision:version="3.10" date="2013-07-30" status="final"
 $node: The #{link} or other element creating the link.
 $action: The #{action} attribute of ${node}.
 $xref: The #{xref} attribute of ${node}.
 $href: The #{href} attribute of ${node}.
-$role: A link role, used to select the appropriate title.
+$role: A space-separated list of link roles, used to select the appropriate title.
 
 This template outputs the automatic text content for a link.  It should only
 be used for links that do not have specified content.  If ${xref} points to a
 valid page or section, the appropriate link title from that page or section
-will be selected, based on ${role}.  The %{mal.link.content.mode} mode will
-be applied to the contents of that title.  Stylesheets using this template
+will be selected, based on the list of roles in ${role}. The first role for
+which a matching link title is found will be used. Otherwise, the link title
+without a role is used, or the primary title. The %{mal.link.content.mode}
+mode is applied to the contents of that title.  Stylesheets using this template
 should map that mode to inline processing.
 
 This template first calls *{mal.link.content.custom} with the same arguments.
@@ -250,10 +252,18 @@ page or section cannot be found, ${xref} is used as the text content.
         <xsl:choose>
           <xsl:when test="$target">
             <xsl:variable name="titles" select="$target/mal:info/mal:title[ type = 'link']"/>
+            <xsl:variable name="realrole">
+              <xsl:for-each select="str:split($role)">
+                <xsl:variable name="thisrole" select="string(.)"/>
+                <xsl:if test="$titles[ role=$thisrole]">
+                  <xsl:value-of select="concat($thisrole, ' ')"/>
+                </xsl:if>
+              </xsl:for-each>
+            </xsl:variable>
             <xsl:choose>
-              <xsl:when test="$role != '' and $titles[ role = $role]">
+              <xsl:when test="$realrole != ''">
                 <xsl:apply-templates mode="mal.link.content.mode"
-                                     select="$titles[ role = $role][1]/node()"/>
+                                     select="$titles[ role = substring-before($realrole, ' ')][1]/node()"/>
               </xsl:when>
               <xsl:when test="$titles[not(@role)]">
                 <xsl:apply-templates mode="mal.link.content.mode"
@@ -289,12 +299,12 @@ page or section cannot be found, ${xref} is used as the text content.
 mal.link.content.custom
 Output the content for a custom #{link} element.
 :Stub: true
-:Revision:version="3.4" date="2012-01-17" status="final"
+:Revision:version="3.10" date="2013-07-30" status="final"
 $node: The #{link} or other element creating the link.
 $action: The #{action} attribute of ${node}.
 $xref: The #{xref} attribute of ${node}.
 $href: The #{href} attribute of ${node}.
-$role: A link role, used to select the appropriate title.
+$role: A space-separated list of link roles, used to select the appropriate title.
 
 This template is called by *{mal.link.content} to create content for custom
 links. Use this template to support the #{action} attribute or extended #{xref}
@@ -326,12 +336,12 @@ By default, it returns the string value of its input.  Stylesheets that use
 <!--**==========================================================================
 mal.link.tooltip
 Output a tooltip for a #{link} element.
-:Revision:version="3.4" date="2012-01-18" status="final"
+:Revision:version="3.10" date="2013-07-30" status="final"
 $node: The #{link} or other element creating the link.
 $action: The #{action} attribute of ${node}.
 $xref: The #{xref} attribute of ${node}.
 $href: The #{href} attribute of ${node}.
-$role: A link role, used to select the appropriate title.
+$role: A space-separated list of link roles, used to select the appropriate title.
 
 This template outputs a text-only tooltip for a link. If ${xref} points to a
 valid page or section, the text title from that page or section will be used.
@@ -408,12 +418,12 @@ tooltips may be provided for certain URI schemes.
 mal.link.tooltip.custom
 Output a tooltip for a custom #{link} element.
 :Stub: true
-:Revision:version="3.4" date="2012-01-17" status="final"
+:Revision:version="3.10" date="2013-07-30" status="final"
 $node: The #{link} or other element creating the link.
 $action: The #{action} attribute of ${node}.
 $xref: The #{xref} attribute of ${node}.
 $href: The #{href} attribute of ${node}.
-$role: A link role, used to select the appropriate title.
+$role: A space-separated list of link roles, used to select the appropriate title.
 
 This template is called by *{mal.link.tooltip} to create tooltips for custom
 links. Use this template to support the #{action} attribute or extended #{xref}
@@ -509,9 +519,9 @@ attributes containing slash or colon characters.
 <!--**==========================================================================
 mal.link.guidelinks
 Output the guide links for a page or section.
-:Revision:version="3.4" date="2011-11-01" status="final"
+:Revision:version="3.10" date="2013-07-30" status="final"
 $node: The #{page} or #{section} element to generate links for.
-$role: A link role, used to select the appropriate title, default #{"guide"}.
+$role: A space-separated list of link roles, used to select the appropriate title, default #{"guide"}.
 
 This template outputs all the guide links for a page or section, whether
 declared as guide links in the page or section or as topic links from another
@@ -581,10 +591,10 @@ The output is a result tree fragment.  To use these results, call
 <!--**==========================================================================
 mal.link.topiclinks
 Output the topic links for a page or section.
-:Revision:version="3.4" date="2011-11-01" status="final"
+:Revision:version="3.10" date="2013-07-30" status="final"
 $node: The #{page} or #{section} element to generate links for.
 $groups: The list of all valid link groups for ${node}.
-$role: A link role, used to select the appropriate title, default #{"topic"}.
+$role: A space-separated list of link roles, used to select the appropriate title, default #{"topic"}.
 
 This template outputs all the topic links for a guide page or section, whether
 declared as topic links in the page or section or as guide links from another
@@ -751,9 +761,9 @@ The output is a result tree fragment.  To use these results, call
 <!--**==========================================================================
 mal.link.seealsolinks
 Output the see-also links for a page or section.
-:Revision:version="3.4" date="2011-11-01" status="final"
+:Revision:version="3.10" date="2013-07-30" status="final"
 $node: The #{page} or #{section} element to generate links for.
-$role: A link role, used to select the appropriate title, default #{"seealso"}.
+$role: A space-separated list of link roles, used to select the appropriate title, default #{"seealso"}.
 
 This template outputs all the see-also links for a page or section, whether
 declared in the page or section or in another page or section.  It outputs
@@ -1018,9 +1028,9 @@ The output is a result tree fragment.  To use these results, call
 <!--**==========================================================================
 mal.link.sorttitle
 Output the sort title for a page or section.
-:Revision:version="3.4" date="2011-11-01" status="final"
+:Revision:version="3.10" date="2013-07-30" status="final"
 $node: The #{page} or #{section} element to output a sort title for.
-$role: A link role, used to select an appropriate link title.
+$role: A space-separated list of link roles, used to select the appropriate title.
 
 This template returns a sort title for a page or section as a normalized string.
 If ${node} defines a sort title in its #{info} element, the value of that title
diff --git a/xslt/mallard/html/mal2html-api.xsl b/xslt/mallard/html/mal2html-api.xsl
index 9da0c8e..60488ba 100644
--- a/xslt/mallard/html/mal2html-api.xsl
+++ b/xslt/mallard/html/mal2html-api.xsl
@@ -129,6 +129,7 @@ the synopsis.
                   <xsl:call-template name="mal.link.tooltip">
                     <xsl:with-param name="node" select="$node"/>
                     <xsl:with-param name="xref" select="$link/@xref"/>
+                    <!-- FIXME: role -->
                   </xsl:call-template>
                 </xsl:attribute>
                 <xsl:value-of select="$function/api:name"/>
diff --git a/xslt/mallard/html/mal2html-gloss.xsl b/xslt/mallard/html/mal2html-gloss.xsl
index f6e908d..5305067 100644
--- a/xslt/mallard/html/mal2html-gloss.xsl
+++ b/xslt/mallard/html/mal2html-gloss.xsl
@@ -77,6 +77,7 @@ include a link to their defining page.
                 <xsl:attribute name="title">
                   <xsl:call-template name="mal.link.tooltip">
                     <xsl:with-param name="xref" select="@xref"/>
+                    <xsl:with-param name="role" select="'gloss:page'"/>
                   </xsl:call-template>
                 </xsl:attribute>
                 <xsl:call-template name="mal.link.content">
diff --git a/xslt/mallard/html/mal2html-inline.xsl b/xslt/mallard/html/mal2html-inline.xsl
index f42dee5..eff82f6 100644
--- a/xslt/mallard/html/mal2html-inline.xsl
+++ b/xslt/mallard/html/mal2html-inline.xsl
@@ -119,6 +119,7 @@ an #{xref} or #{href} attribute.
           <xsl:attribute name="title">
             <xsl:call-template name="mal.link.tooltip">
               <xsl:with-param name="node" select="$node"/>
+              <xsl:with-param name="role" select="$node/@role"/>
             </xsl:call-template>
           </xsl:attribute>
           <xsl:apply-templates mode="mal2html.inline.content.mode" select="$node"/>
diff --git a/xslt/mallard/html/mal2html-links.xsl b/xslt/mallard/html/mal2html-links.xsl
index 67b494e..c7b6254 100644
--- a/xslt/mallard/html/mal2html-links.xsl
+++ b/xslt/mallard/html/mal2html-links.xsl
@@ -45,11 +45,11 @@ Mallard links element and implicitly.
 <!--**==========================================================================
 mal2html.links.links
 Output links in one of a number of formats.
-:Revision:version="3.4" date="2012-02-24" status="final"
+:Revision:version="3.10" date="2013-07-30" status="final"
 $node: A #{links}, #{page}, or #{section} element to link from.
 $depth: The depth level for the HTML header element.
 $links: A list of links, as from a template in !{mal-link}.
-$role: A link role, used to select the appropriate title.
+$role: A space-separated list of link roles, used to select the appropriate title.
 $divs: Whether to default to divs instead of a list.
 $title: A default title to use if no #{title} element is found.
 
@@ -246,9 +246,9 @@ parameter will be used if provided.
 <!--**==========================================================================
 mal2html.links.ul
 Output links in an HTML #{ul} element.
-:Revision:version="1.0" date="2011-06-15" status="final"
+:Revision:version="3.10" date="2013-07-30" status="final"
 $links: A list of links, as from a template in !{mal-link}.
-$role: A link role, used to select the appropriate title.
+$role: A space-separated list of link roles, used to select the appropriate title.
 $bold: Whether to bold the link titles.
 $nodesc: Whether to omit descriptions.
 
@@ -281,10 +281,10 @@ This template handles link sorting.
 <!--**==========================================================================
 mal2html.links.ul.li
 Output a list item with a link.
-:Revision:version="1.0" date="2011-06-15" status="final"
+:Revision:version="3.10" date="2013-07-30" status="final"
 $link: The #{link} element from a list of links.
 $xref: An #{xref} string pointing to the target node.
-$role: A link role, used to select the appropriate title.
+$role: A space-separated list of link roles, used to select the appropriate title.
 $bold: Whether to bold the link titles.
 $nodesc: Whether to omit descriptions.
 
@@ -319,6 +319,7 @@ a link for each target.
         <xsl:attribute name="title">
           <xsl:call-template name="mal.link.tooltip">
             <xsl:with-param name="xref" select="$xref"/>
+            <xsl:with-param name="role" select="$role"/>
           </xsl:call-template>
         </xsl:attribute>
         <xsl:call-template name="mal.link.content">
@@ -369,12 +370,13 @@ the links itself. They must be passed in with the ${links} parameter.
       </xsl:otherwise>
     </xsl:choose>
   </xsl:variable>
+  <xsl:variable name="role" select="$node/self::mal:links/@role"/>
   <xsl:if test="$links">
     <xsl:call-template name="mal2html.links.links">
       <xsl:with-param name="node" select="$node"/>
       <xsl:with-param name="depth" select="$depth"/>
       <xsl:with-param name="links" select="$links"/>
-      <xsl:with-param name="role" select="'guide'"/>
+      <xsl:with-param name="role" select="concat($role, ' guide')"/>
       <xsl:with-param name="title">
         <xsl:call-template name="l10n.gettext">
           <xsl:with-param name="msgid" select="'More Information'"/>
@@ -475,6 +477,7 @@ element containing ${node}.
 <xsl:template name="mal2html.links.section" match="mal:links[ type = 'section']">
   <xsl:param name="node" select="."/>
   <xsl:param name="depth" select="count($node/ancestor-or-self::mal:section) + 2"/>
+  <xsl:variable name="role" select="$node/self::mal:links/@role"/>
   <xsl:variable name="style" select="concat(' ', $node/@style, ' ')"/>
   <xsl:variable name="sectdepth">
     <xsl:choose>
@@ -519,6 +522,7 @@ element containing ${node}.
           <xsl:call-template name="_mal2html.links.section.ul">
             <xsl:with-param name="node" select="$node/.."/>
             <xsl:with-param name="depth" select="number($sectdepth)"/>
+            <xsl:with-param name="role" select="$role"/>
           </xsl:call-template>
         </div>
       </div>
@@ -530,11 +534,12 @@ element containing ${node}.
 <xsl:template name="_mal2html.links.section.ul">
   <xsl:param name="node"/>
   <xsl:param name="depth"/>
+  <xsl:param name="role"/>
   <ul>
     <xsl:for-each select="$node/mal:section">
       <xsl:call-template name="mal2html.links.ul.li">
         <xsl:with-param name="xref" select="concat(/mal:page/@id, '#', @id)"/>
-        <xsl:with-param name="role" select="'section'"/>
+        <xsl:with-param name="role" select="concat($role, ' section')"/>
       </xsl:call-template>
       <xsl:if test="$depth > 1 and mal:section">
         <li class="links">
@@ -542,6 +547,7 @@ element containing ${node}.
             <xsl:call-template name="_mal2html.links.section.ul">
               <xsl:with-param name="node" select="."/>
               <xsl:with-param name="depth" select="$depth - 1"/>
+              <xsl:with-param name="role" select="$role"/>
             </xsl:call-template>
           </ul>
         </li>
@@ -566,12 +572,13 @@ the links itself. They must be passed in with the ${links} parameter.
   <xsl:param name="node" select="."/>
   <xsl:param name="depth" select="count($node/ancestor-or-self::mal:section) + 2"/>
   <xsl:param name="links" select="/false"/>
+  <xsl:variable name="role" select="$node/self::mal:links/@role"/>
   <xsl:if test="$links">
     <xsl:call-template name="mal2html.links.links">
       <xsl:with-param name="node" select="$node"/>
       <xsl:with-param name="depth" select="$depth"/>
       <xsl:with-param name="links" select="$links"/>
-      <xsl:with-param name="role" select="'seealso'"/>
+      <xsl:with-param name="role" select="concat($role, ' seealso')"/>
       <xsl:with-param name="title">
         <xsl:call-template name="l10n.gettext">
           <xsl:with-param name="msgid" select="'See Also'"/>
@@ -603,6 +610,7 @@ This template calls *{mal2html.links.series.prev} and
   <xsl:variable name="expander" select="$title and
                                         ($node/self::mal:links/@ui:expanded or
                                          $node/self::mal:links/@uix:expanded)"/>
+  <xsl:variable name="role" select="$node/self::mal:links/@role"/>
   <div>
     <xsl:attribute name="class">
       <xsl:text>links serieslinks</xsl:text>
@@ -634,16 +642,18 @@ This template calls *{mal2html.links.series.prev} and
         <ul>
           <xsl:call-template name="mal2html.links.series.prev">
             <xsl:with-param name="node" select="$page"/>
+            <xsl:with-param name="links" select="$node/self::mal:links"/>
           </xsl:call-template>
           <li class="links">
             <xsl:call-template name="mal.link.content">
               <xsl:with-param name="node" select="$page"/>
               <xsl:with-param name="xref" select="$page/@id"/>
-              <xsl:with-param name="role" select="'series'"/>
+              <xsl:with-param name="role" select="concat($role, ' series')"/>
             </xsl:call-template>
           </li>
           <xsl:call-template name="mal2html.links.series.next">
             <xsl:with-param name="node" select="$page"/>
+            <xsl:with-param name="links" select="$node/self::mal:links"/>
           </xsl:call-template>
         </ul>
       </div>
@@ -657,6 +667,7 @@ mal2html.links.series.prev
 Output preceding links to pages in a series.
 :Revision:version="1.0" date="2011-06-15" status="final"
 $node: The current #{page} element.
+$links: The series #{links} element.
 
 This template is called by *{mal2html.links.series} to output the pages before
 the starting page in the series. This template finds the previous page for the
@@ -665,6 +676,8 @@ to it.
 -->
 <xsl:template name="mal2html.links.series.prev">
   <xsl:param name="node"/>
+  <xsl:param name="links" select="/false"/>
+  <xsl:variable name="role" select="$links/self::mal:links/@role"/>
   <xsl:variable name="linkid">
     <xsl:call-template name="mal.link.linkid">
       <xsl:with-param name="node" select="$node"/>
@@ -675,6 +688,7 @@ to it.
     <xsl:if test="$prev">
       <xsl:call-template name="mal2html.links.series.prev">
         <xsl:with-param name="node" select="key('mal.cache.key', $prev/../../@id)"/>
+        <xsl:with-param name="links" select="$links"/>
       </xsl:call-template>
       <li class="links">
         <a>
@@ -688,13 +702,13 @@ to it.
             <xsl:call-template name="mal.link.tooltip">
               <xsl:with-param name="node" select="$prev"/>
               <xsl:with-param name="xref" select="$prev/../../@id"/>
-              <xsl:with-param name="role" select="'series'"/>
+              <xsl:with-param name="role" select="concat($role, ' series')"/>
             </xsl:call-template>
           </xsl:attribute>
           <xsl:call-template name="mal.link.content">
             <xsl:with-param name="node" select="$prev"/>
             <xsl:with-param name="xref" select="$prev/../../@id"/>
-            <xsl:with-param name="role" select="'series'"/>
+            <xsl:with-param name="role" select="concat($role, ' series')"/>
           </xsl:call-template>
         </a>
       </li>
@@ -708,6 +722,7 @@ mal2html.links.series.next
 Output following links to pages in a series.
 :Revision:version="1.0" date="2011-06-15" status="final"
 $node: The current #{page} element.
+$links: The series #{links} element.
 
 This template is called by *{mal2html.links.series} to output the pages after
 the starting page in the series. This template finds the next page for the page
@@ -716,6 +731,8 @@ page.
 -->
 <xsl:template name="mal2html.links.series.next">
   <xsl:param name="node"/>
+  <xsl:param name="links" select="/false"/>
+  <xsl:variable name="role" select="$links/self::mal:links/@role"/>
   <xsl:variable name="linkid">
     <xsl:call-template name="mal.link.linkid">
       <xsl:with-param name="node" select="$node"/>
@@ -736,18 +753,19 @@ page.
             <xsl:call-template name="mal.link.tooltip">
               <xsl:with-param name="node" select="$next"/>
               <xsl:with-param name="xref" select="$next/@xref"/>
-              <xsl:with-param name="role" select="'series'"/>
+              <xsl:with-param name="role" select="concat($role, ' series')"/>
             </xsl:call-template>
           </xsl:attribute>
           <xsl:call-template name="mal.link.content">
             <xsl:with-param name="node" select="$next"/>
             <xsl:with-param name="xref" select="$next/@xref"/>
-            <xsl:with-param name="role" select="'series'"/>
+            <xsl:with-param name="role" select="concat($role, ' series')"/>
           </xsl:call-template>
         </a>
       </li>
       <xsl:call-template name="mal2html.links.series.next">
         <xsl:with-param name="node" select="key('mal.cache.key', $next/@xref)"/>
+        <xsl:with-param name="links" select="$links"/>
       </xsl:call-template>
     </xsl:for-each>
   </xsl:if>
@@ -788,6 +806,7 @@ when determining which links to output.
     <xsl:text> </xsl:text>
   </xsl:param>
   <xsl:param name="allgroups" select="''"/>
+  <xsl:variable name="role" select="$node/self::mal:links/@role"/>
   <xsl:if test="$node/ancestor-or-self::mal:page[last()]/@type = 'guide'">
     <xsl:variable name="_groups">
       <xsl:if test="not(contains($allgroups, ' #first '))">
@@ -813,7 +832,7 @@ when determining which links to output.
         <xsl:with-param name="node" select="$node"/>
         <xsl:with-param name="depth" select="$depth"/>
         <xsl:with-param name="links" select="$_links"/>
-        <xsl:with-param name="role" select="'topic'"/>
+        <xsl:with-param name="role" select="concat($role, ' topic')"/>
         <xsl:with-param name="divs" select="true()"/>
       </xsl:call-template>
     </xsl:if>
@@ -825,6 +844,7 @@ when determining which links to output.
 <xsl:template name="_mal2html.links.mouseovers">
   <xsl:param name="node"/>
   <xsl:param name="links"/>
+  <xsl:variable name="role" select="$node/self::mal:links/@role"/>
   <div class="mouseovers">
     <xsl:for-each select="$node/e:mouseover[not(@match)]">
       <img>
@@ -849,6 +869,7 @@ when determining which links to output.
             <xsl:attribute name="title">
               <xsl:call-template name="mal.link.tooltip">
                 <xsl:with-param name="xref" select="$xref"/>
+                <xsl:with-param name="role" select="concat($role, ' topic')"/>
               </xsl:call-template>
             </xsl:attribute>
             <xsl:for-each select="$node/e:mouseover[ match = $xref]">
@@ -859,7 +880,7 @@ when determining which links to output.
             <xsl:call-template name="mal.link.content">
               <xsl:with-param name="node" select="."/>
               <xsl:with-param name="xref" select="$xref"/>
-              <xsl:with-param name="role" select="'topic'"/>
+              <xsl:with-param name="role" select="concat($role, ' topic')"/>
             </xsl:call-template>
           </a>
         </li>
@@ -896,6 +917,7 @@ when determining which links to output.
           <xsl:attribute name="title">
             <xsl:call-template name="mal.link.tooltip">
               <xsl:with-param name="xref" select="$xref"/>
+              <xsl:with-param name="role" select="$role"/>
             </xsl:call-template>
           </xsl:attribute>
           <xsl:call-template name="mal.link.content">
@@ -1091,6 +1113,7 @@ when determining which links to output.
               <xsl:attribute name="title">
                 <xsl:call-template name="mal.link.tooltip">
                   <xsl:with-param name="xref" select="$xref"/>
+                  <xsl:with-param name="role" select="$role"/>
                 </xsl:call-template>
               </xsl:attribute>
               <xsl:call-template name="mal.link.content">
diff --git a/xslt/mallard/html/mal2html-page.xsl b/xslt/mallard/html/mal2html-page.xsl
index fbec693..03243ad 100644
--- a/xslt/mallard/html/mal2html-page.xsl
+++ b/xslt/mallard/html/mal2html-page.xsl
@@ -386,12 +386,13 @@ separators used between links.
     <xsl:attribute name="title">
       <xsl:call-template name="mal.link.tooltip">
         <xsl:with-param name="xref" select="$node/@xref"/>
+        <xsl:with-param name="role" select="'trail guide'"/>
       </xsl:call-template>
     </xsl:attribute>
     <xsl:call-template name="mal.link.content">
       <xsl:with-param name="node" select="$node"/>
       <xsl:with-param name="xref" select="$node/@xref"/>
-      <xsl:with-param name="role" select="'trail'"/>
+      <xsl:with-param name="role" select="'trail guide'"/>
     </xsl:call-template>
   </a>
   <xsl:choose>
diff --git a/xslt/mallard/html/mal2html-ui.xsl b/xslt/mallard/html/mal2html-ui.xsl
index 3cf65a3..fcf6c2a 100644
--- a/xslt/mallard/html/mal2html-ui.xsl
+++ b/xslt/mallard/html/mal2html-ui.xsl
@@ -165,6 +165,7 @@ This template handles link sorting.
             <xsl:call-template name="mal.link.tooltip">
               <xsl:with-param name="node" select="$node"/>
               <xsl:with-param name="xref" select="$link/@xref"/>
+              <xsl:with-param name="role" select="$role"/>
             </xsl:call-template>
           </xsl:attribute>
           <span class="ui-tile-img" style="width: {$width}px; height: {$height}px;">


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