SAXONICA

Saxon Documentation
Full Contents
About Saxon
Changes in this Release
Notices
Using XSLT 2.0
Using XQuery
Handling Source Documents
XML Schema Processing
XPath API for Java
Saxon on .NET
Extensibility
Saxon Extensions
| Introduction
| EXSLT Extensions
| Extension attributes (XSLT only)
» | Additional serialization parameters
| Extension functions
| Extension instructions
Sample Saxon Applications
The Saxon SQL Extension
XSLT Elements
XPath 2.0 Expression Syntax
Function Library
Standards Conformance

# The saxon:xquery serialization method

A new serialization method `saxon:xquery` is available. This is intended to be useful when generating an XQuery query as the output of a query or stylesheet. This method differs from the XML serialization method in that "<" and ">" characters appearing between curly braces (but not between quotes) in text nodes and attribute nodes are not escaped. The idea is to allow queries to generated, or to be written within an XML document, and processed by first serializing them with this output method, then parsing the result with the XQuery parser. For example, the document `<a>{$a &lt; '&lt;'}</a>` will serialize as `<a>{$a < '&lt;'}</a>`.

When invoking this method via an API, use the property value "{http://saxon.sf.net/}xquery".

When using this serialization method, the `omit-xml-declaration` parameter is automatically set to "yes".

Next