cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Smith <M.Sm...@secureinteractive.com>
Subject RE: Output escaping
Date Wed, 14 Feb 2001 06:06:11 GMT
We had a similar problem and found the following workaround.  I am assuming
that you are saving this xml packet into a database or something, and then
retrieving it later.  

When you save your xml packet, instead of saving tags as <i> and <b>, etc,
save them as something like <italic> <bold>, or use a namespace eg
<myproj:b>.  Then, in the xsp you get the data and include it into the page
using <util:expr>.  Finally, your xsl can replace the substituted tags for
the real html ones eg:

	<xsl:template match="bold">
		<b><xsl:value-of select="."/>
	</xsl:template>
	.
	.
	.

It takes a couple of steps, and your xml packets can't be viewed directly in
a browser, but it should get around the escaping problem.  This is the best
solution I have been able to come up with.  If anyone can think of a better
one, I'd love to hear it!

Matt

-----Original Message-----
From: Shaun Adolphson [mailto:shaun@xweb.com.au]
Sent: Wednesday, 14 February 2001 2:53 PM
To: 'cocoon-users@xml.apache.org'
Subject: Output escaping


Hello all,

I know this is an old topic, but I have been throught all the mailing list
archives and still can't find an answer or away around not being able to use
disable-output-escaping. Yes I have read the faq, but I still need to find
away around it.  Any ideas or solutions would be great. Here are the details
and the description of the problem:

I am running Cocoon 1.8 on Redhat 6.2 with Tomcat. 

We are using a basic JavaScript HTML editor so that users can enter there
content in to there website. The editor allows them to use bold, italics,
underline, create a link,etc.  This content is saved into an XML packet
which is then sent to our servers where we are using Cocoon to process and
display the site.  The content needs to be escaped so that it is displayed
properly as currently it is just displaying the raw _escaped_ HTML

Some help would be greatly appreciated.

Thanks

Shaun

--------------------------------
Shaun Adolphson
XWeb Pty Ltd
Email: shaun@xweb.com.au

---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>

Mime
View raw message