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
| Introduction
| Writing extension functions in Java
| Converting Arguments to Java Extension Functions
| Converting the Result of a Java Extension Function
| Writing extension functions for .NET
» | Converting Arguments to .NET Extension Functions
| Converting the Result of a .NET Extension Function
| Writing XSLT extension instructions
| Customizing Serialization
| Implementing a collating sequence
| Localizing numbers and dates
| Adding an output encoding
| Writing a URI Resolver for Input Files
| Writing a URI Resolver for Output Files
Saxon Extensions
Sample Saxon Applications
The Saxon SQL Extension
XSLT Elements
XPath 2.0 Expression Syntax
Function Library
Standards Conformance

# Converting Nodes and Sequences of Nodes

If the expected type is a generic collection type, or an array of the Saxon class `NodeInfo`, or a `Value` or `SequenceIterator`, Saxon will pass the nodes supplied in the call in their native Saxon representation.

Saxon also recognizes `System.Xml.Node` and its subtypes. However, calling a method that expects an instance if `System.Xml.Node` will only work if the actual node supplied as the argument value is a Saxon-wrapped DOM node, that is (a) the input to the stylesheet or query must be supplied in the form of a wrapped DOM, and (b) the external function must be called supplying a node obtained from the input document, not some node in a temporary tree created in the course of stylesheet or query processing.

If an external function returns an `System.Xml.Node` then it will be wrapped as a Saxon node. This may be expensive if it is done a lot, since each such node will acquire its own document wrapper.

Next