ddn.data.xml.xinclude
XInclude processing (phased).
This module provides basic support for the W3C XInclude 1.0 mechanism.
Current scope (MVP):
- Supports
<xi:include href='...'/> with the namespace URIhttp://www.w3.org/2001/XInclude. - Supports
parse='xml'(default) andparse='text'. - Local filesystem includes only; network fetching is disabled by default.
- Bounded recursion depth.
- Uses
xmllint --xincludeas an oracle in unittests.
var XINCLUDE_NS
struct XmlXIncludeOptions
Types 1
structXmlXIncludeOptions
XInclude options.
Fields
size_t maxDepthMaximum include nesting depth.bool allowNetworkIf `true`, allow network/URI includes (disabled by default).const(ubyte)[] delegate(string uri) @safe networkLoaderOptional loader for non-`file:` URIs.bool cacheResourcesIf `true`, cache loaded include payloads by resolved identifier.Functions 5
fn
XmlDocument processXInclude(XmlDocument doc, XmlXIncludeOptions options = XmlXIncludeOptions.init) @safeApplies XInclude processing to `doc`.private fn
void processElement(
XmlDocument owner,
XmlElement el,
size_t depth,
XmlXIncludeOptions options,
ref XmlResourceLoader loader) @safeVariables 1
private enumvar
XINCLUDE_NS = "http://www.w3.org/2001/XInclude"