]> granicus.if.org Git - docbook-dsssl/commitdiff
Made a number of changes related to elements with
authorMichael Smith <xmldoc@users.sourceforge.net>
Mon, 5 Feb 2007 07:20:57 +0000 (07:20 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Mon, 5 Feb 2007 07:20:57 +0000 (07:20 +0000)
out-of-line content:

- Added handling for mediaobject & inlinemedidaobject.
  Each imagedata, audiodata, or videodata element
  within a mediaobject or inline mediaobject is now
  treated as a "notesource" and so handled in much the
  same way as links and annotation/alt/footnotes.

  That means a numbered marker is generated inline to
  mark the place in the main flow where the imagedata,
  audiodata, or videodata element occurs, and a
  corresponding numbered endnote for it is generated in
  the endnotes list at the end of the man page; the
  endnote contains the URL from the fileref attribute
  of the imagedata, audiodata, or videodata element.

  For mediobject and inlinemediaobject instances that
  have a textobject child, the textobject is displayed
  within the main text flow.

- Renamed several man.link.* params to man.endnotes.*,
  to reflect that fact that the endnotes list now
  contains more than just links. Also did similar
  renaming for a number of stylesheet-internal vars.

- Added support for xlink:href (along with existing
  support for the legacy ulink element).

- Cleaned up and streamlined the endnotes-handling
  code. It's still messy and klunky and the basic
  mechanism it uses is very inefficent for documents
  that contain a lot of notesources, but at least it's
  a bit better than it was.

12 files changed:
xsl/manpages/block.xsl
xsl/manpages/docbook.xsl
xsl/manpages/inline.xsl
xsl/manpages/links.xsl
xsl/manpages/param.ent
xsl/manpages/param.xweb
xsl/params/man.endnotes.are.numbered.xml [moved from xsl/params/man.links.are.numbered.xml with 50% similarity]
xsl/params/man.endnotes.list.enabled.xml [new file with mode: 0644]
xsl/params/man.endnotes.list.heading.xml [new file with mode: 0644]
xsl/params/man.links.are.underlined.xml
xsl/params/man.links.list.enabled.xml [deleted file]
xsl/params/man.links.list.heading.xml [deleted file]

index b9454221a6fbcf765bc09611e343ab7138d2a5d0..1751a45286185ba0e0952cc95ff20c50824f7c7e 100644 (file)
   <xsl:call-template name="formal.object">
     <xsl:with-param name="placement" select="$placement"/>
   </xsl:call-template>
+  <xsl:text>&#10;</xsl:text>
+</xsl:template>
 
+<!-- ==================================================================== -->
+
+<xsl:template match="mediaobject">
+  <xsl:text>&#x2302;sp</xsl:text>
+  <xsl:text>&#10;</xsl:text>
+  <xsl:text>&#x2302;RS</xsl:text> 
+  <xsl:if test="not($list-indent = '')">
+    <xsl:text> </xsl:text>
+    <xsl:value-of select="$list-indent"/>
+  </xsl:if>
+  <xsl:text>&#10;</xsl:text>
+  <xsl:apply-templates/>
+  <xsl:text>&#10;</xsl:text>
+  <xsl:text>&#x2302;RE&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="imageobject">
+  <xsl:text>[IMAGE]</xsl:text>
+  <xsl:apply-templates/>
+  <xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="textobject[parent::inlinemediaobject]">
+  <xsl:text>[</xsl:text>
+  <xsl:value-of select="."/>
+  <xsl:text>]</xsl:text>
+</xsl:template>
+
+<xsl:template match="textobject">
+  <xsl:apply-templates/>
 </xsl:template>
 
 <!-- ==================================================================== -->
     <bold><xsl:apply-templates select="$object" mode="object.title.markup.textonly"/></bold>
   </xsl:param>
   <xsl:apply-templates mode="bold" select="exsl:node-set($title)"/>
+  <xsl:text>&#10;</xsl:text>
 </xsl:template>
 
 <!-- ==================================================================== -->
index 3a0b40148b38c96486fada6cf6348edb227b737d..db4cb3ddd2fe9896e57c812651d0fb142a0d8246 100644 (file)
         <xsl:with-param name="info" select="$info"/>
       </xsl:call-template>
       <!-- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-      <!-- * LINKS list (only if user wants links numbered and/or listed) -->
+      <!-- * NOTES list (only if user wants endnotes numbered and/or listed) -->
       <!-- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-      <xsl:if test="$man.links.list.enabled != 0 or
-                    $man.links.are.numbered != 0">
+      <xsl:if test="$man.endnotes.list.enabled != 0 or
+                    $man.endnotes.are.numbered != 0">
         <xsl:call-template name="endnotes.list"/>
       </xsl:if>
     </xsl:variable> <!-- * end of manpage.contents -->
index 21f70ba3fb23d3ea56eadbc39a184bd5285e1ad0..5583ff975b0b1f3ebf46e5e0ad8392067e9f1394 100644 (file)
   </xsl:choose>
 </xsl:template>
 
-<!-- * span in seems to sneak through into output sometimes, possibly due -->
+<!-- * span seems to sneak through into output sometimes, possibly due -->
 <!-- * to failed Olink processing; so we need to catch it -->
 <xsl:template match="span">
   <xsl:apply-templates/>
 </xsl:template>
 
+<xsl:template match="inlinemediaobject">
+  <xsl:apply-templates/>
+</xsl:template>
+
 </xsl:stylesheet>
index a332539e1bdb255ab0aed394959c1968e8052e4a..f0bad20011b0c5d4d24ebd6d17aecd72073be9cc 100644 (file)
@@ -3,7 +3,8 @@
                 xmlns:exsl="http://exslt.org/common"
                 xmlns:ng="http://docbook.org/docbook-ng"
                 xmlns:db="http://docbook.org/ns/docbook"
-                exclude-result-prefixes="db ng exsl"
+                xmlns:xlink="http://www.w3.org/1999/xlink"
+                exclude-result-prefixes="db ng exsl xlink"
                 version='1.0'>
 
 <!-- ********************************************************************
 
 <!-- ==================================================================== -->
 <!-- * -->
-<!-- * This stylesheet: -->
+<!-- * The templates in this file handle elements whose contents can't -->
+<!-- * be displayed completely within the main text flow in output, but -->
+<!-- * instead need to be displayed "out of line". Those elements are: -->
 <!-- * -->
-<!-- * 1. Identifies all "note sources" (link, annotation, alt, and -->
-<!-- *    footnote instances) in a Refentry which do not have the same -->
-<!-- *    "earmark" as any preceding notesource in that same Refentry -->
-<!-- *    (and for notesources that are links, then only those links -->
-<!-- *    whose string value and url attribute value are not identical). -->
+<!-- *   - elements providing annotative text (annotation|alt|footnote) -->
+<!-- *   - elements pointing at external resources (ulink, link, and -->
+<!-- *     any elements with xlink:href attributes; and imagedata, -->
+<!-- *     audiodata, and videodata - which (using their fileref -->
+<!-- *     attribute) reference external files -->
 <!-- * -->
-<!-- * 2. Puts a number inline to mark the place where the notesource -->
-<!-- *    occurs in the main text flow. -->
+<!-- * Within this stylesheet, the above are collectively referred to as -->
+<!-- * a "notesources". This stylesheet handles those notesources in -->
+<!-- * this way: -->
 <!-- * -->
-<!-- * 3. Generates a numbered endnotes list (titled NOTES in -->
-<!-- *    English) at the end of the man page, with the contents of -->
-<!-- *    each notesourcse. -->
+<!-- * 1. Constructs a numbered in-memory index of all unique "earmarks“ -->
+<!-- *    of all notesources in the document. For each link, the -->
+<!-- *    earmark is the value of its url or xlink:href attribute; for -->
+<!-- *    each imagedata|audiodata|videodata: the value of its fileref -->
+<!-- *    attribute; for each annotative element: its content. -->
 <!-- * -->
-<!-- * Note that table footnotes are not listed in the endnotes list, -->
-<!-- * and are not handled by this stylesheet (they are instead -->
-<!-- * handled by the table.xsl stylesheet). -->
+<!-- *    Notesources with the same earmark are assigned the same -->
+<!-- *    number. -->
 <!-- * -->
-<!-- * Also, we don't get notesources in *info sections or Refmeta or -->
-<!-- * Refnamediv or Indexterm, because, in manpages output, contents -->
-<!-- * of those are either suppressed or are displayed out of document -->
-<!-- * order - for example, the Info/Author content gets moved to the -->
-<!-- * end of the page. So, if we were to number notesources in the Author -->
-<!-- * content, it would "throw off" the numbering at the beginning of -->
-<!-- * the main text flow. -->
+<!-- *    By design, that index excludes any element whose whose string -->
+<!-- *    value is identical to value of its url xlink:href attribute). -->
+<!-- * -->
+<!-- * 2. Puts a numbered marker inline to mark the place where the -->
+<!-- *    notesource occurs in the main text flow. -->
 <!-- * -->
-<!-- * Important: For any notesource whose earmark matches that of a -->
-<!-- * preceding notesource in the same Refentry, we assign it the -->
-<!-- * number of that previous notesource. -->
+<!-- * 3. Generates a numbered endnotes list (titled NOTES in English) -->
+<!-- *    at the end of the man page, with the contents of each -->
+<!-- *    notesource. -->
 <!-- * -->
-<!-- * For links, we check to see if the link is empty OR if its -->
-<!-- * string value is identical to the value of its url attribute; if -->
-<!-- * either of those is true, we just display the value of its url -->
-<!-- * attribute (if the link itself is empty), and stop there. -->
+<!-- * Note that table footnotes are not listed in the endnotes list, -->
+<!-- * and are not handled by this stylesheet (they are instead handled -->
+<!-- * by the table.xsl stylesheet). -->
 <!-- * -->
-<!-- * And for the record, one reason we don't use xsl:key to index -->
-<!-- * the notesources is that we need to get and check the sets of -->
-<!-- * notesources for uniqueness per-Refentry (not per-document). -->
+<!-- * Also, we don't get notesources in *info sections or Refmeta or -->
+<!-- * Refnamediv or Indexterm, because, in manpages output, contents of -->
+<!-- * those are either suppressed or are displayed out of document -->
+<!-- * order - for example, the Info/Author content gets moved to the -->
+<!-- * end of the page. So, if we were to number notesources in the -->
+<!-- * Author content, it would "throw off" the numbering at the -->
+<!-- * beginning of the main text flow. -->
 <!-- * -->
-<!-- * FIXME: mediaobject and inlinemediaobject should also be handled -->
-<!-- * as notesources; should change most link* variable names to -->
-<!-- * notesource*; as with "repeat" URLS, alt instances that have the -->
-<!-- * same string value as preceding ones (likely to occur for repeat -->
-<!-- * acroynyms and abbreviations) should be listed only once in -->
-<!-- * the endnotes list, and numbered accordingly inline; split -->
-<!-- * man.indent.width into man.indent.width.value (default 4) and -->
-<!-- * man.indent.width.units (default n); also, if the first child of -->
-<!-- * notesource is some block content other than a (non-formal) -->
-<!-- * paragraph, the current code will probably end up generating a -->
-<!-- * blank line after the corresponding number in the endnotes -->
-<!-- * list... we should probably try to instead display the title of -->
-<!-- * that block content there (if there is one: e.g., the list title, -->
-<!-- * admonition title, etc.) -->
+<!-- * And for the record, one reason we don't use xsl:key to index the -->
+<!-- * earmarks is that we need to get and check the sets of -->
+<!-- * earmarks for uniqueness per-Refentry (not per-document). -->
 <!-- * -->
+<!-- * FIXME: as -->
+<!-- * with "repeat" URLS, alt instances that have the same string value -->
+<!-- * as preceding ones (likely to occur for repeat acroynyms and -->
+<!-- * abbreviations) should be listed only once in the endnotes list, -->
+<!-- * and numbered accordingly inline; split man.indent.width into -->
+<!-- * man.indent.width.value (default 4) and man.indent.width.units -->
+<!-- * (default n); also, if the first child of notesource is some block -->
+<!-- * content other than a (non-formal) paragraph, the current code -->
+<!-- * will probably end up generating a blank line after the -->
+<!-- * corresponding number in the endnotes list... we should probably -->
+<!-- * try to instead display the title of that block content there (if -->
+<!-- * there is one: e.g., the list title, admonition title, etc.) -->
+
 <!-- ==================================================================== -->
-      
-<xsl:template name="get.all.links.with.unique.urls">
-  <xsl:if test="$man.links.are.numbered != 0">
+
+<xsl:template name="get.all.earmark.indexes.in.current.document">
+  <!-- * Here we create a tree to hold indexes of all earmarks in -->
+  <!-- * the current document. If the current document contains -->
+  <!-- * multiple refentry instances, then this tree will contain -->
+  <!-- * multiple indexes. -->
+  <xsl:if test="$man.endnotes.are.numbered != 0">
+    <!-- * Only create earmark indexes if user wants numbered endnotes -->
     <xsl:for-each select="//refentry">
-      <refentry.link.set>
+      <earmark.index>
         <xsl:attribute name="idref">
           <xsl:value-of select="generate-id()"/>
         </xsl:attribute>
         <xsl:for-each
-            select=".//*[self::ulink
+            select=".//*[self::*[@xlink:href]
+                    or self::ulink
+                    or self::imagedata
+                    or self::audiodata
+                    or self::videodata
                     or self::footnote[not(ancestor::table)]
                     or self::annotation
                     or self::alt]
