Chapter 1XInclude

The semantics of XInclude are that the xi:include element is replaced by whatever it identifies. If there’s an error retrieving the resource it identifies, the author can provide fallback; in this case, the xi:include element is replaced by the fallback. (The fallback markup can include more xi:include elements that can have fallback of their own.)

The xi:include element can specify whether the resource being included is XML or text. If it’s XML, then it will be parsed and xi:include elements recursively expanded within the included parts.

XInclude can refer to whole documents or parts of documents, it can even refer to parts of the document that includes the xi:include element. However, it must not form a loop: you can’t include “A” that includes “B” that includes “A” again.

(For more details about precisely what is possible and how, consult XML Inclusions (XInclude) Version 1.1.)

SInclude supports both XML and text parsing with (or without) fallback. What sets SInclude apart are the fragment identifier schemes that it supports.