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, Priscilla Walmsley. 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 TypeName | Type | Description |
$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()*"> | | </xsl:variable> |
XPath Example | 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 |
History |
Recommended Reading:
|