Hi,

        In my servlet I've created a DOM-tree using DocumentImpl in Xerces 1.2.1. I
now
want to transform this tree using a XSL-document, but I keep getting the
same
exception. Below is the method I call to transform my DOM tree:

    public void transformXML(Node xmlDocument, String xslDocument,
HttpServletResponse response) throws IOException {

                response.setContentType("text/html");
        PrintWriter out = response.getWriter();

        try {
                Processor processor = Processor.newInstance("xslt");

            Templates templates = processor.process(new InputSource(
                        getServletContext().getRealPath("/") + "/presentation/all/" +
xslDocument
                ));

            Transformer transformer = templates.newTransformer();
            transformer.transformNode(xmlDocument, new Result(out));

        } catch (Exception e) {
                prettyPrintException(e, out);
        }

        }

and this is the Exception I get :

500 Servlet Exception
java.lang.AbstractMethodError
        at
org.apache.xpath.axes.ChildWalkerOneStep.nextNode(ChildWalkerOneStep.java:10
0)
        at org.apache.xpath.axes.LocPathIterator.nextNode(LocPathIterator.java:436)
        at
org.apache.xalan.transformer.TransformerImpl.transformSelectedNodes(Transfor
merImpl.java:1253)
        at
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.jav
a:177)
        at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:1483)
        at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava:1400)
        at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava:702)
        at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava:657)
        at com.javabra.webmail.servlets.XMLServlet.transformXML(XMLServlet.java:97)
        at com.javabra.webmail.servlets.Login.doGet(Login.java:22)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:102)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:83)
        at com.caucho.server.http.Invocation.service(Invocation.java:236)
        at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:142)
        at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:211)
        at
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:145)
        at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
        at java.lang.Thread.run(Thread.java:484)

line 97 in XMLServer.java is

transformer.transformNode(xmlDocument, new Result(out));

I've been trying to get this to work for over 2 hours now, please help.

[ Matthias Carlsson ]
[ Programmer (Java, CGI/Perl, Javascript, HTML) ] [ Web Designer ]
[ E-Mail : [EMAIL PROTECTED] ] [ ICQ: 1430647 ]
[ http://home1.swipnet.se/~w-18931/programming/ ]

> -----Ursprungligt meddelande-----
> Fran: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]For Milt Epstein
> Skickat: den 16 november 2000 23:10
> Till: [EMAIL PROTECTED]
> Amne: Re: Which is the best framework WebMacro, Struts, or Tapestry?
>
>
> On Thu, 16 Nov 2000, robert young wrote:
>
> > just out of curiosity, and since neither the O'reilly site,
> > nor his has any specific information, and he's voiced some
> > strong approval of WebMacro in the past; any notion of
> > when Jason Hunter's 2nd edtion will be available and whether
> > it provides new treatments of WebMacro (and other templating
> > structures)?
>
> Go to the list archives (its URL is at the "footer" attached to the
> bottom of this message) and look for some recent posts from him (Jason
> Hunter); he's mentioned a number of things that he's going to cover in
> the second edition (I think WebMacro and some other templating and
> similar systems are included).
>
>
> > -----Original Message-----
> > From: A mailing list for discussion about Sun Microsystem's Java Servlet
> > API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
> > Justin Wells
> > Sent: Thursday, November 16, 2000 03:53 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Which is the best framework WebMacro, Struts, or Tapestry?
> >
> >
> > In my view JSP has many problems.
> > <snip>
> > Most of the template solutions allow you a much cleaner separation of
> > concerns than is possible in JSP.
> > <snip>
>
> Milt Epstein
> Research Programmer
> Software/Systems Development Group
> Computing and Communications Services Office (CCSO)
> University of Illinois at Urbana-Champaign (UIUC)
> [EMAIL PROTECTED]
>
> __________________________________________________________________
> _________
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to