[yelp-xsl] Removing some leftover facet templates



commit fec00bb7f2d99d4a42e8b29b19dc1e2706774343
Author: Shaun McCance <shaunm redhat com>
Date:   Wed May 24 11:07:02 2017 -0400

    Removing some leftover facet templates

 doc/yelp-xsl/C/mal-link.page            |    2 +-
 doc/yelp-xsl/C/mal.facet.all.key.page   |    6 --
 doc/yelp-xsl/C/mal.link.facetlinks.page |   15 -----
 xslt/mallard/common/mal-link.xsl        |  103 +------------------------------
 4 files changed, 2 insertions(+), 124 deletions(-)
---
diff --git a/doc/yelp-xsl/C/mal-link.page b/doc/yelp-xsl/C/mal-link.page
index 36858f9..9901fa5 100644
--- a/doc/yelp-xsl/C/mal-link.page
+++ b/doc/yelp-xsl/C/mal-link.page
@@ -1,2 +1,2 @@
 <?xml version="1.0"?>
-<page xmlns="http://projectmallard.org/1.0/"; id="mal-link" type="guide" style="xslt-stylesheet"><info><link 
type="guide" xref="stylesheets" group="mal"/><revision version="3.4" date="2012-01-17" status="final"/><link 
type="xslt-defines-template" xref="mal.link.linkid"/><link type="xslt-defines-template" 
xref="mal.link.xref.linkid"/><link type="xslt-defines-template" xref="mal.link.content"/><link 
type="xslt-defines-template" xref="mal.link.content.custom"/><link type="xslt-defines-template" 
xref="mal.link.desc"/><link type="xslt-defines-template" xref="mal.link.desc.custom"/><link 
type="xslt-defines-template" xref="mal.link.tooltip"/><link type="xslt-defines-template" 
xref="mal.link.tooltip.custom"/><link type="xslt-defines-template" xref="mal.link.target"/><link 
type="xslt-defines-template" xref="mal.link.target.custom"/><link type="xslt-defines-template" 
xref="mal.link.guidelinks"/><link type="xslt-defines-template" xref="mal.link.topiclinks"/><link 
type="xslt-defines-temp
 late" xref="mal.link.seealsolinks"/><link type="xslt-defines-template" xref="mal.link.linktrails"/><link 
type="xslt-defines-template" xref="mal.link.facetlinks"/><link type="xslt-defines-template" 
xref="mal.link.sorttitle"/><link type="xslt-implements-mode" xref="mal.link.content.mode"/><link 
type="xslt-defines-param" xref="mal.cache.file"/><link type="xslt-defines-param" xref="mal.cache"/><link 
type="xslt-defines-param" xref="mal.link.prefix"/><link type="xslt-defines-param" 
xref="mal.link.extension"/><link type="xslt-defines-param" 
xref="mal.link.default_root"/></info><title>Mallard Links</title><p>Common linking utilities for Mallard 
documents.</p><p>This stylesheet contains various utilities for handling links in Mallard documents.  The 
templates in this stylesheet make it easier to handle the different linking mechanisms in Mallard, including 
the dynamic automatic linking systems.</p><links type="topic" groups="stylesheets" 
style="linklist"><title>Stylesheets</title></l
 inks><links type="topic" groups="parameters" style="linklist"><title>Parameters</title></links><links 
type="topic" groups="modes" style="linklist"><title>Modes</title></links><links type="topic" 
groups="templates" style="linklist"><title>Templates</title></links><links type="topic" groups="keys" 
style="linklist"><title>Keys</title></links><list style="compact"><title>Calls 
Templates</title><item><p><link xref="l10n.gettext"/></p></item><item><p><link 
xref="utils.email_address"/></p></item></list><list style="compact"><title>Calls Keys</title><item><p><link 
xref="mal.cache.key"/></p></item><item><p><link xref="mal.cache.link.key"/></p></item><item><p><link 
xref="mal.facet.all.key"/></p></item></list><list style="compact"><title>Calls 
Parameters</title><item><p><link xref="mal.cache"/></p></item><item><p><link 
xref="mal.cache.file"/></p></item><item><p><link xref="mal.link.default_root"/></p></item><item><p><link 
xref="mal.link.extension"/></p></item><item><p><link xref="mal.l
 ink.prefix"/></p></item></list><table><title>Implements 
