Dear Tonny, This email came through my svg lists and I just wanted to say hello and Happy Holidays. Gene
On 12/5/05 8:06 PM, "Tonny Kohar" <[EMAIL PROTECTED]> wrote: > Hi, > > On Mon, 2005-12-05 at 15:13 -0500, Bishop, Michael W. CONTR J9C880 > wrote: > >> - If I load an SVG document from c:\, I don't have any XML telling the >> document it lives at c:\. >> - If I create a document in memory and save it to c:\, the in-memory >> document does not know about c:\. I don't want to set its base URL to >> c:\ because it will break if I move it do d:\. >> - The first example doesn't have this problem. How can I mimic the >> behavior of the first example? > > Yup, this url path resolution is quite problematic for us as well, but > the Documentation states that it need base url for resolve another url. > > Basicly this is what we do > 1) put the Document Base URL into the document, this can be anything c: > \tmp, etc because it is only in memory path and not persisted with the > document during save. > > 2) use that base url to resolve the relative (we use relative path for > easier file moving maintenance) > > You could set the Document URL using either > - doc.setURLObject(newURL); > or > - String parser = XMLResourceDescriptor.getXMLParserClassName(); > SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser); > doc = f.createSVGDocument(uri,reader); > > Regards > Tonny Kohar --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
