W3C home > Mailing lists > Public > xproc-dev@w3.org > September 2009

Re: Can this combined into one step ? msgXS0032

From: Manfred Staudinger <manfred.staudinger@gmail.com>
Date: Fri, 11 Sep 2009 12:32:18 +0200
Message-ID: <a946be3a0909110332q65825b4crb38c7a89097b9c3e@mail.gmail.com>
To: James Sulak <jsulak@gmail.com>
Cc: xproc-dev <xproc-dev@w3.org>
Hi James,

Ah, now I understand! Thanks also for the pointer to the markmail
thread. Wouldn't it be helpful if the message could point to the
source of the problem?

Regards,
Manfred

On 11/09/2009, James Sulak <jsulak@gmail.com> wrote:
> Hi Manfred,
>
> This is a bit of an xproc gotcha.  When you move the <p:input> inside
> the <p:add-attribute />, there's no longer a default readable port to
> provide context for the xpath in p:with-option/@select.  When you were
> using a p:identity, its output provided the needed context for
> p:with-option/@select.
>
> You need to change your p:with-option to read:
>
>  <p:with-option name="attribute-value" select="$dir" >
>       <p:empty />
>  </p:with-option>
>
> A previous discussion can be found here:
>
> http://markmail.org/thread/dquafykxus5pffwl
>
> Hope this helps,
>
> -James
>
>
> On Thu, Sep 10, 2009 at 4:50 PM, Manfred Staudinger
> <manfred.staudinger@gmail.com> wrote:
>> I have the following pipeline:
>>
>> <p:declare-step name="myPipeline"
>>        xmlns:c="http://www.w3.org/ns/xproc-step"
>>        xmlns:p="http://www.w3.org/ns/xproc">
>>        <p:option name="dir"/>
>>        <p:output port="result"/>
>>        <p:serialization port="result" indent="true"
>> omit-xml-declaration="false"/>
>>        <p:identity>
>>                <p:input port="source">
>>                        <p:inline>
>> <c:directory><c:directory/></c:directory>
>>                        </p:inline>
>>                </p:input>
>>        </p:identity>
>>        <p:add-attribute match="*/c:directory" attribute-name="name">
>>                <p:with-option name="attribute-value" select="$dir"/>
>>        </p:add-attribute>
>> </p:declare-step>
>>
>> which works fine.- But when I try to combine it into one step, by
>> moving the p:input into the p:add-attribute, I get the message XS0032:
>> It is a static error if no binding is provided and the default
>> readable port is undefined. Any explanation or pointers what I should
>> read?
>>
>> Regards,
>> Manfred
>>
>>
>
Received on Friday, 11 September 2009 10:32:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 11 September 2009 10:32:58 GMT