Indeed Liam, file:write() is one of my go-tos. My main one, in fact.
Ought to have mentioned that in my original message.
Good point re XSLT 4 and aggregating modes within the tag itself.
And as regards Renton, that's very cool. :)
Thanks,
-Tony
Anthony J. (Tony) BufortOwner, AJB Consulting Renton, WA USA
Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android
------------------------------------------------------------------------
From: Liam R. E. Quin liam@xxxxxxxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Sunday, January 19, 2025 12:42:18 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: I love programs that output programs
On Sun, 2025-01-19 at 06:05 +0000, ajbufort@xxxxxxxxxxxxxxxx wrote:
And if you output the file as XML first, and THEN want to try to
re-ingest it and process it within the same transform, you will run
across the Saxon protective measure of prohibiting ingesting a file
you have just output within the same transform. Admittedly, to get
around this at times, I will output the XML to a file during a
transform, programmatically re-name it via the same transform, and
then continue processing.
You can also use the exslt file:write() function to write it out, which
does not have that limitation.
[...]
One way is to isolate templates involving the same mode within their
own file,
in XSLT 4 as proposed, you can put all templates for a given mode inside
the xsl:mode element (although i am not sure you can enforce that,
unfortunately, but it would be relatively easy to check automatically
that you had done this)
The first joint XQuery and XSL meeting i went to as W3C staff contact for
XQuery was in Renton by the way.
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 archiveEasyUnsubscribe
(by email)
XSL-List info and archiveEasyUnsubscribe (by email)
|