xsl-list
[Top] [All Lists]

Disable Output Esacping Problems

2002-11-06 13:17:46
All,

I am trying to generate an HTML file that will really be generated as an XML 
file and then be used as input to another XSL stylesheet (for styling purposes) 
where it will then be converted to a new HTML file for display in the browser. 
In the second XSLT file, the program goes through each <TR> and <TD> tag and 
adds an appropriate atribute for styling.

In the first XSLT file I need (or I think I need) to disable output esacping 
because I need to generate non-symmetrical XML tags. The disabling of output 
esacping generates the expected output, but the second XSLT file doesn't seem 
to recognize the <TD> and <TR> tags whose output was escaped and fails to apply 
the appropriate styling to these tags.

Here is the code:

<xsl:template match="Side Dish">
<xsl:if test="position() = 1">
        <xsl:text disable-output-escaping="yes"><![CDATA[<tr><td>Side 
Dish:</td><td>]]></xsl:text>
</xsl:if>
      <xsl:value-of select="."/>
<xsl:choose>
        <xsl:when test="position() != last()">
                <xsl:text>, </xsl:text>
        </xsl:when>
        <xsl:otherwise>
                <xsl:text 
disable-output-escaping="yes"><![CDATA[</td></tr>]]></xsl:text>
        </xsl:otherwise>
</xsl:choose>
</xsl:template>

Any help would be greatly apprecited.

Thanks,
Rechell

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



<Prev in Thread] Current Thread [Next in Thread>