xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott_B...@lotus.com
Subject Re: Difficulty using Xalan with JSP
Date Mon, 01 Jan 2001 02:18:04 GMT

"David Gonzalez" <dvdgnzlz@europa.com> wrote:
> I know the xsl file is being read properly, because when I intentionally
introduce some errors in the file, I get the appropriate
TransformerConfigurationException.
David, sorry for the trouble.  It's important to state what version of
Xalan you are using when reporting problems.  I'm going to assume you are
using the XalanJ2 D05 version we released just before Christmas.

Unfortunately, while exploring what I thought would be some minor bugs on
my Christmas break, I encountered some major problems with the incremental
threading, and some other nasty bugs that only showed up for me when piping
transforms together.  I think these are fixed with my check-ins last night.

To be clear, Xalan runs the build of the source tree on one thread, and the
transform on a second thread, in order to be able to produce incremental
output.  I try to do this without to much performance penalty, and so the
mechanism is a little delicate still.  I'm hoping it's totally robust with
the work I did in the last few days.

> It almost seems as though xsl nodes (other than <xsl:template match="/">
) cause the transformation to fail, yet no errors are generated.

It sure sounds from this like you were using Xalan in some sort of piping
mode.  The tests that caused similar problems for me was that we were
creating an XMLReader, feeding in the SAX events via ContentHandler events
through the TransformerHandler, creating a default identity transformer via
SAXTransformerFactory#newTransformerHandler(), and feeding in the result
events to the identity transformer in order to perform the serialization.
Does this sound at all familiar?  Because the identity transform right now
is implemented as a full transform, there were actually three threads
running.  What was happening is that an exception would be thrown from the
transformer, but there is no mechanism to report the error to the main
thread.  I've worked around this by at least dumping the call stack if
there's no good way to give the exception to the main thread, and making
sure as much as possible that exceptions are passed on through the pipe so
that all threads can properly terminate.  But, to some extent, this may
remain a problem unless someone can tell me of a Java mechanism to pass an
exception to the main thread (it's probably obvious...).

Anyway, that's probably more detail than you want.  Either try building
from the CVS, or we should be making another release next week, and
hopefully your problem will be fixed.

> I've spent my entire Christmas break trying to sort this out. Any help
would be appreciated...

Geez, I feel really bad.  Let me know if there's anyway to make it up to
you.

-scott




                                                                                         
                         
                    "David                                                               
                         
                    Gonzalez"            To:     <general@xml.apache.org>, <xalan-dev@xml.apache.org>
             
                    <dvdgnzlz@eur        cc:     (bcc: Scott Boag/CAM/Lotus)          
                            
                    opa.com>             Subject:     Difficulty using Xalan with JSP 
                            
                                                                                         
                         
                    12/30/2000                                                           
                         
                    11:50 PM                                                             
                         
                    Please                                                               
                         
                    respond to                                                           
                         
                    general                                                              
                         
                                                                                         
                         
                                                                                         
                         




I'm trying to use Xalan to transform an XML document and deliver the
resulting HTML with Java Server Pages.  I'm using Allaires JRun as the web
server.  The trouble I'm having is that the transformation only seems to
process the first XSLT node (  <xsl:template match="/"> ) but any following
xsl instructions are ignored.  The transformations work fine when done as a
Java application, so I know the XSL and XML files are OK.  I only
experience this behavior when the transformations take place as part of the
JSP, so I assume that the server environment is at fault somehow.  It
almost seems as though xsl nodes (other than <xsl:template match="/"> )
cause the transformation to fail, yet no errors are generated.  I know the
xsl file is being read properly, because when I intentionally introduce
some errors in the file, I get the appropriate
TransformerConfigurationException.  I've spent my entire Christmas break
trying to sort this out. Any help would be appreciated...

David




Mime
View raw message