With the help of <p:xinclude>, external documents can be embedded by “XInclude“. The file indication of the documents to be read in is made at the input port (“source“). The result is outputted at the output port (“result“). The options “fixup-xml-base“ and “fixup-xml-lang“ are XInclude-specific and have an influence on the processing of the reading process. XInclude is a W3C specification and is explained in more detail in the basics chapter.
In the following example the known document (“FilmCollection.xml“) is read in by XInclude.
<?xml version="1.0" encoding="UTF-8"?> <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:c="http://www.w3.org/ns/xproc-step" version="1.0"> <p:input port="source"> <p:document href="FilmCollection.xml"/> </p:input> <p:output port="result"/> <p:xinclude/> </p:declare-step>