Closed Bug 400024 Opened 19 years ago Closed 19 years ago

XML file that references an XSLT style sheet displays <tr> tags

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 98168

People

(Reporter: nearlyheadlessrod, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7 When an XML file that references an XSLT style sheet that generates HTML table contents, the <tr> tags appear in the rendered page. The <tr> tags should not be visible on the rendered page. Xalan correctly transforms the xml + xsl combination to html. In addition, when the xml file is opened with Internet Explorer, it is correctly rendered. Reproducible: Always Steps to Reproduce: 1. Create files lint.xml and lint.xsl from the data contained in the "Additional Information" field. 2. With files lint.xml and lint.xsl in the same directory, open lint.xml with the browser. 3. Note that <tr> elements appear on the rendered page. Actual Results: Source Code Directories <tr> Project/WoRxClient/GuiApp Project/probeWoRx/LibraryDynamic/PWRDataIO Project/probeWoRx/LibraryDynamic/PWRGUI </tr> <tr> Project/waferWoRx/LibraryDynamic/WWDataIO Expected Results: Source Code Directories Project/WoRxClient/GuiApp Project/probeWoRx/LibraryDynamic/PWRDataIO Project/probeWoRx/LibraryDynamic/PWRGUI Project/waferWoRx/LibraryDynamic/WWDataIO Project/waferWoRx/LibraryDynamic/WWGUI Project/waferWoRx/LibraryDynamic/WWGUI/ProbingMethod ===contents of file lint.xml=== <?xml version="1.0" ?> <?xml-stylesheet type="text/xsl" href="lint.xsl" ?> <linted> <timestamp>2007-10-15 20:47:31</timestamp> <projDesc>waferWoRx Client</projDesc> <srcNodes> <srcNode name="Project/WoRxClient/GuiApp"> </srcNode> <srcNode name="Project/probeWoRx/LibraryDynamic/PWRDataIO"> </srcNode> <srcNode name="Project/probeWoRx/LibraryDynamic/PWRGUI"> </srcNode> <srcNode name="Project/waferWoRx/LibraryDynamic/WWDataIO"> </srcNode> <srcNode name="Project/waferWoRx/LibraryDynamic/WWGUI"> </srcNode> <srcNode name="Project/waferWoRx/LibraryDynamic/WWGUI/ProbingMethod"> </srcNode> </srcNodes> </linted> ===end of lint.xml=== ===contents of lint.xsl=== <?xml version='1.0'?> <xsl:transform xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'> <xsl:output method='html' indent='yes' /> <xsl:strip-space elements='*' /> <xsl:template match='/'> <!-- HTML Document Tags --> <html> <head> <title>Lint Report</title> </head> <body> <h1>Lint Report <xsl:text> - </xsl:text> <xsl:value-of select="/linted/projDesc" /> <xsl:text> (</xsl:text> <xsl:value-of select="/linted/timestamp" /> <xsl:text>)</xsl:text> </h1> <br/> <xsl:variable name="fileNodes" select='/linted/srcNodes/srcNode/file' /> <xsl:variable name="overviewNodes" select="document( 'overview.xml' )" /> <xsl:if test='count( $overviewNodes )' > <a href="overview.xml"> <xsl:text>Summary of </xsl:text> <xsl:value-of select='count( $fileNodes )' /> <xsl:text> files</xsl:text> </a> <br /> </xsl:if> <xsl:variable name="angels" select='/linted/srcNodes/srcNode/file[(@error = 0) and (@warning = 0) and (@note = 0) and (@info = 0)]' /> <xsl:if test='count( $angels )' > <a href="#Angels"> <xsl:value-of select='count( $angels )' /> <xsl:text> Lint-Clean Files</xsl:text> </a> <br /> </xsl:if> <xsl:variable name="purgatory" select='/linted/srcNodes/srcNode/file[( (number( @error ) + number( @warning ) + number( @note ) + number( @info ) ) &lt; 10 )]' /> <xsl:variable name="almostAngels" select='$purgatory[ count( . | $angels ) != count( $angels )]' /> <xsl:if test='count( $almostAngels )' > <a href="#AlmostAngels"> <xsl:value-of select='count( $almostAngels )' /> <xsl:text> Almost Lint-Clean Files</xsl:text> </a> <br /> </xsl:if> <br/> <br/> <hr/> <br/> <xsl:variable name="srcNodes" select='/linted/srcNodes/srcNode' /> <xsl:if test='count( $srcNodes )' > <h2>Source Code Directories</h2> <!-- Emit a table of source node links --> <table border="0"> <!-- Emit an anchor tag for each srcNode --> <xsl:for-each select='$srcNodes' > <xsl:if test="position() mod 3 = 1" > <xsl:text disable-output-escaping="yes"> &lt;tr&gt; </xsl:text> </xsl:if> <td> <a href="#{@name}"> <xsl:value-of select="@name" /> <br /> </a> <!-- Emit </tr><tr> tags at end of row --> </td> <xsl:if test="position() mod 3 = 0" > <xsl:text disable-output-escaping="yes"> &lt;/tr&gt; </xsl:text> </xsl:if> </xsl:for-each> </table> <br/> <hr/> <br/> </xsl:if> <br /> <xsl:if test='count( $angels )' > <div id="Angels" /> <h2> <xsl:value-of select='count( $angels )' /> <xsl:text> Lint Clean Files</xsl:text> </h2> <table border="border" cellspacing="0" cellpadding="5"> <tr> <th>File</th> <th>Errors</th> <th>Warnings</th> <th>Infos</th> <th>Notes</th> </tr> <xsl:for-each select='$angels'> <tr> <td> <xsl:value-of select="../@name" /> <xsl:text>/</xsl:text> <xsl:value-of select="@name" /> </td> <td> <xsl:value-of select="@error" /> </td> <td> <xsl:value-of select="@warning" /> </td> <td> <xsl:value-of select="@info" /> </td> <td> <xsl:value-of select="@note" /> </td> </tr> </xsl:for-each> </table> <br/> </xsl:if> <xsl:if test='count( $almostAngels )' > <div id="AlmostAngels" /> <h2> <xsl:value-of select='count( $almostAngels )' /> <xsl:text> Almost Lint-Clean Files</xsl:text> </h2> <table border="border" cellspacing="0" cellpadding="5"> <tr> <th>File</th> <th>Errors</th> <th>Warnings</th> <th>Infos</th> <th>Notes</th> </tr> <xsl:for-each select='$almostAngels'> <tr> <td> <a href="{@msgRef}"> <xsl:value-of select="../@name" /> <xsl:text>/</xsl:text> <xsl:value-of select="@name" /> </a> </td> <td> <xsl:value-of select="@error" /> </td> <td> <xsl:value-of select="@warning" /> </td> <td> <xsl:value-of select="@info" /> </td> <td> <xsl:value-of select="@note" /> </td> </tr> </xsl:for-each> </table> <br/> </xsl:if> <xsl:apply-templates /> </body> </html> </xsl:template> <xsl:template match="/linted/timestamp"> <!-- Do nothing --> </xsl:template> <xsl:template match="/linted/projDesc"> <!-- Do nothing --> </xsl:template> <!-- Handle srcNode Tag --> <xsl:template match='/linted/srcNodes/srcNode'> <br/> <br/> <div id="{@name}" /> <h2> <xsl:value-of select="@name" /> </h2> <table border="border" cellspacing="0" cellpadding="5"> <tr> <th>File</th> <th>Errors</th> <th>Warnings</th> <th>Infos</th> <th>Notes</th> </tr> <xsl:apply-templates /> </table> <br/> </xsl:template> <xsl:template match='/linted/srcNodes/srcNode/file' name="outputFileRec" > <tr> <td> <xsl:choose> <xsl:when test='( (@error = 0) and (@warning = 0) and (@note = 0) and (@info = 0) )' > <xsl:value-of select="@name" /> </xsl:when> <xsl:otherwise> <a href="{@msgRef}"> <xsl:value-of select="@name" /> </a> </xsl:otherwise> </xsl:choose> </td> <td> <xsl:value-of select="@error" /> </td> <td> <xsl:value-of select="@warning" /> </td> <td> <xsl:value-of select="@info" /> </td> <td> <xsl:value-of select="@note" /> </td> </tr> </xsl:template> <xsl:template match="/linted/headerMsgs" > <br/> <br/> <div id="HeaderMsgs" /> <h2>Header Messages</h2> <table border="border" cellspacing="0" cellpadding="5"> <tr> <th>Incidents</th> <th>Message</th> </tr> <xsl:apply-templates /> </table> </xsl:template> <xsl:template match="/linted/headerMsgs/headerMsg" > <xsl:if test="@count &gt; 25" > <tr> <td> <xsl:value-of select="@count" /> </td> <td> <xsl:value-of select="@msg" /> </td> </tr> </xsl:if> </xsl:template> </xsl:transform> ===end of lint.xsl===
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.