W3C home > Mailing lists > Public > xproc-dev@w3.org > July 2010

RE: variable with select gives err XD0008 in Calabash

From: <Toman_Vojtech@emc.com>
Date: Mon, 12 Jul 2010 10:50:47 -0400
Message-ID: <997C307BEB90984EBE935699389EC41C839172@CORPUSMX70C.corp.emc.com>
To: <xproc-dev@w3.org>
Hi Kevin,

This is an interesting one. That you get XD0008 is probably because something changed in Calabash wrt p:pipe and reading from parameter input ports. It looks like p:pipe was returning a single c:param-set document in the previous versions, but now it returns a sequence of c:param documents.

>From the XProc perspective, both c:param-set and a sequence of c:param are equivalent ways for representing and passing along parameters to steps. XPath expressions, however, is a completely different story: there you want to have complete control over what the context item looks like.

I could not find anything in the XProc specification that would mandate how parameters should be represented when you read them using p:pipe. I think that this is completely implementation-dependent. If you want to have more control, use the p:parameters step, where the spec explicitly says that the parameters will be represented as a c:param-set document.

What I would do would be to process the parameters using p:parameters first, and use the result of the p:parameters step as the XPath context.


-----Původní zpráva-----
Od: xproc-dev-request@w3.org za uživatele Kevin Flynn
Odesláno: po 12.7.2010 14:32
Komu: xproc-dev@w3.org; Norman Walsh
Předmět: p:variable with select gives err XD0008 in Calabash

Setting a variable like this:

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"




<p:input port="source"/>
<p:input port="par" kind="parameter"/>
<p:output port="result">
<p:pipe step="end-of-pipe" port="result"/>

<p:variable name="pipeline"
<p:pipe step="run-pipe" port="par"/>



worked in Calabash 0.9.16, but fails with:

:err:XD0008:More than one document in context for parameter 'pipeline'

in Calabash 0.9.21.

The select statement in the p:variable element should only return one
node - the source document looks like this:

<c:param-set xmlns:c="http://www.w3.org/ns/xproc-step">
<c:param name="pipeline" value="ebk-fo"/>
<c:param name="input-file"
<c:param name="output-folder"
<c:param name="output-file-stem" value="syndication-ref"/>
<c:param name="version" value="5.0-8"/>

My question is: has an error been introduced into Calabash, or is the
new behavior correct, and I've been using a loophole that is now closed.
As far as I can tell from the spec it should work, but the spec is not
light reading...

Thanks for your attention!

Kevin Flynn
Oslo, Norway
Received on Monday, 12 July 2010 14:51:39 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:07 UTC