W3C home > Mailing lists > Public > xproc-dev@w3.org > April 2012

Re: Iterating over a list of file paths to run an xslt on each

From: Romain Deltour <rdeltour@gmail.com>
Date: Tue, 1 May 2012 00:46:23 +0200
Cc: XProc Dev <xproc-dev@w3.org>
Message-Id: <F9876B65-30CF-4726-A6ED-6987F88BE5CD@gmail.com>
To: David Cramer <david@thingbag.net>
The @select attribute of a p:iteration-source element has the same restriction as @select on inputs: it must evaluate to a (sequence of) element or document. In your pipeline, the @select evaluates to a URI string. You'd rather want to iterate over the wadl elements and then load its @href  with a p:load.

Hope this helps.

On 1 mai 2012, at 00:23, David Cramer wrote:

> Hi there,
> In a pipeline [1], I use an xslt to find a list of URIs to files which
> I would like to then process. The list of files comes out on the
> secondary port of the list-files step in the format <root><wadl
> href="file://path/to/file.wadl"/></root> (though I could change the
> xslt if necessary).
> In the p:for-each, I would like to read each of these files, process
> it, and write out the result. I've tried various things involving
> p:document and other combinations, but I suspect I'm going about
> things the wrong way. All my attempts result in a XD0016. Can someone
> point me in the right direction?
> Thanks,
> David
> [1] http://pastebin.com/qSb6PVie
Received on Monday, 30 April 2012 22:46:58 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:17:03 UTC