-                    [node()
+                    [(node()
+                      or self::imagedata
+                      or self::audiodata
+                      or self::videodata
+                      )
                     and not(ancestor::refentryinfo)
                     and not(ancestor::info)
                     and not(ancestor::docinfo)
                     and not(ancestor::refnamediv)
                     and not(ancestor::indexterm)
                     and not(. = @url)
+                    and not(. = @xlink:href)
                     and not(@url =
                     preceding::ulink[node()
                     and not(ancestor::refentryinfo)
                     and not(ancestor::refnamediv)
                     and not(ancestor::indexterm)
                     and (generate-id(ancestor::refentry)
-                    = generate-id(current()))]/@url)]">
-          <notesource>
-            <xsl:attribute name="earmark">
-              <xsl:choose>
-                <xsl:when test="@url">
-                  <xsl:value-of select="@url"/>
-                </xsl:when>
-                <xsl:otherwise>
-                  <xsl:value-of select="generate-id()"/>
-                </xsl:otherwise>
-              </xsl:choose>
+                    = generate-id(current()))]/@url)
+                    and not(@xlink:href =
+                    preceding::*[@xlink:href][node()
+                    and not(ancestor::refentryinfo)
+                    and not(ancestor::info)
+                    and not(ancestor::docinfo)
+                    and not(ancestor::refmeta)
+                    and not(ancestor::refnamediv)
+                    and not(ancestor::indexterm)
+                    and (generate-id(ancestor::refentry)
+                    = generate-id(current()))]/@xlink:href)
+                    and not(@fileref =
+                    preceding::*[@fileref][
+                    not(ancestor::refentryinfo)
+                    and not(ancestor::info)
+                    and not(ancestor::docinfo)
+                    and not(ancestor::refmeta)
+                    and not(ancestor::refnamediv)
+                    and not(ancestor::indexterm)
+                    and (generate-id(ancestor::refentry)
+                    = generate-id(current()))]/@fileref)]">
+          <earmark>
+            <xsl:attribute name="id">
+              <xsl:value-of select="generate-id()"/>
             </xsl:attribute>
+            <xsl:attribute name="number">
+              <xsl:value-of select="position()"/>
+            </xsl:attribute>
+            <xsl:if test="@url|@xlink:href|@fileref">
+              <!-- * Only add a uri attribute if the notesource is -->
+              <!-- * a link or an element that references an external -->
+              <!-- * (an imagedata, audiodata, or videodata element) -->
+              <xsl:attribute name="uri">
+                <xsl:value-of select="@url|@xlink:href|@fileref"/>
+              </xsl:attribute>
+            </xsl:if>
             <xsl:copy>
               <xsl:copy-of select="node()"/>
             </xsl:copy>
-          </notesource>
+          </earmark>
         </xsl:for-each>
-      </refentry.link.set>
+      </earmark.index>
     </xsl:for-each>
   </xsl:if>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="ulink|footnote[not(ancestor::table)]|annotation|alt">
-  <xsl:variable name="get.all.links.with.unique.urls">
-    <xsl:call-template  name="get.all.links.with.unique.urls"/>
+<xsl:template match="*[@xlink:href]|ulink
+                     |imagedata|audiodata|videodata
+                     |footnote[not(ancestor::table)]
+                     |annotation|alt">
+  <xsl:variable name="all.earmark.indexes.in.current.document.rtf">
+    <xsl:call-template name="get.all.earmark.indexes.in.current.document"/>
   </xsl:variable>
-  <xsl:variable name="all.links.with.unique.urls"
-                select="exsl:node-set($get.all.links.with.unique.urls)"/>
-  <xsl:variable name="get.links.with.unique.urls">
-    <!-- * get the set of all unique notesources in the ancestor Refentry of -->
+  <xsl:variable name="all.earmark.indexes.in.current.document"
+                select="exsl:node-set($all.earmark.indexes.in.current.document.rtf)"/>
+  <xsl:variable name="all.earmarks.in.current.refentry.rtf">
+    <!-- * get the set of all earmarks for the ancestor Refentry of -->
     <!-- * this notesource -->
     <xsl:copy-of
-        select="$all.links.with.unique.urls/refentry.link.set
-                [@idref = generate-id(current()/ancestor::refentry)]/notesource"/>
+        select="$all.earmark.indexes.in.current.document/earmark.index
+                [@idref =
+                generate-id(current()/ancestor::refentry)]/earmark"/>
   </xsl:variable>
-  <xsl:variable name="links.with.unique.urls"
-                select="exsl:node-set($get.links.with.unique.urls)"/>
-  <!-- * Identify the "earmark" for this notesource -->
+  <xsl:variable name="all.earmarks.in.current.refentry"
+                select="exsl:node-set($all.earmarks.in.current.refentry.rtf)"/>
+
+  <!-- * identify the earmark for the current element -->
   <xsl:variable name="earmark">
     <xsl:choose>
-      <xsl:when test="@url">
-        <xsl:value-of select="@url"/>
+      <xsl:when test="@url|@xlink:href">
+        <xsl:value-of select="@url|@xlink:href"/>
+      </xsl:when>
+      <xsl:when test="@fileref">
+        <xsl:value-of select="@fileref"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:value-of select="generate-id()"/>
       </xsl:otherwise>
     </xsl:choose>
   </xsl:variable>
-  <!-- * for links, $notesource is either the link contents (if the -->
-  <!-- * link is non-empty) or the "earmark" URL (if the link is empty) -->
-  <xsl:variable name="notesource">
+
+  <xsl:variable name="notesource.contents">
     <xsl:choose>
       <!-- * check to see if the element is empty or not; if it's -->
       <!-- * non-empty, get the content -->
         <xsl:apply-templates/>
       </xsl:when>
       <xsl:otherwise>
-        <!-- * Otherwise this is an empty link, so we just get the -->
-        <!-- * value of its URL; note that we don't number empty links -->
+        <!-- * Otherwise this is an empty link or an empty imagedata, -->
+        <!-- * audiodata, or videodata element, so we just get the -->
+        <!-- * value of its url, xlink:href, or fileref attribute. -->
         <!-- * -->
         <!-- * Add hyphenation suppression in URL output only if -->
         <!-- * break.after.slash is also non-zero -->
       </xsl:otherwise>
     </xsl:choose>
   </xsl:variable>
-  <xsl:if test="self::ulink">
-  <xsl:choose>
-    <!-- * if user wants links underlined, underline (ital) it -->
-    <xsl:when test="$man.links.are.underlined != 0">
-      <xsl:variable name="link.wrapper">
-        <italic><xsl:value-of select="$notesource"/></italic>
-      </xsl:variable>
-      <xsl:apply-templates mode="italic" select="exsl:node-set($link.wrapper)"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <!-- * user doesn't want links underlined, so just display content -->
-      <xsl:value-of select="$notesource"/>
-    </xsl:otherwise>
-  </xsl:choose>
+
+  <xsl:if test="self::ulink or self::*[@xlink:href]">
+    <!-- * This is a hyperlink, so we need to decide how to format -->
+    <!-- * the inline contents of the link (to underline or not). -->
+    <xsl:choose>
+      <!-- * if user wants links underlined, underline (ital) it -->
+      <xsl:when test="$man.links.are.underlined != 0">
+        <xsl:variable name="link.wrapper">
+          <italic><xsl:value-of select="$notesource.contents"/></italic>
+        </xsl:variable>
+        <xsl:apply-templates mode="italic"
+                             select="exsl:node-set($link.wrapper)"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <!-- * user doesn't want links underlined, so just display content -->
+        <xsl:value-of select="$notesource.contents"/>
+      </xsl:otherwise>
+    </xsl:choose>
   </xsl:if>
-  <!-- * If link is non-empty AND its string value is not equal to the -->
-  <!-- * value of its url attribute AND user wants notesources numbered, -->
-  <!-- * then output a number for it -->
-  <xsl:if test="node() and not(. = @url) and $man.links.are.numbered != 0">
-    <!-- * We number notesources by checking the $links.with.unique.urls -->
-    <!-- * set and finding the notesource whose earmark matches the -->
-    <!-- * earmark for this notesource. -->
-    <!-- * -->
-    <!-- * If this is the only instance in this Refentry of a notesource -->
-    <!-- * with this earmark, then it gets a unique number. -->
+
+  <!-- * Format the numbered marker for this notesource -->
+  <!-- * -->
+  <!-- * If this is an imagedata, audiodata, or videodata element -->
+  <!-- * OR if it's a non-empty element AND its string value is not -->
+  <!-- * equal to the value of its url or xlink:href attribute (if -->
+  <!-- * it has one) AND user wants endnotes numbered, only then -->
+  <!-- * do we output a number for it -->
+  <xsl:if test="(self::imagedata or
+                 self::audiodata or
+                 self::videodata or
+                  (node()
+                    and not(. = @url)
+                    and not(. = @xlink:href))
+                )
+                and $man.endnotes.are.numbered != 0">
+    <!-- * To generate the numbered marker for this notesource, we -->
+    <!-- * check the index of all earmarks for the current refentry -->
+    <!-- * and find the number of the indexed earmark which matches -->
+    <!-- * this notesource's earmark. -->
+    <!-- * Note that multiple notesources may share the same -->
+    <!-- * numbered earmark; in that case, they get the same number. -->
     <!-- * -->
-    <!-- * But if this is a notesource for which there are multiple -->
-    <!-- * instances of notesources in this Refentry that have the same -->
-    <!-- * earmark as this notesource, then the number assigned is the -->
-    <!-- * number of the _first_ instance of a notesource in this -->
-    <!-- * Refentry with the earmark for this notesource (which be the -->
-    <!-- * number of this notesource itself, if it happens to be the -->
-    <!-- * first instance). -->
     <xsl:variable name="notesource.number">
-      <xsl:apply-templates
-          select="$links.with.unique.urls/notesource[@earmark = $earmark][1]"
-          mode="notesource.number"/>
+      <xsl:choose>
+        <xsl:when test="self::ulink or
+                        self::*[@xlink:href] or
+                        self::imagedata or
+                        self::audiodata or
+                        self::videodata">
+          <xsl:value-of select="$all.earmarks.in.current.refentry/earmark[@uri = $earmark]/@number"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$all.earmarks.in.current.refentry/earmark[@id  = $earmark]/@number"/>
+        </xsl:otherwise>
+      </xsl:choose>
     </xsl:variable>
+
     <!-- * Format the number by placing it in square brackets. FIXME: -->
     <!-- * This formatting should probably be made user-configurable, -->
     <!-- * to allow something other than just square brackets; e.g., -->
 
 <!-- ==================================================================== -->
 
-<xsl:template match="*" mode="notesource.number">
-  <xsl:value-of select="count(preceding::*[(self::ulink
-                        or self::footnote[not(ancestor::table)]
-                        or self::annotation
-                        or self::alt)
-                        and node()
-                        and not(ancestor::refentryinfo)
-                        and not(ancestor::info)
-                        and not(ancestor::docinfo)
-                        and not(ancestor::refmeta)
-                        and not(ancestor::refnamediv)
-                        and not(ancestor::indexterm)
-                        and not(. = @url)
-                        and not(@url =
-                        preceding::ulink[node()
-                        and not(ancestor::refentryinfo)
-                        and not(ancestor::info)
-                        and not(ancestor::docinfo)
-                        and not(ancestor::refmeta)
-                        and not(ancestor::refnamediv)
-                        and not(ancestor::indexterm)
-                        and (generate-id(ancestor::refentry)
-                        = generate-id(current()/ancestor::refentry))]/@url)]
-                        [generate-id(ancestor::refentry)
-                        = generate-id(current()/ancestor::refentry)]) + 1"/>
-</xsl:template>
+<xsl:template name="endnotes.list">
+  <!-- We have stored earmark indexes for all refentry instances in the -->
+  <!-- current document, with the ID for each index being the same ID as -->
+  <!-- its corresponding refentry; so we now need to get the ID for the -->
+  <!-- current refentry so we can grab its corresponding earmark index -->
+  <xsl:variable name="current.refentry.id">
+    <xsl:value-of select="generate-id(.)"/>
+  </xsl:variable>
 
-<!-- ==================================================================== -->
+  <xsl:variable name="endnotes.rtf">
+    <xsl:variable name="all.earmark.indexes.in.current.document.rtf">
+      <xsl:call-template  name="get.all.earmark.indexes.in.current.document"/>
+    </xsl:variable>
+    <xsl:variable name="all.earmark.indexes.in.current.document"
+                  select="exsl:node-set($all.earmark.indexes.in.current.document.rtf)"/>
+      <xsl:copy-of
+          select="$all.earmark.indexes.in.current.document/earmark.index
+                  [@idref = $current.refentry.id]/earmark"/>
+  </xsl:variable>
 
-<xsl:template name="endnotes.list">
-  <xsl:variable name="notesources"
-                select=".//*[(self::ulink
-                  or self::footnote[not(ancestor::table)]
-                  or self::annotation
-                  or self::alt)
-                  and node()
-                  and not(ancestor::refentryinfo)
-                  and not(ancestor::info)
-                  and not(ancestor::docinfo)
-                  and not(ancestor::refmeta)
-                  and not(ancestor::refnamediv)
-                  and not(ancestor::indexterm)
-                  and not(. = @url)
-                  and not(@url =
-                  preceding::ulink[node()
-                  and not(ancestor::refentryinfo)
-                  and not(ancestor::info)
-                  and not(ancestor::docinfo)
-                  and not(ancestor::refmeta)
-                  and not(ancestor::refnamediv)
-                  and not(ancestor::indexterm)
-                  and (generate-id(ancestor::refentry)
-                  = generate-id(current()))]/@url)]"/>
-  <!-- * check to see if we have actually found any notesources; if we -->
-  <!-- * have, we generate the endnotes list, if not, we do nothing -->
-  <xsl:if test="$notesources/node()">
+  <xsl:variable name="endnotes" select="exsl:node-set($endnotes.rtf)"/>
+
+  <!-- * check to see if we have actually found any content to use as -->
+  <!-- * endnotes; if we have, we generate the endnotes list, if not, -->
+  <!-- * we do nothing -->
+  <xsl:if test="$endnotes/node()">
     <xsl:call-template name="format.endnotes.list">
-      <xsl:with-param name="notesources" select="$notesources"/>
+      <xsl:with-param name="endnotes" select="$endnotes"/>
     </xsl:call-template>
   </xsl:if>
