MapTools.org

[Chameleon-dev] [Bug 63] [Chameleon 1.1]Chameleon does not generate full conformed HTML

bugzilla-daemon@www.maptools.org bugzilla-daemon@www.maptools.org
Fri, 26 Sep 2003 14:29:10 -0400
http://www.maptools.org/bugzilla/show_bug.cgi?id=63





------- Additional Comments From nsavard@dmsolutions.ca  2003-09-26 14:29 -------
I am building automated testing for the Chameleon widgets.  I was doing a test
with only one widget "mapDHTMLWidget".

I copied the "chameleon_sample" application to a new directory under a new name:
 "test".  I copied the template into the htdocs "sample.html" to "norm1.html". 
I edited "norm1.html" and removed all the line codes that were not necessary. 
So I kept the line codes necessary to load only one widget.  I loaded the
application on the browser and I saw the map.

I renamed the "mapDHTMLWidget" to "boggymapDHTMLWidget" to simulate an error.  I
loaded the application again and the error came out.  I meant the error line
appeared in red into the browser.  The following line:

<cwc2 type="BoggyMapDHTMLWidget" visible="true" width="400" height="300"
allowresize="false" marqueecolor="FF3333" marqueewidth="2" minscale="1"/>

This is what I want.

Next, I used PHP.XPath. I opened this URL with XPath and the errors came out
like this one:

<b>XPath error in XPath.class.php:1692</b> In importFromString(): XML error in given
file mapdhtmlwidget.html' on line 13  column 2. Reason:mismatched tag<br \>    

-------------------
To solve the problem I made a view source and saved the source into a file on
the disk.  I then again executed XPath against this file.  I corrected the
errors progressively.  I first added the "/" before ">" ending tags.  Then I
added quotes around attribute values.  Finally, XPath stopped complaining.  The
source file saved in its original state is this one:

<html><!-- InstanceBegin template="/Templates/techserv2.dwt"
codeOutsideHTMLIsLocked="false" -->


<head>


<title>DM Solutions Group</title>


<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">





<link rel="stylesheet" href="cwc2.css" type="text/css">


</head>





<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"
onLoad="CWC2OnLoadFunction()">


<form method="post">


<FONT SIZE="2" COLOR=#FF3333>&lt;cwc2 type=&quot;MapDHTMLXWidget&quot;
visible=&quot;true&quot; width=&quot;400&quot; height=&quot;300&quot;
allowresize=&quot;false&quot; marqueecolor=&quot;FF3333&quot;
marqueewidth=&quot;2&quot; minscale=&quot;1&quot;/&gt;</FONT>



<INPUT TYPE=HIDDEN NAME=sid VALUE="3f731bfab24d8"></FORM>


</body>


</html>

----------------------------------

I executed agains my template file and no error came out.  My template file is
this one:

<html><!-- InstanceBegin template="/Templates/techserv2.dwt"
codeOutsideHTMLIsLocked="false" -->
<head>
<title>DM Solutions Group</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></meta>

<link rel="stylesheet" href="cwc2.css" type="text/css"></link>
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"
onLoad="CWC2OnLoadFunction()">
<form method="post">
<cwc2 type="BoggyMapDHTMLWidget" visible="true" width="400" height="300"
allowresize="false" marqueecolor="FF3333" marqueewidth="2" minscale="1"/>
</form>
</body>
</html>

------------------------------

Question:  Can we produce an HTML that a XML parser can go through?



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


This archive was generated by Pipermail.