写法一:可调用多个JAVA类
< xsl:stylesheet xmlns:xsl = " http://www.w3.org/1999/XSL/Transform " version = " 1.0 "
xmlns:math = " com.test.Math "
xmlns:string = " com.test.StringUtils "
extension-element-prefixes = " math string " >
< xsl:value-of select = " string:toUpper('aaaa') " />
< br />
< xsl:value-of select = " math:plus(10,20) " />
< br />
写法二:不可调用多个JAVA类 namespace分不开
< xsl:stylesheet xmlns:xsl = " http://www.w3.org/1999/XSL/Transform " version = " 1.0 "
xmlns:xalan = " http://xml.apache.org/xalan "
xmlns:dh-ext = " ext1 "
extension-element-prefixes = " dh-ext " >
< xalan:component prefix = " string " functions = " toUpper " >
< xalan:script lang = " javaclass " src = " xalan://com.test.StringUtils " ></ xalan:script >
</ xalan:component >
< xsl:value-of select = " string:toUpper('aaaa') " />
< br />
< xsl:stylesheet xmlns:xsl = " http://www.w3.org/1999/XSL/Transform " version = " 1.0 "
xmlns:math = " com.test.Math "
xmlns:string = " com.test.StringUtils "
extension-element-prefixes = " math string " >
< xsl:value-of select = " string:toUpper('aaaa') " />
< br />
< xsl:value-of select = " math:plus(10,20) " />
< br />
写法二:不可调用多个JAVA类 namespace分不开
< xsl:stylesheet xmlns:xsl = " http://www.w3.org/1999/XSL/Transform " version = " 1.0 "
xmlns:xalan = " http://xml.apache.org/xalan "
xmlns:dh-ext = " ext1 "
extension-element-prefixes = " dh-ext " >
< xalan:component prefix = " string " functions = " toUpper " >
< xalan:script lang = " javaclass " src = " xalan://com.test.StringUtils " ></ xalan:script >
</ xalan:component >
< xsl:value-of select = " string:toUpper('aaaa') " />
< br />