+
 </xsl:template>
 
 <!-- ==================================================================== -->
 
 <xsl:template name="format.endnotes.list">
-  <xsl:param name="notesources"/>
+  <xsl:param name="endnotes"/>
   <xsl:call-template name="mark.subheading"/>
-  <!-- * make the endnotes-list section heading -->
+
+  <!-- * ======= make the endnotes-list section heading ============= -->
   <xsl:text>&#x2302;SH "</xsl:text>
   <xsl:call-template name="string.upper">
     <xsl:with-param name="string">
       <xsl:choose>
         <!-- * if user has specified a heading, use that -->
-        <xsl:when test="$man.links.list.heading != ''">
-          <xsl:value-of select="$man.links.list.heading"/>
+        <xsl:when test="$man.endnotes.list.heading != ''">
+          <xsl:value-of select="$man.endnotes.list.heading"/>
         </xsl:when>
         <xsl:otherwise>
           <!-- * otherwise, get localized heading from gentext -->
           <!-- * (in English, NOTES) -->
           <xsl:call-template name="gentext">
-            <xsl:with-param name="key" select="'References'"/>
+            <xsl:with-param name="key" select="'Notes'"/>
           </xsl:call-template>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:with-param>
   </xsl:call-template>
   <xsl:text>"&#10;</xsl:text>
-  <xsl:for-each select="$notesources">
+
+  <!-- * ================ process each earmark ====================== -->
+  <xsl:for-each select="$endnotes/earmark">
     <!-- * make paragraph with hanging indent, and starting with a -->
     <!-- * number in the form " 1." (padded to $man.indent.width - 1) -->
     <xsl:text>&#x2302;IP</xsl:text>
     <xsl:text> "</xsl:text>
     <xsl:variable name="endnote.number">
-      <xsl:apply-templates select="." mode="notesource.number"/>
+      <xsl:value-of select="@number"/>
       <xsl:text>.</xsl:text>
     </xsl:variable>
     <xsl:call-template name="prepend-pad">
       <xsl:value-of select="$list-indent"/>
     </xsl:if>
     <xsl:text>&#10;</xsl:text>
-    <!-- * Print the endnote contents -->
-    <!-- * -->
-    <!-- * IMPORTANT: If there are multiple notesources in this Refentry -->
-    <!-- * with the same earmark, this gets the contents of the first -->
-    <!-- * instance of the notesource in this Refentry with that earmark -->
+
+    <!-- * ========================================================= -->
+    <!-- *           print the notesource/endnote contents -->
+    <!-- * ========================================================= -->
     <xsl:choose>
-      <xsl:when test="self::ulink">
-        <xsl:variable name="contents">
-          <xsl:apply-templates/>
-        </xsl:variable>
-        <xsl:value-of select="normalize-space($contents)"/>
+      <xsl:when test="*/node()">
+        <!-- * if the earmark has non-empty child content, then -->
+        <!-- * its corresponding notesource is either a link or -->
+        <!-- * an instance of annotative text, so we want to -->
+        <!-- * display that content -->
+        <xsl:apply-templates select="*/node()"/>
       </xsl:when>
       <xsl:otherwise>
-        <xsl:apply-templates/>
+        <!-- * otherwise, this earmark has empty content, -->
+        <!-- * which means its corresponding notesources is an -->
+        <!-- * imagedata, audiodata, or videodata instance; in -->
+        <!-- * that case, we use the value of the notesoures's -->
+        <!-- * @fileref attribute (which is stored in the -->
+        <!-- * earmark uri attribute) as the "contents" for -->
+        <!-- * this endnote/notesource -->
+        <xsl:value-of select="@uri"/>
       </xsl:otherwise>
     </xsl:choose>
-    <xsl:text>&#10;</xsl:text> 
-    <xsl:if test="@url">
+    <xsl:text>&#10;</xsl:text>
+
+    <!-- * ========================================================= -->
+    <!-- *           print the URL for links -->
+    <!-- * ========================================================= -->
+    <!-- * In addition to the notesource contents, if the -->
+    <!-- * notesource is a link, we display the URL for the link. -->
+    <!-- * But for notesources that are imagedata, audiodata, or -->
+    <!-- * videodata instances, we don't want to (re)display the -->
+    <!-- * URL for those here, because for those elements, the -->
+    <!-- * notesource contents are the URL (the value of the -->
+    <!-- * @fileref attribute), and we have already rendered them. -->
+    <!-- * -->
+    <!-- * We know an earmark is a link if it has non-empty child -->
+    <!-- * content and a uri attribute; so we check for that -->
+    <!-- * condition here. -->
+    <xsl:if test="*/node() and @uri">
       <xsl:text>&#x2302;RS</xsl:text>
       <xsl:if test="not($list-indent = '')">
         <xsl:text> </xsl:text>
         <xsl:value-of select="$list-indent"/>
       </xsl:if>
       <xsl:text>&#10;</xsl:text>
-      <!-- * This is a link, so print its URL. -->
       <!-- * Add hyphenation suppression in URL output only if -->
       <!-- * $break.after.slash is also non-zero -->
       <xsl:if test="$man.hyphenate.urls = 0
         <xsl:call-template name="suppress.hyphenation"/>
         <xsl:text>&#x2593;%</xsl:text>
       </xsl:if>
-      <xsl:value-of select="@url"/>
+      <xsl:value-of select="@uri"/>
       <xsl:text>&#10;</xsl:text>
       <xsl:text>&#x2302;RE</xsl:text>
       <xsl:text>&#10;</xsl:text>
     </xsl:if>
+
   </xsl:for-each>
 </xsl:template>
 
index 5e6915fa8b91cce0fd225edc111a93b709087de5..fc47f70e0c9099ca3e9e8b221904290d8f0b9f3a 100644 (file)
@@ -9,10 +9,10 @@
 <!ENTITY man.indent.blurbs SYSTEM "../params/man.indent.blurbs.xml">
 <!ENTITY man.indent.lists SYSTEM "../params/man.indent.lists.xml">
 <!ENTITY man.indent.verbatims SYSTEM "../params/man.indent.verbatims.xml">
-<!ENTITY man.links.are.numbered SYSTEM "../params/man.links.are.numbered.xml">
+<!ENTITY man.endnotes.list.enabled SYSTEM "../params/man.endnotes.list.enabled.xml">
+<!ENTITY man.endnotes.list.heading SYSTEM "../params/man.endnotes.list.heading.xml">
+<!ENTITY man.endnotes.are.numbered SYSTEM "../params/man.endnotes.are.numbered.xml">
 <!ENTITY man.links.are.underlined SYSTEM "../params/man.links.are.underlined.xml">
-<!ENTITY man.links.list.enabled SYSTEM "../params/man.links.list.enabled.xml">
-<!ENTITY man.links.list.heading SYSTEM "../params/man.links.list.heading.xml">
 <!ENTITY variablelist.term.separator SYSTEM "../params/variablelist.term.separator.xml">
 <!ENTITY variablelist.term.break.after SYSTEM "../params/variablelist.term.break.after.xml">
 <!ENTITY man.string.subst.map.local.pre SYSTEM "../params/man.string.subst.map.local.pre.xml">
