Closed Bug 192904 Opened 23 years ago Closed 23 years ago

xslt fails with disable-output-escaping

Categories

(Core :: XSLT, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 98168

People

(Reporter: tsager, Assigned: peterv)

Details

Attachments

(3 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.2.1) Gecko/20021130 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.2.1) Gecko/20021130 When opening Test.xml (which uses Test.xslt) in Mozilla, the included xsl:text-content (with disable-output-escaping) is not interpreted but printed out. Reproducible: Always Steps to Reproduce: 1. Open Text.xml Actual Results: This is outputted: ONE <table border="1"> one two three two two three three two three </table> TWO <table border="1"> one two three two two three three two three </table> THREE <table border="1"> one two three </table> Expected Results: Three tables should be outputted: ONE one two three two two three three two three TWO one two three two two three three two three THREE one two three
Attached file Sample test case —
Attached file Test Schema —
Attached file Test stylesheet —
d-o-e is serialisation only. Mozilla does not serialize and thus does not do disable-output-escaping. See the FAQ on http://www.mozilla.org/projects/xslt/
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
Ok. Sorry for the false alarm. But can you tell me how I get the output working in Mozilla?
Simply rewrite your stylesheet to not use disable-output-escaping="yes" For example change: <xsl:for-each select="two"> <xsl:if test="position()=1"> <xsl:text disable-output-escaping="yes">&lt;table border="1"&gt;</xsl:text> </xsl:if> <tr> <td> <xsl:for-each select="over"> <xsl:apply-templates/> </xsl:for-each> </td> <td> <xsl:for-each select="and"> <xsl:apply-templates/> </xsl:for-each> </td> <td> <xsl:for-each select="out"> <xsl:apply-templates/> </xsl:for-each> </td> </tr> <xsl:if test="position()=last()"> <xsl:text disable-output-escaping="yes">&lt;/table&gt;</xsl:text> </xsl:if> </xsl:for-each> to <table border="1"> <xsl:for-each select="two"> <tr> <td> <xsl:for-each select="over"> <xsl:apply-templates/> </xsl:for-each> </td> <td> <xsl:for-each select="and"> <xsl:apply-templates/> </xsl:for-each> </td> <td> <xsl:for-each select="out"> <xsl:apply-templates/> </xsl:for-each> </td> </tr> </xsl:for-each> </table> and so on and so forth. Also leave out the doctype thingy that you're doing, it's not needed. If you really want to insert a doctype use the xsl:output element
Status: RESOLVED → VERIFIED
Thanks. (That would really have been simple :-/) Regards, Tobias
Duplicate of bug: doe
Resolution: INVALID → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: