You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Matt Jones <ig...@yahoo.com> on 2000/06/07 20:40:37 UTC

query result formatting

Hi, I have a quick question, let's say I have a
<query> tag that returns the following text:

		This sentence has <i>some italic</i> words.

How can I get the <i> tags to be passed through as
html formatting info, rather than it being escaped to:

		This sentence has &lt;i>some italic&lt;/i> words.

Thanks very much for your help!
-Matt Jones

p.s. (I realize that it's bad form to mix formatting
info into the content, but in my particular case
there's no easy way around it.)

__________________________________________________
Do You Yahoo!?
Yahoo! Photos -- now, 100 FREE prints!
http://photos.yahoo.com

Re: query result formatting

Posted by Giacomo Pati <Gi...@pwr.ch>.
On Wed, Jun 07, 2000 at 11:40:37AM -0700, Matt Jones wrote:
> Hi, I have a quick question, let's say I have a
> <query> tag that returns the following text:
> 
> 		This sentence has <i>some italic</i> words.
> 
> How can I get the <i> tags to be passed through as
> html formatting info, rather than it being escaped to:
> 
> 		This sentence has &lt;i>some italic&lt;/i> words.

Use a template in your stylesheet.xsl like this:

<xsl:template match="i">
 <i>
  <xsl:apply-templates/>
 </i>
</xsl:template>

Giacomo

> 
> Thanks very much for your help!
> -Matt Jones
> 
> p.s. (I realize that it's bad form to mix formatting
> info into the content, but in my particular case
> there's no easy way around it.)
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Photos -- now, 100 FREE prints!
> http://photos.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 

-- 
PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1 856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1 856 2201
Hintereichenstrasse 7                     Mailto:Giacomo.Pati@pwr.ch
CH-8166 Niederweningen                    Web:   http://www.pwr.ch