Re: [xsl] How to read an XML file that is in a subfolder or sub-subfolder or sub-sub-subfolder or ...?

Subject: Re: [xsl] How to read an XML file that is in a subfolder or sub-subfolder or sub-sub-subfolder or ...?
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 7 Apr 2020 13:14:02 -0000
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@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> 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

Current Thread