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.
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>