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?
Thanks
Derek
>>> [EMAIL PROTECTED] 10/08/2001 05:55:32 >>> 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:[EMAIL PROTECTED]] Sent: Wednesday, July 18, 2001 10:40 AM To: '[EMAIL PROTECTED]' 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 "<br>" 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 <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> --------------------------------------------------------------------- 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> |