This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: mystery #3: rendering embedded HTML


> From: owner-xsl-list@lists.mulberrytech.com 
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Gary 
> Lawrence Murphy

> What I found was the other way around.  When disable-output-escaping
> is _off_ and I try "<br>", I get "&lt;br&gt;" ... but the reverse is
> not true.
> Hmmm ... this is not what I see with either xalan or xt.  I get the
> entities spelled out in full, exactly as entered.
That might means your xslt processor doesn't control output serialization and just ignore d-o-e, which is in serialization, not transformation domain actually.

> ================================================================
> and the simplest possible XSL
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> 
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
> version="1.0" >
> <xsl:template match="/">
> 
> <h3><xsl:value-of 
> select="sports-content/sports-metadata/sports-title"/></h3>
> 
> <xsl:value-of select="sports-content/sports-event/highlight"/>
> 
> </xsl:template>
> </xsl:stylesheet>
> 
> ================================================================ it
> does not matter if doe is set on or off in the value-of, the output
> result is identical, the browser sees a single block of text with
> literal "<P>" strings in it instead of paragraph breaks.

Well, when I turn on d-o-e in your stylesheet by
<xsl:value-of disable-output-escaping="yes" select="sports-content/sports-event/highlight"/>
I get 
<P>
 when they welcome the Minnesota Wild to America West Arena.
 
<P>
...
in msxml, saxon and xalan, so the problem is in your environment.

Ooops, it seems to me you are using cocoon! AFAIK cocoon developers deliberately don't support d-o-e as "bad programming practice", see http://xml.apache.org/cocoon1/faqs.html#faq-disableescaping, but I'm not sure about cocoon2.

---
Oleg Tkachenko,
Multiconn International, Israel 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]