Skip to content

Instantly share code, notes, and snippets.

@dwcramer
Last active November 17, 2017 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dwcramer/6db7a8c017aae94c1ce15b15d6044642 to your computer and use it in GitHub Desktop.
Save dwcramer/6db7a8c017aae94c1ce15b15d6044642 to your computer and use it in GitHub Desktop.
Sample Pipeline to test Calabash's caching of loaded source (assumes a loadme.xml that contains a valid xi:include element)
<?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" name="main">
<p:input port="source">
<p:inline>
<doc>Hello world!</doc>
</p:inline>
</p:input>
<p:output port="result">
<p:pipe port="result" step="test"/>
</p:output>
<p:load href="./loadme.xml" name="loaded"/>
<p:xinclude fixup-xml-base="true" name="xinclude"/>
<p:sink/>
<p:xslt name="test">
<p:input port="source">
<p:pipe step="main" port="source"/>
</p:input>
<p:input port="parameters">
<p:empty/>
</p:input>
<p:input port="stylesheet">
<p:inline>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:c="http://www.w3.org/ns/xproc-step" version="2.0">
<xsl:template match="/">
<xsl:copy-of select="document('./loadme.xml')"/>
</xsl:template>
</xsl:stylesheet>
</p:inline>
</p:input>
</p:xslt>
</p:declare-step>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment