Hi list,
I have written a java extension function that is used during this xslt
transformation:
<xsl:value-of select="src:myFunction(foo)"/>
"foo" is a node in my xml document:
<foo>Some Text</foo>
This is the function:
public static String myFunction(org.w3c.dom.Node n) {
String s = n.getTextContent();
// Some more stuff ...
}
According to the java 1.5 documentation, the "getTextContent" method
should return the "concatenation of the textContent attribute value of
every child node", i.e. in this case: "Some Text". However, the function
returns null.
The Node n is of type org.apache.xml.dtm.ref.DTMNodeProxy. This is the
code from the svn repository:
public String getTextContent() throws DOMException {
return getNodeValue(); // overriden in some subclasses
}
Of course, "getNodeValue" returns null for the "foo" node, but I think
this is not the way "getTextContent" should be implemented. Is this a
bug or do I miss anything?
Regards,
Christian
--
Deriva GmbH Tel.: +49 551 489500-42
Financial IT and Consulting Fax: +49 551 489500-91
Hans-Böckler-Straße 2 http://www.deriva.de
D-37079 Göttingen
Deriva CA Certificate: http://www.deriva.de/deriva-ca.cer