RE: xproc as an alternative to Apache ant

> > You can then pass it to the parameter input port of this pipeline:
> 
> Singular? I.e. there is only one parameter input port?
> Implies I can't have multiple 'imported' variable definitions?

My example pipeline had only one parameter input port, but you can have as many you want in your pipelines.

> >  <!-- "result" is not primary on p:parameters -->
> >  <p:identity>
> >    <p:input port="source">
> >      <p:pipe step="parameters" port="result"/>
> >    </p:input>
> >  </p:identity>
> > </p:declare-step>
> 
> Guessing, this is simply copying the param-set to the output port?

Right, the "result" port of p:parametrs is non-primary, so you have to connect to it explicitly if you want to do something with the result document.

> Next question, how do I refer to the values set in
> the external file? Is there some syntax for this?
> 
> E.g. I want to run an XSLT transform using
> parameter $xslt_stylesheet as the stylesheet for the transform.

I think you have to use p:parameters to read the parameters document first. Then you can apply XPath expressions to the generated c:param-set document and use the results in, for instance, XProc variables or options, or in choose/when statements.

Regards,
Vojtech

Received on Monday, 25 May 2009 07:53:05 UTC