[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

problem using saxon:function

Subject: problem using saxon:function
From: Xiaocun Xu <xiaocunxu@xxxxxxxxx>
Date: Tue, 22 Jan 2002 08:51:58 -0800 (PST)
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.

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.