how is the return result from a query written to a file? thanks, Nick
ah, I see, it's using expath? |file:write|($file as|xs:string|, $items as|item()*|) as|empty-sequence()| |file:write|($file as|xs:string|, $items as|item()*|, $params as|element(output:serialization-parameters)|) as|empty-sequence() something like that? | On 12/15/20 9:15 AM, Nicholas wrote:
how is the return result from a query written to a file?
thanks,
Nick
pardon, forgot to include: https://tech.forums.softwareag.com/t/writing-to-file-using-xquery/67224 where michael kay says that's just not going to work. similarly, I'd want to feed the result into an xslt. On 12/15/20 9:15 AM, Nicholas wrote:
how is the return result from a query written to a file?
thanks,
Nick
On Tue, 2020-12-15 at 09:19 -0800, Nicholas wrote:
pardon, forgot to include:
https://tech.forums.softwareag.com/t/writing-to-file-using-xquery/67224
where michael kay says that's just not going to work.
That's not exactly what he says - Mike words himself very carefully most of the time. If you want to run XSLT on the result of a query you can use fn:transform() to do that from within XQuery, and you can write the result with file:write(), yes. Using xsl:resut-document from XSLT won't write anything out in that situation but will put the results into a map that your XQuery expression can save to a file. You could also use an XProc pipeline, of course. But it depends on your situation and needs. 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
On 12/15/20 11:38 AM, Liam R. E. Quin wrote:
On Tue, 2020-12-15 at 09:19 -0800, Nicholas wrote:
pardon, forgot to include:
https://tech.forums.softwareag.com/t/writing-to-file-using-xquery/67224
where michael kay says that's just not going to work. That's not exactly what he says - Mike words himself very carefully most of the time.
If you want to run XSLT on the result of a query you can use fn:transform() to do that from within XQuery, and you can write the result with file:write(), yes. Using xsl:resut-document from XSLT won't write anything out in that situation but will put the results into a map that your XQuery expression can save to a file.
You could also use an XProc pipeline, of course. But it depends on your situation and needs.
Liam
Fair enough, that was at least my takeaway. For the post-processing he mentions, this might be with xsl:result-document as suggested? thanks, Nick
participants (3)
-
Christian Grün -
Liam R. E. Quin -
Nicholas