index f56817899b29627554a7e9084406c7c0e8966be8..84c3fc73f9cc6c8beb8d37a374c7b925dc213e40 100644 (file)
 &man.font.table.headings;
 &man.font.table.title;
   </reference>
-  <reference id="links">
-  <title>Link handling</title>
-&man.links.are.numbered;
+  <reference id="endnotes">
+  <title>Endnotes and link handling</title>
+&man.endnotes.list.enabled;
+&man.endnotes.list.heading;
+&man.endnotes.are.numbered;
 &man.links.are.underlined;
-&man.links.list.enabled;
-&man.links.list.heading;
   </reference>
   <reference id="lists">
   <title>Lists</title>
 <src:fragref linkend="man.string.subst.map.local.pre.frag"/>
 <src:fragref linkend="man.string.subst.map.frag"/>
 <src:fragref linkend="man.string.subst.map.local.post.frag"/>
-<src:fragref linkend="man.links.are.numbered.frag"/>
+<src:fragref linkend="man.endnotes.list.enabled.frag"/>
+<src:fragref linkend="man.endnotes.list.heading.frag"/>
+<src:fragref linkend="man.endnotes.are.numbered.frag"/>
 <src:fragref linkend="man.links.are.underlined.frag"/>
-<src:fragref linkend="man.links.list.enabled.frag"/>
-<src:fragref linkend="man.links.list.heading.frag"/>
 <src:fragref linkend="variablelist.term.separator.frag"/>
 <src:fragref linkend="variablelist.term.break.after.frag"/>
 <src:fragref linkend="man.charmap.enabled.frag"/>
similarity index 50%
rename from xsl/params/man.links.are.numbered.xml
rename to xsl/params/man.endnotes.are.numbered.xml
index ef4d3b40035b1cc41b14f3ec936208bac385dcef..a273144a71906163dfd178e80574792501585026 100644 (file)
@@ -1,69 +1,71 @@
 <refentry xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
           xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-          id="man.links.are.numbered">
+          id="man.endnotes.are.numbered">
 <refmeta>
-<refentrytitle>man.links.are.numbered</refentrytitle>
+<refentrytitle>man.endnotes.are.numbered</refentrytitle>
 <refmiscinfo role="type">boolean</refmiscinfo>
 </refmeta>
 <refnamediv>
-<refname>man.links.are.numbered</refname>
-<refpurpose>Number links?</refpurpose>
+<refname>man.endnotes.are.numbered</refname>
+<refpurpose>Number endnotes?</refpurpose>
 </refnamediv>
 
 <refsynopsisdiv>
-<src:fragment id='man.links.are.numbered.frag'>
-<xsl:param name="man.links.are.numbered">1</xsl:param>
+<src:fragment id='man.endnotes.are.numbered.frag'>
+<xsl:param name="man.endnotes.are.numbered">1</xsl:param>
 </src:fragment>
 </refsynopsisdiv>
 
 <refsect1><title>Description</title>
 
-<para>If the value of <parameter>man.links.are.numbered</parameter> is
+<para>If the value of <parameter>man.endnotes.are.numbered</parameter> is
 non-zero (the default), then for each non-empty<footnote>
-<para>A <quote>non-empty</quote> link is one that looks like
+<para>A “non-empty” notesource is one that looks like
 this:<literallayout class="monospaced"
  >  &lt;ulink url="http://docbook.sf.net/snapshot/xsl/doc/manpages/">manpages&lt;/ulink></literallayout>
-an <quote>empty link</quote> is on that looks like this:<literallayout class="monospaced"
+an “empty” notesource is on that looks like this:<literallayout class="monospaced"
  >  &lt;ulink url="http://docbook.sf.net/snapshot/xsl/doc/manpages/"/></literallayout>
-</para></footnote> link:
+</para></footnote> “notesource”:
 
 <itemizedlist>
   <listitem>
-    <para>a number (in square brackets) is displayed inline before the
-    rendered contents of the link</para>
+    <para>a number (in square brackets) is displayed inline after the
+    rendered inline contents (if any) of the notesource</para>
   </listitem>
   <listitem>
-    <para>the URL for the link is included in a numbered list of links
-    that is generated at the end of each man page; the number for each
-    links corresponds to the inline number for the link with which it is
-    associated</para>
+    <para>the contents of the notesource are included in a
+      numbered list of endnotes that is generated at the end of
+      each man page; the number for each endnote corresponds to
+      the inline number for the notesource with which it is
+      associated</para>
   </listitem>
 </itemizedlist>
-The default heading for the list of links is
-<literal>REFERENCES</literal>. To output a different heading, set a value
+The default heading for the list of endnotes is
+<literal>NOTES</literal>. To output a different heading, set a value
 for the <parameter>man.links.section.heading</parameter>
 parameter.</para>
 
 <note>
-  <para>The link list is also displayed (but without numbers) if the
-  value of <parameter>man.links.list.enabled</parameter> is
-  non-zero.</para>
+  <para>The endnotes list is also displayed (but without
+    numbers) if the value of
+    <parameter>man.links.list.enabled</parameter> is
+    non-zero.</para>
 </note>
 
 
-<para>If the value of <parameter>man.links.are.numbered</parameter> is
-zero, numbering of links is suppressed; only the link contents are
-displayed inline.
+<para>If the value of <parameter>man.endnotes.are.numbered</parameter> is
+zero, numbering of endnotess is suppressed; only inline
+contents (if any) of the notesource are displayed inline.
 <important>
-  <para>If you are thinking about disabling link numbering by setting
-  the value of <parameter>man.links.are.numbered</parameter> to zero,
+  <para>If you are thinking about disabling endnote numbering by setting
+  the value of <parameter>man.endnotes.are.numbered</parameter> to zero,
   before you do so, first take some time to carefully
   consider the information needs and experiences of your users. The
-  square-bracketed numbers displayed inline before links may seem
+  square-bracketed numbers displayed inline after notesources may seem
   obstrusive and aesthetically unpleasing<footnote 
   
-  ><para>You might
-  think that it would be better to just display URLs for non-empty
+  ><para>As far as notesources that are links, ytou might
+  think it would be better to just display URLs for non-empty
   links inline, after their content, rather than displaying
   square-bracketed numbers all over the place. But it's not better. In
   fact, it's not even practical, because many (most) URLs for links
@@ -73,33 +75,29 @@ displayed inline.
   that, but it could be argued that what you end up with is at least
   as ugly, and definitely more obstrusive, then having short
   square-bracketed numbers displayed inline.</para></footnote>,
-   
-  but in a text-only output format, the numbered-links/link-listing
-  mechanism is the only practical way of associating inline text with
-  URLs.</para>
 
