xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cameron McCormack <...@mcc.id.au>
Subject Re: Attrbutes Generated For USE tag
Date Mon, 07 Apr 2008 11:09:01 GMT
Hi Helder.

Helder Magalhães:
> 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);

On the contrary, I think it is valid to use a prefix for the second
parameter of setAttributeNS() (see
http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ElSetAttrNS).  It is
also valid to omit the prefix.

-- 
Cameron McCormack, http://mcc.id.au/
	xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au

---------------------------------------------------------------------
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