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

RE: calabash / xsl:result-document

From: <vojtech.toman@emc.com>
Date: Thu, 2 Dec 2010 07:27:49 -0500
To: <xproc-dev@w3.org>
Message-ID: <3799D0FD120AD940B731A37E36DAF3FE32B116B663@MX20A.corp.emc.com>
> I had the same problem.  If you let XProc handle writing(p:write) the
> XML file instead of the XSLT then it worked.  I have to admit it is a
> little simpler to use <xsl:result-document>.
> For complex chunking of documents I suspect using XProc for writing
> the chunking mechanisms could be painful.

Maybe, maybe not. The documents carry the correct base URIs (as specified in xsl:result-document and/or using the output-base-uri option), so you can do things like this:

<p:xslt name="xslt">...</p:xslt>
    <p:pipe step="xslt" port="result"/>
    <p:pipe step="xslt" port="secondary"/>
    <p:with-option name="href" select="p:base-uri()"/>

The pipeline above iterates over all documents produced by the stylesheet (both primary and the ones created using xs:result-document) and saves them to the correct output locations. The advantage is that you can also do something else if you want.


Vojtech Toman
Consultant Software Engineer
EMC | Information Intelligence Group
Received on Thursday, 2 December 2010 12:29:31 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:07 UTC