Dudka Tetyana wrote:

Thank you for you suggestions, I tried to  do like

String data = "href=\"stylesheet.css\" type=\"text/css\"";

               ProcessingInstruction pi =

                   doc.createProcessingInstruction("xml-stylesheet", data);

               doc.insertBefore(ssp, doc.getDocumentElement());

but, I still have a problem with it. While running the application,

there is a SVG Error:
Null Document reference: Invalid CSS document
at org.apache.batik.css.engine.CSSEngine.parseStyleSheet(Unknown Source)


it seems like it canât find the CSS file.

I agree. Is 'stylesheet.css' in the same directory as the SVG document you are adding the PI to? If not, you might want to use an absolute URI. Also is your SVG document loaded from a stream or from a URI? (which is a round about way of asking if it has a 'base URI' associated with it for use when resolving relative URLs).



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



Reply via email to