xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brent L Johnson" <br...@bjohnson.net>
Subject DOMImplementation
Date Sun, 29 Jul 2001 23:39:19 GMT
I'm currently using Xerces as my XML parser (version 1.4.1 I think).  I'm
simply trying to get the DOMImplementation setup (without getting an error
message).  I keep getting a createDocument() error (I've seen another post
to this list about the error).

It was suggested that the person was using DOM1 instead of DOM2.  I know
Xerces is a DOM2 parser so it should work fine with Batik right?  Here is
the error message and code from a JSP page - I'm interested in creating some
bar and pie charts for reports using Batik (after reading some of the docs
and info it looks like it would be fairly simple to do this with Batik).
Also, from the things I've read, I'm assuming that it's possible to output
the SVG file in JPEG format to the browser using the transcoder?

------------------ ERROR ------------------

x_0002ejspindex_jsp_1.java:83: Method createDocument(java.lang.String,
java.lang.String, null) not found in interface
Document doc = impl.createDocument(svgNS, "svg", null);

------------------ CODE ------------------
<%@ page import="org.w3c.dom.DOMImplementation" %>
<%@ page import="org.apache.batik.dom.svg.SVGDOMImplementation" %>
<%@ page import="org.apache.batik.svggen.SVGGraphics2D" %>
<%@ page import="org.w3c.dom.Document" %>
<%@ page import="java.awt.Dimension" %>
<title>test title</title>
DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
// we are using a constant available on the SVGDOMImplementation
// but we could have used "http://www.w3.org/2000/svg"
String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
Document doc = impl.createDocument(svgNS, "svg", null);

------------------ CLASSPATH ------------------

I also noticed this error message:
Class org.w3c.dom.css.DOMImplementationCSS not found in class

>From what I understand Xerces does not support CSS?  Is there a way around
that?  I also tried taking out the reference to Xerces in my CLASSPATH and
tried the crimson-parser.jar implementation and that did not work.

Also, when I looking into batik-ext.jar I saw there was an org.w3c.dom.*
implementation there - which also gives me the same createDocument() error.

Any help would be greatly appreciated,

- Brent

To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org

View raw message