You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by William Bagby <wi...@adone.com> on 2001/08/10 17:55:32 UTC

RE: disable-output-escaping="yes"

Roger,

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. 

<risking-flame-war-and-being-shunned-by-peers>
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
side. 
</risking-flame-war-and-being-shunned-by-peers>

William Bagby.

-----Original Message-----
From: Roger Brooks [mailto:roger.brooks@loewenfels.ch]
Sent: Wednesday, July 18, 2001 10:40 AM
To: 'cocoon-users@xml.apache.org'
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
http://xml.apache.org/cocoon/faqs.html#faq-disableescaping
<http://xml.apache.org/cocoon/faqs.html#faq-disableescaping> ).  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.

Questions:
1.	Where can I download a copy of
org.apache.cocoon.transformer.SAXONTransformer?
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	 <ma...@loewenfels.ch> roger.brooks@loewenfels.ch
www	 <http://www.loewenfels.ch> http://www.loewenfels.ch

****************************************************************
************
**
*   >>>  <http://www.loewenfels.ch/d/news/indexwettbewerb.htm> 
NEHMEN SIE AN
UNSERER UMFRAGE TEIL UND GEWINNEN SIE EINEN PALM   <<< *
****************************************************************
************
**




---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


RE: disable-output-escaping="yes"

Posted by giacomo <gi...@apache.org>.
On Fri, 10 Aug 2001, William Bagby wrote:

> Roger,
>
> 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.
>
> <risking-flame-war-and-being-shunned-by-peers>
> 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
> side.
> </risking-flame-war-and-being-shunned-by-peers>

So why don't you send a patch to solve it?

Giacomo

>
> William Bagby.
>
> -----Original Message-----
> From: Roger Brooks [mailto:roger.brooks@loewenfels.ch]
> Sent: Wednesday, July 18, 2001 10:40 AM
> To: 'cocoon-users@xml.apache.org'
> 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
> http://xml.apache.org/cocoon/faqs.html#faq-disableescaping
> <http://xml.apache.org/cocoon/faqs.html#faq-disableescaping> ).  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.
>
> Questions:
> 1.	Where can I download a copy of
> org.apache.cocoon.transformer.SAXONTransformer?
> 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	 <ma...@loewenfels.ch> roger.brooks@loewenfels.ch
> www	 <http://www.loewenfels.ch> http://www.loewenfels.ch
>
> ****************************************************************
> ************
> **
> *   >>>  <http://www.loewenfels.ch/d/news/indexwettbewerb.htm>
> NEHMEN SIE AN
> UNSERER UMFRAGE TEIL UND GEWINNEN SIE EINEN PALM   <<< *
> ****************************************************************
> ************
> **
>
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
>
>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>