Thomas DeWeese wrote:
You could try printing 'getNamespaceURI' on the elements that are finally added to the DOM.
Jorg Heymans wrote:
it prints "http://www.w3.org/2000/svg" , the prefix is "svg".
So this means that the node that is finally added to the dom has the correct namespace and a valid prefix right?
Yes, it would appear so.
If this is the case and i don't get any other exceptions or warnings, why isn't the node shown?
Good question, you aren't doing something daft like setting display/visibility on a parent are you?
I am adding it using Node old = getSVGDocument().getElementById(oldID); oldNode.getParentNode().replaceChild(newNode, oldNode);
Again, dumping the svg to file and loading it in squiggle works fine.
This is really not a very good test of 'did I get things right' because the reparse can fix a lot of subtle errors.
One more thing i just thought of : i set the viewbox coordinates also dynamically by replacing the attributes of the documentElement. I do this before i start swapping out nodes like above. Could this be problematic?
It is possible I would try having the code start with a correct viewBox (note capital 'B') and see if this fixes things. I would also try adding some 'marker' elements to the canvas (like a rect in each 'corner') it's very difficult to tell the difference between an empty document, and a clipped document ;)
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
