[yelp-xsl] Fixed some errors in the documentation



commit 32bdff8bca0f28b612b1a24eb5286623cc429033
Author: Shaun McCance <shaunm gnome org>
Date:   Tue Jan 24 08:52:21 2012 -0500

    Fixed some errors in the documentation

 doc/yelp-xsl/xsldoc-scan.awk           |    5 +++++
 doc/yelp-xsl/xsldoc-scan.xsl           |   27 ++++++++++++++++++---------
 xslt/common/html.xsl                   |    4 ++--
 xslt/common/icons.xsl                  |    2 +-
 xslt/docbook/common/db-common.xsl      |    2 +-
 xslt/docbook/common/db-xref.xsl        |    2 +-
 xslt/docbook/html/db2html-css.xsl      |    4 +---
 xslt/docbook/html/db2html-division.xsl |    2 +-
 xslt/docbook/html/db2html-index.xsl    |    2 +-
 xslt/docbook/html/db2html-inline.xsl   |    2 +-
 xslt/docbook/html/db2html-list.xsl     |    2 +-
 xslt/docbook/html/db2html-refentry.xsl |    2 +-
 xslt/docbook/html/db2html-table.xsl    |    2 +-
 xslt/docbook/html/db2xhtml.xsl         |    2 ++
 xslt/mallard/common/mal-if.xsl         |    1 +
 xslt/mallard/common/mal-sort.xsl       |   10 ++++++----
 xslt/mallard/html/mal2html-links.xsl   |    1 +
 17 files changed, 45 insertions(+), 27 deletions(-)
---
diff --git a/doc/yelp-xsl/xsldoc-scan.awk b/doc/yelp-xsl/xsldoc-scan.awk
index a6f5034..14c1904 100644
--- a/doc/yelp-xsl/xsldoc-scan.awk
+++ b/doc/yelp-xsl/xsldoc-scan.awk
@@ -143,6 +143,11 @@ cur_block = "";
 }
 
 # One-line comments to mark things private
+/<\!--\#\!.*-->/ {
+    split($0, a);
+    printf "<?xslt-private %s?>\n", a[2];
+    next;
+}
 /<\!--\#\*.*-->/ {
     split($0, a);
     printf "<?xslt-private %s?>\n", a[2];
diff --git a/doc/yelp-xsl/xsldoc-scan.xsl b/doc/yelp-xsl/xsldoc-scan.xsl
index 160103c..7936e99 100644
--- a/doc/yelp-xsl/xsldoc-scan.xsl
+++ b/doc/yelp-xsl/xsldoc-scan.xsl
@@ -78,7 +78,10 @@ free software.
   <xsl:param name="page"/>
   <xsl:param name="xslt_node"/>
   <xsl:for-each select="$xslt_node">
-    <xsl:variable name="calls_templates" select="set:distinct(.//xsl:call-template[not(@name = $xslt_node//xsl:template/@name)]/@name)"/>
+    <xsl:variable name="calls_templates" select="set:distinct(.//xsl:call-template[
+                                                 not(@name = $xslt_node//xsl:template/@name) and
+                                                 not($page/processing-instruction('xslt-private')[string(.) = @name])
+                                                 ]/@name)"/>
     <xsl:if test="count($calls_templates) > 0">
       <list style="compact">
         <title>Calls Templates</title>
@@ -135,17 +138,21 @@ free software.
       <xsl:copy-of select="mal:info/*[not(self::mal:desc) and not(self::mal:revision)]"/>
       <!-- xslt-includes -->
       <xsl:for-each select="$xslt_file//xsl:include">
+        <xsl:variable name="base" select="substring-before(str:split(@href, '/')[last()], '.xsl')"/>
         <xsl:choose>
+          <xsl:when test="$page/processing-instruction('xslt-private')[string(.) = $base]"/>
           <xsl:when test="processing-instruction('pass')">
             <xsl:for-each select="document(@href, /)//xsl:include">
