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

Re: Some hints on the basics

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...

    ...whatever setup you want to do...



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:with-option name="href" select="replace(...)"/>

> 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


                                        Be seeing you,

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

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