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

Re: Some hints on the basics

From: HILLMAN, Tomos <tomos.hillman@oup.com>
Date: Tue, 13 Apr 2010 11:21:46 +0100
To: "xproc-dev@w3.org" <xproc-dev@w3.org>
Message-ID: <04E229667EEBCF4E9A075810ECA4665F2BB268361E@UKMB02.uk.oup.com>
Hi Wendell,

I'm new to this myself, but in the spirit of participation...

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

Assuming the pipeline you want to call in looks a bit like this:

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:ex="http://www.example.com" name="pipeline01" version="1.0">
...
</p:declare-step>

You can do the following:

<p:import href="pipeline01.xpl"/>
<ex:pipeline01 name="friendly-name"/>
<p:xslt name="subsequent-transforms>...</p:xslt>

> 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?)

Well, I only learnt about the p:load element this morning, but my first guess would be to get your base-uri for doc1 into a variable and do this:

<p:load>
<p:with-option name="href" select="replace($href, 'dir1', 'dir2')"/>
</p:load>

> 3. How do I combine these

If you define the subordinate pipeline you should be able to reuse it easily enough for each document.

Perhaps the experts could confirm or deny this approach?

T
Oxford University Press (UK) Disclaimer

This message is confidential. You should not copy it or disclose its contents to anyone. You may use and apply the information for the intended purpose only. OUP does not accept legal responsibility for the contents of this message. Any views or opinions presented are those of the author only and not of OUP. If this email has come to you in error, please delete it, along with any attachments. Please note that OUP may intercept incoming and outgoing email communications.
Received on Tuesday, 13 April 2010 10:22:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 13 April 2010 10:22:19 GMT