Firefox graphical corruption with long XML file

R

reclusive monkey

Hello Everyone,

Just wondering if anyone here has experienced this. I have a (fairly)
long XML file with just under a thousand records in it. The XSL works
fine in IE/FF, however, at a seemingly arbitrary record, the graphical
display of the table corrupts in FF. I'm at work now so can't do
anything useful like upload a picture somewhere, but I can do when I
get home. I've checked the source, and its all there, but the table
degrades to the last record repeated several times and then goes into
compressed lines. Its roughly about half way down the table. Any idea
of what might cause this? Its not a show stopper, I've just never heard
of anyone having this trouble so I am wondering if its something I've
done. Regards,

Luke
 
P

Peter Flynn

reclusive said:
Hello Everyone,

Just wondering if anyone here has experienced this. I have a (fairly)
long XML file with just under a thousand records in it.

Umm. XML doesn't have "records", it has "elements".
What are you referring to as a "record"?
The XSL works
fine in IE/FF, however, at a seemingly arbitrary record, the graphical
display of the table corrupts in FF. I'm at work now so can't do
anything useful like upload a picture somewhere, but I can do when I
get home. I've checked the source, and its all there, but the table
degrades to the last record repeated several times and then goes into
compressed lines. Its roughly about half way down the table. Any idea
of what might cause this? Its not a show stopper, I've just never heard
of anyone having this trouble so I am wondering if its something I've
done. Regards,

I had something similar a long while ago and it turned out to be
that elements which I thought were sibling instances had been
nested instead. Open the document in something which displays the
tree structure and see if this is the case.

///Peter
 
R

reclusive monkey

Peter,

I described a "record", as this is an XML file exported from a
database. As I believe (most likely erroneously) this is something to
do with the gecko rendering engine, I didn't worry too much about
semantics (how foolish I was). One "record" is one row in the table,
which is the <tblSubjective> element in the XML file. Here are the
first two <tblSubjective> elements of the XML file (I am including the
root element for reference);

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="Subjectives.xsl" type="text/xsl"?>
<dataroot xmlns:eek:d="urn:schemas-microsoft-com:eek:fficedata">
<tblSubjectives>
<SubjectiveCode>0000</SubjectiveCode>
<SubjDesc>Teaching Staff- Teachers Scheme</SubjDesc>
<CentrallyControlled>0</CentrallyControlled>
<SCSDNonUse>0</SCSDNonUse>
</tblSubjectives>
<tblSubjectives>
<SubjectiveCode>0001</SubjectiveCode>
<SubjDesc>Tutors</SubjDesc>
<CentrallyControlled>0</CentrallyControlled>
<SCSDNonUse>0</SCSDNonUse>
</tblSubjectives>

As far as my feeble brain can tell these elements are siblings, not
nested.

Here is the XSL;

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<title>SCSD Finance Department - Cost Centres - ID</title>
<link rel="stylesheet" href="IntranetStyle.css" type="text/css"
media="screen" />
</head>
<body>
<div id="container">
<div id="header">
<a name="top"></a>
<h1>SCSD Finance Department</h1>
<h2>Subjectives</h2>
</div>
<div class="content">
<div class="content_header">
<span>Listed by Code Order</span>
</div>
<div class="content_body">
<p>
<div id="listing" align="center">
<table width="95%">
<thead>
<th><div>Code</div></th>
<th><div>Description</div></th>
<th><div>Central?</div></th>
<th><div>Active?</div></th>
</thead>
<xsl:apply-templates/>
</table>
</div>
</p>
</div>
<div class="content_footer">
<span><a href="#top">Back to top</a></span>
</div>
</div>
<div id="footer">
<span>Produced by <a
href="mailto:[email protected]">[email protected]</a>
Finance Technician, Finance Dept., SCSD, Ext.: 2597.</span>
</div>
<div class="hidden"><a href="IntranetStyle.css"></a><img
src="curvebg.gif"/><img src="LOGOINTRANET.JPG"/></div>
</div>
</body>
</html>
</xsl:template>

<xsl:template match="tblSubjectives">
<tr class="even">
<td><xsl:value-of select="SubjectiveCode" /></td>
<td><xsl:value-of select="SubjDesc" /></td>
<xsl:choose>
<xsl:when test="CentrallyControlled = 0">
<td><form><input height="10px" width="10px" type="checkbox"
/></form></td>
</xsl:when>
<xsl:when test="CentrallyControlled = 1">
<td><form><input height="10px" width="10px" type="checkbox"
checked="true"/></form></td>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="SCSDNonUse = 0">
<td><form><input height="10px" width="10px" type="checkbox"
/></form></td>
</xsl:when>
<xsl:when test="SCSDNonUse = 1">
<td><form><input height="10px" width="10px" type="checkbox"
checked="true"/></form></td>
</xsl:when>
</xsl:choose>
</tr>
</xsl:template>

