On Thu, 2022-04-21 at 16:37 +0000, Roger L Costello costello@xxxxxxxxx
wrote:
>
> When I "run" that document, all the XSLT snippets get executed (by an
> XSLT processor).
If you are using xslt 3, you can convert the input to XSLT e.g. in a
variable and then use fn:transform() with that variable as the
stylesheet node.
<xsl:template match="substring">
<xsl:text>{ substring($input, start, length) }</xsl:text>
</xsl:template>
(assuming you have xsl:expand-text="yes" on the stylesheet node).
Your use of xsl:value-of suggests you might be using XSLT 1, in which
either move to XSLT 3 :) or investigate XProc.
Liam
--
Liam Quin,B 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: B http://www.fromoldbooks.org
|