Re: URIs as inputs and outputs

Hi Norm,

> I don't see an obvious way for one component to generate an arbitrary
> series of URIs that another component can consume.

Ah. I was assuming that whenever a component generated documents with 
URIs that weren't known at design time, it would create some kind of 
index document that listed the URIs for the various documents that were 
generated. For example, if a component generated several separate 
chapter documents and SVG images from one book document then you'd get 
an index like:

<book>
   <chapters>
     <chapter href="ch01.xml" />
     <chapter href="ch02.xml" />
     ...
   </chapters>
   <graphics>
     <graphic href="fg01.svg" />
     <graphic href="fg02.svg" />
     ...
   </graphics>
</book>

(Actually I think in most cases the 'index document' would be a natural 
by-product of the component.)

Downstream components could look at this index document to identify what 
documents were generated (and registered with the pipeline processor). 
The pipeline would include something like:

   <p:step name="splitter">
     <p:input name="aggregation" href="book.xml" />
     <p:output name="index" href="book-index.xml" />
   </p:step>
   <p:step name="xslt">
     <p:input name="source" href="book-index.xml" />
     <p:input name="stylesheet" href="chapters2html.xsl" />
     <p:output name="result" href="ToC.html" />
   </p:step>

The XSLT in the second step here would read in the chapters generated in 
the first step using the doc() function on the URIs supplied in the 
index document.

Or, if you did the iteration within the pipeline language instead, 
perhaps something like:

   <p:step name="splitter">
     <p:input name="aggregation" href="book.xml" />
     <p:output name="index" href="book-index.xml" />
   </p:step>
   <p:for-each name="chapter" href="book-index.xml"
               select="book/chapters/chapter/@href">
     <p:step name="xslt">
       <p:input name="source" href="{$chapter}" />
       <p:input name="stylesheet" href="chapter2html.xsl" />
       <p:output name="result" href="{$chapter}.html" />
     </p:step>
   </p:for-each>

I'm not totally enamoured of this -- it's hard to support URIs that 
aren't known at design time without some kind of URI-manipulation 
support. But URI support is always going to be an issue because of 
wanting to do cross-references between documents...

Cheers,

Jeni
-- 
Jeni Tennison
http://www.jenitennison.com

Received on Thursday, 6 April 2006 20:03:28 UTC