RE: [xsl] problem using saxon:function

Subject: RE: [xsl] problem using saxon:function
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Wed, 30 Jan 2002 18:35:44 -0000

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Xiaocun Xu
> Sent: 22 January 2002 16:52
> To: xsl-list
> Subject: [xsl] problem using saxon:function
>
>
> 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.

The place to search for known Saxon errors is the Saxon web site at
http://saxon.sf.net/ That is also the place to report problems with Saxon.

The project area contains a full list of bugs found since Saxon moved to
SourceForge, and the changes file published with each version contains a
list of bugs cleared in that release.

I'm afraid 6.0.2 is a very old release, so I'm not prepared to investigate
any problems you find with it unless you can reproduce them with a more
recent version.

Sorry for the delay in responding: I'm working on clearing a backlog of mail
that arrived when I was in the US last week.

Mike Kay

>
> 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
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread