Lab 11 - Create an XProc pipeline with XSLT and copy steps

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
  1. In the lab folder, make a copy of the XProc pipeline document you created in the previous lab.
  2. Open the pipeline.xpl file in your favorite editor.
  3. 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>
  4. 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>
  5. Save your changes.
  6. Test your XProc pipeline with the com.componize.samples.lab11.PipelineTest unit test.