Hi All,
I'm trying to pass a tree fragment from XSLT to Java in the following
way, and I'm not sure if the node-set is getting through correctly. The
XML is:
...
and the XSLT is:
...
...
where the addGML method is:
public String addGML(org.w3c.dom
Andrew Chamberlain wrote:
Hi All,
I'm trying to pass a tree fragment from XSLT to Java in the following
way, and I'm not sure if the node-set is getting through correctly. The
XML is:
...
This gives the 'result' variable the value of "#text", but when I was
expecting "gml:Polygon".
Not
Hi Luca,
That was it! I changed the line which did the insert to:
Many thanks for your help!
Andy
Luca Morandini wrote:
Andrew Chamberlain wrote:
Hi All,
I'm trying to pass a tree fragment from XSLT to Java in the following
way, and I'm not sure if the node-set is getting t
Hi Luca/All,
Sorry. On further testing, we're still not getting through the full
tree fragment to Java.
I've adapted the java method to give details of what it receives:
public String addGML(org.w3c.dom.Node myNode)
{
System.out.println("Class = "+node.getClass().getName());
Sy
Andrew Chamberlain wrote:
Hi Luca/All,
Sorry. On further testing, we're still not getting through the full
tree fragment to Java.
I've adapted the java method to give details of what it receives:
public String addGML(org.w3c.dom.Node myNode)
{
System.out.println("Class = "+node.getC
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.extensi
Hi Luca, Jascon,
Thanks very much - you've set me straight. I hadn't imagined that the
blank space would constitute a seperate node.
And yes, I should have read the API a bit closer - of course
org.w3c.dom.Node is only an interface.
Thanks again - it all makes more sense now.
Andy
Jason J
Andy
I think you stumbled across one of the "gotchas" of XML; what looks simple
and obvious is not always - at least, not to a machine. For more in-depth
understanding of XML, I can recommend Ken Sall to explain it. There is a
sample chapter from his book on-line:
http://wdvl.internet.com/Autho