cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: nullPointer exception when extending function in Xalan?
Date Tue, 16 Jan 2001 19:41:52 GMT
On Tue, 16 Jan 2001, Stephen Chang wrote:

> My app on Cocoon 1.8 generates some dynamic URL's
> which need to be URLEncoded. I've read the Xalan
> tutorial on using Xalan-Java extensions to include
> some java calls in my XSL so I can do something like
> this:
>
> <xsl:element name="a">
> <xsl:attribute name="href">
> <xsl:value-of
> select="java:java.net.URLEncoder.encode($url)"/>
> </xsl:attribute>My Link</xsl:element>
>
> Where "url" is a variable. Currently I get a "Call to
> extension function failed: method call/new failed:
> java.lang.NullPointerException"
>
> Any clue on what is going on? I have made sure that
> bsf.jar and bsfengines.jar are in my servlet engine
> classpath(tomcat 3.2.1) and have included the
> namespace code at the top of the xsl file:
>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:java="http://xml.apache.org/xslt/java"
> exclude-result-prefixes="java">
>
> What's wrong?

this is off-topic for cocoon-users. i suggest you ask on xalan-dev.

- donald
k


Mime
View raw message