Hi,

> I have no problem doing such a thing, but I believe a User Agent, is best
> served by rendering what it gets, and it should be liberal in doing that,
> the same way as Batik is happy to not use a validating parser, it would
> be good for users to treat createElement as creating an element in the
> default namespace. (after all the important thing is the content of the
> document, not if it's "correct")

Once again, the DOM Level 2 specification  (the one SVG relies on) is pretty
clear on that issue. createElement creates an element with *no* namespace
(no is different that the default one). According to the DOM specification,
users should *not* mix both NS methods and none NS methods. I invite you to
read the DOM Core specification.

http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641
247

Interface Node:namespaceURI

"The namespace URI of this node, or null if it is unspecified...
For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes
created with a DOM Level 1 method, such as createElement from the Document
interface, this is always null."

So, there is no way to find elements in the SVG namespace if you are not
using createElementNS. Because Batik is designed to fully support namespaces
and finds SVG elements by using the SVG namespace and the localName of
elements, we are not able to find any element if you are using
createElement.

Finally, if you want to create elements in the SVG namespace, you must use
createElementNS - createElement is simply wrong and it's a bug in ASV to
support that.

Thierry.



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

Reply via email to