- From: Norman Walsh <ndw@nwalsh.com>
- Date: Thu, 15 Apr 2010 07:44:08 -0400
- To: XProc Dev <xproc-dev@w3.org>
- Message-ID: <m2sk6xq6t3.fsf@nwalsh.com>
Wendell Piez <wapiez@mulberrytech.com> writes:
> 1. Can I (how would I) call out to another pipeline (maybe in another
> XProc instance?) whose input would be my source document and whose
> results would be input to a new transformation?
If the transformation is known in advance, you just declare that pipeline
and then use it:
<p:pipeline ...>
<p:declare-step type="my:subpipe">
<p:input port="source"/>
<p:output port="result"/>
...whatever it does goes here...
</p:declare-step>
...whatever setup you want to do...
<my:subpipe>
<p:xslt>
...
If you need the *pipeline* to vary, then you're off in extension
territory for XProc V1.0. XML Calabash supports an eval step that
will do it.
> 2. How do I calculate the name of a secondary input document from
> that of a primary input? (I gather I can just do
> "replace(base-uri(),'dir1/','dir2/')" or the like, but where and how?)
Probably in p:load:
<p:load>
<p:with-option name="href" select="replace(...)"/>
</p:load>
> 3. How do I combine these, to run a transformation that takes as its inputs:
> a. the results of my primary source file run through my
> subordinate pipeline;
> b. the results of a secondary source (whose name is either
> parameterized for my XProc engine or derived from the name of my
> primary source) through the same subordinate pipeline.
Does what I showed above help?
> Any illustrations or mockups, however sketchy, would be very welcome.
I've recently documented a couple of more complex pipelines
http://norman.walsh.name/2010/04/13/flickrWithXProc
http://norman.walsh.name/2010/03/18/rng2dtd
Be seeing you,
norm
--
Norman Walsh <ndw@nwalsh.com> | 'I have done that,' says my memory. 'I
http://nwalsh.com/ | cannot have done that'--says my pride,
| and remains adamant. At last--memory
| yields.-- Nietzsche
Received on Thursday, 15 April 2010 11:44:45 UTC