[xsl] XSL + Java extensions + Xalan + banging my head against the wall

Subject: [xsl] XSL + Java extensions + Xalan + banging my head against the wall
From: "Mattio Valentino" <xmlhack@xxxxxxxxxxx>
Date: Tue, 03 Jul 2001 18:30:13 -0000
Hi all. I'm having some trouble with Java extensions. I've been through the xml.apache.org documentation with no luck.

I'm using: Resin, Xerces/Xalan, and JSP to serve up the XML/XSL.

I'm doing something really silly wrong here, but I can't figure it out. Resin keeps telling me that it can't find the class file, so my guess is that it's a syntax error/omission on my part.

Here's what I'm doing:

<?xml version="1.0"?>
.[all working stuff]
<xsl:template match="/">
.[all working stuff]
<xsl:template match="poetry-line">
<div class="poetry-line">
<xsl:if test="@indent">
<!--2nd attempt-->
<xsl:param name="indentValue" select="@indent" /><b><xsl:value-of select="$indentValue" /></b>
<xsl:variable name="returnValue" select="java:testExtensions.setIndent($indentValue)" />
<b><xsl:value-of select="$returnValue" /></b>

<!--1st attempt-->
<xsl:param name="indentValue" select="@indent" />
<b><xsl:value-of select="java:testExtensions.setIndent($indentValue)" /></b>
<xsl:apply-templates /></div>

This is testExtensions.java, which has been compiled...

import java.util.*;
import java.io.*;
import java.lang.*;

public class testExtensions

	public String setIndent(int indent) 	{
			String indents="";
			for (int x=1; x<=indent; ++x) {
				indents = indents + " ";

	return indents;


Any help/advice/direction would be greatly appreciated!


Get your FREE download of MSN Explorer at http://explorer.msn.com

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

Current Thread