Templates</title><thead><tr><th><p>Mode</p></th><th><p>Match</p></th></tr></thead><tbody><tr><td><p><link 
xref="mal.link.content.mode">mal.link.content.mode</link></p></td><td><p><code>* | 
text()</code></p></td></tr></tbody></table></page>
+<page xmlns="http://projectmallard.org/1.0/"; id="mal-link" type="guide" style="xslt-stylesheet"><info><link 
type="guide" xref="stylesheets" group="mal"/><revision version="3.4" date="2012-01-17" status="final"/><link 
type="xslt-defines-template" xref="mal.link.linkid"/><link type="xslt-defines-template" 
xref="mal.link.xref.linkid"/><link type="xslt-defines-template" xref="mal.link.content"/><link 
type="xslt-defines-template" xref="mal.link.content.custom"/><link type="xslt-defines-template" 
xref="mal.link.desc"/><link type="xslt-defines-template" xref="mal.link.desc.custom"/><link 
type="xslt-defines-template" xref="mal.link.tooltip"/><link type="xslt-defines-template" 
xref="mal.link.tooltip.custom"/><link type="xslt-defines-template" xref="mal.link.target"/><link 
type="xslt-defines-template" xref="mal.link.target.custom"/><link type="xslt-defines-template" 
xref="mal.link.guidelinks"/><link type="xslt-defines-template" xref="mal.link.topiclinks"/><link 
type="xslt-defines-temp
 late" xref="mal.link.seealsolinks"/><link type="xslt-defines-template" xref="mal.link.linktrails"/><link 
type="xslt-defines-template" xref="mal.link.sorttitle"/><link type="xslt-implements-mode" 
xref="mal.link.content.mode"/><link type="xslt-defines-param" xref="mal.cache.file"/><link 
type="xslt-defines-param" xref="mal.cache"/><link type="xslt-defines-param" xref="mal.link.prefix"/><link 
type="xslt-defines-param" xref="mal.link.extension"/><link type="xslt-defines-param" 
xref="mal.link.default_root"/></info><title>Mallard Links</title><p>Common linking utilities for Mallard 
documents.</p><p>This stylesheet contains various utilities for handling links in Mallard documents.  The 
templates in this stylesheet make it easier to handle the different linking mechanisms in Mallard, including 
the dynamic automatic linking systems.</p><links type="topic" groups="stylesheets" 
style="linklist"><title>Stylesheets</title></links><links type="topic" groups="parameters" style="linklist"><
 title>Parameters</title></links><links type="topic" groups="modes" 
style="linklist"><title>Modes</title></links><links type="topic" groups="templates" 
style="linklist"><title>Templates</title></links><links type="topic" groups="keys" 
style="linklist"><title>Keys</title></links><list style="compact"><title>Calls 
Templates</title><item><p><link xref="l10n.gettext"/></p></item><item><p><link 
xref="utils.email_address"/></p></item></list><list style="compact"><title>Calls Keys</title><item><p><link 
xref="mal.cache.key"/></p></item><item><p><link xref="mal.cache.link.key"/></p></item></list><list 
style="compact"><title>Calls Parameters</title><item><p><link xref="mal.cache"/></p></item><item><p><link 
xref="mal.cache.file"/></p></item><item><p><link xref="mal.link.default_root"/></p></item><item><p><link 
xref="mal.link.extension"/></p></item><item><p><link 
xref="mal.link.prefix"/></p></item></list><table><title>Implements 
Templates</title><thead><tr><th><p>Mode</p></th><th><p>Matc
 h</p></th></tr></thead><tbody><tr><td><p><link 
xref="mal.link.content.mode">mal.link.content.mode</link></p></td><td><p><code>* | 
text()</code></p></td></tr></tbody></table></page>
diff --git a/xslt/mallard/common/mal-link.xsl b/xslt/mallard/common/mal-link.xsl
index 41b2ab0..9202079 100644
--- a/xslt/mallard/common/mal-link.xsl
+++ b/xslt/mallard/common/mal-link.xsl
@@ -17,10 +17,9 @@ along with this program; see the file COPYING.LGPL.  If not, see <http://www.gnu
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                 xmlns:mal="http://projectmallard.org/1.0/";
                 xmlns:cache="http://projectmallard.org/cache/1.0/";
-                xmlns:facet="http://projectmallard.org/facet/1.0/";
                 xmlns:exsl="http://exslt.org/common";
                 xmlns:str="http://exslt.org/strings";
-                exclude-result-prefixes="mal cache facet exsl str"
+                exclude-result-prefixes="mal cache exsl str"
                 version="1.0">
 
 <!--!!==========================================================================
