home contribute faq download

FunctX XQuery Functions

fn:trace

Reports tracing information in an implementation-defined way

Google
Webxqueryfunctions.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, 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 Type

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

Examples

let $var1 :=
4
return
XQuery 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/
Datypic XQuery Services

Recommended Reading:

XQuery