XProc steps

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

p:xinclude

<p:declare-step type="p:xinclude">
   <p:input port="source"/>
   <p:output port="result"/>
   <p:option name="fixup-xml-base" select="'false'"/> <!-- boolean -->
   <p:option name="fixup-xml-lang" select="'false'"/> <!-- boolean -->
</p:declare-step>

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.

Example

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>