After fixing some of the typos and omissions and blatent bad practices
in the fragment you showed us (other than the use of extension code
where it's probably not necessary and in a way that implies you're
forgetting that XSLT doesn't guarantee execution order), it runs without
errors in a reasonably recent version of Xalan executed under Java
1.4.1. In fact, modifying the StringBuffer's initialization, I can
confirm that it's being passed through and retrieved from successfully.
Rebuilt all of Xerces and Xalan under Java 1.5, and ran the stylesheet
under that... and it worked fine there too.
No Trouble Found in Xalan. If you want help, you're going to have to
give us enough information to let us replicate and diagnose the problem.
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns

sl="http://www.w3.org/1999/XSL/Transform"
xmlns

ate="java.util.Date"
xmlns:StringBuffer="java.lang.StringBuffer"
xmlns

arser="es.bfc.xslt.Parser"
exclude-result-prefixes="Date StringBuffer parser">
<!-- Stateful extension functions are a BAD PRACTICE! -->
<xsl:variable name="updateData" select="StringBuffer:new(' ')"/>
<xsl:template match="/">
<script language="javascript">
function setSelectedSelectionCriteriaFields(){
<xsl:value-of select="$updateData" disable-output-escaping="yes" />
}
</script>
</xsl:template>
</xsl:stylesheet>
--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry