xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Helder Magalhães" <helder.magalh...@gmail.com>
Subject Re: Attrbutes Generated For USE tag
Date Mon, 07 Apr 2008 09:50:03 GMT
When using namespace-aware methods, one shouldn't use the prefix.
Apart from being invalid, it may confuse implementations also!

Invalid:
> plotCh.setAttributeNS(XMLConstants.XLINK_NAMESPACE_URI, "xlink:href", "#" + type);
Valid:
plotCh.setAttribute("xlink:href", "#" + type);
plotCh.setAttributeNS(XMLConstants.XLINK_NAMESPACE_URI, "href", "#" + type);

Invalid:
> plotCh.removeAttributeNS(XMLConstants.XLINK_NAMESPACE_URI, "xlink:show");
Valid:
plotCh.removeAttribute("xlink:show");
plotCh.removeAttributeNS(XMLConstants.XLINK_NAMESPACE_URI, "show");

Nevertheless, if the implementation supports it, I generally recommend
using the namespace-aware methods as it seems to improves performance
and avoids namespace mixups.

Hope this helps,

 Helder Magalhães

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message