<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
</head>
<body bgcolor="#ffffff" text="#000000">
Dear list,<br>
<br>
unfortunately Firefox splits xml nodes with a length greater than
4096 Bytes into several nodes. Due to that some format readers of
OpenLayers run into problems.<br>
<br>
Let's take a look at WMSGetFeatureInfo-Format reader
(OpenLayers/lib/OpenLayers/Format/WMSGetFeatureInfo.js) especially
at this part of parseAttributes-function:<br>
<br>
<font face="Courier"> if (child.nodeType == 1) {<br>
var <font color="#ff0000">grandchildren</font>
= child.childNodes;<br>
if (<font color="#ff0000">grandchildren.length
== 1</font>) {<br>
var grandchild = grandchildren[0];<br>
if (grandchild.nodeType == 3 ||<br>
grandchild.nodeType == 4) {<br>
var name = (child.prefix) ? <br>
child.nodeName.split(":")[1] :
child.nodeName;<br>
var value =
grandchild.nodeValue.replace(<br>
this.regExes.trimSpace, "");<br>
attributes[name] = value;<br>
}<br>
}<br>
}</font><br>
<br>
Here in Firefox with a node value length greater than 4096 there
will be more than one grandchildren and the whole attribute will be
skipped. This behaviour is to be found in several other format
reader like parseAttributes-function in
OpenLayers/lib/OpenLayers/Format/GML.js.<br>
<br>
One possible first workaround for that may be adding functionality
to merge nodeValues of all following grandchildren i.e.:<br>
<br>
<font face="Courier"> if (<font color="#ff0000">grandchildren.length
> 1</font>) {<br>
var m = grandchildren.length;<br>
var combinedText = '';<br>
for (var j = 0; j < m; ++j) {<br>
var oneGrandchild = grandchildren[j];<br>
if (oneGrandchild.nodeType == 3 ||<br>
oneGrandchild.nodeType == 4) {<br>
combinedText +=
oneGrandchild.nodeValue.replace(this.regExes.trimSpace, "");<br>
}<br>
}<br>
attributes[name] = combinedText;<br>
}</font><br>
<br>
<br>
Is this a known problem with format readers in combination with
firefox and node values with a length greater than 4096? Are there
any existing plans to solve this problem or even ideas for that?<br>
<br>
Any comments appreciated!<br>
<br>
Best,<br>
<br>
Thorsten<br>
<br>
<pre class="moz-signature" cols="72">--
Diplom-Informatiker Thorsten Müller
-Information Technology Consultant-
terrestris GmbH & Co. KG
Irmintrudisstraße 17
53111 Bonn
Tel: ++49 (0)228 / 96 28 99 -52
Fax: ++49 (0)228 / 96 28 99 -57
Email: <a class="moz-txt-link-abbreviated" href="mailto:mueller@terrestris.de">mueller@terrestris.de</a>
Web: <a class="moz-txt-link-freetext" href="http://www.terrestris.de">http://www.terrestris.de</a>
Amtsgericht Bonn, HRA 6835
Komplementärin: terrestris Verwaltungs GmbH
vertreten durch: Hinrich Paulsen, Till Adams
</pre>
</body>
</html>