Subject: how to call extension function for side-effect, portably?
From: Kevin Rodgers <kevin.rodgers@xxxxxxx>
Date: Tue, 18 Jan 2005 13:46:18 -0700
|
What is the appropriate XSL instruction to call an extension for
side-effect only? Currently I've got this in my stylesheet:
<xsl:variable name="foo"
select="document('file:///tmp/foo.xml')"/>
<xsl:if test="function-available('saxon:discard-document')"
xmlns:saxon="http://saxon.sf.net/">
<xsl:variable name="dummy"
select="saxon:discard-document($foo)"
xmlns:saxon="http://saxon.sf.net/"/>
</xsl:if>
Which not surprisingly generates a warning (from Saxon):
Warning: at xsl:variable on line 11 of file:/tmp/foo.xsl:
A variable with no following sibling instructions has no effect
--
Kevin Rodgers
|