[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Roelof Wobben wrote:
So there the input already has the HTML markup escaped i.e. that "tekst" element has a single text node child that contains markup while in the other input sample the "tekst" element has "p" element child nodes.
With XSLT if you really want to enforce that the escaped markup is output as elements you need e.g.
<xsl:template match="tekst">
<xsl:value-of select="." disable-output-escaping="yes"/>
</xsl:template>
but be warned that disable-output-escaping is only supported if the XSLT processor serializes the result tree. With client-side XSLT in Firefox/Mozilla that is for instance not done and therefore disable-output-escaping is not supported in that context.
--
Re: [xsl] why is the
preserved on one page and changed into < on another page
Subject: Re: [xsl] why is the <p> preserved on one page and changed into < on another page From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Sun, 01 Jan 2012 15:35:18 +0100 |
Roelof Wobben wrote:
And the input file of the wrong page :
<tekst mode="formatted"><p>Hoera, het is zover, eindelijk zwanger. De test laat niets te twijfelen over. Ik ben net een stuiterbal, blij en energie voor tien. Ondanks het prille begin, heb ik een goed gevoel over deze zwangerschap. Waarom? geen idee. Het voelt gewoon goed. Het is moeilijk om s middags mijn mond dicht te houden als ik met mijn zus in de stad ben. Het is maar goed dat er een carnavalsoptocht is, het geeft een beetje afleiding.</p>
</tekst>
So there the input already has the HTML markup escaped i.e. that "tekst" element has a single text node child that contains markup while in the other input sample the "tekst" element has "p" element child nodes.
With XSLT if you really want to enforce that the escaped markup is output as elements you need e.g.
<xsl:template match="tekst">
<xsl:value-of select="." disable-output-escaping="yes"/>
</xsl:template>
but be warned that disable-output-escaping is only supported if the XSLT processor serializes the result tree. With client-side XSLT in Firefox/Mozilla that is for instance not done and therefore disable-output-escaping is not supported in that context.
--
Martin Honnen --- MVP Data Platform Development http://msmvps.com/blogs/martin_honnen/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] why is the <p> preserved , Roelof Wobben | Thread | RE: [xsl] why is the <p> preserved , Roelof Wobben |
RE: [xsl] why is the <p> preserved , Roelof Wobben | Date | RE: [xsl] why is the <p> preserved , Roelof Wobben |
Month |
Keywords