-              <xsl:variable name="id" select="translate(substring-before(str:split(@href, '/')[last()],
-                                              '.xsl'), '.', '_')"/>
-              <link type="topic" xref="{$id}" group="S"/>
+              <xsl:variable name="subpage" select="/mal:page"/>
+              <xsl:variable name="subbase" select="substring-before(str:split(@href, '/')[last()], '.xsl')"/>
+              <xsl:if test="not($subpage/processing-instruction('xslt-private')[string(.) = $subbase])">
+                <xsl:variable name="id" select="translate($subbase, '.', '_')"/>
+                <link type="topic" xref="{$id}" group="S"/>
+              </xsl:if>
             </xsl:for-each>
           </xsl:when>
           <xsl:otherwise>
-            <xsl:variable name="id" select="translate(substring-before(str:split(@href, '/')[last()],
-                                            '.xsl'), '.', '_')"/>
+            <xsl:variable name="id" select="translate($base, '.', '_')"/>
             <link type="topic" xref="{$id}" group="S"/>
           </xsl:otherwise>
         </xsl:choose>
@@ -160,9 +167,11 @@ free software.
       </xsl:for-each>
       <!-- xslt-implements-mode -->
       <xsl:for-each select="set:distinct($xslt_file//xsl:template/@mode)">
-        <!-- FIXME: xslt-private -->
-        <xsl:variable name="id" select="concat('M__', translate(., '.', '_'))"/>
-        <link type="xslt-implements-mode" xref="{$id}"/>
+        <xsl:variable name="mode" select="string(.)"/>
+        <xsl:if test="not($page/processing-instruction('xslt-private')[string(.) = $mode])">
+          <xsl:variable name="id" select="concat('M__', translate($mode, '.', '_'))"/>
+          <link type="xslt-implements-mode" xref="{$id}"/>
+        </xsl:if>
       </xsl:for-each>
       <!-- xslt-defines-param -->
       <xsl:for-each select="$xslt_file/xsl:param/@name">
diff --git a/xslt/common/html.xsl b/xslt/common/html.xsl
index 54d83fa..c957d51 100644
--- a/xslt/common/html.xsl
+++ b/xslt/common/html.xsl
@@ -29,7 +29,7 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 <!--!!==========================================================================
 HTML Output
 Common utilities and CSS for transformations to HTML.
-:Requires: gettext color icons
+:Requires: l10n color icons
 :Revision:version="1.0" date="2010-05-26" status="final"
 
 This stylesheet contains common templates for creating HTML output. The
@@ -1319,7 +1319,7 @@ This template outputs CSS to support syntax highlighting of code blocks. Syntax
 highlighting is done at document load time with JavaScript. Text in code blocks
 is broken up into chunks and wrapped in HTML elements with particular classes.
 This template outputs CSS to match those elements and style them with the
-built-in themeable colors from !{colors}.
+built-in themeable colors from !{color}.
 
 All parameters can be automatically computed if not provided.
 -->
diff --git a/xslt/common/icons.xsl b/xslt/common/icons.xsl
index 869ae82..7491a95 100644
--- a/xslt/common/icons.xsl
+++ b/xslt/common/icons.xsl
@@ -22,7 +22,7 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 <!--!!==========================================================================
 Icons
 Specify common named icons to style output.
-:Requires: gettext
+:Requires: l10n
 :Revision:version="1.0" date="2010-05-25" status="final"
 
 This stylesheet provides a common interface to specify icons for transformations
diff --git a/xslt/docbook/common/db-common.xsl b/xslt/docbook/common/db-common.xsl
index 72d6f1a..1e9610d 100644
--- a/xslt/docbook/common/db-common.xsl
+++ b/xslt/docbook/common/db-common.xsl
@@ -24,7 +24,7 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
 <!--!!==========================================================================
 DocBook Common
-:Requires: gettext
+:Requires: l10n
 
 This stylesheet module provides utility templates for DocBook that are
 independant of the target format.
diff --git a/xslt/docbook/common/db-xref.xsl b/xslt/docbook/common/db-xref.xsl
index 6f1a4c2..73c6938 100644
--- a/xslt/docbook/common/db-xref.xsl
+++ b/xslt/docbook/common/db-xref.xsl
@@ -26,7 +26,7 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
 <!--!!==========================================================================
 DocBook Links
-:Requires: db-chunk db-title gettext
+:Requires: db-chunk db-title l10n
 -->
 
 
