[thelist] xsl:eval equivalent??
David.Cantrell at Gunter.AF.mil
David.Cantrell at Gunter.AF.mil
Thu Nov 14 09:05:01 CST 2002
Is there any way to replicate the functionality of the old xsl:eval in the
new XSLT 1.0?
I'm using MSXML 4.0, and trying to call a custom VBScript function from
within templates. I need to build a string using multiple function calls for
later retrieval and don't see any other way to do it.
I can replicate the functionality using a really bad hack: Have a VBScript
function which returns a bogus value (say "1") and then call it with
parameters using an <xsl:value-of ...> block, and wrap it in a span or div
with "style='display:none'" so it doesn't show up in the browser. However,
I'd really rather not do that.
Here's an example of what I'm talking about:
<xsl:if test="@type">
<span style="display:none">
<xsl:value-of select="user:AddText( 'type' )"/>
</span>
</xsl:if>
And then later I can call "user:GetText()" to retrieve the string I need.
Is there an accepted way to call custom functions directly from within the
script without resorting to such a hack? <msxsl:script> can only be attached
to the root element, so I can't do that directly at each point I need it...
:(
Thanks!
-dave
More information about the thelist
mailing list