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:load

<p:declare-step type="p:load">
   <p:output port="result"/>
   <p:option name="href" required="true"/> <!-- anyURI -->
   <p:option name="dtd-validate" select="'false'"/> <!-- boolean -->
</p:declare-step>

The functionality of the <p:load> step is very similar to the one of <p:document>. Both steps load in external documents and accept appropriate URIs or inline generated documents. The primary difference is that <p:document> is a XProc element and <p:load> a step. This means it can appear at other positions in the stylesheet as <p:document> can. Furthermore, the step supports a validation against a DTD (insofar as it is deposited in the document to be load in). If the DTD is invalid or nonexistent, a dynamic error will be outputted.

Example

In the following example the most trivial possible use of <p:load> is demonstrated.

<?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:output port="result"/>
   <p:load href="FilmCollection.xml"/>
</p:declare-step>