Add patch from Antonio Gallardo, see http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=105151157428414&w=2