[yelp-xsl] doc/yelp-xsl: A bunch of org changes to the xsldoc



commit f1eb19d67fdce7b5950d47972e8f5f9ed9397d0e
Author: Shaun McCance <shaunm gnome org>
Date:   Tue Jan 24 14:49:29 2012 -0500

    doc/yelp-xsl: A bunch of org changes to the xsldoc

 doc/yelp-xsl/C/gnome-doc-xslt.xml      |  241 --------------------------------
 doc/yelp-xsl/C/index__M.page           |   14 --
 doc/yelp-xsl/C/index__P.page           |   14 --
 doc/yelp-xsl/C/index__S.page           |   14 --
 doc/yelp-xsl/C/index__T.page           |   14 --
 doc/yelp-xsl/C/modes.page              |   40 ++++++
 doc/yelp-xsl/C/parameters.page         |   40 ++++++
 doc/yelp-xsl/C/stubs.page              |   40 ++++++
 doc/yelp-xsl/C/stylesheets.page        |   31 ++++
 doc/yelp-xsl/C/templates.page          |   40 ++++++
 doc/yelp-xsl/Makefile.am               |    2 +-
 doc/yelp-xsl/xsldoc-scan.awk           |    7 +-
 doc/yelp-xsl/xsldoc-scan.xsl           |   58 ++++----
 xslt/docbook/html/db2html-division.xsl |    1 +
 xslt/mallard/common/mal-gloss.xsl      |    2 +-
 15 files changed, 224 insertions(+), 334 deletions(-)
