cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florent Soulière <>
Subject XSLT - processing XML from a database field problem
Date Fri, 29 Mar 2002 17:03:11 GMT

I already passed 2 days trying to solve my problem by myself, but I did not 
The situation:
I use the SQL Transformer to get data from database. inside this data, 
there are fields containing XHTML (e.g. <b>this is bold text</b>). What I 
want to do with all the data is to produce a PDF document using FO.
To accomplish such a thing, I use 2 XSL pages: one for "unescaping" the 
&lt;b&gt;, &lt;i&gt; and other XHTML tags into some valid XML-like tags 
(<b>, <i>, ...) with <xsl:value-of disable-output-escaping="yes">. And the

other xsl page does the "big job" by transforming all the document into a 
FO document (including the XHTML tags, of course).

The problem:
Even if the unescaping works fine (I checked it by watching the output of 
the XSLT transformation of the "unescaping XSL page"), it seems that when I 
want to process the <b>, <i> & others with a standard 
<xsl:apply-templates/>, they automatically come back to a non-escaped form.

What I already tried:
I tried to replace <xsl:apply-templates/> by a <xsl:copy-of .../>. And I 
saw that my XHTML tags were still unescaped, as expected. So I really 
wonder why they come back to escaped when applied with apply-templates...
I tried to split the global process into 2 steps: with one pipeline, I get 
the unescaped intermediate result, that I store manually into an xml file, 
and then with another pipeline I read the intermediate file and push it 
into the "big job" XSLT page... And it works!

So, I really would like to know what's wrong with this unescaping and 
chained-XSLT stuff... I know that this problems of integrating XML 
fragments into Cocoon's pipelines have always been sensitive, although the 
documentation have absolutely no care with this.

If anyone can help, thank you in advance.

Florent, Soulière
Stagiaire e-Technologies Lyon
T-Systems Soleri
Groupe Deutsche Telekom
Notre métier: la convergence informatique et télécoms
Convergence is our Business
tél.:    +33 4 37 65 24 26
fax:    +33 4 37 65 22 31
View raw message