caucho
Resin 1.1
FAQ
Reference
JavaDoc
Demo
Java Tutorial

Getting Started
Configuration
Servlet
JSP
XTP/XSL
JavaScript
JS Library

XTP intro
XTP to JSP
XPath
XPath Fun
XSL
XSL lite
XSL lite examples
 XPath Functions

Node Set Functions
last() Returns the number of nodes matching the axis
count(node-set) Returns the number of nodes matching the node-set pattern.
local-part(node) Returns the local part of the node's name.
namespace(node) Returns the namespace URL the node's name.
name(node) Returns the node's name.
id(idref) Returns the node with the 'ID' attribute equals to idref.

String Functions
string(obj) Converts the object to a string.
concat(s1, s2, ...) Concatenates strings.
starts-with(string, head) True if string starts with head.
contains(string, substring) True if string contains substring.
substring-before(string, substring) Returns the substring of string before matching substring.
substring-after(string, substring) Returns the substring of string after the matching substring.
string-length(string) Returns the string length of string.
normalize(string) Normalizes whitespace.
translate(string, from, to) Converts characters in a string, like the 'tr' command.

Boolean Functions
boolean(obj) Converts obj into a boolean
true() Returns true.
false() Returns false.
lang(language) Returns true if the context node has an xml:lang of language.

Number Functions
number(obj) Converts obj to a number (Java double)
sum(node-set) Converts the node values of node-set to numbers and adds them.
floor(number) Returns the closest integer below number.
ceiling(number) Returns the closest integer above number.
round(number) Rounds number to the nearest integer.

Resin Extensions
if(test,a,b) Conditionally selects the value of a or b.

Node Set Functions

last()

Returns the number of nodes matching the axis

chapter/verse[last()]
The last verse in each chapter.
ancestor::node()[last()]
The furthest ancestor from the current node.

count(node-set)

Returns the number of nodes matching the node-set pattern.

local-part(node)

Returns the local part of the node's name. In other words, the node name stripped of the namespace prefix.

namespace(node)

Returns the namespace URL the node's name.

name(node)

Returns the node's name.

id(idref)

Returns the node with the 'ID' attribute equals to idref. The ID attribute is assigned in the DTD. The actual attribute name may, of course, vary.

String Functions

string(obj)

Converts the object to a string.

concat(s1, s2, ...)

Concatenates strings.

starts-with(string, head)

True if string starts with head.

contains(string, substring)

True if string contains substring.

substring-before(string, substring)

Returns the substring of string before matching substring.

substring-after(string, substring)

Returns the substring of string after the matching substring.

string-length(string)

Returns the string length of string.

normalize(string)

Normalizes whitespace. Consecutive whitespace is converted into a single space. Leading and trailing whitespace is trimmed.

translate(string, from, to)

Converts characters in a string, like the 'tr' command.

Boolean Functions

boolean(obj)

Converts obj into a boolean

true()

Returns true.

false()

Returns false.

lang(language)

Returns true if the context node has an xml:lang of language.

Number Functions

number(obj)

Converts obj to a number (Java double)

sum(node-set)

Converts the node values of node-set to numbers and adds them.

floor(number)

Returns the closest integer below number.

ceiling(number)

Returns the closest integer above number.

round(number)

Rounds number to the nearest integer.

Resin Extensions

if(test,a,b)

Conditionally selects the value of a or b. If test evaluates to true, return the value of a. Otherwise, return the value of b.

XPath   XSL
Copyright © 1998-2000 Caucho Technology. All rights reserved.
Last modified: Thu, 16 Sep 1999 14:56:49 -0700 (PDT)