cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart Roebuck ...@adolos.com>
Subject [Q] 1.7.3 - Fault with "substring" function?
Date Tue, 09 May 2000 16:19:41 GMT
I'm getting a StringIndexOutOfBoundsException trying to use the XPath  
substring(string, start, length) function.  I've tried a simple:

	<xsl:variable name="test_variable" select="substring("1234",1,2)" />

And this returns the same stack trace (see below).

Is this a known issue, an unknown issue or stupidity on my part?

If it isn't entirely my stupidity, can someone suggest a temporary workaround?

Thanks,

Stuart.


> java.lang.StringIndexOutOfBoundsException: String index out of range:
> -2147483643
	at java.lang.String.substring(String.java, Compiled Code)
	at 
> org.apache.xalan.xpath.FuncSubstring.execute(FuncSubstring.java:116)
	at 
> org.apache.xalan.xpath.Function.execute(Function.java, Compiled Code)
	at 
> org.apache.xalan.xpath.XPath.executeFunction(XPath.java, Compiled Code)
	at 
> org.apache.xalan.xpath.XPath.execute(XPath.java, Compiled Code)
	at 
> org.apache.xalan.xpath.XPath.execute(XPath.java, Compiled Code)
	at 
> org.apache.xalan.xpath.XPath.execute(XPath.java, Compiled Code)
	at 
> org.apache.xalan.xpath.XPath.execute(XPath.java, Compiled Code)
	at 
> org.apache.xalan.xslt.ElemVariable.getValue(ElemVariable.java, Compiled
> Code)
	at org.apache.xalan.xslt.ElemVariable.execute(ElemVariable.java, 
> Compiled Code)
	at
>  
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java,  

> Compiled Code)
	at
> org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java,
> Compiled Code)
	at
>  
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java,  

> Compiled Code)
	at
> org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java,
> Compiled Code)
	at
>  
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java,  

> Compiled Code)
	at
> org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java,
> Compiled Code)
	at
>  
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java,  

> Compiled Code)
	at
> org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java,
> Compiled Code)
	at
>  
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java,  

> Compiled Code)
	at
>  
org.apache.xalan.xslt.ElemTemplateElement.transformChild(ElemTemplateElement.java,  

> Compiled Code)

Mime
View raw message