Hi fireball, I'm pretty sure that your importer doesn't import the xml:base attribute from the 'svg' element. So in the new document the 'image' element doesn't have an xml:base to establish the base URL to resolve 'image.png' against. If you were to move the xml:base down to the 'g' I think it would work.
Alternately (and probably better in the long run) you could have your importer create a 'g' element and set an xml:base attribute on that that corresponds to the URL of the document it's importing. If you do that make sure to use 'setAttributeNS' with the 'xml' namespace (it's also best to use xml:base as your name). Thomas On Aug 17, 2012, at 1:53 PM, fireball wrote: > I tried something like this but it does not work. > > <svg > xmlns="http://www.w3.org/2000/svg" > xmlns:xlink="http://www.w3.org/1999/xlink" > xml:base="C:/dev/resources/svg" > version="1.1"> > <g > id="image" > transform="matrix(1,0,0,1,0,0)"> > <image width="200" height="180" xlink:href="image.png"/> > </g> > </svg> > > Note that this document gets improted to another. I wonder if that has any > side effects. > > > > -- > View this message in context: > http://batik.2283329.n4.nabble.com/Broken-image-tp4655209p4655211.html > Sent from the Batik - Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org > For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org