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 Jason McIntosh <ze...@gmail.com> on 2006/02/05 01:42:28 UTC

xlink problem with 1.2

I'm having a problem with a <use> element pointing to another local
document when I am using SVG 1.2. Specifically, if the value of the
element's xlink:href attribute is of the form filename.svg#element-id,
I get a java.lang.NullPointerException in Squiggle (as well as our own
Batik-using application).

If I change the version attribute of both documents' <svg> attribute
to "1.1", then it works as I expect. The documents also load fine as
SVG 1.2 if I take out that xlink:href. However, if I make the document
with thhe <use> 1.2 and the one with the object that it refers to 1.1,
then I get a different error: java.lang.ClassCastException.

Is this a bug, or am I doing something obviously dumb? I'd like to use
1.2 since I am enamored with text flow...

Here is a very minimal pair of files that demonstrate the issue I'm having.

main.svg:
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.2"
        xmlns:xlink="http://www.w3.org/1999/xlink"
         >
<use xlink:href="otherfile.svg#my-rect" x="0" y="0" />

</svg>

otherfile.svg:
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.2"
        xmlns:xlink="http://www.w3.org/1999/xlink"
>

<rect id="my-rect" x="0" y="0" width="100" height="100" />

</svg>



--
Jason McIntosh
zendonut@gmail.com
Jabber: jmac@volity.net
AIM: zendonut
http://jmac.org

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