Visit Mozilla.org

EXSLT:str:split

From MDC

XSLT/XPath Reference: XSLT elements, EXSLT functions, XPath functions, XPath axes

This article covers features introduced in Firefox 3

Contents


str:split() splits a string using a pattern string to determine where the splits should occur, returning a node-set containing the resulting strings.

[edit] Syntax

str:split(string, pattern)

[edit] Arguments

string
The string to split.
pattern
The pattern indicating where to split the string.

[edit] Returns

A node-set of token elements, each containing one token from the string.

For example:

str:split('book, phone, computer, chair', ', ')

Returns a node set like this:

<token>book</token>
<token>phone</token>
<token>computer</token>
<token>chair</token>

[edit] Defined

EXSLT - STR:SPLIT

[edit] Gecko support

Supported in Gecko 1.9 and later.