trace

Reports tracing information in an implementation-defined way

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.

Parameters

Description

value:item()

the items to trace

label:string()

a label to display with the trace information

Examples

XPath

Results

Explanation

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

XPath

Results

trace($var1, ‘The value of $var1 is: ‘)

The value of $var1 is: 4