Page 1 of 1

expand-text on xslt 2.0

Posted: Tue Aug 16, 2022 9:16 pm
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

Re: expand-text on xslt 2.0

Posted: Wed Aug 17, 2022 10:52 am
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.

Re: expand-text on xslt 2.0

Posted: Wed Aug 17, 2022 2:01 pm
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.