Has anyone found a simpler way to achieve this dynamic discovery of what files to merge in XSLT? It's not surprising that XSLT cannot read directories directly, but I was hoping to find a simpler way to pass in a list of file names than through another xml file.
Dynamic discovery and processing of XML files can be done using XPath 2/0/XSLT 2.0. More specifically, one has to use the XPath 2.0 collection()
function.
For details, see my answer to this question.
So, if ANT can use a suitable XSLT 2.0 processor, (I would recommend using Saxon), the problem has a complete solution, using the standard collection()
function.
Dimitre Novatchev
2009-02-01 20:44:05