home contribute faq download

FunctX XSLT Functions

fn:trace

Reports tracing information in an implementation-defined way

Google
Webxsltfunctions.com

Description

The fn:trace function accepts items and a label for those items, and returns the items unchanged. The exact behavior of the function is implementation-dependent, but generally the processor puts the label and the value of the items in a log file or user console.

This description is © Copyright 2007, O'Reilly Media. It is excerpted from the book XQuery by Priscilla Walmsley, O'Reilly, 2007. For a complete explanation of this function, please refer to Appendix A of the book.

Arguments and Return Type

NameTypeDescription
$value item()* the items to trace
$label xs:string a label to display with the trace information
return value item()*

Examples

<xsl:variable name="var1" as="item()*">
4
</xsl:variable>
XSLT ExampleResultsExplanation
trace($var1, 'The value of $var1 is: ')
The value of $var1 is: 4
an example of what a processor might write to a log file

History

Published OnLast UpdatedContributor(s)
2006-06-272007-02-26W3C, XQuery 1.0 and XPath 2.0 Functions and Operators, http://www.w3.org/TR/xpath-functions/
Need XSLT Help?
D A T Y P I C
Training | Consulting | Development

XQuery by Priscilla WalmsleyGet the book!
XQuery by Priscilla Walmsley