Judy Qiu wrote:
Hello,
Can anybody help out with the problem I met with? The list is quite long... I will try to split the file into multiple mails.

So I think there is a bug somewhere in your code or else I don't understand what the traces are showing (which is very possible). From your trace in the client:

getNodeItem(currentnode(a), xpath[4](1));
+++collaborativesvgviewer.others.NodePathSupport.java==>>getNodeItem()==>> i=0, 
n.getNodeName()=#text
+++collaborativesvgviewer.others.NodePathSupport.java==>>getElementofDOMTree==>>tempnode
 = #text
+++collaborativesvgviewer.others.NodePathSupport.java==>>getElementofDOMTree==>>tempnode
 = getNodeItem(currentnode(#text), xpath[5](1));
j

        Why does this get the #text node?  it seems pretty clear from
all the other cases you skip text nodes in your counts.  So child '1' of
the 'a' should skip the whitespace #text node and get the 'text' element (that
you want).

The only explination I can think of is that you have some sort of a
"hack" that says if it is asking for child '1' include text nodes
(otherwise it isn't clear how you expect to address them).  But without
seeing the source I can't help you any more than this.

Good luck!

--- Batik viewer version 1.5 beta 4
--- JDK1.4.1_01
--- Windows 2000 OS


This file lists execution results from a master client and a participating client in a collaborative SVG session.
It shows that two different DOM trees generated from the same SVG file on two sides. There's no other operations other
than a click on a hyperlink.


Both sides load in the same SVG file (file:/C:/batikscript/xml-batik/samples/tests/spec/linking/anchorInsideText.svg) from their local file system.
When the master client clicks on an hyperlink to load in another URI, a xpath of the node (element in this case) is generated and broadcast to
the paticipating client.
The participating client generates an "java.lang.NullPointerException" when using the "xpath" from master to locate the hyperlink node (element).
The master client returns an "text" element along the xpath ("/0/14/1/10/1/1") as following
+++collaborativesvgviewer.others.NodePathSupport.java==>>getElementofDOMTree==>>tempnode = getNodeItem(currentnode(a), xpath[4](1));
+++collaborativesvgviewer.others.NodePathSupport.java==>>getNodeItem()==>> i=0, n.getNodeName()=#text
+++collaborativesvgviewer.others.NodePathSupport.java==>>getElementofDOMTree==>>tempnode = text
^^^^^^^^^^^^
but the participating client uses the xpath ("/0/14/1/10/1/1") and returns an "text" node as following +++collaborativesvgviewer.others.NodePathSupport.java==>>getElementofDOMTree==>>tempnode = getNodeItem(currentnode(a), xpath[4](1));
+++collaborativesvgviewer.others.NodePathSupport.java==>>getNodeItem()==>> i=0, n.getNodeName()=#text
+++collaborativesvgviewer.others.NodePathSupport.java==>>getElementofDOMTree==>>tempnode = #text
^^^^^^^^^^^^
+++collaborativesvgviewer.others.NodePathSupport.java==>>getElementofDOMTree==>>tempnode = getNodeItem(currentnode(#text), xpath[5](1));




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



Reply via email to