This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
problem using saxon:function
- From: Xiaocun Xu <xiaocunxu at yahoo dot com>
- To: xsl-list <xsl-list at lists dot mulberrytech dot com>
- Date: Tue, 22 Jan 2002 08:51:58 -0800 (PST)
- Subject: [xsl] problem using saxon:function
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi,
I am having problem using saxon:function(). I just
copy and pasted the example from saxon:function() into
my stylesheet see if it compiles ok, I got the
attached ArrayIndexOutOfBoundsException. I searched
the xsl-list archive and the internet, could not find
any reference to this, anyone know what I did wrong?
BTW, I am using Saxon6.0.2 with JDK1.3.1.
Much thanks,
Xiaocun
XSL:
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:saxon="http://icl.com/saxon"
extension-element-prefixes="saxon">
<saxon:function name="my:initial">
<xsl:param name="size"/>
<saxon:return select="substring(.,1,$size)"/>
</saxon:function>
......
Exception:
java.lang.ArrayIndexOutOfBoundsException
at
com.icl.saxon.om.NamePool.getPrefixFromNamespaceCode(NamePool.java:65
5)
at
com.icl.saxon.tree.ElementWithAttributes.getURICodeForPrefixCode(Elem
entWithAttributes.java:91)
at
com.icl.saxon.tree.ElementWithAttributes.getURICodeForPrefixCode(Elem
entWithAttributes.java:93)
at
com.icl.saxon.tree.ElementWithAttributes.getURICodeForPrefix(ElementW
ithAttributes.java:75)
at
com.icl.saxon.tree.ElementImpl.makeNameCode(ElementImpl.java:173)
at
com.icl.saxon.style.SAXONFunction.prepareAttributes(SAXONFunction.jav
a:39)
at
com.icl.saxon.style.StyleElement.processAttributes(StyleElement.java:
136)
at
com.icl.saxon.style.StyleElement.processAllAttributes(StyleElement.ja
va:119)
at
com.icl.saxon.style.XSLStyleSheet.processAllAttributes(XSLStyleSheet.
java:390)
at
com.icl.saxon.style.XSLStyleSheet.preprocess(XSLStyleSheet.java:314)
at
com.icl.saxon.PreparedStyleSheet.setStyleSheetDocument(PreparedStyleS
heet.java:169)
at
com.icl.saxon.PreparedStyleSheet.prepare(PreparedStyleSheet.java:137)
at
com.icl.saxon.StyleSheet.doMain(StyleSheet.java:330)
at
com.icl.saxon.StyleSheet.main(StyleSheet.java:76)
__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list