cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicola Ken Barozzi" <baro...@nicolaken.com>
Subject Re: XInclude and base attribute
Date Fri, 04 Jan 2002 00:39:24 GMT

----- Original Message -----
From: "Mitchell Christensen" <mchristensen@openlatitude.com>
To: <cocoon-dev@xml.apache.org>
Sent: Thursday, January 03, 2002 9:49 PM
Subject: RE: XInclude and base attribute


> I'm using Cocoon2.0rc2
>
> The stacktrace is bogus in that the original exception was orginally
>
> (partial stacktrace from cocoon.log)

> The exception was pointing to the parse() method of my Generator
> (TaminoGenerator), and all indications were that the problem was there.
The
> fact that the problem really lay two steps later in the pipeline (after an
> XSLT transform in the XInclude transformer) is certainly not obvious from
> the stack trace.  The resolution involved recompiling Xerces with
debugging
> on to print the original source of the exception which resulted in...
>
> java.lang.RuntimeException: stargazer

> Which gave my a clue (solely by virtue of the reference to xalan) that the
> problem may not be in my generator, but rather further down the pipeline.
I
> then began eliminating subsequent steps in the pipeline until I had
isolated
> the exception to the XInclude transformer.  Then I began looking at the
> XIncludeTransformer.java, where I discovered the code requiring the use of
> the base attribute in the first few lines of the processXIncludeElement()
> method (~line 220).  I then added the base attribute to my source XML
> document, put everything back together and it worked.
>
> I still don't know what caused the runtime exception.  I just got a better
> idea of where it was being generated (in the endDocument() handler).
>
> This is certainly not a criticism of the XInclude transformer, but it is
an
> indication of how difficult it can be to troubleshoot Cocoon.

You are right.
We've fixed part of this in 2.1dev and are working on it now.
Xalan doesn't throw RuntimeException anymore in this case and things are
getting better.

If you don't want to upgrade to 2.1dev you can apply an interim patch for
2.0 that fixes the Xalan RuntimeException by cascading it. It's in the
archives of the list.

Ken
--
Nicola Ken Barozzi                 xml-cocoon@nicolaken.com

These are the days of miracle and wonder...
          ...so don't cry baby, don't cry...
                                                  Paul Simon

Mime
View raw message