When serializing, use nodename (which includes namespace prefix). Patch by Jacques Distler
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1393 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
c8d5ba7b7e
commit
d6037a742e
|
@ -1514,14 +1514,10 @@ function BatchCommand(text) {
|
|||
$.inArray(attr.localName, ['width','height','xmlns','x','y','viewBox','id','overflow']) == -1)
|
||||
{
|
||||
out.push(' ');
|
||||
// map various namespaces to our fixed namespace prefixes
|
||||
// (the default xmlns attribute itself does not get a prefix)
|
||||
if(attr.namespaceURI) {
|
||||
out.push(nsMap[attr.namespaceURI]+':');
|
||||
if(!attr.namespaceURI || nsMap[attr.namespaceURI]) {
|
||||
out.push(attr.nodeName); out.push("=\"");
|
||||
out.push(attrVal); out.push("\"");
|
||||
}
|
||||
|
||||
out.push(attr.localName); out.push("=\"");
|
||||
out.push(attrVal); out.push("\"");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -1543,19 +1539,18 @@ function BatchCommand(text) {
|
|||
&& elem.nodeName == 'image'
|
||||
&& attr.localName == 'href'
|
||||
&& save_options.images
|
||||
&& save_options.images == 'embed') {
|
||||
&& save_options.images == 'embed')
|
||||
{
|
||||
var img = encodableImages[attrVal];
|
||||
if(img) attrVal = img;
|
||||
}
|
||||
|
||||
// map various namespaces to our fixed namespace prefixes
|
||||
// (the default xmlns attribute itself does not get a prefix)
|
||||
if(attr.namespaceURI && attr.localName != "xmlns") {
|
||||
out.push(nsMap[attr.namespaceURI]+':');
|
||||
if(!attr.namespaceURI || nsMap[attr.namespaceURI]) {
|
||||
out.push(attr.nodeName); out.push("=\"");
|
||||
out.push(attrVal); out.push("\"");
|
||||
}
|
||||
|
||||
out.push(attr.localName); out.push("=\"");
|
||||
out.push(attrVal); out.push("\"");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue