Can someone please explain the difference between Element.setAttribute
and Element.setAttributeNS(), as it affects Batik?  My code loads a
document into the canvas and performs various modifications to the DOM,
adding various <g>, <rect> and <line> Elements.  I notice that through
accretion, my code is using all of the following in various places:

  e.setAttribute(attribName, attribValue);
  e.setAttributeNS(svgNS, attribName, attribValue);
  e.setAttributeNS(null, attribName, attribValue);

It seems that some attribs need the SVG namespace (e.g. the xml "id"
attrib.)  Others are happy with no namespace (<line> x/y coords.)  Yet
others seem to need the null namespace (the width/height of the <svg>
element.)  Are there some general rules about when & how to supply a
namespace for attributes?

Thanks

--
George Armhold
Rutgers University
eLearning Grant, DCIS


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



Reply via email to