Hi Michael,

"Bishop, Michael W. CONTR J9C880" <[EMAIL PROTECTED]> wrote on 
10/16/2006 10:49:09 AM:

> Which URL is cached?  Is the base URL of the SVGDocument taken into
> account?

   Yes the base URL of the document is taken into account.
> Example: <image xlink:href="somePic.jpg"/>
> 
> But that works because:
> 
> svgomDocument.setURLObject(new
> File("pathWhereDocumentResides").toURL());
> 
> So what is the parsed URL?

   Element imgElem = /* what ever */;
   String baseURI = XMLBaseSupport.getCascadedXMLBase(imgElem);
   ParsedURL purl;
   if (baseURI == null)
       purl = new ParsedURL(uriStr);
   else
       purl = new ParsedURL(baseURI, uriStr);


> 
> file://complete/path/to/somePic.jpg
> 
> or
> 
> somePic.jpg
> 
> Michael Bishop
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Friday, October 13, 2006 7:39 PM
> To: [email protected]
> Cc: [email protected]
> Subject: Re: Resolving xlink:href at a later time?
> 
> Hi Michael,
> 
> "Bishop, Michael W. CONTR J9C880" <[EMAIL PROTECTED]> wrote on
> 
> 10/12/2006 05:07:13 PM:
> 
> > An image element is placed and the xlink:href points to a non-existant
> 
> file. 
> > The standard ?broken image? image appears on the JSVGCanvas instead,
> per 
> 
> > Batik.  Next, the correct file appears in the correct place.  How do I
> 
> tell 
> > Batik to try and resolve that again?  JSVGCanvas.setDocument(?)
> doesn?t 
> seem 
> > to have an effect, the image still appears broken.
> 
>    You need to clear the entry in the URLCache:
> 
> org.apache.batik.ext.awt.image.URLImageCache.getDefaultCache().clear(Par
> sedURL 
> purl);
> 
>    Then removing the image Element form it's parent and reinserting
> should cause it to reload the image.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to