Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Firefox graphical corruption with long XML file

Reply
Thread Tools

Firefox graphical corruption with long XML file

 
 
reclusive monkey
Guest
Posts: n/a
 
      09-13-2005
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

 
Reply With Quote
 
 
 
 
Peter Flynn
Guest
Posts: n/a
 
      09-13-2005
reclusive monkey wrote:

> 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

 
Reply With Quote
 
 
 
 
reclusive monkey
Guest
Posts: n/a
 
      09-14-2005
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 xmlnsd="urn:schemas-microsoft-comfficedata">
<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"
xmlnssl="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="(E-Mail Removed)">luke (E-Mail Removed)</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?

 
Reply With Quote
 
reclusive monkey
Guest
Posts: n/a
 
      09-14-2005
http://www.reclusivemonkey.com/~monk...ges/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.

 
Reply With Quote
 
Peter Flynn
Guest
Posts: n/a
 
      09-14-2005
reclusive monkey wrote:

> 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



 
Reply With Quote
 
Peter Flynn
Guest
Posts: n/a
 
      09-14-2005
reclusive monkey wrote:

> http://www.reclusivemonkey.com/~monk...ges/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

 
Reply With Quote
 
reclusive monkey
Guest
Posts: n/a
 
      09-14-2005
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?

 
Reply With Quote
 
reclusive monkey
Guest
Posts: n/a
 
      09-15-2005
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Having compilation error: no match for call to (const __gnu_cxx::hash<long long int>) (const long long int&) veryhotsausage C++ 1 07-04-2008 05:41 PM
Use of Long and Long Long Bart C C Programming 27 01-15-2008 05:27 AM
long long and long Mathieu Dutour C Programming 4 07-24-2007 11:15 AM
unsigned long long int to long double Daniel Rudy C Programming 5 09-20-2005 02:37 AM
Assigning unsigned long to unsigned long long George Marsaglia C Programming 1 07-08-2003 05:16 PM



Advertisments