XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition (597 page)

BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition
2.87Mb size Format: txt, pdf, ePub

Some very traditional HTML


then the spaces after
Some
and before
traditional
are significant, even though they appear respectively at the end and the beginning of a text node.

XSLT Example

The following key declaration indexes the titles of books with whitespace normalized:


This may then be used to locate books by title as follows:


The effect is that it will be possible, without knowing how many spaces and newlines there are, to retrieve a book appearing in the source document as:


   Object Oriented Languages -<br/></span></p><p><span>                  Basic Principles and Programming Techniques


See Also

concat()
on page 729

substring-after()
on page 885

substring-before()
on page 887

normalize-unicode

The
normalize-unicode()
function returns a canonical representation of a string in which different ways of representing the same Unicode character have been reduced to a common representation. This makes it possible to compare two strings accurately.

Signature

Argument
Type
Meaning
input
xs:string?
The string to be normalized. If an empty sequence is supplied, the function returns a zero-length string.
normalization-form
(optional)
xs:string
The normalization algorithm to be used.
Result
xs:string
The result of normalizing the string
.

Effect

The function applies a Unicode normalization algorithm to the input string, and returns the normalized string as its result. If the
normalization-form
argument is omitted, the default is NFC. The only normalization form that all implementations must support is NFC. Other normalization forms can be requested (including but not limited to
NFC
,
NFD
,
NFKC
,
NFKD
,
FULLY-NORMALIZED
) using the
normalization-form
argument; a runtime error is reported if the requested normalization form is not supported by the implementation. For the meanings of these normalization forms, see the
Usage
section below.

Other books

Beautiful Addictions by Season Vining
Tokyo by Hayder, Mo
La edad de la duda by Andrea Camilleri
Outcasts by Alan Janney
Labyrinth Gate by Kate Elliott
Tricksters Queen by Tamora Pierce
Romanov Succession by Brian Garfield
The Last Anniversary by Liane Moriarty
The Witch and the Dead by Heather Blake