Changeset 8171

Show
Ignore:
Timestamp:
06/24/07 04:12:22 (1 year ago)
Author:
manuel
Message:

Updated docbook-xsl-snapshot to r6863

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/new-xsl/docbook-xsl-snapshot/VERSION

    r8151 r8171  
    1818  <fm:Project>DocBook</fm:Project> 
    1919  <fm:Branch>XSL Stylesheets</fm:Branch> 
    20   <fm:Version>snapshot_6830</fm:Version> 
     20  <fm:Version>snapshot_6863</fm:Version> 
    2121<!-- 
    2222  <fm:License>MIT/X Consortium License</fm:License> 
  • branches/new-xsl/docbook-xsl-snapshot/common/common.xsl

    r7978 r8171  
    19671967  <refpurpose>Evaluates an info profile</refpurpose> 
    19681968  <refdescription> 
    1969     <para>This function evaluates an "info profile" matching the XPath 
     1969    <para>This template evaluates an "info profile" matching the XPath 
    19701970    expression given by the <parameter>profile</parameter> 
    19711971    parameter. It relies on the XSLT <function>evaluate()</function> 
     
    20342034 
    20352035  <refdescription> 
    2036     <para>The <function>log.message</function> function is a utility 
    2037     function for logging/emitting formatted messages&#xa0;– that is, 
     2036    <para>The <function>log.message</function> template is a utility 
     2037    template for logging/emitting formatted messages&#xa0;– that is, 
    20382038    notes and warnings, along with a given log "level" and an 
    20392039    identifier for the "source" that the message relates to.</para> 
     
    20452045        <term>level</term> 
    20462046        <listitem> 
    2047           <para>Text to indicate the message level 
     2047          <para>Text to log/emit in the message-level field to 
     2048            indicate the message level 
    20482049          (<literal>Note</literal> or 
    20492050          <literal>Warning</literal>)</para> 
     
    20532054        <term>source</term> 
    20542055        <listitem> 
    2055           <para>Text to identify source element the 
    2056           notification/warning relates to</para> 
     2056          <para>Text to log/emit in the source field to identify the 
     2057            “source” to which the notification/warning relates. 
     2058            This can be any arbitrary string, but because the 
     2059            message lacks line and column numbers to identify the 
     2060            exact part of the source document to which it 
     2061            relates, the intention is that the value you pass 
     2062            into the <literal>source</literal> parameter should 
     2063            give the user some way to identify the portion of 
     2064            their source document on which to take potentially 
     2065            take action in response to the log message (for 
     2066            example, to edit, change, or add content).</para> 
     2067          <para>So the <literal>source</literal> value should be, 
     2068            for example, an ID, book/chapter/article title, title 
     2069            of some formal object, or even a string giving an 
     2070            XPath expression.</para> 
     2071        </listitem> 
     2072      </varlistentry> 
     2073      <varlistentry> 
     2074        <term>context-desc</term> 
     2075        <listitem> 
     2076          <para>Text to log/emit in the context-description field to 
     2077            describe the context for the message.</para> 
     2078        </listitem> 
     2079      </varlistentry> 
     2080      <varlistentry> 
     2081        <term>context-desc-field-length</term> 
     2082        <listitem> 
     2083          <para>Specifies length of the context-description field 
     2084            (in characters); default is 12</para> 
     2085          <para>If the text specified by the 
     2086            <literal>context-desc</literal> parameter is longer 
     2087            than the number of characters specified in 
     2088            <literal>context-desc-field-length</literal>, it is 
     2089            truncated to <literal>context-desc-field-length</literal> 
     2090            (12 characters by default).</para> 
     2091          <para>If the specified text is shorter than 
     2092            <literal>context-desc-field-length</literal>, 
     2093          it is right-padded out to 
     2094          <literal>context-desc-field-length</literal> (12 by 
     2095          default).</para> 
     2096        <para>If no value has been specified for the 
     2097          <literal>context-desc</literal> parameter, the field is 
     2098          left empty and the text of the log message begins with 
     2099          the value of the <literal>message</literal> 
     2100          parameter.</para> 
    20572101        </listitem> 
    20582102      </varlistentry> 
     
    20602104        <term>message</term> 
    20612105        <listitem> 
    2062           <para>Message to lot/emit</para> 
     2106          <para>Text to log/emit in the actual message field</para> 
    20632107        </listitem> 
    20642108      </varlistentry> 
    20652109      <varlistentry> 
    2066         <term>message-width</term> 
     2110        <term>message-field-length</term> 
    20672111        <listitem> 
    2068           <para>Expected maximum message width</para> 
     2112          <para>Specifies length of the message 
     2113            field (in characters); default is 45</para> 
    20692114        </listitem> 
    20702115      </varlistentry> 
     
    20782123  <xsl:param name="level"/> 
    20792124  <xsl:param name="source"/> 
     2125  <xsl:param name="context-desc"/> 
     2126  <xsl:param name="context-desc-field-length">12</xsl:param> 
     2127  <xsl:param name="context-desc-padded"> 
     2128    <xsl:if test="not($context-desc = '')"> 
     2129      <xsl:call-template name="pad-string"> 
     2130        <xsl:with-param name="leftRight">right</xsl:with-param> 
     2131        <xsl:with-param name="padVar" 
     2132          select="substring($context-desc, 1, $context-desc-field-length)"/> 
     2133        <xsl:with-param name="length" select="$context-desc-field-length"/> 
     2134      </xsl:call-template> 
     2135    </xsl:if> 
     2136  </xsl:param> 
    20802137  <xsl:param name="message"/> 
    2081   <xsl:param name="message-width">50</xsl:param> 
    2082   <xsl:message><xsl:value-of 
    2083   select="$level"/><xsl:text>: </xsl:text><xsl:value-of 
    2084   select="$message"/><xsl:call-template 
    2085   name="copy-string"> 
    2086   <xsl:with-param name="string" select="'&#x20;'"/> 
    2087   <xsl:with-param 
    2088       name="count" 
    2089       select="$message-width - string-length($message)"/> 
    2090   </xsl:call-template><xsl:value-of 
    2091   select="$source"/></xsl:message> 
     2138  <xsl:param name="message-field-length" select="45"/> 
     2139  <xsl:param name="message-padded"> 
     2140    <xsl:variable name="spaces-for-blank-level"> 
     2141      <!-- * if the level field is blank, we'll need to pad out --> 
     2142      <!-- * the message field with spaces to compensate --> 
     2143      <xsl:choose> 
     2144        <xsl:when test="$level = ''"> 
     2145          <xsl:value-of select="4 + 2"/> 
     2146          <!-- * 4 = hard-coded length of comment text ("Note" or "Warn") --> 
     2147          <!-- * + 2 = length of colon-plus-space separator ": " --> 
     2148        </xsl:when> 
     2149        <xsl:otherwise> 
     2150          <xsl:value-of select="0"/> 
     2151        </xsl:otherwise> 
     2152      </xsl:choose> 
     2153    </xsl:variable> 
     2154    <xsl:variable name="spaces-for-blank-context-desc"> 
     2155      <!-- * if the context-description field is blank, we'll need --> 
     2156      <!-- * to pad out the message field with spaces to compensate --> 
     2157      <xsl:choose> 
     2158        <xsl:when test="$context-desc = ''"> 
     2159          <xsl:value-of select="$context-desc-field-length + 2"/> 
     2160          <!-- * + 2 = length of colon-plus-space separator ": " --> 
     2161        </xsl:when> 
     2162        <xsl:otherwise> 
     2163          <xsl:value-of select="0"/> 
     2164        </xsl:otherwise> 
     2165      </xsl:choose> 
     2166    </xsl:variable> 
     2167    <xsl:variable name="extra-spaces" 
     2168      select="$spaces-for-blank-level + $spaces-for-blank-context-desc"/> 
     2169    <xsl:call-template name="pad-string"> 
     2170      <xsl:with-param name="leftRight">right</xsl:with-param> 
     2171      <xsl:with-param name="padVar" 
     2172        select="substring($message, 1, ($message-field-length + $extra-spaces))"/> 
     2173      <xsl:with-param name="length" 
     2174        select="$message-field-length + $extra-spaces"/> 
     2175    </xsl:call-template> 
     2176  </xsl:param> 
     2177  <!-- * emit the actual log message --> 
     2178  <xsl:message> 
     2179    <xsl:if test="not($level = '')"> 
     2180      <xsl:value-of select="$level"/> 
     2181      <xsl:text>: </xsl:text> 
     2182    </xsl:if> 
     2183    <xsl:if test="not($context-desc = '')"> 
     2184      <xsl:value-of select="$context-desc-padded"/> 
     2185      <xsl:text>: </xsl:text> 
     2186    </xsl:if> 
     2187    <xsl:value-of select="$message-padded"/> 
     2188    <xsl:text>  </xsl:text> 
     2189    <xsl:value-of select="$source"/> 
     2190  </xsl:message> 
    20922191</xsl:template> 
    20932192 
  • branches/new-xsl/docbook-xsl-snapshot/common/cs.xml

    r7982 r8171  
    162162<l:gentext key="unsupported" text="nepodporovanÜ"/> 
    163163<l:gentext key="xrefto" text="xref k"/> 
    164 <l:gentext key="Authors" text="Authors" lang="en"/> 
    165 <l:gentext key="copyeditor" text="Copy Editor" lang="en"/> 
    166 <l:gentext key="graphicdesigner" text="Graphic Designer" lang="en"/> 
    167 <l:gentext key="productioneditor" text="Production Editor" lang="en"/> 
    168 <l:gentext key="technicaleditor" text="Technical Editor" lang="en"/> 
    169 <l:gentext key="translator" text="Translator" lang="en"/> 
     164<l:gentext key="Authors" text="Autoři"/> 
     165<l:gentext key="copyeditor" text="Korektor"/> 
     166<l:gentext key="graphicdesigner" text="GrafickÜ designér"/> 
     167<l:gentext key="productioneditor" text="Produkce"/> 
     168<l:gentext key="technicaleditor" text="TechnickÜ editor"/> 
     169<l:gentext key="translator" text="Překladatel"/> 
    170170<l:gentext key="listofequations" text="Seznam rovnic"/> 
    171171<l:gentext key="ListofEquations" text="Seznam rovnic"/> 
  • branches/new-xsl/docbook-xsl-snapshot/common/entities.ent

    r7999 r8171  
    2222 
    2323 
    24 <!ENTITY section   '(ancestor-or-self::set 
    25                      |ancestor-or-self::book 
    26                      |ancestor-or-self::part 
    27                      |ancestor-or-self::reference 
    28                      |ancestor-or-self::partintro 
    29                      |ancestor-or-self::chapter 
    30                      |ancestor-or-self::appendix 
    31                      |ancestor-or-self::preface 
    32                      |ancestor-or-self::article 
    33                      |ancestor-or-self::section 
    34                      |ancestor-or-self::sect1 
    35                      |ancestor-or-self::sect2 
    36                      |ancestor-or-self::sect3 
    37                      |ancestor-or-self::sect4 
    38                      |ancestor-or-self::sect5 
    39                      |ancestor-or-self::refentry 
    40                      |ancestor-or-self::refsect1 
    41                      |ancestor-or-self::refsect2 
    42                      |ancestor-or-self::refsect3 
    43                      |ancestor-or-self::simplesect 
    44                      |ancestor-or-self::bibliography 
    45                      |ancestor-or-self::glossary 
    46                      |ancestor-or-self::index 
    47                      |ancestor-or-self::webpage)[last()]'> 
     24<!ENTITY section   '(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage)[last()]'> 
    4825 
    4926<!ENTITY section.id 'generate-id(&section;)'> 
    5027<!ENTITY sep '" "'> 
    5128 
    52 <!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node()) 
    53                 and ($role = @role or $type = @type or 
    54                 (string-length($role) = 0 and string-length($type) = 0))'> 
     29<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))'> 
    5530 
    5631<!ENTITY setup-language-variable ' 
  • branches/new-xsl/docbook-xsl-snapshot/common/refentry.xsl

    r7978 r8171  
    1717 
    1818<!-- ==================================================================== --> 
    19  
    2019<doc:reference xmlns=""> 
    2120  <referenceinfo> 
     
    5150 
    5251<!-- ==================================================================== --> 
    53  
    5452<doc:template name="get.refentry.metadata" xmlns=""> 
    5553  <refpurpose>Gathers metadata from a refentry and its ancestors</refpurpose> 
    56  
    5754  <refdescription> 
    5855    <para>Reference documentation for particular commands, functions, 
     
    7471 
    7572    <para>Taking all that in mind, the 
    76     <function>get.refentry.metadata</function> function tries to gather 
     73    <function>get.refentry.metadata</function> template tries to gather 
    7774    metadata from a <sgmltag>refentry</sgmltag> element and its ancestor 
    7875    elements in an intelligent and user-configurable way. The basic 
     
    8380 
    8481    <note> 
    85       <para>The <function>get.refentry.metadata</function> function is 
    86       actually just sort of a "driver" function; it calls other 
    87       functions that do the actual data collection, then returns the 
    88       data as a set.</para> 
     82      <para>The <function>get.refentry.metadata</function> 
     83        template is actually just sort of a "driver" template; it 
     84        calls other templates that do the actual data collection, 
     85        then returns the data as a set.</para> 
    8986    </note> 
    9087 
    9188  </refdescription> 
    92  
    9389  <refparameter> 
    9490    <variablelist> 
     
    115111    </variablelist> 
    116112  </refparameter> 
    117  
    118113  <refreturn> 
    119114    <para>Returns a node set with the following elements. The 
     
    157152  </refreturn> 
    158153</doc:template> 
    159  
    160154<xsl:template name="get.refentry.metadata"> 
    161155  <xsl:param name="refname"/> 
     
    196190 
    197191<!-- ====================================================================== --> 
    198  
    199192<doc:template name="get.refentry.title" xmlns=""> 
    200193  <refpurpose>Gets title metadata for a refentry</refpurpose> 
    201  
    202194  <refdescription> 
    203195    <para>The <literal>man(7)</literal> man page describes this as "the 
     
    208200    <sgmltag>refnamediv</sgmltag> in the source.</para> 
    209201  </refdescription> 
    210  
    211202  <refparameter> 
    212203    <variablelist> 
     
    219210    </variablelist> 
    220211  </refparameter> 
    221  
    222212  <refreturn> 
    223213  <para>Returns a <sgmltag>title</sgmltag> node.</para></refreturn> 
    224214</doc:template> 
    225  
    226215<xsl:template name="get.refentry.title"> 
    227216  <xsl:param name="refname"/> 
     
    239228 
    240229<!-- ==================================================================== --> 
    241  
    242230<doc:template name="get.refentry.section" xmlns=""> 
    243231  <refpurpose>Gets section metadata for a refentry</refpurpose> 
    244  
    245232  <refdescription> 
    246233    <para>The <literal>man(7)</literal> man page describes this as "the 
     
    253240    commands"].</para> 
    254241  </refdescription> 
    255  
    256242  <refparameter> 
    257243    <variablelist> 
     
    270256    </variablelist> 
    271257  </refparameter> 
    272  
    273258  <refreturn> 
    274259  <para>Returns a string representing a section number.</para></refreturn> 
     
    287272            <xsl:with-param name="level">Note</xsl:with-param> 
    288273            <xsl:with-param name="source" select="$refname"/> 
    289             <xsl:with-param 
    290                 name="message" 
    291                 >meta manvol : No manvolnum</xsl:with-param> 
     274            <xsl:with-param name="context-desc">meta manvol</xsl:with-param> 
     275            <xsl:with-param name="message"> 
     276              <xsl:text>no refentry/refmeta/manvolnum</xsl:text> 
     277            </xsl:with-param> 
     278          </xsl:call-template> 
     279          <xsl:call-template name="log.message"> 
     280            <xsl:with-param name="level">Note</xsl:with-param> 
     281            <xsl:with-param name="source" select="$refname"/> 
     282            <xsl:with-param name="context-desc">meta manvol</xsl:with-param> 
     283            <xsl:with-param name="message"> 
     284              <xsl:text>see http://docbook.sf.net/el/manvolnum</xsl:text> 
     285            </xsl:with-param> 
    292286          </xsl:call-template> 
    293287        </xsl:if> 
     
    300294                <xsl:with-param name="level">Note</xsl:with-param> 
    301295                <xsl:with-param name="source" select="$refname"/> 
    302                 <xsl:with-param 
    303                     name="message" 
    304                     >meta manvol : Setting man section to 3</xsl:with-param> 
     296                <xsl:with-param name="context-desc">meta manvol</xsl:with-param> 
     297                <xsl:with-param name="message"> 
     298                  <xsl:text>Setting man section to 3</xsl:text> 
     299                </xsl:with-param> 
    305300              </xsl:call-template> 
    306301            </xsl:if> 
     
    317312 
    318313<!-- ==================================================================== --> 
    319  
    320314<doc:template name="get.refentry.date" xmlns=""> 
    321315  <refpurpose>Gets date metadata for a refentry</refpurpose> 
    322  
    323316  <refdescription> 
    324317    <para>The <literal>man(7)</literal> man page describes this as "the 
     
    326319    generate one.</para> 
    327320  </refdescription> 
    328  
    329321  <refparameter> 
    330322    <variablelist> 
     
    350342    </variablelist> 
    351343  </refparameter> 
    352  
    353   <refreturn><para>Returns a <sgmltag>date</sgmltag> node.</para></refreturn> 
     344  <refreturn> 
     345    <para>Returns a <sgmltag>date</sgmltag> node.</para> 
     346  </refreturn> 
    354347</doc:template> 
    355  
    356348<xsl:template name="get.refentry.date"> 
    357349  <xsl:param name="refname"/> 
     
    399391          <xsl:with-param name="level">Note</xsl:with-param> 
    400392          <xsl:with-param name="source" select="$refname"/> 
    401           <xsl:with-param 
    402               name="message" 
    403               >meta date   : No date. Using generated date</xsl:with-param> 
     393          <xsl:with-param name="context-desc">meta date</xsl:with-param> 
     394          <xsl:with-param name="message"> 
     395            <xsl:text>no date; using generated date</xsl:text> 
     396          </xsl:with-param> 
     397        </xsl:call-template> 
     398        <xsl:call-template name="log.message"> 
     399          <xsl:with-param name="level">Note</xsl:with-param> 
     400          <xsl:with-param name="source" select="$refname"/> 
     401          <xsl:with-param name="context-desc">meta date</xsl:with-param> 
     402          <xsl:with-param name="message"> 
     403            <xsl:text>see http://docbook.sf.net/el/date</xsl:text> 
     404          </xsl:with-param> 
    404405        </xsl:call-template> 
    405406      </xsl:if> 
     
    428429 
    429430<!-- ==================================================================== --> 
    430  
    431431<doc:template name="get.refentry.source" xmlns=""> 
    432432  <refpurpose>Gets source metadata for a refentry</refpurpose> 
    433  
    434433  <refdescription> 
    435434    <para>The <literal>man(7)</literal> man page describes this as "the 
     
    492491    </para> 
    493492  </refdescription> 
    494  
    495493  <refparameter> 
    496494    <variablelist> 
     
    517515    </variablelist> 
    518516  </refparameter> 
    519  
    520   <refreturn><para>Returns a <sgmltag>source</sgmltag> node.</para></refreturn> 
     517  <refreturn> 
     518    <para>Returns a <sgmltag>source</sgmltag> node.</para> 
     519  </refreturn> 
    521520</doc:template> 
    522  
    523521<xsl:template name="get.refentry.source"> 
    524522  <xsl:param name="refname"/> 
     
    576574              <xsl:with-param name="level">Warn</xsl:with-param> 
    577575              <xsl:with-param name="source" select="$refname"/> 
    578               <xsl:with-param 
    579                   name="message" 
    580                   >meta source : No valid fallback. Leaving empty</xsl:with-param> 
     576              <xsl:with-param name="context-desc">meta source</xsl:with-param> 
     577              <xsl:with-param name="message"> 
     578                <xsl:text>no valid fallback for source; leaving empty</xsl:text> 
     579              </xsl:with-param> 
    581580            </xsl:call-template> 
    582581          </xsl:if> 
     
    589588          <xsl:with-param name="level">Warn</xsl:with-param> 
    590589          <xsl:with-param name="source" select="$refname"/> 
    591           <xsl:with-param 
    592               name="message" 
    593               >meta source : No fallback specified; leaving empty.</xsl:with-param> 
     590          <xsl:with-param name="context-desc">meta source</xsl:with-param> 
     591          <xsl:with-param name="message"> 
     592            <xsl:text>no source fallback specified; leaving empty</xsl:text> 
     593          </xsl:with-param> 
    594594        </xsl:call-template> 
    595595      </xsl:if> 
     
    599599 
    600600<!-- ==================================================================== --> 
    601  
    602601<doc:template name="get.refentry.source.name" xmlns=""> 
    603602  <refpurpose>Gets source-name metadata for a refentry</refpurpose> 
    604  
    605603  <refdescription> 
    606604    <para>A "source name" is one part of a (potentially) two-part 
     
    609607    <function>get.refentry.source</function> template.</para> 
    610608  </refdescription> 
    611  
    612609  <refparameter> 
    613610    <variablelist> 
     
    634631    </variablelist> 
    635632  </refparameter> 
    636  
    637   <refreturn><para>Depending on what output method is used for the 
     633  <refreturn> 
     634    <para>Depending on what output method is used for the 
    638635  current stylesheet, either returns a text node or possibly an element 
    639   node, containing "source name" data.</para></refreturn> 
     636  node, containing "source name" data.</para> 
     637  </refreturn> 
    640638</doc:template> 
    641  
    642639<xsl:template name="get.refentry.source.name"> 
    643640  <xsl:param name="refname"/> 
     
    747744                  <xsl:with-param name="level">Note</xsl:with-param> 
    748745                  <xsl:with-param name="source" select="$refname"/> 
    749                   <xsl:with-param 
    750                       name="message" 
    751                       >meta source : No productname or alternative</xsl:with-param> 
     746                  <xsl:with-param name="context-desc">meta source</xsl:with-param> 
     747                  <xsl:with-param name="message"> 
     748                    <xsl:text>no *info/productname or alternative</xsl:text> 
     749                  </xsl:with-param> 
    752750                </xsl:call-template> 
    753751                <xsl:call-template name="log.message"> 
    754752                  <xsl:with-param name="level">Note</xsl:with-param> 
    755753                  <xsl:with-param name="source" select="$refname"/> 
    756                   <xsl:with-param 
    757                       name="message" 
    758                       >meta source : No refmiscinfo@class=source</xsl:with-param> 
     754                  <xsl:with-param name="context-desc">meta source</xsl:with-param> 
     755                  <xsl:with-param name="message"> 
     756                    <xsl:text>see http://docbook.sf.net/el/productname</xsl:text> 
     757                  </xsl:with-param> 
     758                </xsl:call-template> 
     759                <xsl:call-template name="log.message"> 
     760                  <xsl:with-param name="level">Note</xsl:with-param> 
     761                  <xsl:with-param name="source" select="$refname"/> 
     762                  <xsl:with-param name="context-desc">meta source</xsl:with-param> 
     763                  <xsl:with-param name="message"> 
     764                    <xsl:text>no refentry/refmeta/refmiscinfo@class=source</xsl:text> 
     765                  </xsl:with-param> 
     766                </xsl:call-template> 
     767                <xsl:call-template name="log.message"> 
     768                  <xsl:with-param name="level">Note</xsl:with-param> 
     769                  <xsl:with-param name="source" select="$refname"/> 
     770                  <xsl:with-param name="context-desc">meta source</xsl:with-param> 
     771                  <xsl:with-param name="message"> 
     772                    <xsl:text>see http://docbook.sf.net/el/refmiscinfo</xsl:text> 
     773                  </xsl:with-param> 
    759774                </xsl:call-template> 
    760775              </xsl:if> 
     
    768783 
    769784<!-- ==================================================================== --> 
    770  
    771785<doc:template name="get.refentry.version" xmlns=""> 
    772786  <refpurpose>Gets version metadata for a refentry</refpurpose> 
    773  
    774787  <refdescription> 
    775788    <para>A "version" is one part of a (potentially) two-part 
     
    778791    <function>get.refentry.source</function> template.</para> 
    779792  </refdescription> 
    780  
    781793  <refparameter> 
    782794    <variablelist> 
     
    803815    </variablelist> 
    804816  </refparameter> 
    805  
    806   <refreturn><para>Depending on what output method is used for the 
     817  <refreturn> 
     818    <para>Depending on what output method is used for the 
    807819  current stylesheet, either returns a text node or possibly an element 
    808   node, containing "version" data.</para></refreturn> 
     820  node, containing "version" data.</para> 
     821  </refreturn> 
    809822</doc:template> 
    810  
    811823<xsl:template name="get.refentry.version"> 
    812824  <xsl:param name="refname"/> 
     
    877889                  <xsl:with-param name="level">Note</xsl:with-param> 
    878890                  <xsl:with-param name="source" select="$refname"/> 
    879                   <xsl:with-param 
    880                       name="message" 
    881                       >meta version: No productnumber or alternative</xsl:with-param> 
     891                  <xsl:with-param name="context-desc">meta version</xsl:with-param> 
     892                  <xsl:with-param name="message"> 
     893                    <xsl:text>no *info/productnumber or alternative</xsl:text> 
     894                  </xsl:with-param> 
    882895                </xsl:call-template> 
    883896                <xsl:call-template name="log.message"> 
    884897                  <xsl:with-param name="level">Note</xsl:with-param> 
    885898                  <xsl:with-param name="source" select="$refname"/> 
    886                   <xsl:with-param 
    887                       name="message" 
    888                       >meta version: No refmiscinfo@class=version</xsl:with-param> 
     899                  <xsl:with-param name="context-desc">meta version</xsl:with-param> 
     900                  <xsl:with-param name="message"> 
     901                    <xsl:text>see http://docbook.sf.net/el/productnumber</xsl:text> 
     902                  </xsl:with-param> 
     903                </xsl:call-template> 
     904                <xsl:call-template name="log.message"> 
     905                  <xsl:with-param name="level">Note</xsl:with-param> 
     906                  <xsl:with-param name="source" select="$refname"/> 
     907                  <xsl:with-param name="context-desc">meta version</xsl:with-param> 
     908                  <xsl:with-param name="message"> 
     909                    <xsl:text>no refentry/refmeta/refmiscinfo@class=version</xsl:text> 
     910                  </xsl:with-param> 
     911                </xsl:call-template> 
     912                <xsl:call-template name="log.message"> 
     913                  <xsl:with-param name="level">Note</xsl:with-param> 
     914                  <xsl:with-param name="source" select="$refname"/> 
     915                  <xsl:with-param name="context-desc">meta version</xsl:with-param> 
     916                  <xsl:with-param name="message"> 
     917                    <xsl:text>see http://docbook.sf.net/el/refmiscinfo</xsl:text> 
     918                  </xsl:with-param> 
    889919                </xsl:call-template> 
    890920              </xsl:if> 
     
    898928 
    899929<!-- ==================================================================== --> 
    900  
    901930<doc:template name="get.refentry.manual" xmlns=""> 
    902931  <refpurpose>Gets source metadata for a refentry</refpurpose> 
    903  
    904932  <refdescription> 
    905933    <para>The <literal>man(7)</literal> man page describes this as "the 
     
    949977 
    950978  </refdescription> 
    951  
    952979  <refparameter> 
    953980    <variablelist> 
     
    9741001    </variablelist> 
    9751002  </refparameter> 
    976  
    977   <refreturn><para>Returns a <sgmltag>manual</sgmltag> node.</para></refreturn> 
     1003  <refreturn> 
     1004    <para>Returns a <sgmltag>manual</sgmltag> node.</para> 
     1005  </refreturn> 
    9781006</doc:template> 
    9791007<xsl:template name="get.refentry.manual"> 
     
    10331061                    <xsl:with-param name="level">Note</xsl:with-param> 
    10341062                    <xsl:with-param name="source" select="$refname"/> 
    1035                     <xsl:with-param 
    1036                         name="message" 
    1037                         >meta manual : No ancestor with title</xsl:with-param> 
     1063                    <xsl:with-param name="context-desc">meta manual</xsl:with-param> 
     1064                    <xsl:with-param name="message"> 
     1065                      <xsl:text>no titled ancestor of refentry</xsl:text> 
     1066                    </xsl:with-param> 
    10381067                  </xsl:call-template> 
    10391068                  <xsl:call-template name="log.message"> 
    10401069                    <xsl:with-param name="level">Note</xsl:with-param> 
    10411070                    <xsl:with-param name="source" select="$refname"/> 
    1042                     <xsl:with-param 
    1043                         name="message" 
    1044                         >meta manual : No refmiscinfo@class=manual</xsl:with-param> 
     1071                    <xsl:with-param name="context-desc">meta manual</xsl:with-param> 
     1072                    <xsl:with-param name="message"> 
     1073                      <xsl:text>no refentry/refmeta/refmiscinfo@class=manual</xsl:text> 
     1074                    </xsl:with-param> 
     1075                  </xsl:call-template> 
     1076                  <xsl:call-template name="log.message"> 
     1077                    <xsl:with-param name="level">Note</xsl:with-param> 
     1078                    <xsl:with-param name="source" select="$refname"/> 
     1079                    <xsl:with-param name="context-desc">meta manual</xsl:with-param> 
     1080                    <xsl:with-param name="message"> 
     1081                      <xsl:text>see http://docbook.sf.net/el/refmiscinfo</xsl:text> 
     1082                    </xsl:with-param> 
    10451083                  </xsl:call-template> 
    10461084                </xsl:if> 
     
    10731111              <xsl:with-param name="level">Warn</xsl:with-param> 
    10741112              <xsl:with-param name="source" select="$refname"/> 
    1075               <xsl:with-param 
    1076                   name="message" 
    1077                   >meta manual : No valid fallback. Leaving empty</xsl:with-param> 
     1113              <xsl:with-param name="context-desc">meta manual</xsl:with-param> 
     1114              <xsl:with-param name="message"> 
     1115                <xsl:text>no valid fallback for manual; leaving empty</xsl:text> 
     1116              </xsl:with-param> 
    10781117            </xsl:call-template> 
    10791118          </xsl:if> 
     
    10871126          <xsl:with-param name="level">Warn</xsl:with-param> 
    10881127          <xsl:with-param name="source" select="$refname"/> 
    1089           <xsl:with-param 
    1090               name="message" 
    1091               >meta manual : No fallback specified; leaving empty.</xsl:with-param> 
     1128          <xsl:with-param name="context-desc">meta manual</xsl:with-param> 
     1129          <xsl:with-param name="message"> 
     1130            <xsl:text>no manual fallback specified; leaving empty</xsl:text> 
     1131          </xsl:with-param> 
    10921132        </xsl:call-template> 
    10931133      </xsl:if> 
     
    10971137 
    10981138<!-- ====================================================================== --> 
    1099  
    11001139<doc:template name="get.refentry.metadata.prefs" xmlns=""> 
    11011140  <refpurpose>Gets user preferences for refentry metadata gathering</refpurpose> 
    1102  
    11031141  <refdescription> 
    11041142    <para>The DocBook XSL stylesheets include several user-configurable 
    11051143    global stylesheet parameters for controlling <sgmltag>refentry</sgmltag> 
    11061144    metadata gathering. Those parameters are not read directly by the 
    1107     other <sgmltag>refentry</sgmltag> metadata-gathering functions. Instead, they 
    1108     are read only by the <function>get.refentry.metadata.prefs</function> 
    1109     function, which assembles them into a structure that is then passed to 
    1110     the other <sgmltag>refentry</sgmltag> metadata-gathering functions.</para> 
     1145    other <sgmltag>refentry</sgmltag> metadata-gathering 
     1146    templates. Instead, they are read only by the 
     1147    <function>get.refentry.metadata.prefs</function> template, 
     1148    which assembles them into a structure that is then passed to 
     1149    the other <sgmltag>refentry</sgmltag> metadata-gathering 
     1150    templates.</para> 
    11111151 
    11121152    <para>So the, <function>get.refentry.metadata.prefs</function> 
    1113     function is the only interface to collecting stylesheet parameters for 
     1153    template is the only interface to collecting stylesheet parameters for 
    11141154    controlling <sgmltag>refentry</sgmltag> metadata gathering.</para> 
    11151155  </refdescription> 
    1116  
    11171156  <refparameter> 
    1118     <para>There are no local parameters for this function; however, it 
     1157    <para>There are no local parameters for this template; however, it 
    11191158    does rely on a number of global parameters.</para> 
    11201159  </refparameter> 
    1121  
    1122   <refreturn><para>Returns a <sgmltag>manual</sgmltag> node.</para></refreturn> 
     1160  <refreturn> 
     1161    <para>Returns a <sgmltag>manual</sgmltag> node.</para> 
     1162  </refreturn> 
    11231163</doc:template> 
    1124  
    11251164<xsl:template name="get.refentry.metadata.prefs"> 
    11261165  <DatePrefs> 
     
    11731212 
    11741213<!-- ====================================================================== --> 
    1175  
    11761214<doc:template name="set.refentry.metadata" xmlns=""> 
    11771215  <refpurpose>Sets content of a refentry metadata item</refpurpose> 
    1178  
    11791216  <refdescription> 
    1180     <para>The <function>set.refentry.metadata</function> function is 
     1217    <para>The <function>set.refentry.metadata</function> template is 
    11811218    called each time a suitable source element is found for a certain 
    11821219    metadata field.</para> 
    11831220  </refdescription> 
    1184  
    11851221  <refparameter> 
    11861222    <variablelist> 
     
    12071243        <listitem> 
    12081244          <para>A string describing the metadata context in which the 
    1209           <function>set.refentry.metadata</function> function was 
     1245          <function>set.refentry.metadata</function> template was 
    12101246          called: either "date", "source", "version", or "manual".</para> 
    12111247        </listitem> 
     
    12161252  <para>Returns formatted contents of a selected source element.</para></refreturn> 
    12171253</doc:template> 
    1218  
    12191254<xsl:template name="set.refentry.metadata"> 
    12201255  <xsl:param name="refname"/> 
     
    12281263        <xsl:with-param name="level">Note</xsl:with-param> 
    12291264        <xsl:with-param name="source" select="$refname"/> 
    1230         <xsl:with-param 
    1231             name="message" 
    1232             >meta <xsl:value-of 
    1233             select="$context"/><xsl:call-template 
    1234             name="copy-string"> 
    1235         <xsl:with-param name="string" select="'&#x20;'"/> 
    1236         <xsl:with-param 
    1237             name="count" 
    1238             select="7 - string-length($context)"/> 
    1239         </xsl:call-template>: No <xsl:value-of select="$preferred" 
    1240         /></xsl:with-param> 
     1265        <xsl:with-param name="context-desc" select="concat('meta ', $context)"/> 
     1266        <xsl:with-param name="message" select="concat('No ', $preferred)"/> 
    12411267      </xsl:call-template> 
    12421268      <xsl:call-template name="log.message"> 
    12431269        <xsl:with-param name="level">Note</xsl:with-param> 
    12441270        <xsl:with-param name="source" select="$refname"/> 
    1245         <xsl:with-param 
    1246             name="message" 
    1247             >meta <xsl:value-of 
    1248             select="$context"/><xsl:call-template 
    1249             name="copy-string"> 
    1250         <xsl:with-param name="string" select="'&#x20;'"/> 
    1251         <xsl:with-param 
    1252             name="count" 
    1253             select="7 - string-length($context)"/> 
    1254         </xsl:call-template>: No refmiscinfo@class=<xsl:value-of 
    1255         select="$context"/></xsl:with-param> 
     1271        <xsl:with-param name="context-desc" select="concat('meta ', $context)"/> 
     1272        <xsl:with-param name="message"> 
     1273          <xsl:text>no refentry/refmeta/refmiscinfo@class=</xsl:text> 
     1274          <xsl:value-of select="$context"/> 
     1275        </xsl:with-param> 
    12561276      </xsl:call-template> 
    12571277      <xsl:call-template name="log.message"> 
    12581278        <xsl:with-param name="level">Note</xsl:with-param> 
    12591279        <xsl:with-param name="source" select="$refname"/> 
    1260         <xsl:with-param 
    1261             name="message" 
    1262             >meta <xsl:value-of 
    1263             select="$context"/><xsl:call-template 
    1264             name="copy-string"> 
    1265         <xsl:with-param name="string" select="'&#x20;'"/> 
    1266         <xsl:with-param 
    1267             name="count" 
    1268             select="7 - string-length($context)"/> 
    1269         </xsl:call-template>: Using <xsl:value-of 
    1270         select="local-name($contents)"/></xsl:with-param> 
     1280        <xsl:with-param name="context-desc" select="concat('meta ', $context)"/&g