[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XSL + Java extensions + Xalan + banging my head agains
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"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:java="http://xml.apache.org/xslt/java" exclude-result-prefixes="java"> . .[all working stuff] . <xsl:template match="/"> <html> <head> <title> </xsl:template> . .[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:if> <xsl:apply-templates /></div> </xsl:template> 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! Mattio xmlhack@xxxxxxxxxxx _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|