Returns a deep copy of specified node set.
Returns a node-set containing all nodes found in node-set1
but not in node-set2
.
test1
, object value1
, ..., boolean testN
, object valueN
, ...., object fallback
)Evaluates each testi
in turn as a boolean, if the result of testi
is true, returns corresponding valuei
. Otherwise, if all testi
evaluates to false, returns fallback
.
node-set
, string separator
)Converts each node in node-set
to a string and joins all these strings using separator
. Returns the resulting string.
Example: join(//h1, ', ')
returns "Introduction, Conclusion"
if the document contains 2 h1
elements, one containing "Introduction"
and the other "Conclusion"
.
Returns a node-set containing all nodes found in both node-set1
and node-set2
.
input
, string pattern
, string flags
?)Similar to XPath 2.0 function matches
. Returns true if input
matches the regular expression pattern
; otherwise, it returns false.
Note that unless ^ and $ are used, the string is considered to match the pattern if any substring matches the pattern.
Optional flags
may be used to parametrize the behavior of the regular expression:
Operate in multiline mode.
Operate in case-insensitive mode.
Examples: matches("foobar", "^f.+r$")
returns true. matches("CamelCase", "ca", "i")
returns true.
The first form returns the maximum value of all nodes of specified node set, after converting each node to a number.
Nodes which cannot be converted to a number are ignored. If all nodes cannot be converted to a number, returns NaN
.
The second form returns the maximum value of all specified numbers (at least 2 numbers).
Arguments which cannot be converted to a number are ignored. If all arguments cannot be converted to a number, returns NaN
.
Same as max() but returns the minimum value of specified arguments.
Returns number1
raised to the power of number2
.
input
, string pattern
, string replacement
, string flags
?)Similar to XPath 2.0 function replace
. Returns the string that is obtained by replacing all non-overlapping substrings of input
that match the given pattern
with an occurrence of the replacement
string.
The replacement
string may use $1 to $9 to refer to captured groups.
Optional flags
may be used to parametrize the behavior of the regular expression:
Operate in multiline mode.
Operate in case-insensitive mode.
Example: replace("foobargeebar", "b(.+)r", "B$1R")
returns "fooBaRgeeBaR"
.
uri
, ?string base
?)If uri
is an absolute URL, returns uri
.
If base
is specified, it must be a valid absolute URL, otherwise an error is reported.
If uri
is a relative URL,
if base
is specified, returns uri
resolved using base
;
if base
is not specified, returns uri
resolved using the base URL of the context node.
If uri
is the empty string,
if base
is specified, returns base
;
if base
is not specified, returns the base URL of the context node.
uri
, ?string base
?)Converts absolute URL uri to an URL which is relative to specified base URL base. If base is not specified, the base URL of the context node is used instead.
Uri must be a valid absolute URL, otherwise an error is reported. If base
is specified, it must be a valid absolute URL, otherwise an error is reported.
Example: returns "../john/.profile
" for uri="file:///home/john/.profile
" and base="file:///home/bob/.cshrc
".
If uri cannot be made relative to base (example: uri="file:///home/john/public_html/index.html
" and base="http://www.xmlmind.com/index.html
"), uri is returned as is.
Converts specified argument, a "file://
" URL, to a native file name. Returns the empty string if argument is not a "file://
" URL.