diff --git a/xslt/docbook/html/db2html-css.xsl b/xslt/docbook/html/db2html-css.xsl
index ea69837..3a5c46e 100644
--- a/xslt/docbook/html/db2html-css.xsl
+++ b/xslt/docbook/html/db2html-css.xsl
@@ -17,14 +17,12 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 -->
 
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
-                xmlns:exsl="http://exslt.org/common";
                 xmlns="http://www.w3.org/1999/xhtml";
-                exclude-result-prefixes="exsl"
                 version="1.0">
 
 <!--!!==========================================================================
 DocBook to HTML - CSS
-:Requires: db2html-footnote db2html-callout db2html-qanda theme-colors theme-html
+:Requires: color html l10n
 
 REMARK: Describe this module
 -->
diff --git a/xslt/docbook/html/db2html-division.xsl b/xslt/docbook/html/db2html-division.xsl
index 727251b..53f8f3d 100644
--- a/xslt/docbook/html/db2html-division.xsl
+++ b/xslt/docbook/html/db2html-division.xsl
@@ -25,7 +25,7 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
 <!--!!==========================================================================
 DocBook to HTML - Divisions
-:Requires: db-chunk db-title db-xref db2html-css db2html-footnote db2html-xref gettext
+:Requires: db-chunk db-title db-xref db2html-css db2html-footnote db2html-xref l10n
 
 REMARK: Describe this module
 -->
diff --git a/xslt/docbook/html/db2html-index.xsl b/xslt/docbook/html/db2html-index.xsl
index 1ea922b..6394dd6 100644
--- a/xslt/docbook/html/db2html-index.xsl
+++ b/xslt/docbook/html/db2html-index.xsl
@@ -26,7 +26,7 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
 <!--!!==========================================================================
 DocBook to HTML - Indexes
-:Requires: db-chunk db2html-division gettext
+:Requires: db-chunk db2html-division l10n
 
 This module provides templates to process DocBook indexes.
 -->
diff --git a/xslt/docbook/html/db2html-inline.xsl b/xslt/docbook/html/db2html-inline.xsl
index 84ccf11..6c87d9e 100644
--- a/xslt/docbook/html/db2html-inline.xsl
+++ b/xslt/docbook/html/db2html-inline.xsl
@@ -26,7 +26,7 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
 <!--!!==========================================================================
 DocBook to HTML - Inline Elements
-:Requires: db-common db2html-xref gettext
+:Requires: db-common db2html-xref l10n
 
 REMARK: Describe this module
 -->
diff --git a/xslt/docbook/html/db2html-list.xsl b/xslt/docbook/html/db2html-list.xsl
index 0d47204..b7f6db0 100644
--- a/xslt/docbook/html/db2html-list.xsl
+++ b/xslt/docbook/html/db2html-list.xsl
@@ -25,7 +25,7 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
 <!--!!==========================================================================
 DocBook to HTML - Lists
-:Requires: db-common db2html-inline db2html-xref gettext html
+:Requires: db-common db2html-inline db2html-xref l10n html
 
 REMARK: Describe this module
 -->
diff --git a/xslt/docbook/html/db2html-refentry.xsl b/xslt/docbook/html/db2html-refentry.xsl
index 5104d8e..d7f80f3 100644
--- a/xslt/docbook/html/db2html-refentry.xsl
+++ b/xslt/docbook/html/db2html-refentry.xsl
@@ -25,7 +25,7 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
 <!--!!==========================================================================
 DocBook to HTML - Reference Pages
-:Requires: db-chunk db-title db2html-inline db2html-division db2html-xref gettext
+:Requires: db-chunk db-title db2html-inline db2html-division db2html-xref l10n
 
 REMARK: Describe this module. Talk about refenty and friends
 -->
diff --git a/xslt/docbook/html/db2html-table.xsl b/xslt/docbook/html/db2html-table.xsl
index 4123410..17556be 100644
--- a/xslt/docbook/html/db2html-table.xsl
+++ b/xslt/docbook/html/db2html-table.xsl
@@ -24,7 +24,7 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
 <!--!!==========================================================================
 DocBook to HTML - Tables
-:Requires: db2html-block db2html-inline db2html-xref gettext
+:Requires: db2html-block db2html-inline db2html-xref l10n
 
 REMARK: This needs lots of talk about CALS
 -->
