[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Xalan Extensions
Hi List,
I am a newbie to xml stuff and to this list i have been following the list quite for some time . Keep up the good stuff. I have a small question for the list i just wrote a small extension and i get the following error Call to extension function failed: method call/new failed: java.lang.NullPointerException below are the xsl and the java files xsl file -------- <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xslt/java" version="1.0"> <xsl:template match="/"> <xsl:apply-templates select="DocumentSummaries/Document"/> </xsl:template> <xsl:template match="DocumentSummaries/Document"> <xsl:variable name="st"> <xsl:value-of select="HtmlBody"/> </xsl:variable> <xsl:value-of select="java:stringlets.getString($st)"/> </xsl:template> </xsl:stylesheet> and this is the calss i use for the stringlets ---------------------------------------------- import java.util.*; public class stringlets { public static String getString(String str) { int ind1=str.indexOf("Source:"); String sttt=str.substring(0,ind1); return sttt; } } but i get an error ------------------- Call to extension function failed: method call/new failed: java.lang.NullPointerException am i dooing anything wrong please correct me. _________________________________________________________________ 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
|