Re: XHTML doesn't allow name attributes for form tag

"Vinod Kurup" <[email protected]> Fri, 17 Mar 2006 20:07:09 -0500
Newsgroups gmane.comp.web.tclwebtest
Message-ID <[email protected]>
------=_Part_4253_14913021.1142644029645
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Here's the patch as well as some test files to place under the selftest
directory.

Index: lib/tclwebtest.tcl
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/tclwebtest/tclwebtest/lib/tclwebtest.tcl,v
retrieving revision 1.73
diff -u -b -B -r1.73 tclwebtest.tcl
--- lib/tclwebtest.tcl    4 Jan 2006 16:50:11 -0000    1.73
+++ lib/tclwebtest.tcl    18 Mar 2006 01:01:53 -0000
@@ -3025,6 +3025,7 @@
         set a_form(enctype) [get_attribute $form_tag enctype ""]

         set a_form(name) [get_attribute $form_tag name]
+        append a_form(name) [get_attribute $form_tag id]
         set a_form(id) [get_attribute $form_tag id]

         # get the content - everything that is inside the form but not

form-name-id.test:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
do_request "file://$TESTHOME/form-name-id.html"


form find ~n myname
log "Found form via name attribute."

form find ~n myid
log "Found form via id attribute."


form-name-id.html:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
<html>
<body>
<form name=3D"myname" id=3D"myid">
</form>
</body>
</html>

How does that look?

Vinod

------=_Part_4253_14913021.1142644029645
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Here's the patch as well as some test files to place under the selftest dir=
ectory.<br><br>Index: lib/tclwebtest.tcl<br>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D<br>RCS file: /cvsroot/tclwebtest/tclwebtest/lib/tclwe=
btest.tcl,v
<br>retrieving revision 1.73<br>diff -u -b -B -r1.73 tclwebtest.tcl<br>--- =
lib/tclwebtest.tcl&nbsp;&nbsp;&nbsp; 4 Jan 2006 16:50:11 -0000&nbsp;&nbsp;&=
nbsp; 1.73<br>+++ lib/tclwebtest.tcl&nbsp;&nbsp;&nbsp; 18 Mar 2006 01:01:53=
 -0000<br>@@ -3025,6 +3025,7 @@<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; set a_form(enctype) [get_attribute $form_tag enctype &quot;&quot;]
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set a_form(name) [get_attribute $form_tag na=
me]<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; append a_form(name) [get=
_attribute $form_tag id]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; set a_form(id) [get_attribute $form_tag id]<br>&nbsp;<br>&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # get the content - everything that is ins=
ide the form but not
<br><br>form-name-id.test:<br>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>do=
_request &quot;file://$TESTHOME/form-name-id.html&quot;<br><br><br>form fin=
d ~n myname<br>log &quot;Found form via name attribute.&quot;<br><br>form f=
ind ~n myid<br>log &quot;Found form via id attribute.&quot;
<br><br><br>
form-name-id.html:<br>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>&lt;html&gt;<br>&lt;body&gt;<br>=
&lt;form name=3D&quot;myname&quot; id=3D&quot;myid&quot;&gt;<br>&lt;/form&g=
t;<br>&lt;/body&gt;<br>&lt;/html&gt;<br><br>How does that look?<br><br>Vino=
d<br>

------=_Part_4253_14913021.1142644029645--


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642