]> git.evergreen-ils.org Git - working/Evergreen.git/blob - stylesheets/evergreen_docbook_files/docbook-xsl-1.75.2/common/charmap.xml
Capitalized the start of a sentence in the bucket section of cataloging.
[working/Evergreen.git] / stylesheets / evergreen_docbook_files / docbook-xsl-1.75.2 / common / charmap.xml
1 <?xml version="1.0"?>\r
2 \r
3 <reference xml:id="charmap">\r
4   <info>\r
5     <title>Common » Character-Map Template Reference</title>\r
6     <releaseinfo role="meta">\r
7       $Id: charmap.xsl 7266 2007-08-22 11:58:42Z xmldoc $\r
8     </releaseinfo>\r
9   </info>\r
10   \r
11   <partintro xml:id="partintro">\r
12     <title>Introduction</title>\r
13     \r
14 <para>This is technical reference documentation for the\r
15       character-map templates in the DocBook XSL Stylesheets.</para>\r
16 \r
17     <note>\r
18       \r
19 <para>These templates are defined in a separate file from the set\r
20         of “common” templates because some of the common templates\r
21         reference DocBook XSL stylesheet parameters, requiring the\r
22         entire set of parameters to be imported/included in any\r
23         stylesheet that imports/includes the common templates.</para>\r
24 \r
25       \r
26 <para>The character-map templates don’t import or include\r
27         any DocBook XSL stylesheet parameters, so the\r
28         character-map templates can be used without importing the\r
29         whole set of parameters.</para>\r
30 \r
31     </note>\r
32     \r
33 <para>This is not intended to be user documentation. It is\r
34       provided for developers writing customization layers for the\r
35       stylesheets.</para>\r
36 \r
37   </partintro>\r
38 \r
39 <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="template.apply-character-map">\r
40 <refnamediv>\r
41 <refname>apply-character-map</refname>\r
42 <refpurpose>Applies an XSLT character map</refpurpose>\r
43 </refnamediv>\r
44 <refsynopsisdiv>\r
45 <synopsis>&lt;xsl:template name="apply-character-map"&gt;\r
46 &lt;xsl:param name="content"/&gt;\r
47 &lt;xsl:param name="map.contents"/&gt;\r
48   ...\r
49 &lt;/xsl:template&gt;</synopsis>\r
50 </refsynopsisdiv>\r
51 <refsect1><title>Description</title>\r
52     \r
53 <para>This template applies an <link xlink:href="http://www.w3.org/TR/xslt20/#character-maps">XSLT character map</link>; that is, it causes certain\r
54       individual characters to be substituted with strings of one\r
55       or more characters. It is useful mainly for replacing\r
56       multiple “special” characters or symbols in the same target\r
57       content. It uses the value of\r
58       <parameter>map.contents</parameter> to do substitution on\r
59       <parameter>content</parameter>, and then returns the\r
60       modified contents.</para>\r
61 \r
62     <note>\r
63       \r
64 <para>This template is a very slightly modified version of\r
65         Jeni Tennison’s <function>replace_strings</function>\r
66         template in the <link xlink:href="http://www.dpawson.co.uk/xsl/sect2/StringReplace.html#d9351e13">multiple string replacements</link> section of Dave Pawson’s\r
67         <link xlink:href="http://www.dpawson.co.uk/xsl/index.html">XSLT FAQ</link>.</para>\r
68 \r
69       \r
70 <para>The <function>apply-string-subst-map</function>\r
71         template is essentially the same template as the\r
72         <function>apply-character-map</function> template; the\r
73         only difference is that in the map that\r
74         <function>apply-string-subst-map</function> expects, <tag class="attribute">oldstring</tag> and <tag class="attribute">newstring</tag> attributes are used\r
75         instead of <tag class="attribute">character</tag> and <tag class="attribute">string</tag> attributes.</para>\r
76 \r
77     </note>\r
78   </refsect1><refsect1><title>Parameters</title>\r
79     \r
80 <variablelist>\r
81       <varlistentry><term>content</term>\r
82         <listitem>\r
83           \r
84 <para>The content on which to perform the character-map\r
85             substitution.</para>\r
86 \r
87         </listitem>\r
88       </varlistentry>\r
89       <varlistentry><term>map.contents</term>\r
90         <listitem>\r
91           \r
92 <para>A node set of elements, with each element having\r
93             the following attributes:\r
94             \r
95 <itemizedlist>\r
96               <listitem>\r
97                 <simpara><tag class="attribute">character</tag>, a\r
98                   character to be replaced</simpara>\r
99               </listitem>\r
100               <listitem>\r
101                 <simpara><tag class="attribute">string</tag>, a\r
102                   string with which to replace <tag class="attribute">character</tag></simpara>\r
103               </listitem>\r
104             </itemizedlist>\r
105 \r
106           </para>\r
107 \r
108         </listitem>\r
109       </varlistentry>\r
110     </variablelist>\r
111 \r
112   </refsect1></refentry>\r
113 \r
114 <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="template.read-character-map">\r
115 <refnamediv>\r
116 <refname>read-character-map</refname>\r
117 <refpurpose>Reads in all or part of an XSLT character map</refpurpose>\r
118 </refnamediv>\r
119 <refsynopsisdiv>\r
120 <synopsis>&lt;xsl:template name="read-character-map"&gt;\r
121 &lt;xsl:param name="use.subset"/&gt;\r
122 &lt;xsl:param name="subset.profile"/&gt;\r
123 &lt;xsl:param name="uri"/&gt;\r
124   ...\r
125 &lt;/xsl:template&gt;</synopsis>\r
126 </refsynopsisdiv>\r
127 <refsect1><title>Description</title>\r
128     \r
129 <para>The XSLT 2.0 specification describes <link xlink:href="http://www.w3.org/TR/xslt20/#character-maps">character maps</link> and explains how they may be used\r
130       to allow a specific character appearing in a text or\r
131       attribute node in a final result tree to be substituted by\r
132       a specified string of characters during serialization. The\r
133       <function>read-character-map</function> template provides a\r
134       means for reading and using character maps with XSLT\r
135       1.0-based tools.</para>\r
136 \r
137     \r
138 <para>This template reads the character-map contents from\r
139       <parameter>uri</parameter> (in full or in part, depending on\r
140       the value of the <parameter>use.subset</parameter>\r
141       parameter), then passes those contents to the\r
142       <function>apply-character-map</function> template, along with\r
143       <parameter>content</parameter>, the data on which to perform\r
144       the character substitution.</para>\r
145 \r
146     \r
147 <para>Using the character map “in part” means that it uses only\r
148       those <tag>output-character</tag> elements that match the\r
149       XPath expression given in the value of the\r
150       <parameter>subset.profile</parameter> parameter. The current\r
151       implementation of that capability here relies on the\r
152       <function>evaluate</function> extension XSLT function.</para>\r
153 \r
154   </refsect1><refsect1><title>Parameters</title>\r
155     \r
156 <variablelist>\r
157       <varlistentry><term>use.subset</term>\r
158         <listitem>\r
159           \r
160 <para>Specifies whether to use a subset of the character\r
161             map instead of the whole map; boolean\r
162             <literal>0</literal> or <literal>1</literal></para>\r
163 \r
164         </listitem>\r
165       </varlistentry>\r
166       <varlistentry><term>subset.profile</term>\r
167         <listitem>\r
168           \r
169 <para>XPath expression that specifies what subset of the\r
170             character map to use</para>\r
171 \r
172         </listitem>\r
173       </varlistentry>\r
174       <varlistentry><term>uri</term>\r
175         <listitem>\r
176           \r
177 <para>URI for a character map</para>\r
178 \r
179         </listitem>\r
180       </varlistentry>\r
181     </variablelist>\r
182 \r
183   </refsect1></refentry>\r
184 </reference>\r
185 \r