Roger,
In Saxon, also, when consuming a path to a directory, the collection()
function accepts a 'recurse' option, which could be used to return
such a file.
collection('file:///path/to/files?recurse=yes;select=filelist.xml')
Of course you might get more than one filelist.xml this way.
Cheers, Wendell
On Tue, Apr 7, 2020 at 9:14 AM Michael Kay mike(_at_)saxonica(_dot_)com
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:
Assuming your processor can map a file system directory to a collection, you
can use the fn:uri-collection() function to get all the URIs of files in the
collection and then search them to find the one you are looking for.
An alternative would be to use the functions in the EXPath file module, which
gives explicit access to concepts like folders and files.
Michael Kay
Saxonica
On 7 Apr 2020, at 14:06, Costello, Roger L. costello(_at_)mitre(_dot_)org
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:
Hi Folks,
My XSLT program has a variable $filename which contains the name of an XML
file. The XML file is in a folder named "files" or one of its subfolders or
one of its sub-subfolders or one of its sub-sub-subfolders or ...
In other words, it's somewhere in the tree of folders rooted at "files."
I want to open the XML file (wherever it's located within "files") and read
it into an XSLT variable. Is there a way to do this?
/Roger
XSL-List info and archive
EasyUnsubscribe (by email)
--
...Wendell Piez... ...wendell -at- nist -dot- gov...
...wendellpiez.com... ...pellucidliterature.org... ...pausepress.org...
...github.com/wendellpiez... ...gitlab.coko.foundation/wendell...
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--