Re: Some hints on the basics

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 UTC