cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobia <tobia.confo...@linux.it>
Subject Re: REPOST: HTML Tags from a database field
Date Wed, 09 Jan 2008 15:17:04 GMT
Derek Hohls wrote:
> I am using the SQLTransformer from Cocoon 2.1.8 to extract data from  
> text fields in a database.  At present, <tags> are being returned by  
> the transformer (i.e. before any downstream alteration) as  
> &lt;tags&gt;


I use the HTMLTransformer for that purpose, with a couple of XSLT  
stylesheets before and after it.

The first one writes <unescape> tags around each piece of escaped  
HTML.  Then the HTMLTransformer is instructed to only transform text  
nodes inside those tags (by passing it a <parameter name="tags"  
value="unescape"/>.)  Finally a second piece of XSLT gets rid of the  
<unescape> tags along with the fake <body> and <html> inserted by the  
transformer, and does a bit of magic with &amp; and &lt; characters.


Tobia

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


Mime
View raw message