Questions about xslt:transform-text and xslt:transform-report

Monday, 2 June 2025 · 4 messages
LV
Lizzi, Vincent2 Jun 2025 12:58 #
Hello BaseX team, I typically use the xslt:transform-text function to apply an XSLT stylesheet and obtain the result that is serialized by Saxon according to the xsl:output instructions in the stylesheet. The xslt:transform-report has the advantage of providing access to messages created by xsl:message instructions. I have a few questions about these functions: Is there a way to use the xsl:transform-report function to obtain messages and the serialized result (instead of document nodes) that is currently returned by xslt:transform-text? Is there a way to provide a base URI in the options of xsl:transform-text (or xsl:transform-report or xsl:transform)? If the input to the transformation is on disk then the base URI is set automatically, however if the input is held in memory then the base URI is not set so it could be helpful to be able to provide a base uri to the transformer as an option. The documentation doesn't mention these capabilities so I'm guessing that these things are not currently possible. Thank you, Vincent ______________________________________________ Vincent M. Lizzi Head of Information Standards | Taylor & Francis Group E-Mail: vincent.lizzi at taylorandfrancis.com<mailto:vincent.lizzi at taylorandfrancis.com> Web: www.tandfonline.com<http://www.tandfonline.com/> Time zone: US Eastern Taylor & Francis is a trading name of Informa UK Limited, registered in England under no. 1072954 "Everything should be made as simple as possible, but not simpler." [https://res.public.onecdn.static.microsoft/assets/bookwithme/misc/CalendarPerson20px.png]<https://outlook.office.com/bookwithme/user/aa80d42cbb5b46dba06a5ad241d7665b at taylorandfrancis.com?anonymous&ep=owaSlotsEmailSignature> Book time to meet with me<https://outlook.office.com/bookwithme/user/aa80d42cbb5b46dba06a5ad241d7665b at taylorandfrancis.com?anonymous&ep=owaSlotsEmailSignature> Information Classification: General
AB
Andy Bunce2 Jun 2025 15:49 #
Hi, A related supplementary question about using xslt:transform-report to get xsl:message reports: Back in 2024 with BaseX 10 getting these messages appeared to require release of Saxon-he version 10 [1] Because of this I always reach this Saxon version. Has this situation changed with newer BaseX and Saxon releases? /Andy [1] https://www.mail-archive.com/basex-talk at mailman.uni-konstanz.de/msg15672.html
Quoted text · Vincent · 74 lines
On Mon, 2 Jun 2025 at 11:59, Lizzi, Vincent < Vincent.Lizzi at taylorandfrancis.com> wrote: > Hello BaseX team, > > > > I typically use the xslt:transform-text function to apply an XSLT > stylesheet and obtain the result that is serialized by Saxon according to > the xsl:output instructions in the stylesheet. The xslt:transform-report > has the advantage of providing access to messages created by xsl:message > instructions. I have a few questions about these functions: > > > > Is there a way to use the xsl:transform-report function to obtain messages > and the serialized result (instead of document nodes) that is currently > returned by xslt:transform-text? > > > > Is there a way to provide a base URI in the options of xsl:transform-text > (or xsl:transform-report or xsl:transform)? If the input to the > transformation is on disk then the base URI is set automatically, however > if the input is held in memory then the base URI is not set so it could be > helpful to be able to provide a base uri to the transformer as an option. > > > > The documentation doesn’t mention these capabilities so I’m guessing that > these things are not currently possible. > > > > Thank you, > > Vincent > > > > ______________________________________________ > > *Vincent M. Lizzi* > > Head of Information Standards | Taylor & Francis Group > > E-Mail: *vincent.lizzi at taylorandfrancis.com > <vincent.lizzi at taylorandfrancis.com>* > > Web: *www.tandfonline.com <http://www.tandfonline.com/>* > > Time zone: US Eastern > > > > Taylor & Francis is a trading name of Informa UK Limited, > > registered in England under no. 1072954 > > > > "Everything should be made as simple as possible, but not simpler." > > > > > <https://outlook.office.com/bookwithme/user/aa80d42cbb5b46dba06a5ad241d7665b at taylorandfrancis.com?anonymous&ep=owaSlotsEmailSignature> > > Book time to meet with me > <https://outlook.office.com/bookwithme/user/aa80d42cbb5b46dba06a5ad241d7665b at taylorandfrancis.com?anonymous&ep=owaSlotsEmailSignature> > > > > Information Classification: General >
CG
Christian Grünin reply to Lizzi, Vincent, 2 Jun 2025, 12:582 Jun 2025 16:01 #
Hi Vincent,
Quoted text · Lizzi, Vincent · 4 lines
Is there a way to use the xsl:transform-report function to obtain messages > and the serialized result (instead of document nodes) that is currently > returned by xslt:transform-text? >
Currentl no; we’ll think about it. A long-term solution could be to support fn:transform, but that’s currently out of scope. Is there a way to provide a base URI in the options of xsl:transform-text
Quoted text · Lizzi, Vincent · 5 lines
> (or xsl:transform-report or xsl:transform)? If the input to the > transformation is on disk then the base URI is set automatically, however > if the input is held in memory then the base URI is not set so it could be > helpful to be able to provide a base uri to the transformer as an option. >
We have revised the way how we assess the base URI of the input, and it should also be detected and propagated now for main-memory nodes. Feel free to check out the latest snapshot [1]. Hope this helps, Christian [1] https://files.basex.org/releases/latest/
Quoted text · Lizzi, Vincent · 48 lines
> > > The documentation doesn’t mention these capabilities so I’m guessing that > these things are not currently possible. > > > > Thank you, > > Vincent > > > > ______________________________________________ > > *Vincent M. Lizzi* > > Head of Information Standards | Taylor & Francis Group > > E-Mail: *vincent.lizzi at taylorandfrancis.com > <vincent.lizzi at taylorandfrancis.com>* > > Web: *www.tandfonline.com <http://www.tandfonline.com/>* > > Time zone: US Eastern > > > > Taylor & Francis is a trading name of Informa UK Limited, > > registered in England under no. 1072954 > > > > "Everything should be made as simple as possible, but not simpler." > > > > > <https://outlook.office.com/bookwithme/user/aa80d42cbb5b46dba06a5ad241d7665b at taylorandfrancis.com?anonymous&ep=owaSlotsEmailSignature> > > Book time to meet with me > <https://outlook.office.com/bookwithme/user/aa80d42cbb5b46dba06a5ad241d7665b at taylorandfrancis.com?anonymous&ep=owaSlotsEmailSignature> > > > > Information Classification: General >
CG
Christian Grünin reply to Andy Bunce, 2 Jun 2025, 15:492 Jun 2025 16:06 #
Hi Andy, Has this situation changed with newer BaseX and Saxon releases?
Quoted text · Andy Bunce · 1 line
>
No; I’m sorry. Maybe the Saxon API has stabilized in the meanwhile, so that we can avoid rewriting the corresponding code again and again; would be worth a try (PRs are welcome ;·). That’s also one of the reasons why we haven’t implemented fn:transform so far: Chances are high that we would need to give a lot of support for changes that we are not directly responsible for. Best, Christian
Quoted text · Andy Bunce · 79 lines
[1] > https://www.mail-archive.com/basex-talk at mailman.uni-konstanz.de/msg15672.html > > On Mon, 2 Jun 2025 at 11:59, Lizzi, Vincent < > Vincent.Lizzi at taylorandfrancis.com> wrote: > >> Hello BaseX team, >> >> >> >> I typically use the xslt:transform-text function to apply an XSLT >> stylesheet and obtain the result that is serialized by Saxon according to >> the xsl:output instructions in the stylesheet. The xslt:transform-report >> has the advantage of providing access to messages created by xsl:message >> instructions. I have a few questions about these functions: >> >> >> >> Is there a way to use the xsl:transform-report function to obtain >> messages and the serialized result (instead of document nodes) that is >> currently returned by xslt:transform-text? >> >> >> >> Is there a way to provide a base URI in the options of xsl:transform-text >> (or xsl:transform-report or xsl:transform)? If the input to the >> transformation is on disk then the base URI is set automatically, however >> if the input is held in memory then the base URI is not set so it could be >> helpful to be able to provide a base uri to the transformer as an option. >> >> >> >> The documentation doesn’t mention these capabilities so I’m guessing that >> these things are not currently possible. >> >> >> >> Thank you, >> >> Vincent >> >> >> >> ______________________________________________ >> >> *Vincent M. Lizzi* >> >> Head of Information Standards | Taylor & Francis Group >> >> E-Mail: *vincent.lizzi at taylorandfrancis.com >> <vincent.lizzi at taylorandfrancis.com>* >> >> Web: *www.tandfonline.com <http://www.tandfonline.com/>* >> >> Time zone: US Eastern >> >> >> >> Taylor & Francis is a trading name of Informa UK Limited, >> >> registered in England under no. 1072954 >> >> >> >> "Everything should be made as simple as possible, but not simpler." >> >> >> >> >> <https://outlook.office.com/bookwithme/user/aa80d42cbb5b46dba06a5ad241d7665b at taylorandfrancis.com?anonymous&ep=owaSlotsEmailSignature> >> >> Book time to meet with me >> <https://outlook.office.com/bookwithme/user/aa80d42cbb5b46dba06a5ad241d7665b at taylorandfrancis.com?anonymous&ep=owaSlotsEmailSignature> >> >> >> >> Information Classification: General >> >

⚡Generated with XQuery