BASICS

ADMINISTRATION

DEVELOPMENT

SUPER ADMIN

  LAST UPDATED
5/22/2013

System Defined XPath Functions

The following includes a list of system-defined XPath functions and includes the syntax, and syntax and output examples.

concat()

Concat takes two or more arguments and returns a string. Please note that each argument is converted into string.

concat(arg1, arg2,…)

Example

<xsl:value-of select="concat('Hello','World')"/>

Output

Hello World

Argument: arg(n) (mandatory): More than one argument of string to be combined.

upper-case()

The upper-case function converts lower case characters in a string to upper case.

upper-case(string)

Example

<xsl:value-of select="upper-case('Hello World')"/>

Output

HELLO WORLD

Argument: arg (mandatory): String argument to be converted into upper case.

lower-case()

The lower-case function converts upper case characters in a string to lower case.

lower-case(string)

Example

<xsl:value-of select="lower-case('Hello World')"/>

Output

hello world

Argument: arg (mandatory): String argument to be converted into lower case.

substring-after()

The substring-after function returns the part of the string after a delimiter. Please note that the function will return the first occurrence of the specified substring. 

substring-after(string, delimiter)

Example

<xsl:value-of select="substring-after('index.html', '.')"/>

Output

html

Argument: string (mandatory): The containing string.

Argument: delimiter (mandatory): The delimiter substring.

substring-before()

The substring-before function returns the part of the string, before a delimiter. Please note that the function returns the first occurrence of the specified substring. 

substring-before(string, delimiter)

Example

<xsl:value-of select="substring-before('index.html', '.')"/>

Output

index

Argument: string (mandatory): The containing string.  

Argument: delimiter (mandatory): The delimiter substring.  

tokenize()

Tokenize function splits a string in a sequence of substrings, based on a provided delimiter.

tokenize(string, delimiter)

Example

<xsl:value-of select="tokenize('one, two, three', ',')"/>

Output

one two three
 

 

Introduction to XPathOU Campus XSLT Variables

 


Was this page helpful?

Additional Comments:


(Include your email address if you would like a reply)