Closed Bug 270223 Opened 20 years ago Closed 18 years ago

XML file displays incorrectly when an XSL file is applied to display as html

Categories

(Core :: XSLT, defect)

1.8 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: none98765, Unassigned)

Details

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

The XML is displayed incorrectly in Firefox.  It should be displayed as a table.
 However, each row is placed next to each other instead of the table rendering
properly.  This displays correctly as a table in Internet Explorer.

Reproducible: Always
Steps to Reproduce:
1. Create an XML file:
-----------XML FILE-----------------------
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/xsl" href="mytest.xsl"?>
<database>
	<schema name="SCHEMA1">
		<table>
			<name>PERSON</name>
			<description>This table contains info about each person</description>
			<column>
				<name>PersonID</name>
				<notnull />
				<datatype>int</datatype>
				<description>Identity field that autoincrements for each person record
added</description>
			</column>
			<column>
				<name>FirstName</name>
				<datatype>varchar(50)</datatype>
				<description>First Name of this person</description>
			</column>
			<column>
				<name>DOB</name>
				<datatype>DateTime</datatype>
				<description>Date of birth for this person</description>
			</column>
		</table>
	</schema>
</database>
------------------------------------------


2. Create an XSL file:
-----------XSL FILE-----------------------
<?xml version="1.0" encoding="iso-8859-1" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<xsl:template match="/">
		<html>
			<head><title>My Test</title></head>
			<body>
				<h2>Database</h2>
				<xsl:apply-templates/>
			</body>
		</html>
	</xsl:template>

	<xsl:template match="schema">
		<schema>
			<div style="border: solid 1px #BBBBBB;">
				<span style="font-weight: bold;"><xsl:apply-templates select="@name"/></span>
				<xsl:apply-templates/>
			</div>
		</schema>
	</xsl:template>

	<xsl:template match="table">
		<table>
			<div style="border: solid 1px green; padding: 5px;">
				<div style="font-weight: bold;">
					<span style="color: magenta;"><name><xsl:apply-templates
select="name"/></name></span> -
					<xsl:apply-templates select="description"/>
				</div>
				<table border="1">
					<xsl:apply-templates/>
				</table>
			</div>
		</table>
	</xsl:template>

	<xsl:template match="column">
		<column>
			<tr>
				<td><xsl:apply-templates select="name"/></td>
				<td><xsl:apply-templates select="datatype"/></td>
				<td><xsl:apply-templates select="description"/></td>
			</tr>
		</column>
	</xsl:template>

</xsl:stylesheet>
------------------------------------------


3. Open the XML file in Firefox - it does not display the table correctly.
Actual Results:  
Table portion not displayed correctly - rows placed next to each other instead
of in standard table format

Expected Results:  
Similar output to Internet Explorer or the way the following html is displayed:

<html>
<head><title>My Test</title></head>
<body>
	<h2>Database</h2>
	<div style="border: solid 1px #BBBBBB;">
	<span style="font-weight: bold;">SCHEMA1</span>
	<div style="border: solid 1px green; padding: 5px;">
		<div style="font-weight: bold;">
			<span style="color: magenta;">PEOPLE</span> - This table contains info about
each person
		</div>
		<table border="1">
			<tr>
				<td>PersonID</td>
				<td>int</td>
				<td>Identity field that autoincrements for each person record added</td>
			</tr>
			<tr>
				<td>FirstName</td>
				<td>varchar(50)</td>
				<td>First Name of this person</td>
			</tr>
			<tr>
				<td>DOB</td>
				<td>DateTime</td>
				<td>Date of birth for this person</td>
			</tr>
		</table>
	</div>
</div>
</body>
</html>
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → EXPIRED
Just received the message saying hte bug was expired - never got a message
saying it was going to expire.

Tested in the most recent released Firefox  - version 1.0.7.

Bug still exists.  Identical rendering to submitted gif showing current results
vs expected results.
Status: RESOLVED → UNCONFIRMED
Resolution: EXPIRED → ---
(In reply to comment #4)

> Bug still exists.  Identical rendering to submitted gif showing current results
> vs expected results.

Tested in the version 1.5.0.5, it is still true.
Assignee: bross2 → xslt
Component: General → XSLT
Product: Firefox → Core
QA Contact: general → keith
Version: unspecified → 1.8 Branch
A non-html tags like a <schema>, <column>, <name>  are eliminated (in comparison with original XSL).
A non-html tags are removed from target HTML-document, rendering is ok.
WFM based on the testcase in attachment 247698 [details].
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago18 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: