cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luca Morandini <>
Subject Re: Passing a node-set from XSLT to Java
Date Thu, 03 Jul 2008 13:56:53 GMT
Andrew Chamberlain wrote:
> The last line (which uses the getTextContent() method) throws the 
> following exception:
> javax.xml.transform.TransformerException: java.lang.AbstractMethodError: 
> org.apache.xml.dtm.ref.DTMNodeProxy.getTextContent()Ljava/lang/String;
>        at 
> org.apache.xalan.extensions.ExtensionHandlerJavaClass.callFunction(

For a better understanding, you should look at the portion of the stack 
trace following "caused by".

> Firstly, I was expecting the Class to be "org.w3c.dom.Node", so does 
> anyone know how I can enable this?  

Rather difficult, since org.w3c.dom.Node is an interface, not a class: 
the object that is passed to the addGML function is an instance of 
org.apache.xml.dtm.ref.DTMNodeProxy, an actual class which happens to 
implement org.w3c.dom.Node.

> I was also expecting the name of the 
> first child to be "gml:exterior" instead of a "#text". 

Understandable, since your XML has newlines and blanks before 
gml:exterior: try stripping all this baggage before parsing.


    Luca Morandini

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message