xsl-list
[Top] [All Lists]

Re: [xsl] Seek your suggestions on how to create a declarative mapping document with embedded XSLT commands

2022-04-21 12:06:54
On Thu, 2022-04-21 at 16:37 +0000, Roger L Costello 
costello(_at_)mitre(_dot_)org
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, 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
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--


<Prev in Thread] Current Thread [Next in Thread>