You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Gregory Stafford <gs...@asciences.com> on 2002/11/13 23:10:57 UTC
Wrong XMLReaderImpl
I have a simple servlet that is basically straight out of the example for
translating svg to jpg. (Hence, the clever name.) It was working just fine
until I messed around with the jar files in my webapp and container's
classpath. Now, it seems that whatever XMLReader implementation the factory
is trying to get isn't the right one.
[Tue Nov 12 15:56:56 EST 2002] java.io.IOException: SAX2 driver class
org.apache.crimson.parser.XMLReaderImpl does not implement XMLReader
[Tue Nov 12 15:56:56 EST 2002] at
org.apache.batik.dom.util.SAXDocumentFactory.createDocument(Unknown Source)
[Tue Nov 12 15:56:56 EST 2002] at
org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown
Source)
[Tue Nov 12 15:56:56 EST 2002] at
org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown
Source)
[Tue Nov 12 15:56:56 EST 2002] at
org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source)
[Tue Nov 12 15:56:56 EST 2002] at
gov.nih.nci.dtp.servlets.SvgToJpg.doGet(SvgToJpg.java:43)
I've had similiar problems recently where I had to do a call like this:
System.setProperty("javax.xml.transform.TransformerFactory",
org.apache.xalan.processor.TransformerFactoryImpl");
so that I could do XML transformations after the same jar file
reorganization. Has anyone run into a situation like this where they had to
explicitly set the implementation class?
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org
XLinkSupport;
Posted by Jane Singer <js...@cc.huji.ac.il>.
Yes that did it, thanks.
Jane
----- Original Message -----
From: "Thierry Kormann" <tk...@ilog.fr>
To: "Batik Users" <ba...@xml.apache.org>
Sent: Sunday, November 17, 2002 12:33 AM
Subject: RE: Wrong XMLReaderImpl
>
> > Element zigzag = SVGdoc.createElementNS(svgNS, "use");
> > zigzag.setAttribute( "xlink:href", ("#zg" ));
>
> You should use:
>
> zigzag.setAttributeNS(XLinkSupport.XLINK_NAMESPACE_URI, "href", "#zg");
>
> > zigzag.setAttribute("x", Double.toString(x));
> > zigzag.setAttribute("y", Double.toString(y));
>
> Thierry.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org
RE: Wrong XMLReaderImpl
Posted by Thierry Kormann <tk...@ilog.fr>.
> Element zigzag = SVGdoc.createElementNS(svgNS, "use");
> zigzag.setAttribute( "xlink:href", ("#zg" ));
You should use:
zigzag.setAttributeNS(XLinkSupport.XLINK_NAMESPACE_URI, "href", "#zg");
> zigzag.setAttribute("x", Double.toString(x));
> zigzag.setAttribute("y", Double.toString(y));
Thierry.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org
Re: Wrong XMLReaderImpl
Posted by Jane Singer <js...@cc.huji.ac.il>.
I'm trying to add a "use" element to an SVG document that is then displayed
in a JSVGCanvas.
Here is the element:
Element zigzag = SVGdoc.createElementNS(svgNS, "use");
zigzag.setAttribute( "xlink:href", ("#zg" ));
zigzag.setAttribute("x", Double.toString(x));
zigzag.setAttribute("y", Double.toString(y));
[the zg ref is defined in the same document.]
Here is the error that shows up in the same frame as the JSVGCanvas:
org.apache.batik.bridge.BridgeException: file/C:/temp/basic_document.svg:-1
The URI " specified on the element <use> is invalid.
When I output the SVGDocument to an external file, that file displays fine
in Internet Explorer.
I thought it had something to do with the character '#', but I tried to add
'\' as an escape charater, and got an "invalid esacape character" error.
What's doing on?
Thanks,
Jane
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org