fixDocXIncludes: Fix the href attributes on XML_XINCLUDE_START nodes

fixDocXIncludesR Documentation

Fix the href attributes on XML_XINCLUDE_START nodes

Description

This attempts to fix the C-level XML nodes that libxml2 creates to represent content included by XInclude xi:include nodes.

Usage

fixDocXIncludes(doc, xinc = getXIncludes2(docName(doc)))

Arguments

doc

the XML document or node

xinc

the data frame containing the information about which XML file includes which other XML files, in the order they are included in the XML tree.

Value

The updated document/XML tree with the href attribute set.

Author(s)

Duncan Temple Lang

References

libxml2 and XInclude nodes.

See Also

xmlParse getXIncludes2 getNodeLocation

Examples

m = xmlParse(system.file("examples/multi.xml", package = "XML"))
invisible(fixDocXIncludes(m))
getNodeLocation(getNodeSet(m, "//C"))

omegahat/XML documentation built on Jan. 17, 2024, 6:47 p.m.