RE: multiple source documents and xslt/xproc integration

If you are using XSLT 2.0, you can use the collection() function in your stylesheet to access all input documents that you passed to the p:xslt step.
As for using the doc() function to refer to in-memory data, that can be easily done if the XProc processor supports some kind of a URI scheme that represents resources stored in the memory. If you, however, mean using doc() to refer to the output port of some step (like p:pipe), then I am afraid this is not possible. It would require the XProc processor to statically analyze the stylesheet to find all calls to doc() , and then update the dependency graph accordingly. Obviously, the arguments to doc() can be dynamic expressions, or the call may be contained in an imported stylesheet etc.

Regards,
Vojtech


--
Vojtech Toman
Consultant Software Engineer
EMC | Information Intelligence Group
vojtech.toman@emc.com
http://developer.emc.com/xmltech

From: xproc-dev-request@w3.org [mailto:xproc-dev-request@w3.org] On Behalf Of Alex Muir
Sent: Thursday, March 17, 2011 11:01 AM
To: XProc Dev
Subject: multiple source documents and xslt/xproc integration

Hi,

I was just thinking that it would be nice to have xslt be able to work with more than one source document from xproc such that the when accessing a second source with xslt doc() function it could point to a source in memory specified by xproc or perhaps better via a parameter one could access the second source.

That's not possible correct,, such that currently the best one can do is have the XSLT file accept the primary source via memory and a second source from disk via doc()?

I note the spec says "If a sequence of documents is provided on the source port, the first document is used as the primary input document." and that there is only a secondary port for output.

"     <p:output port="result" primary="true"/>
     <p:output port="secondary" sequence="true"/>
"

Regards

--
Alex
-----
Currently:
Freelance Software Engineer 6+ yrs exp

Previously:
https://sites.google.com/a/utg.edu.gm/alex/


A Bafila, is two rivers flowing together as one:
http://www.facebook.com/pages/Bafila/125611807494851

Received on Thursday, 17 March 2011 10:25:04 UTC