
Mental,
after your changes to namespace handling, we can no longer load documents without any namespace declarations, e.g. simply
<svg> <g style="fill: ;"> <path d="M1 979.362L1 1051.362L73 1051.362L73 979.362L1 979.362z"/> </g> </svg>
This used to work before, and it also works in Batik, so I think we must restore that. Can you please fix?

On Fri, 2005-01-07 at 00:09, bulia byak wrote:
Mental,
after your changes to namespace handling, we can no longer load documents without any namespace declarations, e.g. simply
<svg> <g style="fill: ;"> <path d="M1 979.362L1 1051.362L73 1051.362L73 979.362L1 979.362z"/> </g> </svg>
This used to work before, and it also works in Batik, so I think we must restore that. Can you please fix?
Agh, yeah. I was wondering how long it would take someone to notice.
I do plan to fix it, but I've had no time or energy to code since I've been working 12-hour coding days at work for most of this week (got dragged in to rescue a doomed project :P).
If you or someone else would like to venture a try at it, look for the location of the TODO in sp_repr_do_read [in src/xml/repr-io.cpp].
What needs to be done there (n.b. only when default_ns is SP_SVG_NS_URI) is testing whether the normalized qname of the root element is "svg" (no prefix) -- if so, recursively go through the document and add the "svg:" prefix to all element names that don't have a prefix -- but be sure to only do it on element nodes (repr->type() == SP_XML_ELEMENT_NODE).
There is no API currently for changing existing repr names, but be careful about adding one -- keep it local to the file for now (e.g. a static function or one in an anonymous namespace).
Changing names after reprs are created will have to be permitted eventually (for DOM), but it is a can of worms I don't want to open yet. We can do it safely in repr-io.cpp, at least for documents that nobody outside has yet touched, though.
-mental
participants (2)
-
bulia byak
-
MenTaLguY