-  <para>Also, users of <quote>text based</quote> browsers such as
+  but in a text-only output format, the
+  numbered-notesources/endnotes-listing mechanism is the only
+  practical way to handle this kind of content.</para>
+
+  <para>Also, users of “text based” browsers such as
   <command>lynx</command> will already be accustomed to seeing inline
   numbers for links. And various "man to html" applications, such as
   the widely used <command><ulink
   url="http://users.actrix.gen.nz/michael/vhman2html.html"
   >man2html</ulink></command> (<literal>VH-Man2html</literal>)
   application, can automatically turn URLs into "real" HTML hyperlinks
-  in output. So leaving <parameter>man.links.are.numbered</parameter>
-  at its default (non-zero) value ensures that no link information is
+  in output. So leaving <parameter>man.endnotes.are.numbered</parameter>
+  at its default (non-zero) value ensures that no information is
   lost in your man-page output. It just gets
-  <quote>rearranged</quote>.</para>
+  “rearranged”.</para>
 </important>
 </para>
 <para>The handling of empty links is not affected by this
 parameter. Empty links are handled simply by displaying their URLs
 inline. Empty links are never auto-numbered.</para>
-<note>
-  <para>Currently, this parameter only affects output for
-  <tag>ulink</tag>s.</para>
-</note>
 
-<para>If you disable link numbering, you should probably also set
+<para>If you disable endnotes numbering, you should probably also set
 <parameter>man.links.are.underlined</parameter> to zero (to disable
 link underlining).</para>
 </refsect1>
diff --git a/xsl/params/man.endnotes.list.enabled.xml b/xsl/params/man.endnotes.list.enabled.xml
new file mode 100644 (file)
index 0000000..d528ac3
--- /dev/null
@@ -0,0 +1,106 @@
+<refentry xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
+          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+          id="man.endnotes.list.enabled">
+<refmeta>
+<refentrytitle>man.endnotes.list.enabled</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>man.endnotes.list.enabled</refname>
+<refpurpose>Display endnotes list at end of man page?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='man.endnotes.list.enabled.frag'>
+<xsl:param name="man.endnotes.list.enabled">1</xsl:param>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If the value of <parameter>man.endnotes.list.enabled</parameter> is
+non-zero (the default), then an endnotes list is added to the end of
+the output man page.</para>
+
+<para>If the value of <parameter>man.endnotes.list.enabled</parameter> is
+zero, the list is suppressed — unless link numbering is enabled (that
+is, if <parameter>man.endnotes.are.numbered</parameter> is non-zero), in
+which case, that setting overrides the
+<parameter>man.endnotes.list.enabled</parameter> setting, and the
+endnotes list is still displayed. The reason is that inline
+numbering of notesources associated with endnotes only makes sense
+if a (numbered) list of endnotes is also generated.</para>
+
+<note>
+  <para>Leaving
+  <parameter>man.endnotes.list.enabled</parameter> at its default
+  (non-zero) value ensures that no “out of line” information (such
+  as the URLs for hyperlinks and images) gets lost in your
+  man-page output. It just gets “rearranged”.</para>
+  <para>So if you’re thinking about disabling endnotes listing by
+    setting the value of
+    <parameter>man.endnotes.list.enabled</parameter> to zero:
+    Before you do so, first take some time to carefully consider
+    the information needs and experiences of your users. The “out
+    of line” information has value even if the presentation of it
+    in text output is not as interactive as it may be in other
+    output formats.</para>
+  <para>As far as the specific case of URLs: Even though the URLs
+    displayed in text output may not be “real” (clickable)
+    hyperlinks, many X terminals have convenience features for
+    recognizing URLs and can, for example, present users with
+    an options to open a URL in a browser with the user clicks on
+    the URL is a terminal window. And short of those, users with X
+    terminals can always manualy cut and paste the URLs into a web
+    browser.</para>
+  <para>Also, note that various “man to html” tools, such as the
+    widely used <command><ulink
+        url="http://users.actrix.gen.nz/michael/vhman2html.html"
+  >man2html</ulink></command> (<literal>VH-Man2html</literal>)
+  application, automatically mark up URLs with into a@href markup
+  during conversion — resulting in “real” hyperlinks in HTML
+  output from those tools.</para>
+</note>
+
+<para>To “turn off” numbering of endnotes in the
+endnotes list, set <parameter>man.endnotes.are.numbered</parameter>
+to zero. The endnotes list will
+still be displayed; it will just be displayed without the
+numbers<footnote ><para>It can still make sense to have
+the list of endnotes displayed even if you have endnotes numbering turned
+off. In that case, your endnotes list basically becomes a “list
+of references” without any association with specific text in
+your document. This is probably the best option if you find the inline
+endnotes numbering obtrusive. Your users will still have access to all the “out of line”
+such as URLs for hyperlinks.</para></footnote>
+</para>
+
+<para>The default heading for the endnotes list is
+<literal>NOTES</literal>. To change that, set a non-empty
+value for the <parameter>man.endnotes.list.heading</parameter>
+parameter.</para>
+
+<para>In the case of notesources that are links: Along with the
+URL for each link, the endnotes list includes the contents of the
+link. The list thus includes only non-empty<footnote
+ >
+
+<para>A “non-empty” link is one that looks like
+this:<literallayout class="monospaced" >  &lt;ulink url="http://docbook.sf.net/snapshot/xsl/doc/manpages/">manpages&lt;/ulink></literallayout>
+an “empty link” is on that looks like this:<literallayout
+class="monospaced" >  &lt;ulink url="http://docbook.sf.net/snapshot/xsl/doc/manpages/"/></literallayout>
+</para></footnote> links.
+
+Empty links are never included, and never numbered. They are simply
+displayed inline, without any numbering.</para>
+
+<para>In addition, if there are multiple instances of links in a
+<tag>refentry</tag> that have the same URL, the URL is listed only
+once. The contents listed for that link in the endnotes list are
+the contents of the first link which has that URL.</para>
+
+<para>If you disable endnotes listing, you should probably also set
+<parameter>man.links.are.underlined</parameter> to zero (to disable
+link underlining).</para>
+</refsect1>
+</refentry>
diff --git a/xsl/params/man.endnotes.list.heading.xml b/xsl/params/man.endnotes.list.heading.xml
new file mode 100644 (file)
index 0000000..893ff4d
--- /dev/null
@@ -0,0 +1,33 @@
+<refentry xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
+          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+          id="man.endnotes.list.heading">
+<refmeta>
+<refentrytitle>man.endnotes.list.heading</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>man.endnotes.list.heading</refname>
+<refpurpose>Specifies an alternate name for endnotes list</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='man.endnotes.list.heading.frag'>
+<xsl:param name="man.endnotes.list.heading" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If the value of the
+<parameter>man.endnotes.are.numbered</parameter> parameter
+and/or the <parameter>man.endnotes.list.enabled</parameter>
+parameter is non-zero (the defaults for both are non-zero), a
+numbered list of endnotes is generated near the end of each man
+page. The default heading for the list of endnotes is the
+equivalent of the English word <literal>NOTES</literal> in
+the current locale. To cause an alternate heading to be displayed,
+set a non-empty value for the
+<parameter>man.endnotes.list.heading</parameter> parameter —
+for example, <literal>REFERENCES</literal>.</para>
+</refsect1>
+</refentry>
index 18011e158ffdddf77fc3025c76a3851a6904defa..9aaefcdcf13e1321d40ce4c57266a69372d5ff38 100644 (file)
@@ -39,8 +39,8 @@ you should probably set a non-zero value for
 <parameter>man.links.are.underlined</parameter> also<footnote
 ><para>If the main purpose of underlining of links in most output
 formats it to indicate that the underlined text is
