On Wed, 26 May 2004, Archie Cobbs wrote:

DB: "Auugh, I can't clone a GVT GraphicsNode easily"

AC: using the DOM API, I add append a new <use> to the
AC: top level  <svg> tag

DB: "Ah ha (ding!)"
DB:
DB: The GVTBuilder code, upon encountering a <svg:use/> element,
DB: simply builds a new GraphicsNode corresponding to the target
DB: of the use and the use's translations, thus achieving the same
DB: effect as I intended by cloning a GrahicsNode.

AC: Glad that worked... it's still an open question (to me) whether one
AC: method is more "correct", faster, etc. than the other.

I think that using the SVG DOM is fine, insofar as it
enshrines a data-model of SVG documents.  However, using
DOM also forces you to deal with syntactical concerns of
the representation of that data-model in XML.  That is
the annoying thing about DOM's.

Batik's GVT representation of an SVG document is 'cleaner',
in that it expunges the nasty XML-syntax concerns, BUT it
has shortcomings, such as:

  a) not having an equivalent of <svg:use/>

  b) not being programmer-friendly in respect of common
     tasks such as cloning


I didn't find that bulilding a GVT tree from an SVG DOM took
a great deal of time ... the parsing of the document initially
was the most expensive operation by far (in my case 2000ms to
parse it, and about 50ms to build the GVT represenation).

cheers,
David


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

Reply via email to