diff --git a/specifications/xslt-40/src/function-catalog.xml b/specifications/xslt-40/src/function-catalog.xml index 1b5e34257..accf104db 100644 --- a/specifications/xslt-40/src/function-catalog.xml +++ b/specifications/xslt-40/src/function-catalog.xml @@ -1461,6 +1461,62 @@ + + + + + + + + + deterministic + context-dependent + focus-independent + + +

Delivers the content of a character map declared using xsl:character-map.

+
+ + +

The static context for a stylesheet package includes a set of named character maps. This function + delivers the content of a character map if a character map with the given name is present in the + static context of the containing package, or an empty sequence otherwise.

+ +
+ + +

The returned character map is in a format suitable for use within the $options + parameter of the serialize function.

+
+ + + +

Consider the following character map declaration:

+ + + + + + ]]> +

Then the result of the function call character-map(xs:QName('jsp')) is the map:

+ +map { + "«": "<%", + "»": "%>", + "§": '"' +} + +

This might be used in a call to the function serialize, for example:

+ +serialize($input, {'method': 'xml', + 'use-character-maps': character-map(xs:QName('jsp')) }) + + +
+
+
diff --git a/specifications/xslt-40/src/xslt.xml b/specifications/xslt-40/src/xslt.xml index e6701e9e7..ad32f7be8 100644 --- a/specifications/xslt-40/src/xslt.xml +++ b/specifications/xslt-40/src/xslt.xml @@ -9651,7 +9651,7 @@ and version="1.0" otherwise.

variables are defined by the variable binding elements that are in scope for the containing element (see ).

- +

The statically known function definitions are:

@@ -9770,6 +9770,9 @@ and version="1.0" otherwise.

The set of named keys, used by the key function

+ +

The set of named character maps, used by the character-map function

+

The values of system properties, used by the @@ -9780,14 +9783,14 @@ and version="1.0" otherwise.

element-available function

-

A dynamic function call clears the first of these +

If these functions are called within a , the results will reflect the capabilities and configuration of the processor used to perform static analysis, while if they @@ -38646,9 +38649,17 @@ return ($m?price - $m?discount)

It is not an error if the same character map is referenced more than once, directly or indirectly.

-

An output definition, after recursive - expansion of character maps referenced via its use-character-maps - attribute, may contain several mappings for the same character. In this situation, + +

For every xsl:character-map declaration in a , + other than one that is overridden by another of higher , + the static context of the package includes a named character map derived from the + xsl:character-map declaration. The name of the named character map is the + QName formed by expanding the value of the name attribute, and the content is + a map of type map{xs:string, xs:string} that maps characters (represented as + xs:string instances of length 1) to their replacement strings.

+ +

Recursive expansion of character maps using use-character-maps + attributes may produce several mappings for the same character. In this situation, the last character mapping takes precedence. To establish the ordering, the following rules are used:

@@ -38752,6 +38763,23 @@ return ($m?price - $m?discount) validation.

+ + The character-map function + + + The contents of a character map declared using xsl:character-map are now + available dynamically via a new character-map function. + + +

The contents of a character map declared using xsl:character-map are + available dynamically via the character-map function.

+ + + + + +
+ Disabling Output Escaping

Normally, when using the XML, HTML, or XHTML output method, the serializer will