@@ -94,19 +93,6 @@ The context node must be in the document @{mal.cache} when this key is called.
          use="concat(@type, ':', @xref)"/>
 
 
-<!--++==========================================================================
-mal.facet.all.key
-Get all #{page} and #{section} elements with #{facet:tag} elements.
-
-This key returns all #{page} and #{section} elements that have at least one
-#{facet:tag} element in their #{info} element. Pass the emptry string as the
-key argument.
--->
-<xsl:key name="mal.facet.all.key"
-         match="mal:page[mal:info/facet:tag] | mal:section[mal:info/facet:tag]"
-         use="''"/>
-
-
 <!--@@==========================================================================
 mal.link.prefix
 A prefix for link targets.
@@ -1187,93 +1173,6 @@ FIXME:
 
 
 <!--**==========================================================================
-mal.link.facetlinks
-Output the facet links for a facets page or section.
-:Revision:version="3.0" date="2010-12-16" status="final"
-$node: The #{page} or #{section} element to generate links for.
-
-This template outputs all the facet links for facets page or section. Links are
-output for each page or section that matches all #{facet:match} elements from
-${node}, excluding those which will be included in descendant facets nodes. It
-outputs each of the links as a #{link} element within the Mallard namespace.
-Each #{link} element has an #{xref} attribute pointing to the target page
-or section.
-
-Each #{link} element contains a #{title} with #{type="sort"} providing the
-sort title of the target page or section.  The results are not sorted when
-returned from this template.  Use #{xsl:sort} on the sort titles to sort
-the results.
-
-Each #{link} element contains a copy of all the #{facet:tag} elements from
-the #{info} element of the target page or section.
-
-The output is a result tree fragment.  To use these results, call
-#{exsl:node-set} on them.
--->
-<xsl:template name="mal.link.facetlinks">
-  <xsl:param name="node" select="."/>
-  <xsl:if test="$node/mal:info/facet:match">
-    <xsl:for-each select="$mal.cache">
-      <xsl:for-each select="key('mal.facet.all.key', '')">
-        <xsl:variable name="fnode" select="."/>
-        <xsl:variable name="linkid">
-          <xsl:call-template name="mal.link.linkid">
-            <xsl:with-param name="node" select="$fnode"/>
-          </xsl:call-template>
-        </xsl:variable>
-        <xsl:variable name="include">
-          <xsl:for-each select="$node/ancestor-or-self::*/mal:info/facet:match">
-            <xsl:variable name="match" select="."/>
-            <xsl:choose>
-              <xsl:when test="@values">
-                <xsl:if test="not(str:split($fnode/mal:info/facet:tag[@key = $match/@key]/@values)
-                              = str:split($match/@values))">
-                  <xsl:text>x</xsl:text>
-                </xsl:if>
-              </xsl:when>
-              <xsl:otherwise>
-                <xsl:if test="not($fnode/mal:info/facet:tag[@key = $match/@key])">
-                  <xsl:text>x</xsl:text>
-                </xsl:if>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:for-each>
-        </xsl:variable>
-        <xsl:variable name="exclude">
-          <xsl:for-each select="$node//mal:section/mal:info/facet:match">
-            <xsl:variable name="match" select="."/>
-            <xsl:choose>
-              <xsl:when test="@values">
-                <xsl:if test="str:split($fnode/mal:info/facet:tag[@key = $match/@key]/@values)
-                              = str:split($match/@values)">
-                  <xsl:text>x</xsl:text>
-                </xsl:if>
-              </xsl:when>
-              <xsl:otherwise>
-                <xsl:if test="$fnode/mal:info/facet:tag[@key = $match/@key]">
-                  <xsl:text>x</xsl:text>
-                </xsl:if>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:for-each>
-        </xsl:variable>
-        <xsl:if test="not(contains($include, 'x')) and not(contains($exclude, 'x'))">
-          <mal:link xref="{$linkid}">
-            <mal:title type="sort">
-              <xsl:call-template name="mal.link.sorttitle">
-                <xsl:with-param name="node" select="$fnode"/>
-              </xsl:call-template>
-            </mal:title>
-            <xsl:copy-of select="mal:info/facet:tag"/>
-          </mal:link>
-        </xsl:if>
-      </xsl:for-each>
-    </xsl:for-each>
-  </xsl:if>
-</xsl:template>
-
-
-<!--**==========================================================================
 mal.link.sorttitle
 Output the sort title for a page or section.
 :Revision:version="3.10" date="2013-07-30" status="final"


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