cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <br...@outerthought.org>
Subject Re: Please Help: Re: Cocoon 2.1rc2 SVG Error
Date Wed, 13 Aug 2003 08:46:11 GMT
On Wed, 2003-08-13 at 07:48, Steve Schwarz wrote:
> I'm really confused by this problem and would appreciate any opinions!
> 
> I've simplified my issue down to Cocoon/Batik throwing an error on specific 
> styles of SVG documents if and only if a stylesheet is applied to the 
> document. Interestingly, once a single SVG document is processed w/o error 
> by SVGSerializer all SVG documents (including ones that failed previously) 
> are processed w/o error.

Looking at the code, that's quite logical because the stored document
locator isn't properly reset between uses. I've fixed that.

>  I'm guessing SVGBuilder.setDocumentLocator() is 
> called in the success case and once it is called the serializer works 
> correctly for all SVG documents.

correct, as long as you're getting the same serializer instance from the
pool.

> 
> Under 2.04 these documents/stylesheets worked w/o errors.

Yep, but there the document locator wasn't taken into account and the
base URL of the document was always set to http://xml.apache.org

I've now changed the code to set it to http://localhost/ if
setDocumentLocator wasn't called. Maybe this should be something that is
configurable but for now it fixes this problem.

So if you'd like to have this fix, you'll have to grab the latest code
from CVS. If you don't want to use a complete CVS-version of Cocoon, you
can grab just the file
src/blocks/batik/java/org/apache/cocoon/xml/dom/SVGBuilder.java and put
that over your local copy.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


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


Mime
View raw message