xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dylan Browne" <dbro...@mango-solutions.com>
Subject RE: Attrbutes Generated For USE tag
Date Mon, 07 Apr 2008 14:19:22 GMT
Thanks all for the replies. It's been an interesting discussion and certainly been useful.

Many thanks again,
Dylan

-----Original Message-----
From: Helder Magalhães [mailto:helder.magalhaes@gmail.com] 
Sent: 07 April 2008 13:48
To: batik-users@xmlgraphics.apache.org
Subject: Re: Attrbutes Generated For USE tag

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

Yes, agreed [1]. Thanks for clarifying! :-)

Nevertheless, one should be careful with namespace mess up - for
example, one may set XLink namespace to use the "xl" prefix in the top
level SVG element and then try to access it by using "xlink" prefix.
Not using prefixes at all in namespace-aware method addresses this
error (rather pretty unlikely, though).

Finally, not using prefixes seems to squeeze a (small) performance
gain - although unmeasured with Batik, seen using ASV and Firefox.
Probably due to avoiding additional string parsing needed if prefixes
are used. Running a few tests to profile this difference could be
(potentially) useful to include in a possible "Performance Tips" or
"Best practices", but this is outside the scope of this thread, as
it's a general SVG/XML subject. ;-)

Regards,

  Helder Magalhães

[1] http://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-qualifiedname

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


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