Introduction

SInclude is an XInclude processor designed to work with the Saxon Java processor. It works with Saxon version 10 or higher.

This is not the default processor used by Saxon when XInclude processing is requested. By default, Saxon relies on XInclude support in the XML parser (usually Xerces). This is a useful separation of concerns. While XInclude is useful to authors, it’s not part of XSLT. The XInclude processor built into Xerces is a streaming processor seamlessly available to Saxon anywhere that XML is parsed.

Unfortunately, the Xerces XInclude processor doesn’t support very many fragment identifier schemes and, because it’s a streaming processor, can’t handle any document reference or scheme that can’t be implemented with a one-pass, streaming algorithm.

SInclude is a transformation of one parsed XML document into another1. It isn’t limited to a single pass and supports an extensible range of fragment identifier schemes. This implementation can be used as a Java API, comes with a Saxon extension function, and is also the implementation used in XML Calabash.