From: Michael Smith Date: Wed, 22 Jun 2005 16:29:17 +0000 (+0000) Subject: Finalized read-character-map() and apply-character-map() functions. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d30044a7235afa9ac97cc81fd5168aba4bd58175;p=docbook-dsssl Finalized read-character-map() and apply-character-map() functions. --- diff --git a/xsl/lib/lib.xweb b/xsl/lib/lib.xweb index bb6773106..98f76d720 100644 --- a/xsl/lib/lib.xweb +++ b/xsl/lib/lib.xweb @@ -1,6 +1,8 @@ + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:dyn="http://exslt.org/dynamic" + xmlns:saxon="http://icl.com/saxon"> XSL Library Template Reference $Id$ @@ -723,21 +725,24 @@ and preserving the delimiters as text nodes between the tokens. - + - replace-chars-with-strings - Replace (special) characters with strings + apply-character-map + Apply an XSLT character map Description - This function replaces individual characters with strings of - one or more characters. It is useful mainly for replacing "special" - chararacters or symbols. It reads in content, - the content on which to perform the character replacement, and - character-mappings, a node set of elements - (the names of the elements don't matter), with each element having - the following attributes: + This function applies an XSLT character + maps; that is, it cause certain individual characters to be + substituted with strings of one or more characters. It is useful + mainly for replacing "special" chararacters or symbols. It reads in + two things: content, the content on which to + perform the character replacement, and + character.map.contents, a node set of + elements (the names of the elements don't matter), with each element + having the following attributes: character, a character to @@ -749,8 +754,8 @@ and preserving the delimiters as text nodes between the tokens. class="attribute">character attribute - This function uses character-mappings to do - character replacement on content , and then + This function uses character.map.contents to + do character replacement on content, and then returns the modified contents. @@ -763,25 +768,25 @@ and preserving the delimiters as text nodes between the tokens. FAQ. - - + + - + + select="$character.map.contents[1]/@character" /> + select="$character.map.contents[1]/@string" /> - - + + - + @@ -796,10 +801,10 @@ and preserving the delimiters as text nodes between the tokens. - + -apply-character-map -Apply an XSLT character map +read-character-map +Read in all or part of an XSLT character map Description @@ -809,49 +814,62 @@ url="http://www.w3.org/TR/xslt20/#character-maps">character maps and explains how they may be used to allow a specific character appearing in a text or attribute node in a final results tree to be substituted by a specified string of characters during -serialization. The apply-character-map provides a -means for reading and using character maps with XSLT 1.0-based XSLT -engines. It reads the character-map contents from -uri, then passes contents (in full or in part, -depending on the value of the use.subset -parameter) to the -replace-chars-with-strings function, -along with content, the contents on which to +serialization. The read-character-map function +provides a means for reading and using character maps with XSLT +1.0-based tools. + +It reads the character-map contents from +uri (in full or in part, depending on the value +of the use.subset parameter), then passes those +contents to the apply-character-map function, +along with content, the data on which to perform the character substition. Using the character map "in part" means that it uses only those -output-character elements that have a class attribute whose value matches that of -the subset.name. +output-character elements that match the XPATH expression +given in the value of the subset.profile +parameter. The current implementation of that capability here relies +on the evaluate extension XSLT function. - - - + + - + - - - - - - - - - - + + + + + + + + + + + + +Error: To process character-map subsets, you must use an XSLT engine +that supports the evaluate() XSLT extension function. Your XSLT engine +does not support it. + + + + + + + - + @@ -999,8 +1017,8 @@ around these functions. - +