Thomas --

On Sat February 28 2009 7:25:25 am [email protected] wrote:
> Hi Roberto,
>
> Roberto Villarreal <[email protected]> wrote on 02/27/2009 11:40:18
>
> PM:
> > The snippet itself is below; a compilable working example is attached.
> >
> >
> > SVGDocument doc = (SVGDocument) impl.createDocument( svg, "svg", null );
>
>     This document doesn't have any base URL so resolving
> URL's that aren't absolute will be a problem.  Since your
> URL's are relative this is likely your problem.
>
>     You could set the base URL on that document with
> batik.dom.svg.SVGOMDocument.setURLObject(URL).
> This will work fine if all your content is based off
> one URL.  The other thing you could do is create a group
> and use the 'xml:base' attribute on the group to set the
> 'base' URL for resolution within that group.

The first suggestion worked (haven't tried the second yet); thanks.  Having 
said that, this leaves me to believe the following:

1) An external SVG document, applied using either setURI() or 
setSVGDocument(), "knows" what this base URL is (even when not specified in 
the file)

2) A code-created SVG document does not "know" what the base URL unless told

3) Either:
    a) the URL passed into setURLObject() is a "meta-attribute"; part of the 
internal Batik data structures, but not part of the tree itself, or
    b) if it is part of the tree, the PrettyPrinter does not display it, or
    c) I have no idea what I'm talking about

Am I correct on any or all of these?


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to