W3C home > Mailing lists > Public > xproc-dev@w3.org > December 2008

Re: instance name visible within a custom step?

From: mozer <xmlizer@gmail.com>
Date: Fri, 12 Dec 2008 15:47:07 +0100
Message-ID: <21d9ade60812120647h6f2b6fd5nd4466c863979f521@mail.gmail.com>
To: "James Sulak" <jsulak@gmail.com>
Cc: "XProc Dev" <xproc-dev@w3.org>

James,

You have to pass it in as a separate option.

Xmlizer

On Fri, Dec 12, 2008 at 3:40 PM, James Sulak <jsulak@gmail.com> wrote:
>
> Hello all,
>
> If I declare a new step type:
>
> <p:pipeline type="u:debug-output">
>  <p:output port="result">
>     <p:pipe step="ident" port="result" />
>  </p:output>
>  <p:option name="step-name" required="true" />
>  <p:identity name="ident" />
>  <p:store>
>     <p:with-option name="href" select="concat($step-name, '.xml')" />
>  </p:store>
> </p:pipeline>
>
> And then create an instance of it in another pipeline:
>
> <p:pipeline name="import-test" >
>  <p:import href="utils.xpl" />
>  <u:debug-output name="instance" step-name="instance" />
> </p:pipeline>
>
> Is the name of a step instance (in this case, the name "instance")
> available inside the step as a variable or a function? I'd like to be
> able to access the name of the step instance instead of having to pass
> it in as a separate option.
>
> Thanks,
>
> -James
>
>
Received on Friday, 12 December 2008 14:47:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 12 December 2008 14:47:47 GMT