Bug 63 - [Chameleon 1.1]Chameleon does not generate full conformed HTML
: [Chameleon 1.1]Chameleon does not generate full conformed HTML
Status: CLOSED WONTFIX
: Chameleon
Core
: 1.1
: PC Linux
: P2 normal
: ---
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2003-09-26 09:03 by
Modified: 2004-06-23 16:00 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2003-09-26 09:03:48
Chameleon 1.1]Chameleon does not generate full conformed HTML

Linux 7.2, Netscape 7.02

The HTML generated by chameleon does not respect the HTML specifications.  In
fact the attributes are not put into quotes.  Some tags are not closed based on
the following rules:  <tag/> or <tag> </tag>.

This problem was found by using the XPath parser tool.  Since HTML is a subset
of XML, the XML parser should go through without complaining.

IMPORTANT FOR TESTING.
------- Comment #1 From 2003-09-26 09:57:46 -------
Please be more specific on the exact widgets that do not produce valid HTML or
include specific examples of HTML that doesn't validate.  Without that the
developers cannot help.  Also keep in mind that most of the HTML comes from the
application template which is not under the control of chameleon.
------- Comment #2 From 2003-09-26 14:29:09 -------
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?
------- Comment #3 From 2003-09-26 14:31:28 -------
I forgot to add that the errors appeared on the following lines:


The problem is where I put "here ---->":

here 1:  missing ending tag
here 2:  missing ending tag
here 3:  missing "" on attribute value  example:  SIZE=2 should read SIZE="2"
here 4:   missing "" on attribute value example:  TYPE=HIDDEN should read
TYPE="HIDDEN"


Norm
----------------------------------

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

<head>

<title>DM Solutions Group</title>

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


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

</head>


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

<form method="post">

here 3-----><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>


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

</body>

</html>
------- Comment #4 From 2003-09-30 09:24:26 -------
*** Bug 64 has been marked as a duplicate of this bug. ***
------- Comment #5 From 2003-09-30 09:24:54 -------
*** Bug 65 has been marked as a duplicate of this bug. ***
------- Comment #6 From 2004-04-05 16:14:39 -------
I would say that the output is conformant HTML but not necessarily XHTML or XML.
 I am not willing to update to output XML-parser-compatible HTML at this point,
marking as wontfix
------- Comment #7 From 2004-06-23 16:00:24 -------
closing this bug