Some hints on the basics

Hi,

I ought to be a useful lab rat for teaching the fundamentals of 
XProc, as I get the idea while knowing almost nothing about the 
details of XProc as such. My XML, XSLT and XPath skills aren't bad.

But of course, I'm finding the how-to literature available on line is 
either out of date, or a mismatch for my needs, or both. There are 
many very interesting pieces in the box, but I haven't learned how to 
connect them.

Here's an example. I have an application with a pipeline running 
three XSLT transformations in sequence. I've figured out how to do 
this (not so hard), but now I want to embed this in a more elaborate 
setup. My new pipeline will take two input files, apply the 
three-step transformation to each, and then provide both as input to 
a subsequent merging transformation that creates final output by 
combining and processing both inputs together.

Another detail is that the two files are known to be named in 
relation to one another. That is, if the first input file is 
"dir1/my.xml" then the second is "dir2/my.xml". Were I using 
standalone XSLT for my merging step, I might (or might not) take 
advantage of this in my logic to derive the name of the second input 
file from the base-uri() of the primary input, to spare myself having 
to pass its name in as a parameter.

So, my questions:

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?

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

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.

I'm perfectly amenable to having either one, or both transformation 
results accepted as parameters into the last XSLT (got to get them in 
somehow), or (even better) to aggregating these results into a single 
combined input. It's how to get XProc to pass them in that I haven't 
figured out.

Any illustrations or mockups, however sketchy, would be very welcome.

At the moment, I'm using Calabash inside oXygen.

Most grateful for any assistance,
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 08:00:31 UTC