summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun McCance <shaunm@redhat.com>2017-05-24 11:07:02 -0400
committerShaun McCance <shaunm@redhat.com>2017-05-24 11:07:02 -0400
commitfec00bb7f2d99d4a42e8b29b19dc1e2706774343 (patch)
tree02cf4aa67728c8b90e2f251260e9e622a34210ef
parentcb13ea3a873244c5e17dcf9276ee2c07c1850ddc (diff)
downloadyelp-xsl-fec00bb7f2d99d4a42e8b29b19dc1e2706774343.tar.gz
Removing some leftover facet templates
-rw-r--r--doc/yelp-xsl/C/mal-link.page2
-rw-r--r--doc/yelp-xsl/C/mal.facet.all.key.page6
-rw-r--r--doc/yelp-xsl/C/mal.link.facetlinks.page15
-rw-r--r--xslt/mallard/common/mal-link.xsl103
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 36858f97..9901fa51 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-template" 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></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><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.link.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-template" 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>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>
diff --git a/doc/yelp-xsl/C/mal.facet.all.key.page b/doc/yelp-xsl/C/mal.facet.all.key.page
deleted file mode 100644
index 3ffd8fca..00000000
--- a/doc/yelp-xsl/C/mal.facet.all.key.page
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0"?>
-<page xmlns="http://projectmallard.org/1.0/" id="mal.facet.all.key" type="topic" style="xslt-key"><info><link type="guide" xref="mal-link" group="keys"/><link type="guide" xref="keys" group="mal"/><revision version="0.0" date="1970-01-01" status="stub"/><desc>Get all <code>page</code> and <code>section</code> elements with <code>facet:tag</code> elements.</desc></info><title>mal.facet.all.key</title><p>Get all <code>page</code> and <code>section</code> elements with <code>facet:tag</code> elements.</p>
-
-
- <p>This key returns all <code>page</code> and <code>section</code> elements that have at least one <code>facet:tag</code> element in their <code>info</code> element. Pass the emptry string as the key argument.</p>
-</page>
diff --git a/doc/yelp-xsl/C/mal.link.facetlinks.page b/doc/yelp-xsl/C/mal.link.facetlinks.page
deleted file mode 100644
index 59f61dac..00000000
--- a/doc/yelp-xsl/C/mal.link.facetlinks.page
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0"?>
-<page xmlns="http://projectmallard.org/1.0/" id="mal.link.facetlinks" type="topic" style="xslt-template"><info><link type="guide" xref="mal-link" group="templates"/><link type="guide" xref="templates" group="mal"/><revision version="3.0" date="2010-12-16" status="final"/><desc>Output the facet links for a facets page or section.</desc></info><title>mal.link.facetlinks</title><p>Output the facet links for a facets page or section.</p>
-
-
- <synopsis><title>Parameters</title><terms>
- <item>
- <title><code>node</code></title>
- <p>The <code>page</code> or <code>section</code> element to generate links for.</p>
- </item>
- </terms></synopsis>
- <p>This template outputs all the facet links for facets page or section. Links are output for each page or section that matches all <code>facet:match</code> elements from <code style="xslt-param">node</code>, excluding those which will be included in descendant facets nodes. It outputs each of the links as a <code>link</code> element within the Mallard namespace. Each <code>link</code> element has an <code>xref</code> attribute pointing to the target page or section.</p>
- <p>Each <code>link</code> element contains a <code>title</code> with <code>type="sort"</code> providing the sort title of the target page or section. The results are not sorted when returned from this template. Use <code>xsl:sort</code> on the sort titles to sort the results.</p>
- <p>Each <code>link</code> element contains a copy of all the <code>facet:tag</code> elements from the <code>info</code> element of the target page or section.</p>
- <p>The output is a result tree fragment. To use these results, call <code>exsl:node-set</code> on them.</p>
-<list style="compact"><title>Calls Templates</title><item><p><link xref="mal.link.linkid"/></p></item><item><p><link xref="mal.link.sorttitle"/></p></item></list><list style="compact"><title>Calls Keys</title><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></list></page>
diff --git a/xslt/mallard/common/mal-link.xsl b/xslt/mallard/common/mal-link.xsl
index 41b2ab09..92020793 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"