Microsoft XML SDK 2.6 - XSLT Reference

string Function

Converts an object to a string.

string string(object?)

Remarks

An object is converted to a string as follows:

A node-set is converted to a string by returning the string value of the node in the node-set that is first in document order. If the node-set is empty, an empty string is returned.

A number is converted to a string as follows:

The Boolean "false" value is converted to the string "false". The Boolean "true" value is converted to the string "true".

An object of a type other than the four basic types is converted to a string in a way that is dependent on that type.

If the argument is omitted, it defaults to a node-set with the context node as its only member.

Note   The string function is not intended for converting numbers into strings for presentation to users. The format-number function and <xsl:number> element in XSLT provide this functionality.

See Also

XML Data Types Reference