XSLT Templates to manipulate strings
Status
The templates in this stylesheet are used in several other ones. Please don't modify it without letting me know and don't break the current exposed API.
Variables
- str:uc
- L'ensemble des lettres en majuscule (pratique pour conversion majuscule-minuscule)
- str:lc
- L'ensemble des lettres en minuscule (pratique pour conversion majuscule-minuscule)
Templates
- str:keep-before
- Takes a string and a delimiter parameters and returns the part of the string before the first appearance of delimiter in string, the complete string if delimiter is not in string.
- str:ends-with
- Takes a string and a string2 parameters and returns
yes
if string ends with string2, nothing otherwise (please use normalize-space()
on the results to avoid bad surprises
- str:has-token
- Takes a string, a token and an optinal delimiter (default at " ") parameters and returns if token is a token of string delimited by delimiter the value token, nothing (that is, an unspecified number of spaces; please use
normalize-space()
on the results to avoid bad surprises) else.
- str:keep-before-last
- Takes a string and a delimiter parameters and returns the part of the string before the last appearance of delimiter in string, the complete string if delimiter is not in string.
- str:replace
- Takes a string, and replace every occurence of the toBeReplaced parameter by the replaceBy parameter.
- str:stripElements
- Takes a string and return it without the tags between
<
and >
.
$Id: str-util.xsl,v 1.19 2005/11/02 15:53:56 matthieu Exp $
Dominique Hazael-Massieux