expand-text on xslt 2.0

Here should go questions about transforming XML with XSLT and FOP.
Idrees Mahmood
Posts: 2
Joined: Tue Aug 16, 2022 8:59 pm

expand-text on xslt 2.0

Post by Idrees Mahmood »

Hello,

Was exploring the expand-text feature of xslt 3.0 and it seemed to work correctly when the stylesheet used xslt version 2.0 aswell.

The only difference seemed to be xslt 3.0 having syntax highlighting and oxygen suggesting expand-text as a possible attribute when typing, which didn’t occur on xslt 2.0.

I assumed this was only an xslt 3.0 feature, have I misunderstood or is this perhaps related to the selected Saxon processor.

Thanks in advance
Mircea
Posts: 130
Joined: Tue Mar 25, 2003 11:21 am

Re: expand-text on xslt 2.0

Post by Mircea »

Hello,

The Text Value Templates are supported only in XSLT 3.0 officially.
You are right, it is a Saxon "feature" to recognize them also in XSLT 2.0.

Regards,
Mircea.
Mircea Enachescu
<oXygen> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Martin Honnen
Posts: 96
Joined: Tue Aug 19, 2014 12:04 pm

Re: expand-text on xslt 2.0

Post by Martin Honnen »

Saxon 9.8 and later are XSLT 3 processors, so even if you put `version="2.0"` into your code it doesn't take away XSLT 3 elements or other features like text value templates.
I think you would need to go back to 9.7 or earlier to have some difference between using `version="2.0"` or `version="3.0"`, PE and EE would support XSLT 3 features with the latter, HE would only support XPath 3 expressions and functions, while with version="2.0" and the attempt to use XSLT 3 features you might get an error or warning.
But I am writing from memory, haven't checked what happens in relation to text value templates.
Post Reply