Ancillary files
<p:library xml:id="b5-ancillary"
xmlns:p="http://www.w3.org/ns/xproc"
xmlns:cx="http://xmlcalabash.com/ns/extensions"
xmlns:pl="http://www.w3.org/XML/XProc/docs/library">
<p:declare-step name="main" type="pl:main">
<p:input port="parameters" kind="parameter"/>
<pl:format-spec>
<p:input port="source">
<p:document href="langspec.xml"/>
</p:input>
</pl:format-spec>
<pl:tidy href="langspec.html"/>
</p:declare-step>
<p:declare-step name="main" type="pl:format-spec">
<p:input port="source"/>
<p:input port="parameters" kind="parameter"/>
<p:output port="result"/>
<p:xslt>
<p:input port="stylesheet">
<p:document href="../style/makeglossary.xsl"/>
</p:input>
</p:xslt>
<p:store name="store-glossary" href="glossary.xml"/>
<p:xinclude cx:depends-on="store-glossary">
<p:input port="source">
<p:pipe step="main" port="source"/>
</p:input>
</p:xinclude>
<p:validate-with-relax-ng name="validated">
<p:input port="schema">
<p:document href="../schema/dbspec.rng"/>
</p:input>
</p:validate-with-relax-ng>
<pl:ancillary-files name="make-ancillary"/>
<p:xslt name="style" cx:depends-on="make-ancillary">
<p:input port="source">
<p:pipe step="validated" port="result"/>
</p:input>
<p:input port="stylesheet">
<p:document href="../style/dbspec.xsl"/>
</p:input>
</p:xslt>
</p:declare-step>
<p:declare-step name="main" type="pl:ancillary-files">
<p:input port="source"/>
<p:input port="parameters" kind="parameter"/>
<p:xslt>
<p:input port="source">
<p:pipe step="main" port="source"/>
</p:input>
<p:input port="stylesheet">
<p:document href="../style/pipeline-library.xsl"/>
</p:input>
</p:xslt>
<p:store href="pipeline-library.xml"/>
<p:xslt>
<p:input port="source">
<p:pipe step="main" port="source"/>
</p:input>
<p:input port="stylesheet">
<p:document href="../style/typed-pipeline-library.xsl"/>
</p:input>
</p:xslt>
<p:store href="typed-pipeline-library.xml"/>
<p:xslt>
<p:input port="source">
<p:pipe step="main" port="source"/>
</p:input>
<p:input port="stylesheet">
<p:document href="../style/error-list.xsl"/>
</p:input>
</p:xslt>
<p:store href="error-list.xml"/>
</p:declare-step>
<p:declare-step type="pl:tidy">
<p:input port="source"/>
<p:option name="href" required="true"/>
<p:store name="store">
<p:with-option name="href" select="$href"/>
</p:store>
<p:exec result-is-xml="false"
source-is-xml="false"
command="/Users/ndw/bin/tidy"
cx:depends-on="store">
<p:with-option name="args" select="$href">
<p:empty/>
</p:with-option>
<p:input port="source"><p:empty/></p:input>
</p:exec>
<p:sink/>
</p:declare-step>
</p:library>