Re: Some hints on the basics

Tomos,

Thanks very much for the ideas: this definitely gives me things to try.

At 06:21 AM 4/13/2010, HILLMAN, Tomos wrote:
> > 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>

Hm: that's intriguing.

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

That looks good.

> > 3. How do I combine these
>
>If you define the subordinate pipeline you should be able to reuse 
>it easily enough for each document.

Fair enough, but what's the best way to construct a pipeline that 
either (a) aggregates two documents into one and then transforms the 
aggregate, or (b) calls a transformation with the results of one 
pipeline as a source and another as a parameter?

I'd prefer (a) since eventually there may be more than two....

>Perhaps the experts could confirm or deny this approach?

Yes, please?

Also, what's the state of play regarding reference literature? The W3C Rec?

In the meantime I'll mess around, so thanks for the tips. (And this 
will be in baby steps so if I go quiet it means only that I'm busy.)

Cheers,
Wendell



======================================================================
Wendell Piez                            mailto:wapiez@mulberrytech.com
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
   Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================

Received on Tuesday, 13 April 2010 18:13:27 UTC