---
diff --git a/doc/yelp-xsl/C/modes.page b/doc/yelp-xsl/C/modes.page
new file mode 100644
index 0000000..83f754d
--- /dev/null
+++ b/doc/yelp-xsl/C/modes.page
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<page xmlns="http://projectmallard.org/1.0/";
+      type="guide"
+      id="modes">
+  <info>
+    <link type="guide" xref="index"/>
+    <title type="link">Modes</title>
+    <title type="link" role="topic">XSLT Modes</title>
+  </info>
+
+  <title>XSLT Modes</title>
+
+  <links type="topic" style="linklist" groups="mal2html">
+    <title>Mallard to HTML</title>
+  </links>
+  <links type="topic" style="linklist" groups="mal">
+    <title>Mallard Common</title>
+  </links>
+  <links type="topic" style="linklist" groups="db2html">
+    <title>DocBook to HTML</title>
+  </links>
+  <links type="topic" style="linklist" groups="db">
+    <title>DocBook Common</title>
+  </links>
+  <links type="topic" style="linklist" groups="html">
+    <title>HTML Output</title>
+  </links>
+  <links type="topic" style="linklist" groups="l10n">
+    <title>Localization</title>
+  </links>
+  <links type="topic" style="linklist" groups="color">
+    <title>Colors</title>
+  </links>
+  <links type="topic" style="linklist" groups="icons">
+    <title>Icons</title>
+  </links>
+  <links type="topic" style="linklist" groups="#first #default #last">
+    <title>Other</title>
+  </links>
+</page>
diff --git a/doc/yelp-xsl/C/parameters.page b/doc/yelp-xsl/C/parameters.page
new file mode 100644
index 0000000..4b5d044
--- /dev/null
+++ b/doc/yelp-xsl/C/parameters.page
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<page xmlns="http://projectmallard.org/1.0/";
+      type="guide"
+      id="parameters">
+  <info>
+    <link type="guide" xref="index"/>
+    <title type="link">Parameters</title>
+    <title type="link" role="topic">XSLT Parameters</title>
+  </info>
+
+  <title>XSLT Parameters</title>
+
+  <links type="topic" style="linklist" groups="mal2html">
+    <title>Mallard to HTML</title>
+  </links>
+  <links type="topic" style="linklist" groups="mal">
+    <title>Mallard Common</title>
+  </links>
+  <links type="topic" style="linklist" groups="db2html">
+    <title>DocBook to HTML</title>
+  </links>
+  <links type="topic" style="linklist" groups="db">
+    <title>DocBook Common</title>
+  </links>
+  <links type="topic" style="linklist" groups="html">
+    <title>HTML Output</title>
+  </links>
+  <links type="topic" style="linklist" groups="l10n">
+    <title>Localization</title>
+  </links>
+  <links type="topic" style="linklist" groups="color">
+    <title>Colors</title>
+  </links>
+  <links type="topic" style="linklist" groups="icons">
+    <title>Icons</title>
+  </links>
+  <links type="topic" style="linklist" groups="#first #default #last">
+    <title>Other</title>
+  </links>
+</page>
diff --git a/doc/yelp-xsl/C/stubs.page b/doc/yelp-xsl/C/stubs.page
new file mode 100644
index 0000000..82e2af5
--- /dev/null
+++ b/doc/yelp-xsl/C/stubs.page
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<page xmlns="http://projectmallard.org/1.0/";
+      type="guide"
+      id="stubs">
+  <info>
+    <link type="guide" xref="index"/>
+    <title type="link">Stubs</title>
+    <title type="link" role="topic">XSLT Template Stubs</title>
+  </info>
+
+  <title>XSLT Template Stubs</title>
+
+  <links type="topic" style="linklist" groups="mal2html">
+    <title>Mallard to HTML</title>
+  </links>
+  <links type="topic" style="linklist" groups="mal">
+    <title>Mallard Common</title>
+  </links>
+  <links type="topic" style="linklist" groups="db2html">
+    <title>DocBook to HTML</title>
+  </links>
+  <links type="topic" style="linklist" groups="db">
+    <title>DocBook Common</title>
+  </links>
+  <links type="topic" style="linklist" groups="html">
+    <title>HTML Output</title>
+  </links>
+  <links type="topic" style="linklist" groups="l10n">
+    <title>Localization</title>
+  </links>
+  <links type="topic" style="linklist" groups="color">
+    <title>Colors</title>
+  </links>
+  <links type="topic" style="linklist" groups="icons">
+    <title>Icons</title>
+  </links>
+  <links type="topic" style="linklist" groups="#first #default #last">
+    <title>Other</title>
+  </links>
+</page>
diff --git a/doc/yelp-xsl/C/stylesheets.page b/doc/yelp-xsl/C/stylesheets.page
new file mode 100644
index 0000000..efd59ac
--- /dev/null
+++ b/doc/yelp-xsl/C/stylesheets.page
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<page xmlns="http://projectmallard.org/1.0/";
+      type="guide"
+      id="stylesheets">
+  <info>
+    <link type="guide" xref="index"/>
+    <title type="link">Stylesheets</title>
+    <title type="link" role="topic">XSLT Stylesheets</title>
+  </info>
+
+  <title>XSLT Stylesheets</title>
+
+  <links type="topic" style="linklist" groups="mal2html mal2xhtml">
+    <title>Mallard to HTML</title>
+  </links>
+  <links type="topic" style="linklist" groups="mal">
+    <title>Mallard Common</title>
+  </links>
+  <links type="topic" style="linklist" groups="db2html db2xhtml">
+    <title>DocBook to HTML</title>
+  </links>
+  <links type="topic" style="linklist" groups="db">
+    <title>DocBook Common</title>
+  </links>
+  <links type="topic" style="linklist" groups="html l10n color icons">
+    <title>Common</title>
+  </links>
+  <links type="topic" style="linklist" groups="#first #default #last">
+    <title>Other</title>
+  </links>
+</page>
diff --git a/doc/yelp-xsl/C/templates.page b/doc/yelp-xsl/C/templates.page
new file mode 100644
index 0000000..c7dfc0f
--- /dev/null
+++ b/doc/yelp-xsl/C/templates.page
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<page xmlns="http://projectmallard.org/1.0/";
+      type="guide"
+      id="templates">
+  <info>
+    <link type="guide" xref="index"/>
+    <title type="link">Templates</title>
+    <title type="link" role="topic">XSLT Templates</title>
+  </info>
+
+  <title>XSLT Templates</title>
+
+  <links type="topic" style="linklist" groups="mal2html">
+    <title>Mallard to HTML</title>
+  </links>
+  <links type="topic" style="linklist" groups="mal">
+    <title>Mallard Common</title>
+  </links>
+  <links type="topic" style="linklist" groups="db2html">
+    <title>DocBook to HTML</title>
+  </links>
+  <links type="topic" style="linklist" groups="db">
+    <title>DocBook Common</title>
+  </links>
+  <links type="topic" style="linklist" groups="html">
+    <title>HTML Output</title>
+  </links>
+  <links type="topic" style="linklist" groups="l10n">
+    <title>Localization</title>
+  </links>
+  <links type="topic" style="linklist" groups="color">
+    <title>Colors</title>
+  </links>
+  <links type="topic" style="linklist" groups="icons">
+    <title>Icons</title>
+  </links>
+  <links type="topic" style="linklist" groups="#first #default #last">
+    <title>Other</title>
+  </links>
+</page>
diff --git a/doc/yelp-xsl/Makefile.am b/doc/yelp-xsl/Makefile.am
index 43283ed..6ff3eb3 100644
--- a/doc/yelp-xsl/Makefile.am
+++ b/doc/yelp-xsl/Makefile.am
@@ -58,7 +58,7 @@ gnome-doc-xslt-check-xsldoc: $(xsldoc_docs)
 .PHONY: xsldoc-clean
 clean-local: xsldoc-clean
 xsldoc-clean:
