[Yanel-dev] Jelly and escaping XML within the "usecase" resource-type

Guillaume Déflache guillaume.deflache at wyona.com
Thu Aug 13 13:45:34 CEST 2009


Guillaume Déflache schrieb:
> Hi!
> 
> The problem is as follows: the "usecase" resource-type currently does 
> not escape XML properly, see
> http://bugzilla.wyona.com/cgi-bin/bugzilla/show_bug.cgi?id=5964
> [...]
> IMHO a real solution could be not to introduce another non-misbehaving 
> resource-type, but only a new "jelly-XML" view-type alongside the 
> already-existing "jelly" one.
> Then to fix encoding problems one would only need to switch from "jelly" 
> to "jelly-XML" type in *.rc files and audit the related Jelly code to 
> see if it really needs some XML to be included verbatim/non-escaped.
> 
> The proposed solution should be backward-compatible and would only need 
> changes in org.wyona.yanel.impl.resources.xml.ConfigurableViewDescriptor 
> and org.wyona.yanel.impl.resources.usecase.UsecaseResource AFAICS.

Implemented as described as of revision 44171.


> However I am still unsure if we should deprecate the "jelly" type itself 
> (to make people aware they need to check for escaping issues) and 
> introduced yet another "jelly-text" type allowing to state explicitely 
> that XML escaping is known to be unneeded, or leave the "jelly" type alone.
> What we might be able to do is check in the "usecase" RT whether the 
> Jelly output is really used as XML in the rest of the "pipeline", e.g. 
> as input for an XSLT or serialized as XML or (X)HTML (is it always the 
> case?) and only then warn that not-escaping XML might cause problems.

The 'jelly-text' view-type was added, but the suggested check was not 
done (was not really practical to do): we only add a deprecation warning 
(well at the INFO log level only ATM) when 'jelly' is used.


More information about the Yanel-development mailing list