cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Per Kreipke" <>
Subject [C1] Xerces 1 bug affects Cocoon...
Date Thu, 12 Apr 2001 20:36:31 GMT
I sent the following to the xerces-j-dev list but am concerned that any
update wouldn't work with C1. Is anyone using Xerces 1.3.X with C1? How
could this change get incorporated into Xerces and then into Cocoon (e.g.
does anyone here have commit privileges on Xerces too)?



In class ElementImpl, in the function normalize(), the following code can
throw an exception if a null node value returned.

   // If kid is empty, remove it
   if ( kid.getNodeValue().length()==0 )
      removeChild( kid );

Not sure what the proper change is:

   if (null != kid.getNodeValue() && kid.getNodeValue().length() == 0)
      removeChild( kid );

is probably correct but perhaps not, I don't know the DOM well enough to

[Cocoon note: The normalize() code is called from xsp-java.xsl as the last
step before generating the page's data model.]

The bug can be reproduced by creating a node as follows:

    property = document.createElement("test");

Specifically, any number of functions in will cause
the exception. For example, if a form is posted using method GET, the
content type is null and XSPRequestLibrary.getContentType() produces an
'invalid' node. Or, if cookies are set incorrectly, the following in Cocoon
causes an exception:


    property = document.createElement("cookie:domain");

Per Kreipke

To unsubscribe, e-mail:
For additional commands, email:

View raw message