On Saturday 08 September 2001 17:03, Mikael Ståldal wrote:
> I want to build a SVG DOM from a SAX event stream, but I realized that it
> wasn't possible using org.apache.batik.dom.svg.SAXSVGDocumentFactory. So I
> modified that class and org.apache.batik.dom.util.SAXDocumentFactory a bit
> to make it possible (see the attached patches).

I suggest you subclass SAXSVGDocumentFactory instead of patching it - all the 
fields are protected to allow this.

> It seems to work, and I can
> put the generated DOM into the transcoder. However, if the SVG contains an
> external xlink, I get this strange error message from the Crimson parser
> during transcoding (which is made visible by my patch to
> org.apache.batik.dom.util.SAXDocumentFactory):
>
> org.xml.sax.SAXParseException: org.apache.crimson.parser/P-001 3c
>          at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3030)
>          at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3024)
>          at
> org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:505) at
> org.apache.crimson.parser.Parser2.parse(Parser2.java:304) at
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
>          at
> org.apache.batik.dom.util.SAXDocumentFactory.createDocument(SAXDocumentFact
>ory.java:229)
>
> What does it mean?

I just had a look at crimson's sources 
(http://cvs.apache.org/viewcvs.cgi/xml-crimson/src/org/apache/crimson/parser/Parser2.java?rev=1.13&content-type=text/vnd.viewcvs-markup)
and it seems that this error is caused by an invalid char at the end of your 
XML file.
--
  Stephane.

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

Reply via email to