Copy link to clipboard
Copied
I am outputting an SVG file using indesign javascript and when I try to execute the following line in the newest indesign cc version I get an error. However, it works in CS5. I suspect it has something to do with not defining a namespace that I am using in an attribute but I am not sure how to define it.
code that is giving an error:
new XML('<image xlink:href="' + imgName + '" />');
var ns = new Namespace ("xlink", "http://www.someuri.com/1.0");
x.addNamespace (ns);
x["@xlink:url"] = "tutu.jpg";
alert(x.toXMLString());
Copy link to clipboard
Copied
var ns = new Namespace ("xlink", "http://www.someuri.com/1.0");
x.addNamespace (ns);
x["@xlink:url"] = "tutu.jpg";
alert(x.toXMLString());