Hi JavaNoob,

javaNoob <[EMAIL PROTECTED]> wrote on 09/03/2007 03:06:37 AM:

> it's not working.. can anyone take a look?

   What's happening?  Any stack trace/Exception?

> this snippet is from a servlet that loads the svg.. i am sure that the
> styleSheetURL is correct

   Why are you sure of that?  (also see below for possible typo).

>     protected SVGDocument loadMap(String fileName) {
>         Document doc = null;
>         try {
>             String parser = 
XMLResourceDescriptor.getXMLParserClassName();
>             SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);
>             String uri = fileName;
>             doc = f.createDocument(uri);
> 
>             ProcessingInstruction pi =
> doc.createProcessingInstruction("xml-stylesheet", 
                                  "type=\"text/css\"href=\"" + 
styleSheetURL + "\"");
 
     I think there should be a space between the close quote for
'type' and the 'href' attribute.  That could probably cause the problem...

>             doc.insertBefore(pi, doc.getDocumentElement()); 
>         } catch (IOException ex) {
>             ex.printStackTrace();
>         }
>         return (SVGDocument)doc;
>     }


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

Reply via email to