You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Julian gosnell <Ju...@ubsw.com> on 2001/02/27 13:23:23 UTC

SAX Output....

I am using batik to convert a collection of nested JComponents into SVG
in a Servlet and send the SVG back to a browser.

Batik builds a complete DOM of my GUI (which can contain may hundreds of
components - it's a big Graph), and only when it has finished doing this
can I request the DOM and serialise it.

I may be missing something here, but is there a very good reason why
Batik could not just spit out SAX[2] events as the J2D Graphic was being
drawn on, decreasing my Servlets footprint substantially and reducing
the Client's waiting time ?

What is the 'state' that must be held from the beginning to the end of
the SVG-ising process ?

Why can nothing be returned until the whole interface has been converted
into a DOM ?

Is this a Batik or a Swing constraint ?

Thanks for your time,


Jules


P.S.

I would have searched the mailing lists archives for answers to these
questions, but it took a good 15 minutes of fossicking around
xml.apache.org to even find this list, and even then I had to deduce it
existed from the [un]subscription address. I couldn't find the mail
archive at all, just huge paged full of archives for the web server,
which whilst a related project is not exactly tightly bound to Batik.

On a more upbeat note though - Thanks for Batik, it's a cool piece of
kit, and central to my project.




Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.


Re: SAX Output....

Posted by Vincent Hardy <vh...@eng.sun.com>.
Julian,

I take it you are using the SVGGraphics2D to turn your Swing component
into an SVG DOM tree. The SVGGraphics2D does have some state to factor
the equivalent of the Graphics2D's graphic context.
However, you can serialize any portion of your tree or organize it the 
way you want. May be having a look at the SVGSwingPrettyPrinter will
help you out.

Regards.
Vincent.

Julian gosnell wrote:
> 
> I am using batik to convert a collection of nested JComponents into SVG
> in a Servlet and send the SVG back to a browser.
> 
> Batik builds a complete DOM of my GUI (which can contain may hundreds of
> components - it's a big Graph), and only when it has finished doing this
> can I request the DOM and serialise it.
> 
> I may be missing something here, but is there a very good reason why
> Batik could not just spit out SAX[2] events as the J2D Graphic was being
> drawn on, decreasing my Servlets footprint substantially and reducing
> the Client's waiting time ?
> 
> What is the 'state' that must be held from the beginning to the end of
> the SVG-ising process ?
> 
> Why can nothing be returned until the whole interface has been converted
> into a DOM ?
> 
> Is this a Batik or a Swing constraint ?
> 
> Thanks for your time,
> 
> Jules
> 
> P.S.
> 
> I would have searched the mailing lists archives for answers to these
> questions, but it took a good 15 minutes of fossicking around
> xml.apache.org to even find this list, and even then I had to deduce it
> existed from the [un]subscription address. I couldn't find the mail
> archive at all, just huge paged full of archives for the web server,
> which whilst a related project is not exactly tightly bound to Batik.
> 
> On a more upbeat note though - Thanks for Batik, it's a cool piece of
> kit, and central to my project.
> 
> Visit our website at http://www.ubswarburg.com
> 
> This message contains confidential information and is intended only
> for the individual named.  If you are not the named addressee you
> should not disseminate, distribute or copy this e-mail.  Please
> notify the sender immediately by e-mail if you have received this
> e-mail by mistake and delete this e-mail from your system.
> 
> E-mail transmission cannot be guaranteed to be secure or error-free
> as information could be intercepted, corrupted, lost, destroyed,
> arrive late or incomplete, or contain viruses.  The sender therefore
> does not accept liability for any errors or omissions in the contents
> of this message which arise as a result of e-mail transmission.  If
> verification is required please request a hard-copy version.  This
> message is provided for informational purposes and should not be
> construed as a solicitation or offer to buy or sell any securities or
> related financial instruments.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-dev-help@xml.apache.org