Hi,
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
dilemma:

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

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?

Thanks,
Ben

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to