During the lab, you will extend the XProc pipeline document created in the previous lab to
copy images referenced by the source document to the output folder.
To complete the lab, you will need the following stylesheets:
list-topic-images-xhtml.xsl
list-topic-images-copy.xsl
-
In the lab folder, make a copy of the XProc pipeline document you created in the previous
lab.
-
Open the
pipeline.xpl
file in your favorite editor.
-
After the p:store step, add a step that performs an XSLT transformation on the source
document using the
list-topic-images-copy.xsl
stylesheet. This will generate the list of
images to be copied to the output folder.
Note: You will need to use a p:pipe.
<p:xslt name="build-copy-list">
<p:input port="source">
<p:pipe step="load-source-document" port="result" />
</p:input>
<p:input port="stylesheet">
<p:document href="../xsl/list-topic-images-copy.xsl" />
</p:input>
</p:xslt>
-
Add a cpnz:copy step to copy the images to the output folder.
<cpnz:copy name="copy-images">
<p:with-option name="cpnz:destination" select="$result-document-uri" />
</cpnz:copy>
-
Save your changes.
-
Test your XProc pipeline with the com.componize.samples.lab11.PipelineTest unit
test.