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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks Jostein and Romain. That did the trick.

David

On 04/30/2012 05:40 PM, Jostein Austvik Jacobsen wrote:
> Use p:load to load documents dynamically. I think I'd do something
> like this... (untested)
> 
> <p:for-each> <p:iteration-source select="//wadl"> <p:pipe
> port="result" step="yourFileList"/> </p:iteration-source> 
> <p:variable name="href" select="/*/@href"/>
> 
> <p:load> <p:with-option name="href" select="$href"/> </p:load>
> 
> <!-- ... do your stuff ... -->
> 
> </p:for-each>
> 
> Jostein
> 
> 
> 2012/5/1 David Cramer <david@thingbag.net
> <mailto:david@thingbag.net>>
> 
> 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
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPoDmrAAoJEMHeSXG7afUhT3UH+wQbAXie7Y4CkPaCufrZ5+wL
UIC+zBBbywaOIAXsD8g/JCUq6tnHKAywnb9dz2qVRpoMam/TU/GEJiBnXc2Z1UsO
G56YXZ2l5W+csyWC6HFLZzyMjfuaxIv7vBXHOMCM0T6Gsxpht11+HMJDU8qVRVrd
3qhcdnkoaht73LjtXrfBVWlvXBtKand383EzX9fxU7Amt9pU8d9+I/yZ1tnALSwv
NOOkQsfnxLv2GtZ8yF5BkYcMOzGw5pWVkFW/Hm0VXyPukpooNvbxHo/xpkbzz2UK
fZWDTZPGjT4eYyLTopURmxH5dwF/47L9ysRALrFLqIpSq+ms57gie+SCFcKqqRQ=
=MeLb
-----END PGP SIGNATURE-----

Received on Tuesday, 1 May 2012 19:30:17 UTC