I have no doubt at all that one simple screenshot would show what is
happening far more clearly than I can describe, so I will upload one
tonight when I get home and pray that someone knows what is going. I am
_reasonably_ sure that my XML/XSL is ok, as it works ok in IE (yeah,
yeah IE isn't a browser, so its probably more of an indication it _is_
something which isn't standard), but it works fine in FF, until, as I
said about halfway through the <tblSubjective> elements (of which there
are about 700+), where it likes like FF has just run out of steam
drawing the table. The table is fine until about row 400. Should I post
my CSS as well?
 
P

Peter Flynn

reclusive said:
Peter,

I described a "record", as this is an XML file exported from a
database. As I believe (most likely erroneously) this is something to
do with the gecko rendering engine, I didn't worry too much about
semantics (how foolish I was).

Nothing foolish about it, it's perfectly natural. But I'm not a
database person, I'm a markup person, so if I want to understand the
problem, I need to visualise it in markup terms.
One "record" is one row in the table,

That much I do know about databases :) Unfortunately there is an
infinite number of ways in which a row from a database can be encoded
in XML...
<tblSubjectives> [...]
</tblSubjectives>
<tblSubjectives>
[...]
</tblSubjectives>

OK, thanks, now I can see which way round it is.
As far as my feeble brain can tell these elements are siblings, not
nested.

Yep. So my suggestion is junk, I'm afraid. Sorry about that.
Here is the XSL;

I just tested this here by duplicating your tblSubjectives 500x to give
1000 of them. Saxon did the job standalone just fine, so I brought it up
on Apache under FC4, and Firefox 1.0.6 Linux also did it OK, as did the
same Firefox on Windows and Mozilla and MSIE6.
I have no doubt at all that one simple screenshot would show what is
happening far more clearly than I can describe, so I will upload one
tonight when I get home and pray that someone knows what is going. I am
_reasonably_ sure that my XML/XSL is ok, as it works ok in IE (yeah,
yeah IE isn't a browser, so its probably more of an indication it _is_
something which isn't standard), but it works fine in FF, until, as I
said about halfway through the <tblSubjective> elements (of which there
are about 700+), where it likes like FF has just run out of steam
drawing the table. The table is fine until about row 400. Should I post
my CSS as well?

It wouldn't do any harm. Your XSLT is fine, and I assume you have run
the XML through a standalone parser to check that it is well-formed.

///Peter
 
P

Peter Flynn

reclusive said:
http://www.reclusivemonkey.com/~monkey/images/ff_xml.jpg

This is what I am talking about. The further down the table you go, the
more it begins to break up so you just end up with a series of lines
together, then nothing. The page *seems* about the right lenght, FF
just doesn't seems to be able to hold it together as it tries to render
it all.

Ah...*that* kind of breakup. I thought you meant the XSLT was spewing
data out wrongly. This looks like a browser bug to me. Some kind of
delirium tremens in the rendering engine. I get it on machines with
small memory when I try to move a window, but I haven't seen it occur
inside a stationary window before.

///Peter
 
R

reclusive monkey

Thanks for the reply Peter. I should of mentioned there is no server
here; its simply a XML file on the LAN at work. Do you think I should
mention this to the Mozilla people?
 
R

reclusive monkey

Hmm, its my stylesheet. I am not sure why it should do this, but at
least I know where the problem lies now! I think the mozilla team are
aware of this as I found this on http://www.quirksmode.org;

"Doctypes
Unfortunately Mozilla supports "doctype switching". I don't closely
follow developments in this newest scourge of web design so I cannot
offer any more information. Advice: don't use it.

Problems
I made these notes for an earlier Mozilla version. I don't know if
they're still valid.

It sometimes has trouble with an XHTML 1.0 Transitional DOCTYPE. If you
use XHTML Trans and lots of tables, the tables may develop strange and
inexplicable bugs if you use anything else than this DOCTYPE
declaration:

<!DOCTYPE HTML PUBliC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">

Apart from the official Mozilla Web Authoring FAQ and the Doctype
Switching page I found a very helpful page about doctypes in Netscape 6
and Explorer 5 on Mac. An acquaintance of mine also wrote an article
about this problem. The page it's on has a wrong DOCTYPE, so take a
look at this in Netscape 6 to see what you're up against. See also
Richard Bennett's doctype page.
(Some readers suggest that this table behaviour may actually be
standards compatible. This is possible, I don't know. In any case a web
developer must be prepared for such things)."

So I might have to play around with some DOCTYPE changes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top