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
4.6Mb size Format: txt, pdf, ePub
ads

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.

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

Other books

PrimalDemand by Rebecca Airies
Yellow Blue Tibia by Adam Roberts
The Revenge of the Radioactive Lady by Elizabeth Stuckey-French
Texas Hold 'Em by Patrick Kampman
Whiskey and Water by Elizabeth Bear
A History of Money: A Novel by Alan Pauls, Ellie Robins
When Wicked Craves by Beck, J. K.
Sara's Game by Ernie Lindsey
Just a Memory by Lois Carroll