cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Anderson <>
Subject disable-output-escaping htmlserializer
Date Fri, 06 Jan 2006 14:33:19 GMT
I believe I have one of the exceptional cases where I need to use the
xsl:test element with disable-output-escaping="yes".  Here's my

      <xsl:for-each ...
        <xsl:variable name="pos" select="position()"/>
        <xsl:variable name="cellContent">
          <!-- some snazzy html -->
          <xsl:when test="($pos mod 2) = 1">
            <xsl:text disable-output-escaping="yes"><![CDATA[<tr>]]></xsl:text>
            <xsl:copy-of select="$cellContent"/>
            <xsl:copy-of select="$cellContent"/>
            <xsl:text disable-output-escaping="yes"><![CDATA[</tr>]]></xsl:text>

The only reason I tried using xsl:text is because without it, my xsl
document is not valid xml.  Is there a way around this?  If not is
there any particular reason I'm getting this as my output:

<?javax.xml.transform.disable-output-escaping >&lt;tr
class="Highlight"&gt;<?javax.xml.transform.enable-output-escaping >
as my output?

I'm using saxon... and I found a note by Michael Kay that says
something like "your serializer probably doesn't support the
disable-output-escaping interface".

Any ideas?  I'm guessing this is a common use case and maybe I'm
completely missing a much easier way to do it?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message