Fix namespace prefix problem in serializing function
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@588 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -801,10 +801,15 @@ function BatchCommand(text) {
|
||||
attr.nodeValue = attr.nodeValue.replace(',','.');
|
||||
}
|
||||
out.push(" ");
|
||||
// map various namespaces to our fixed namespace prefixes
|
||||
// TODO: put this into a map and do a look-up instead of if-else
|
||||
if (attr.namespaceURI == 'http://www.w3.org/1999/xlink') {
|
||||
out.push('xlink:');
|
||||
}
|
||||
out.push(attr.nodeName); out.push("=\"");
|
||||
else if(attr.namespaceURI == 'http://www.w3.org/2000/xmlns/' && attr.localName != 'xmlns') {
|
||||
out.push('xmlns:');
|
||||
}
|
||||
out.push(attr.localName); out.push("=\"");
|
||||
out.push(attr.nodeValue); out.push("\"");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user