Closed
Bug 192904
Opened 23 years ago
Closed 23 years ago
xslt fails with disable-output-escaping
Categories
(Core :: XSLT, defect)
Tracking
()
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
| Reporter | ||
Comment 1•23 years ago
|
||
| Reporter | ||
Comment 2•23 years ago
|
||
| Reporter | ||
Comment 3•23 years ago
|
||
Comment 4•23 years ago
|
||
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
| Reporter | ||
Comment 5•23 years ago
|
||
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"><table border="1"></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"></table></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
| Reporter | ||
Comment 7•23 years ago
|
||
Thanks.
(That would really have been simple :-/)
Regards,
Tobias
You need to log in
before you can comment on or make changes to this bug.
Description
•