[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xsl-list
Subject:    Re: [xsl] Checking if a file exists
From:       "Liam R. E. Quin liam () fromoldbooks ! org" <xsl-list-service () lists ! mulberrytech ! com
Date:       2024-04-19 0:36:29
Message-ID: 20240418203602.734a62f3 () lists ! mulberrytech ! com
[Download RAW message or body]

On Thu, 2024-04-18 at 22:59 +0000, dvint dvint@dvint.com wrote:
> I'm trying to stop the result-document() from writing to the file
> more than once.

It's an error to try, even if the file hasn't yet been written.

One way round this might be to use fn:transform(0 to do your
transformation - this returns the results from xsl:result-document in a
map instead of writing them out, so you can process them at that time.


Another approach might be to use xsl:iterate, passing a map or sequence
of filenames you've processed as a parameter.

liam

-- 
Liam Quin,  https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations:   http://www.fromoldbooks.org
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/651070
or by email: xsl-list-unsub@lists.mulberrytech.com
--~--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic