This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: problem using saxon:function
- From: Xiaocun Xu <xiaocunxu at yahoo dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Tue, 22 Jan 2002 11:40:58 -0800 (PST)
- Subject: Re: [xsl] problem using saxon:function
- Reply-to: xsl-list at lists dot mulberrytech dot com
Thanks for the tip. Forgot the example reference to a
namespace "my" which I did not declare. That fixed
it.
Much thanks,
Xiaocun
--- Trevor Nash <tcn@melvaig.co.uk> wrote:
> ><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>
> >......
>
> You do not seem to have a declaration for the prefix
> 'my'. It doesn't
> matter much what it is, but you need one.
>
> I know you do not want to upgrade, but its still
> worth downloading a
> later version of Saxon in order to try that: it may
> either work (so
> you know you are seeing a bug) or give you a proper
> diagnostic to tell
> you what is wrong with the stylesheet.
>
> >
> >Exception:
> >java.lang.ArrayIndexOutOfBoundsException
> > at
>
>com.icl.saxon.om.NamePool.getPrefixFromNamespaceCode(NamePool.java:65
> >5)
>
> Are you calling Saxon from a command line or from
> Java?
> You can get problems with NamePools if you are using
> Java and trying
> to cache the stylesheet or an input document for use
> in several
> transformations. It might be that you have done
> something wrong, or
> it might be that you have hit a bug - I think there
> have been fixes in
> this area since Saxon 6.0.2.
>
> Regards,
> Trevor Nash
> --
> Traditional training & distance learning,
> Consultancy by email
>
> Melvaig Software Engineering Limited
> voice: +44 (0) 1445 771 271
> email: tcn@melvaig.co.uk
>
> XSL-List info and archive:
> http://www.mulberrytech.com/xsl/xsl-list
>
__________________________________________________
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