+++ /dev/null
-<?xml version="1.0"?>\r
-\r
-<reference xml:id="charmap">\r
- <info>\r
- <title>Common » Character-Map Template Reference</title>\r
- <releaseinfo role="meta">\r
- $Id: charmap.xsl 7266 2007-08-22 11:58:42Z xmldoc $\r
- </releaseinfo>\r
- </info>\r
- \r
- <partintro xml:id="partintro">\r
- <title>Introduction</title>\r
- \r
-<para>This is technical reference documentation for the\r
- character-map templates in the DocBook XSL Stylesheets.</para>\r
-\r
- <note>\r
- \r
-<para>These templates are defined in a separate file from the set\r
- of “common” templates because some of the common templates\r
- reference DocBook XSL stylesheet parameters, requiring the\r
- entire set of parameters to be imported/included in any\r
- stylesheet that imports/includes the common templates.</para>\r
-\r
- \r
-<para>The character-map templates don’t import or include\r
- any DocBook XSL stylesheet parameters, so the\r
- character-map templates can be used without importing the\r
- whole set of parameters.</para>\r
-\r
- </note>\r
- \r
-<para>This is not intended to be user documentation. It is\r
- provided for developers writing customization layers for the\r
- stylesheets.</para>\r
-\r
- </partintro>\r
-\r
-<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="template.apply-character-map">\r
-<refnamediv>\r
-<refname>apply-character-map</refname>\r
-<refpurpose>Applies an XSLT character map</refpurpose>\r
-</refnamediv>\r
-<refsynopsisdiv>\r
-<synopsis><xsl:template name="apply-character-map">\r
-<xsl:param name="content"/>\r
-<xsl:param name="map.contents"/>\r
- ...\r
-</xsl:template></synopsis>\r
-</refsynopsisdiv>\r
-<refsect1><title>Description</title>\r
- \r
-<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
- individual characters to be substituted with strings of one\r
- or more characters. It is useful mainly for replacing\r
- multiple “special” characters or symbols in the same target\r
- content. It uses the value of\r
- <parameter>map.contents</parameter> to do substitution on\r
- <parameter>content</parameter>, and then returns the\r
- modified contents.</para>\r
-\r
- <note>\r
- \r
-<para>This template is a very slightly modified version of\r
- Jeni Tennison’s <function>replace_strings</function>\r
- 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
- <link xlink:href="http://www.dpawson.co.uk/xsl/index.html">XSLT FAQ</link>.</para>\r
-\r
- \r
-<para>The <function>apply-string-subst-map</function>\r
- template is essentially the same template as the\r
- <function>apply-character-map</function> template; the\r
- only difference is that in the map that\r
- <function>apply-string-subst-map</function> expects, <tag class="attribute">oldstring</tag> and <tag class="attribute">newstring</tag> attributes are used\r
- instead of <tag class="attribute">character</tag> and <tag class="attribute">string</tag> attributes.</para>\r
-\r
- </note>\r
- </refsect1><refsect1><title>Parameters</title>\r
- \r
-<variablelist>\r
- <varlistentry><term>content</term>\r
- <listitem>\r
- \r
-<para>The content on which to perform the character-map\r
- substitution.</para>\r
-\r
- </listitem>\r
- </varlistentry>\r
- <varlistentry><term>map.contents</term>\r
- <listitem>\r
- \r
-<para>A node set of elements, with each element having\r
- the following attributes:\r
- \r
-<itemizedlist>\r
- <listitem>\r
- <simpara><tag class="attribute">character</tag>, a\r
- character to be replaced</simpara>\r
- </listitem>\r
- <listitem>\r
- <simpara><tag class="attribute">string</tag>, a\r
- string with which to replace <tag class="attribute">character</tag></simpara>\r
- </listitem>\r
- </itemizedlist>\r
-\r
- </para>\r
-\r
- </listitem>\r
- </varlistentry>\r
- </variablelist>\r
-\r
- </refsect1></refentry>\r
-\r
-<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="template.read-character-map">\r
-<refnamediv>\r
-<refname>read-character-map</refname>\r
-<refpurpose>Reads in all or part of an XSLT character map</refpurpose>\r
-</refnamediv>\r
-<refsynopsisdiv>\r
-<synopsis><xsl:template name="read-character-map">\r
-<xsl:param name="use.subset"/>\r
-<xsl:param name="subset.profile"/>\r
-<xsl:param name="uri"/>\r
- ...\r
-</xsl:template></synopsis>\r
-</refsynopsisdiv>\r
-<refsect1><title>Description</title>\r
- \r
-<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
- to allow a specific character appearing in a text or\r
- attribute node in a final result tree to be substituted by\r
- a specified string of characters during serialization. The\r
- <function>read-character-map</function> template provides a\r
- means for reading and using character maps with XSLT\r
- 1.0-based tools.</para>\r
-\r
- \r
-<para>This template reads the character-map contents from\r
- <parameter>uri</parameter> (in full or in part, depending on\r
- the value of the <parameter>use.subset</parameter>\r
- parameter), then passes those contents to the\r
- <function>apply-character-map</function> template, along with\r
- <parameter>content</parameter>, the data on which to perform\r
- the character substitution.</para>\r
-\r
- \r
-<para>Using the character map “in part” means that it uses only\r
- those <tag>output-character</tag> elements that match the\r
- XPath expression given in the value of the\r
- <parameter>subset.profile</parameter> parameter. The current\r
- implementation of that capability here relies on the\r
- <function>evaluate</function> extension XSLT function.</para>\r
-\r
- </refsect1><refsect1><title>Parameters</title>\r
- \r
-<variablelist>\r
- <varlistentry><term>use.subset</term>\r
- <listitem>\r
- \r
-<para>Specifies whether to use a subset of the character\r
- map instead of the whole map; boolean\r
- <literal>0</literal> or <literal>1</literal></para>\r
-\r
- </listitem>\r
- </varlistentry>\r
- <varlistentry><term>subset.profile</term>\r
- <listitem>\r
- \r
-<para>XPath expression that specifies what subset of the\r
- character map to use</para>\r
-\r
- </listitem>\r
- </varlistentry>\r
- <varlistentry><term>uri</term>\r
- <listitem>\r
- \r
-<para>URI for a character map</para>\r
-\r
- </listitem>\r
- </varlistentry>\r
- </variablelist>\r
-\r
- </refsect1></refentry>\r
-</reference>\r
-\r