Changeset 00b1e11 in clfs-embedded for BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/refentry.xsl
- Timestamp:
- Jul 21, 2007, 8:07:11 AM (17 years ago)
- Branches:
- master
- Children:
- a6966fa
- Parents:
- 3ca2208
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/refentry.xsl
r3ca2208 r00b1e11 17 17 18 18 <!-- ==================================================================== --> 19 <doc:reference xmlns=""> 20 <referenceinfo> 19 <doc:reference xmlns="" xml:id="refentry"> 20 <info> 21 <title>Common » Refentry Metadata Template Reference</title> 21 22 <releaseinfo role="meta"> 22 23 $Id$ 23 24 </releaseinfo> 24 <corpauthor>The DocBook Project</corpauthor> 25 <copyright> 26 <year>2005-2007</year> 27 <holder>The DocBook Project</holder> 28 </copyright> 29 </referenceinfo> 30 <title>Refentry Metadata-Gathering Template Reference</title> 31 32 <partintro id="partintro"> 25 </info> 26 <!-- * yes, partintro is a valid child of a reference... --> 27 <partintro xml:id="partintro"> 33 28 <title>Introduction</title> 34 35 <para>This is technical reference documentation for the "refentry 36 metadata gathering" templates in the DocBook XSL Stylesheets.</para> 37 29 <para>This is technical reference documentation for the ârefentry 30 metadataâ templates in the DocBook XSL Stylesheets.</para> 38 31 <para>This is not intended to be user documentation. It is provided 39 for developers writing customization layers for the 40 stylesheets.</para> 41 32 for developers writing customization layers for the stylesheets.</para> 42 33 <note> 43 34 <para>Currently, only the manpages stylesheets make use of these 44 35 templates. They are, however, potentially useful elsewhere.</para> 45 36 </note> 46 47 37 </partintro> 48 49 38 </doc:reference> 50 39 … … 57 46 example, users view Unix man pages as, well, individual pages, not as 58 47 part of a "book" of some kind. Therefore, it is sometimes necessary to 59 embed "context" information in output for each < sgmltag>refentry</sgmltag>.</para>48 embed "context" information in output for each <tag>refentry</tag>.</para> 60 49 61 50 <para>However, one problem is that different users mark up that 62 51 context information in different ways. Often (usually), the 63 52 context information is not actually part of the content of the 64 < sgmltag>refentry</sgmltag> itself, but instead part of the content of a65 parent or ancestor element to the the < sgmltag>refentry</sgmltag>. And53 <tag>refentry</tag> itself, but instead part of the content of a 54 parent or ancestor element to the the <tag>refentry</tag>. And 66 55 even then, DocBook provides a variety of elements that users might 67 56 potentially use to mark up the same kind of information. One user 68 might use the < sgmltag>productnumber</sgmltag> element to mark up version57 might use the <tag>productnumber</tag> element to mark up version 69 58 information about a particular product, while another might use 70 the < sgmltag>releaseinfo</sgmltag> element.</para>59 the <tag>releaseinfo</tag> element.</para> 71 60 72 61 <para>Taking all that in mind, the 73 62 <function>get.refentry.metadata</function> template tries to gather 74 metadata from a < sgmltag>refentry</sgmltag> element and its ancestor63 metadata from a <tag>refentry</tag> element and its ancestor 75 64 elements in an intelligent and user-configurable way. The basic 76 65 mechanism used in the XPath expressions throughout this stylesheet 77 66 is to select the relevant metadata from the *info element that is 78 closest to the actual < sgmltag>refentry</sgmltag> â either on the79 < sgmltag>refentry</sgmltag> itself, or on its nearest ancestor.</para>67 closest to the actual <tag>refentry</tag> â either on the 68 <tag>refentry</tag> itself, or on its nearest ancestor.</para> 80 69 81 70 <note> … … 92 81 <term>refname</term> 93 82 <listitem> 94 <para>The first < sgmltag>refname</sgmltag> in the refentry</para>83 <para>The first <tag>refname</tag> in the refentry</para> 95 84 </listitem> 96 85 </varlistentry> … … 98 87 <term>info</term> 99 88 <listitem> 100 <para>A set of info nodes (from a < sgmltag>refentry</sgmltag>89 <para>A set of info nodes (from a <tag>refentry</tag> 101 90 element and its ancestors)</para> 102 91 </listitem> … … 195 184 <para>The <literal>man(7)</literal> man page describes this as "the 196 185 title of the man page (e.g., <literal>MAN</literal>). This differs 197 from < sgmltag>refname</sgmltag> in that, if the <sgmltag>refentry</sgmltag> has a198 < sgmltag>refentrytitle</sgmltag>, we use that as the <sgmltag>title</sgmltag>;199 otherwise, we just use first < sgmltag>refname</sgmltag> in the first200 < sgmltag>refnamediv</sgmltag> in the source.</para>186 from <tag>refname</tag> in that, if the <tag>refentry</tag> has a 187 <tag>refentrytitle</tag>, we use that as the <tag>title</tag>; 188 otherwise, we just use first <tag>refname</tag> in the first 189 <tag>refnamediv</tag> in the source.</para> 201 190 </refdescription> 202 191 <refparameter id="get.refentry.title-params"> … … 205 194 <term>refname</term> 206 195 <listitem> 207 <para>The first < sgmltag>refname</sgmltag> in the refentry</para>196 <para>The first <tag>refname</tag> in the refentry</para> 208 197 </listitem> 209 198 </varlistentry> … … 211 200 </refparameter> 212 201 <refreturn id="get.refentry.title-returns"> 213 <para>Returns a < sgmltag>title</sgmltag> node.</para></refreturn>202 <para>Returns a <tag>title</tag> node.</para></refreturn> 214 203 </doc:template> 215 204 <xsl:template name="get.refentry.title"> … … 233 222 <para>The <literal>man(7)</literal> man page describes this as "the 234 223 section number the man page should be placed in (e.g., 235 <literal>7</literal>)". If we do not find a < sgmltag>manvolnum</sgmltag>236 specified in the source, and we find that the < sgmltag>refentry</sgmltag> is224 <literal>7</literal>)". If we do not find a <tag>manvolnum</tag> 225 specified in the source, and we find that the <tag>refentry</tag> is 237 226 for a function, we use the section number <literal>3</literal> 238 227 ["Library calls (functions within program libraries)"]; otherwise, we … … 245 234 <term>refname</term> 246 235 <listitem> 247 <para>The first < sgmltag>refname</sgmltag> in the refentry</para>236 <para>The first <tag>refname</tag> in the refentry</para> 248 237 </listitem> 249 238 </varlistentry> … … 324 313 <term>refname</term> 325 314 <listitem> 326 <para>The first < sgmltag>refname</sgmltag> in the refentry</para>315 <para>The first <tag>refname</tag> in the refentry</para> 327 316 </listitem> 328 317 </varlistentry> … … 330 319 <term>info</term> 331 320 <listitem> 332 <para>A set of info nodes (from a < sgmltag>refentry</sgmltag>321 <para>A set of info nodes (from a <tag>refentry</tag> 333 322 element and its ancestors)</para> 334 323 </listitem> … … 343 332 </refparameter> 344 333 <refreturn id="get.refentry.date-returns"> 345 <para>Returns a < sgmltag>date</sgmltag> node.</para>334 <para>Returns a <tag>date</tag> node.</para> 346 335 </refreturn> 347 336 </doc:template> … … 496 485 <term>refname</term> 497 486 <listitem> 498 <para>The first < sgmltag>refname</sgmltag> in the refentry</para>487 <para>The first <tag>refname</tag> in the refentry</para> 499 488 </listitem> 500 489 </varlistentry> … … 502 491 <term>info</term> 503 492 <listitem> 504 <para>A set of info nodes (from a < sgmltag>refentry</sgmltag>493 <para>A set of info nodes (from a <tag>refentry</tag> 505 494 element and its ancestors)</para> 506 495 </listitem> … … 516 505 </refparameter> 517 506 <refreturn id="get.refentry.source-returns"> 518 <para>Returns a < sgmltag>source</sgmltag> node.</para>507 <para>Returns a <tag>source</tag> node.</para> 519 508 </refreturn> 520 509 </doc:template> … … 612 601 <term>refname</term> 613 602 <listitem> 614 <para>The first < sgmltag>refname</sgmltag> in the refentry</para>603 <para>The first <tag>refname</tag> in the refentry</para> 615 604 </listitem> 616 605 </varlistentry> … … 618 607 <term>info</term> 619 608 <listitem> 620 <para>A set of info nodes (from a < sgmltag>refentry</sgmltag>609 <para>A set of info nodes (from a <tag>refentry</tag> 621 610 element and its ancestors)</para> 622 611 </listitem> … … 796 785 <term>refname</term> 797 786 <listitem> 798 <para>The first < sgmltag>refname</sgmltag> in the refentry</para>787 <para>The first <tag>refname</tag> in the refentry</para> 799 788 </listitem> 800 789 </varlistentry> … … 802 791 <term>info</term> 803 792 <listitem> 804 <para>A set of info nodes (from a < sgmltag>refentry</sgmltag>793 <para>A set of info nodes (from a <tag>refentry</tag> 805 794 element and its ancestors)</para> 806 795 </listitem> … … 982 971 <term>refname</term> 983 972 <listitem> 984 <para>The first < sgmltag>refname</sgmltag> in the refentry</para>973 <para>The first <tag>refname</tag> in the refentry</para> 985 974 </listitem> 986 975 </varlistentry> … … 988 977 <term>info</term> 989 978 <listitem> 990 <para>A set of info nodes (from a < sgmltag>refentry</sgmltag>979 <para>A set of info nodes (from a <tag>refentry</tag> 991 980 element and its ancestors)</para> 992 981 </listitem> … … 1002 991 </refparameter> 1003 992 <refreturn id="get.refentry.manual-returns"> 1004 <para>Returns a < sgmltag>manual</sgmltag> node.</para>993 <para>Returns a <tag>manual</tag> node.</para> 1005 994 </refreturn> 1006 995 </doc:template> … … 1141 1130 <refdescription id="get.refentry.metadata.prefs-desc"> 1142 1131 <para>The DocBook XSL stylesheets include several user-configurable 1143 global stylesheet parameters for controlling < sgmltag>refentry</sgmltag>1132 global stylesheet parameters for controlling <tag>refentry</tag> 1144 1133 metadata gathering. Those parameters are not read directly by the 1145 other < sgmltag>refentry</sgmltag> metadata-gathering1134 other <tag>refentry</tag> metadata-gathering 1146 1135 templates. Instead, they are read only by the 1147 1136 <function>get.refentry.metadata.prefs</function> template, 1148 1137 which assembles them into a structure that is then passed to 1149 the other < sgmltag>refentry</sgmltag> metadata-gathering1138 the other <tag>refentry</tag> metadata-gathering 1150 1139 templates.</para> 1151 1140 1152 1141 <para>So the, <function>get.refentry.metadata.prefs</function> 1153 1142 template is the only interface to collecting stylesheet parameters for 1154 controlling < sgmltag>refentry</sgmltag> metadata gathering.</para>1143 controlling <tag>refentry</tag> metadata gathering.</para> 1155 1144 </refdescription> 1156 1145 <refparameter id="get.refentry.metadata.prefs-params"> … … 1159 1148 </refparameter> 1160 1149 <refreturn id="get.refentry.metadata.prefs-returns"> 1161 <para>Returns a < sgmltag>manual</sgmltag> node.</para>1150 <para>Returns a <tag>manual</tag> node.</para> 1162 1151 </refreturn> 1163 1152 </doc:template> … … 1224 1213 <term>refname</term> 1225 1214 <listitem> 1226 <para>The first < sgmltag>refname</sgmltag> in the refentry</para>1215 <para>The first <tag>refname</tag> in the refentry</para> 1227 1216 </listitem> 1228 1217 </varlistentry>
Note: See TracChangeset
for help on using the changeset viewer.