-	rm -f $(xsldoc_pages) C/T__*.page C/P__*.page C/M__*.page C/index.cache
+	rm -f $(xsldoc_pages) C/*.*.page C/index.cache
 
 EXTRA_DIST = 			\
 	mal2cache		\
diff --git a/doc/yelp-xsl/xsldoc-scan.awk b/doc/yelp-xsl/xsldoc-scan.awk
index 14c1904..002dbec 100644
--- a/doc/yelp-xsl/xsldoc-scan.awk
+++ b/doc/yelp-xsl/xsldoc-scan.awk
@@ -63,15 +63,14 @@ function runline (line, ix, jx, pre, aft, char, name, id, fmt) {
 	char = substr(line, ix, 1);
 	name = substr(line, ix + 2, jx - ix - 3);
 	id = name;
-	while (sub(/[\.]/, "_", id));
 	if (char == "!")
 	    fmt = "<file xref='%s'>%s</file>";
 	else if (char == "*")
-	    fmt = "<code style='xslt-template' xref='T__%s'>%s</code>";
+	    fmt = "<code style='xslt-template' xref='%s'>%s</code>";
 	else if (char == "%")
-	    fmt = "<code style='xslt-mode' xref='M__%s'>%s</code>";
+	    fmt = "<code style='xslt-mode' xref='%s'>%s</code>";
 	else if (char == "@") 
-	    fmt = "<code style='xslt-param' xref='P__%s'>%s</code>";
+	    fmt = "<code style='xslt-param' xref='P.%s'>%s</code>";
 	else if (char == "$") 
 	    fmt = "<code style='xslt-param'>"name"</code>";
 	else if (char == "#")
diff --git a/doc/yelp-xsl/xsldoc-scan.xsl b/doc/yelp-xsl/xsldoc-scan.xsl
index 193530a..83d4ca4 100644
--- a/doc/yelp-xsl/xsldoc-scan.xsl
+++ b/doc/yelp-xsl/xsldoc-scan.xsl
@@ -88,8 +88,7 @@ free software.
         <xsl:for-each select="$calls_templates">
           <xsl:variable name="name" select="string(.)"/>
           <xsl:if test="not($page/processing-instruction('xslt-private')[string(.) = $name])">
-            <xsl:variable name="id" select="concat('T__', translate($name, '.', '_'))"/>
-            <item><p><link xref="{$id}"/></p></item>
+            <item><p><link xref="{$name}"/></p></item>
           </xsl:if>
         </xsl:for-each>
       </list>
@@ -107,8 +106,7 @@ free software.
         <xsl:variable name="mode" select="string(.)"/>
         <xsl:if test="not($page/processing-instruction('xslt-private')[string(.) = $mode])">
           <xsl:if test="not($node//mal:section[ style = 'xslt-mode' and mal:title = $mode])">
-            <xsl:variable name="id" select="concat('M__', translate($mode, '.', '_'))"/>
-            <link xref="{$id}"/>
+            <link xref="{$mode}"/>
           </xsl:if>
         </xsl:if>
       </xsl:for-each>
@@ -129,8 +127,9 @@ free software.
   <xsl:variable name="page" select="."/>
   <page id="{$xsldoc.id}" type="guide" style="xslt-stylesheet">
     <xsl:copy-of select="processing-instruction()"/>
+    <xsl:variable name="prefix" select="str:tokenize($xsldoc.id, '.-_')[1]"/>
     <info>
-      <link type="guide" xref="index__S"/>
+      <link type="guide" xref="stylesheets" group="{$prefix}"/>
       <xsl:if test="string(mal:desc) != ''">
         <xsl:copy-of select="mal:desc"/>
       </xsl:if>
@@ -143,17 +142,14 @@ free software.
           <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="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 test="not(/xsl:stylesheet/comment()[normalize-space(.) = concat('#! ', $subbase)])">
+                <link type="topic" xref="{$subbase}" group="stylesheets"/>
               </xsl:if>
             </xsl:for-each>
           </xsl:when>
           <xsl:otherwise>
-            <xsl:variable name="id" select="translate($base, '.', '_')"/>
-            <link type="topic" xref="{$id}" group="S"/>
+            <link type="topic" xref="{$base}" group="stylesheets"/>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:for-each>
@@ -161,24 +157,21 @@ free software.
       <xsl:for-each select="$xslt_file/xsl:template/@name">
         <xsl:variable name="name" select="string(.)"/>
         <xsl:if test="not($page/processing-instruction('xslt-private')[string(.) = $name])">
-          <xsl:variable name="id" select="concat('T__', translate($name, '.', '_'))"/>
-          <link type="xslt-defines-template" xref="{$id}"/>
+          <link type="xslt-defines-template" xref="{$name}"/>
         </xsl:if>
       </xsl:for-each>
       <!-- xslt-implements-mode -->
       <xsl:for-each select="set:distinct($xslt_file//xsl:template/@mode)">
         <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}"/>
+          <link type="xslt-implements-mode" xref="{$mode}"/>
         </xsl:if>
       </xsl:for-each>
       <!-- xslt-defines-param -->
       <xsl:for-each select="$xslt_file/xsl:param/@name">
         <xsl:variable name="name" select="string(.)"/>
         <xsl:if test="not($page/processing-instruction('xslt-private')[string(.) = $name])">
-          <xsl:variable name="id" select="concat('P__', translate($name, '.', '_'))"/>
-          <link type="xslt-defines-param" xref="{$id}"/>
+          <link type="xslt-defines-param" xref="{concat('P.', $name)}"/>
         </xsl:if>
       </xsl:for-each>
       <!-- xslt-uses-param -->
@@ -207,8 +200,7 @@ free software.
         </xsl:for-each>
       </xsl:variable>
       <xsl:for-each select="set:distinct(exsl:node-set($uses-params)/mal:param)">
-        <xsl:variable name="id" select="concat('P__', translate(string(.), '.', '_'))"/>
-        <link type="xslt-uses-param" xref="{$id}"/>
+        <link type="xslt-uses-param" xref="{concat('P.', .)}"/>
       </xsl:for-each>
     </info>
     <xsl:copy-of select="mal:title"/>
@@ -218,16 +210,16 @@ free software.
       </p>
     </xsl:if>
     <xsl:apply-templates/>
-    <links type="topic" groups="S" style="linklist">
+    <links type="topic" groups="stylesheets" style="linklist">
       <title>Stylesheets</title>
     </links>
-    <links type="topic" groups="P" style="linklist">
+    <links type="topic" groups="parameters" style="linklist">
       <title>Parameters</title>
     </links>
-    <links type="topic" groups="M" style="linklist">
+    <links type="topic" groups="modes" style="linklist">
       <title>Modes</title>
     </links>
-    <links type="topic" groups="T" style="linklist">
+    <links type="topic" groups="templates" style="linklist">
       <title>Templates</title>
     </links>
     <xsl:variable name="requires" select="$page/mal:info/mal:link[ type = 'xslt-requires']"/>
@@ -259,26 +251,30 @@ free software.
   <xsl:variable name="type">
     <xsl:choose>
       <xsl:when test="@style = 'xslt-template'">
-        <xsl:text>T</xsl:text>
+        <xsl:text>templates</xsl:text>
       </xsl:when>
       <xsl:when test="@style = 'xslt-mode'">
-        <xsl:text>M</xsl:text>
+        <xsl:text>modes</xsl:text>
       </xsl:when>
       <xsl:when test="@style = 'xslt-param'">
-        <xsl:text>P</xsl:text>
+        <xsl:text>parameters</xsl:text>
       </xsl:when>
     </xsl:choose>
   </xsl:variable>
   <xsl:variable name="id">
-    <xsl:value-of select="concat($type, '__', translate(mal:title, '.', '_'))"/>
+    <xsl:if test="$type = 'parameters'">
+      <xsl:text>P.</xsl:text>
+    </xsl:if>
+    <xsl:value-of select="mal:title"/>
   </xsl:variable>
   <exsl:document href="{$id}.page">
     <page id="{$id}" type="topic" style="{ style}">
+      <xsl:variable name="prefix" select="str:tokenize(mal:title, '.-_')[1]"/>
       <info>
         <link type="guide" xref="{$xsldoc.id}" group="{$type}"/>
-        <link type="guide" xref="index__{$type}"/>
+        <link type="guide" xref="{$type}" group="{$prefix}"/>
         <xsl:if test="count(mal:info/xsldoc:stub) > 0">
-          <link type="guide" xref="stubs"/>
+          <link type="guide" xref="stubs" group="{$prefix}"/>
         </xsl:if>
         <xsl:call-template name="revision"/>
         <xsl:copy-of select="mal:info/*[not(self::mal:revision)]"/>
@@ -289,7 +285,7 @@ free software.
           <xsl:copy-of select="mal:info/mal:desc/node()"/>
         </p>
       </xsl:if>
-      <xsl:if test="$type = 'T'">
+      <xsl:if test="$type = 'templates'">
         <xsl:if test="count(mal:info/xsldoc:stub) > 0">
           <note>
             <p>This template is a stub. Customizations may override it for
@@ -298,7 +294,7 @@ free software.
         </xsl:if>
       </xsl:if>
       <xsl:apply-templates/>
-      <xsl:if test="$type = 'T'">
+      <xsl:if test="$type = 'templates'">
         <xsl:variable name="title" select="mal:title"/>
         <xsl:variable name="xslt_node" select="$xslt_file//xsl:template[ name = $title]"/>
         <xsl:call-template name="calls_templates">
diff --git a/xslt/docbook/html/db2html-division.xsl b/xslt/docbook/html/db2html-division.xsl
index 53f8f3d..2abd288 100644
--- a/xslt/docbook/html/db2html-division.xsl
+++ b/xslt/docbook/html/db2html-division.xsl
@@ -161,6 +161,7 @@ REMARK: Talk about some of the parameters
   </xsl:choose>
 </xsl:template>
 
+<!--#* _db2html.division.div.inner -->
 <xsl:template name="_db2html.division.div.inner">
   <xsl:param name="node"/>
   <xsl:param name="info"/>
diff --git a/xslt/mallard/common/mal-gloss.xsl b/xslt/mallard/common/mal-gloss.xsl
index 8e7ef4a..96dce9f 100644
--- a/xslt/mallard/common/mal-gloss.xsl
+++ b/xslt/mallard/common/mal-gloss.xsl
@@ -26,7 +26,7 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
                 version="1.0">
 
 <!--!!==========================================================================
-Mallard - Glossaries
+Mallard Glossaries
 Common templates for the Mallard Glossary extension.
 
 This stylesheet contains utility templates for locating and linking to terms



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