Page 1 of 1

xproc: how do I reference a library of steps

Posted: Mon Jun 17, 2013 6:52 am
by Doug
How do I reference a library of steps? I'm using Oxygen 14.2. Particularly I want to use cx:recursive-directory-list from xmlns:cx="http://xmlcalabash.com/ns/extensions". Also I will soon want to have a library of my own steps. From examples I've found on the web cx:recursive-directory-list requires a path attribute but I'm getting the following error:

System ID: J:\work\e60s03-sample\xproc\checkConversion.xpl
Main validation file: J:\work\e60s03-sample\xproc\checkConversion.xpl
Engine name: Calabash XProc
Severity: error
Description: err:XS0010 : Undeclared option specified: path (It is a static error if a pipeline contains a step whose specified inputs, outputs, and options do not match the signature for steps of that type.)
Start location: 10:0

Here's my xproc code:

Code: Select all


 <p:pipeline xmlns:p="http://www.w3.org/ns/xproc" xmlns:c="http://www.w3.org/ns/xproc-step"
version="1.0" xmlns:cx="http://xmlcalabash.com/ns/extensions" type="cx:recursive-directory-list" xmlns:saxon="http://saxon.sf.net/"
name="myPipeline" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<p:import href="http://xmlcalabash.com/extension/steps/library-1.0.xpl"/>
<p:variable name="path" select="'../documents/'"/>

....

<cx:recursive-directory-list name="documents-dir">
<p:with-option name="path" select="p:resolve-uri($path)"/>
</cx:recursive-directory-list>

...

</p:pipeline>

Re: xproc: how do I reference a library of steps

Posted: Wed Jun 26, 2013 4:06 pm
by Radu
Hi Doug,

We are not really XProc Calabash experts so maybe you should also register on the XProc mailing list and ask the question there:

http://lists.w3.org/Archives/Public/xproc-dev/

From what I looked through the Calabash implementation, it seems that you need to set version="2.0" to the pipeline root element instead of 1.0.

Regards,
Radu