You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by J Aaron Farr <ja...@yahoo.com> on 2002/07/12 22:47:04 UTC

Linking solutions

Has anyone created a way to link to html or other documents from within an SVG
document displayed in an SVGCanvas object (ie- like the batik browser)?

Basically, I have an SVG document in a SVGCanvas object that needs to contain
links (ie-xlink) to a servlet that returns HTML.  The solutions as I see it are
as follows:

1. Create some sort of listener that would direct the link action to the OS to
open the system web browser.

2. Create some sort of listener that would direct the link to a new java frame
(part of the same application) that would render the HTML (ie- a mini-browser).

3. Create some sort of filter that the HTML would pass through that would turn
it into SVG. (the HTML is fairly simple, mostly tables, no images).

4. Somehow add functionality to the SVGCanvas that would allow it to render
both SVG and HTML.

I'm not sure which of these is best, or even possible.  I'm assuming I could do
either (1) or (2) by creating some sort of "Interactor" or other extention to
the SVGCanvas.  I'm not sure if anyone has done something like (3).  Using
XSLT, it should be possible, but not very elegant I would think.  I have no
real idea about the feasibility of (4).

I'm also not familiar with how well the SVGCanvas can handle other namespaces. 
That is, would it work if I were return XHTML, or something along those lines?

The trick is, I would really like to be able to open the link up in a *new*
window.  The javascript capabilities (Rhino) included in batik don't seem to
make it possible to do this with scripting only (if someone knows a way, please
let me know!).  So I'm asking for a suggestion from anyone who has perhaps
previously faced the same problem.

Thank you!
J Aaron Farr

__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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