-<quote>clickable</quote>, given that links rendered in man pages are
-not <quote>real</quote> hyperlinks that users can click on, it might
+“clickable”, given that links rendered in man pages are
+not “real” hyperlinks that users can click on, it might
 seem like there is never a good reason to have link contents
 underlined in man output.</para> <para>In fact, if you suppress the
 display of inline link references (by setting
@@ -48,9 +48,9 @@ display of inline link references (by setting
 good reason to have links underlined. However, if
 <parameter>man.links.are.numbered</parameter> is non-zero, having
 links underlined may (arguably) serve a purpose: It provides
-<quote>context</quote> information about exactly what part of the text
-is being <quote>annotated</quote> by the link. Depending on how you
-use mark up your content, that context information may or may not have
-value.</para></footnote>.</para>
+“context” information about exactly what part of the text
+is being “annotated” by the link. Depending on how you
+mark up your content, that context information may or may not
+have value.</para></footnote>.</para>
 </refsect1>
 </refentry>
diff --git a/xsl/params/man.links.list.enabled.xml b/xsl/params/man.links.list.enabled.xml
deleted file mode 100644 (file)
index f2342fb..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-<refentry xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
-          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-          id="man.links.list.enabled">
-<refmeta>
-<refentrytitle>man.links.list.enabled</refentrytitle>
-<refmiscinfo role="type">boolean</refmiscinfo>
-</refmeta>
-<refnamediv>
-<refname>man.links.list.enabled</refname>
-<refpurpose>Display list of links at end of man page?</refpurpose>
-</refnamediv>
-
-<refsynopsisdiv>
-<src:fragment id='man.links.list.enabled.frag'>
-<xsl:param name="man.links.list.enabled">1</xsl:param>
-</src:fragment>
-</refsynopsisdiv>
-
-<refsect1><title>Description</title>
-
-<para>If the value of <parameter>man.links.list.enabled</parameter> is
-non-zero (the default), then a list of links is added to the end of
-the output man page.</para>
-
-<para>If the value of <parameter>man.links.list.enabled</parameter> is
-zero, the list is suppressed -- unless link numbering is enabled (that
-is, if <parameter>man.links.are.numbered</parameter> is non-zero), in
-which case, that setting overrides the
-<parameter>man.links.list.enabled</parameter> setting, and the link
-list is still displayed. The reason is that link numbering only makes
-sense if a (numbered) list of links is also generated.</para>
-
-<note>
-  <para>Various <quote>man to html</quote> applications, such as the
-  widely used <command><ulink
-  url="http://users.actrix.gen.nz/michael/vhman2html.html"
-  >man2html</ulink></command> (<literal>VH-Man2html</literal>)
-  application, can automatically turn URLs into <quote>real</quote>
-  HTML hyperlinks in output. So leaving
-  <parameter>man.links.list.enabled</parameter> at its default
-  (non-zero) value ensures that no link URLs are lost in your man-page
-  output. They just get <quote>rearranged</quote>. So if you are
-  thinking about disabling link listing by setting the value of
-  <parameter>man.links.list.enabled</parameter> to zero, before you do
-  so, first take some time to carefully consider the information needs
-  and experiences of your users. The URLs are useful information even
-  if they aren't <quote>real</quote> (clickable) hyperlinks.</para>
-</note>
-
-<para>To <quote>turn off</quote> numbering of links in the list, set
-<parameter>man.links.are.numbered</parameter> to zero. The list will
-still be displayed; it will just be displayed without the
-numbers<footnote ><para>It can still <quote>make sense</quote> to have
-the list of links displayed even if you have link numbering turned
-off. In that case, your list of links basically becomes a <quote>list
-of references</quote> without any association with specific text in
-your document. This is probably the best option if you find the inline
-link numbering obtrusive. Your users will still have access to the
-URLs and link contents, without being annoyed by the presence of
-inline link numbering.</para></footnote>
-</para>
-
-<para>The default heading for the section in which the list appears is
-<literal>REFERENCES</literal>. To change that, set a non-empty value
-for the <parameter>man.links.list.heading</parameter>
-parameter.</para>
-
-<para>Along with the URL for each link, the link list includes the contents
-of the link. The list thus includes only non-empty<footnote
- >
-
-<para>A <quote>non-empty</quote> link is one that looks like
-this:<literallayout class="monospaced" >  &lt;ulink url="http://docbook.sf.net/snapshot/xsl/doc/manpages/">manpages&lt;/ulink></literallayout>
-an <quote>empty link</quote> is on that looks like this:<literallayout
-class="monospaced" >  &lt;ulink url="http://docbook.sf.net/snapshot/xsl/doc/manpages/"/></literallayout>
-</para></footnote> links.
-
-Empty links are never included, and never numbered. They are simply
-displayed inline, without any numbering.</para>
-
-<para>In addition, if there are multiple instances of links in a
-<tag>refentry</tag> that have the same URL, the URL is listed only
-once. The contents listed for that link are the contents of the first
-link which has that URL.</para>
-
-<note>
-  <para>Currently, this parameter only affects output for
-  <tag>ulink</tag>s.</para>
-</note>
-
-<para>If you disable link listing, you should probably also set
-<parameter>man.links.are.underlined</parameter> to zero (to disable
-link underlining).</para>
-</refsect1>
-</refentry>
diff --git a/xsl/params/man.links.list.heading.xml b/xsl/params/man.links.list.heading.xml
deleted file mode 100644 (file)
index 46aaa11..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<refentry xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
-          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-          id="man.links.list.heading">
-<refmeta>
-<refentrytitle>man.links.list.heading</refentrytitle>
-<refmiscinfo role="type">string</refmiscinfo>
-</refmeta>
-<refnamediv>
-<refname>man.links.list.heading</refname>
-<refpurpose>Specifies an alternate name for links list</refpurpose>
-</refnamediv>
-
-<refsynopsisdiv>
-<src:fragment id='man.links.list.heading.frag'>
-<xsl:param name="man.links.list.heading" select="''"/>
-</src:fragment>
-</refsynopsisdiv>
-
-<refsect1><title>Description</title>
-
-<para>If the value of the
-<parameter>man.links.are.numbered</parameter> parameter and/or the
-<parameter>man.links.list.enabled</parameter> parameter is non-zero
-(the defaults for both are non-zero), a numbered list of URLs is
-generated near the end of each man page. The default section heading
-for the list of links is the equivalent of the English word
-<literal>REFERENCES</literal> in the current locale. To cause an
-alternate heading to be displayed, set a non-empty value for the
-<parameter>man.links.list.heading</parameter> parameter -- for
-example, <literal>LINKS</literal>.</para>
-</refsect1>
-</refentry>