cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <>
Subject Using Markup from a Database Field (was: disable-output-escaping="yes")
Date Thu, 16 Aug 2001 09:57:01 GMT
Following on from this - 

if I have data in a database field which contains HTML markup and I want this carried through
after wrapping the field data in an XML tag... how exactly do I do this?


>>> 10/08/2001 05:55:32 >>>

Xalan supports this feature just fine. It's Cocoon that does not (please
correct me if I am mistaken). I face a problem similar to yours - I need to
grab small HTML fragments (which may or may not be well-formed) from a DB
and drop them into a page, and disable-output-escaping would be the perfect
solution. Alas, it is not supported. 

After asking for help on this list, I received lots of references to "bad
programming style" and "better ways of doing it", but have yet to receive a
*practical* alternative to disable-output-escaping. I am a vocal proponent
of Cocoon among my peers.  I absolutely love it, and I recommend it to
everyone. But this 'minor detail' has become a rather large thorn in my

William Bagby.

-----Original Message-----
From: Roger Brooks []
Sent: Wednesday, July 18, 2001 10:40 AM
To: ''
Subject: disable-output-escaping="yes"

We are migrating text data from a legacy system to one which 
uses Cocoon for
presentation.  In some cases the legacy data contain line 
breaks, which we
wish to reproduce on the new system.  The easiest way to do 
this appears to
be to embed "<br>" in the data where the line breaks should 
occur.  These
are then output to XML as "&lt;br&gt;"  Some XSLT engines (such as
InstantSAXON 6.1) will then obligingly issue the required <br> 
in the HTML
output stream, provided one includes 
disable-output-escaping="yes" in the
appropriate xsl directive.

Unfortunately, Xalan does not support this attribute.  
Furthermore, Cocoon
wishes to discourage this (see
<> ).  One
alternative which occurred to us is to embed <p> and </p> tags 
in the data
and then handle these in XSL on output.  This solution requires 
quite a bit
more effort than the above solution, however, particularly as 
the text in
question is presently output in XML as an ATTRIBUTE and not as 
the content
of an ELEMENT.

In view of the effort involved for the implementation described 
above, I am
sorely tempted to replace Xalan with another XSLT-transformer.

1.    Where can I download a copy of
2.    Will this solve the problem?
3.    Can someone recommend an alternative solution we 
haven't thought of?

Thanks in advance!

Löwenfels Partner AG
Roger Brooks
Haldenstrasse 6 
6006 Luzern

Telefon    +41-41-418 44 00    Fax    +41-41-418 44 44
Direkt    +41-41-418 44 64

E-mail    <>
www    <>>
*   >>>  <> 

Please check that your question has not already been answered in the
FAQ before posting. <>

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

Please check that your question has not already been answered in the
FAQ before posting. <>

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

View raw message