diff --git a/xslt/docbook/html/db2xhtml.xsl b/xslt/docbook/html/db2xhtml.xsl
index 4f92256..bf0422f 100644
--- a/xslt/docbook/html/db2xhtml.xsl
+++ b/xslt/docbook/html/db2xhtml.xsl
@@ -58,4 +58,6 @@ DocBook to XHTML
 <xsl:include href="db2html-xref.xsl"/>
 <xsl:include href="db2html-footnote.xsl"/>
 
+<!--#! db2html-suppressed -->
+
 </xsl:stylesheet>
diff --git a/xslt/mallard/common/mal-if.xsl b/xslt/mallard/common/mal-if.xsl
index a26a21e..ee2a09b 100644
--- a/xslt/mallard/common/mal-if.xsl
+++ b/xslt/mallard/common/mal-if.xsl
@@ -134,6 +134,7 @@ If no #{if:when} elements are true, the output is empty.
   </xsl:if>
 </xsl:template>
 
+<!--#* _mal.if.choose.try -->
 <xsl:template name="_mal.if.choose.try">
   <xsl:param name="node"/>
   <xsl:param name="pos"/>
diff --git a/xslt/mallard/common/mal-sort.xsl b/xslt/mallard/common/mal-sort.xsl
index d8ebad9..972c9e8 100644
--- a/xslt/mallard/common/mal-sort.xsl
+++ b/xslt/mallard/common/mal-sort.xsl
@@ -59,7 +59,7 @@ topic or next links.
 <xsl:template name="mal.sort.tsort">
   <xsl:param name="node" select="key('mal.cache.key', $mal.link.default_root)"/>
   <xsl:variable name="sorted">
-    <xsl:call-template name="mal.sort.tsort.node">
+    <xsl:call-template name="_mal.sort.tsort.node">
       <xsl:with-param name="node" select="$node"/>
     </xsl:call-template>
   </xsl:variable>
@@ -72,7 +72,8 @@ topic or next links.
   </xsl:for-each>
 </xsl:template>
 
-<xsl:template name="mal.sort.tsort.node">
+<!--#* _mal.sort.tsort.node -->
+<xsl:template name="_mal.sort.tsort.node">
   <xsl:param name="node" select="key('mal.cache.key', $mal.link.default_root)"/>
   <xsl:param name="done" select="''"/>
   <xsl:variable name="linkid">
@@ -92,7 +93,7 @@ topic or next links.
     </xsl:variable>
     <xsl:if test="$linklinkid != '' and not(contains($done, concat(' ', $linklinkid, ' ')))">
       <xsl:variable name="nextnode" select="key('mal.cache.key', $linklinkid)"/>
-      <xsl:call-template name="mal.sort.tsort.node">
+      <xsl:call-template name="_mal.sort.tsort.node">
         <xsl:with-param name="node" select="$nextnode"/>
         <xsl:with-param name="done" select="concat($done, ' ', $linkid, ' ')"/>
       </xsl:call-template>
@@ -163,7 +164,7 @@ topic or next links.
       <xsl:for-each select="$mal.cache">
       <xsl:variable name="topic" select="key('mal.cache.key', $linklinkid)"/>
       <xsl:if test="$topic">
-        <xsl:call-template name="mal.sort.tsort.node">
+        <xsl:call-template name="_mal.sort.tsort.node">
           <xsl:with-param name="node" select="$topic"/>
           <xsl:with-param name="done" select="$newdone"/>
         </xsl:call-template>
@@ -173,6 +174,7 @@ topic or next links.
   </xsl:for-each>
 </xsl:template>
 
+<!--#* _mal.sort.getgroups -->
 <xsl:template name="_mal.sort.getgroups">
   <xsl:param name="node" select="."/>
   <xsl:variable name="groups">
diff --git a/xslt/mallard/html/mal2html-links.xsl b/xslt/mallard/html/mal2html-links.xsl
index 7d32d91..02302c5 100644
--- a/xslt/mallard/html/mal2html-links.xsl
+++ b/xslt/mallard/html/mal2html-links.xsl
@@ -870,6 +870,7 @@ when determining which links to output.
   </div>
 </xsl:template>
 
+<!--#% _mal2html.links.divs.nolink.mode -->
 <xsl:template mode="_mal2html.links.divs.nolink.mode" match="*">
   <xsl:copy>
     <xsl:copy-of select="@*"/>



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