cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: disable-output-escaping
Date Wed, 07 Jan 2004 03:04:18 GMT
On 07.01.2004 03:37, wrote:

> Thanks for your answer, but have I any other choices to create HTML output from 
> HTML fragments, they are readed from database? I'm doing a CMS, so I'm reading 
> some HTML fragments from database (as title, abstract, content of article, 
> etc.) plus many other stuff (forum notes, questionnaires etc.) - all is putted 
> into XML by generator and transformed by XSLT transformer to the appropriate 
> form.

Let the generator do the escaping - or is it not well-formed? If it's 
just HTML what about the HTMLGenerator? You are not the first one asking 
for solution for HTML snippets from the database, so other can give 
their experiences here I guess. I can imagine following approach:

<map:match pattern="HTML-from-DB">
   <map:read type="database" src="InWhichWayYouEverAccessYourDB"/>

<map:match pattern="html-snippet">
   <map:generate type="html" src="cocoon:/HTML-from-DB"/>
   <map:serialize type="xml"/>

<map:match pattern="site">
     <map:part src="yourgenerator"/>
     <map:part src="cocoon:/html-snippet"/>

"yourgenerator" is the replacement for the generator you currently use. 
If it's more than a file generator you have to put it in another 
pipeline and access it via cocoon:/.

This or a similar approach is much cleaner than disabling output escaping.

> I simply tried to add disable-output-escaping element:
> <xsl:value-of select="body" disable-output-escaping="yes"/>
> (element <body> contains escaped content of article)
> ... but it returns usual escaped content as before. This "feature" has to be 
> enabled somewhere or transformer has to have some extra parameters?

No, nothing to be enabled or parameterized. Is there an additional 
transformer between this stylesheet and the serializer? This won't work.


> Cituji z emailu od Joerg Heinicke <>:
>>This "feature" is not disabled, but not recommended to be used. Can you 
>>show a simple stylesheet that does not work?
>>On 07.01.2004 01:31, wrote:
>>>I tried use attribute disable-output-escaping in XSLT transformer (by
>>>of and xsl:copy-of), but it doesn't work, it seems (the output is encoded
>>>well as unusing the attribute). What I'm doing wrong? Thanks a lot!
>>>Otmar Vobejda

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

View raw message