Please could someone help me, I have been stumped by this for 2 days!!

I am using a simple Java extension that is called from the xsl stylesheet.
The Java is included when the transformation is run from the command line
using xalan. When i run the exact same transformation from Cocoon, Cocoon
cannot find the file and gives the error:

java.lang.RuntimeException: java.lang.NoSuchMethodException: For extension
function, could not find method
org.apache.xpath.axes.SelfIteratorNoPredicate.match ([ExpressionContext,])
at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java
):3231
)at java.lang.Thread.run(Thread.java:536
read.java:536)

Match is the name of the static method in the Java file:

...
  public boolean match (patternString)
   {
        boolean b;
        b = Pattern.matches ("He\\Wllo", patternString);
        return b;
   }
...

from the xsl file:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:fo="http://www.w3.org/1999/XSL/Format";
xmlns:java="java"
xmlns:match="xalan://XSLPatternMatch" exclude-result-prefixes="match" >
<xsl:template match="teststring">
<html>
<head>
<title></title>
</head>
<body>
<xsl:value-of select="match:match(.)"/>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

Thanks

Spencer


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to