Menu

#30 select component "selected" not valid XHTML

open
nobody
5
2014-08-14
2004-03-22
No

This also raises the issue of how to handle XHTML vs
HTML compliance in general.

$ cvs diff
Index: form.inc.php
===================================================================
RCS file:
/cvsroot/wact/wact/framework/template/components/form.inc.php,v
retrieving revision 1.28
diff -c -r1.28 form.inc.php
*** form.inc.php 21 Feb 2004 02:28:15 -0000
1.28
--- form.inc.php 22 Mar 2004 03:39:38 -0000
***************
*** 706,712 ****
echo htmlspecialchars($key, ENT_QUOTES);
echo '"';
if ($selected) {
! echo " selected";
}
echo '>';
if (empty($contents)) {
--- 706,712 ----
echo htmlspecialchars($key, ENT_QUOTES);
echo '"';
if ($selected) {
! echo ' selected="selected"';
}
echo '>';
if (empty($contents)) {

Discussion

  • Harry Fuecks

    Harry Fuecks - 2004-06-11

    Logged In: YES
    user_id=569780

    One thing we could is "detect" the type from the opening
    doctype declaration. It's fairly easy to do with HTMLSax.
    It's then a question of providing an easy mechanism for this
    information to be communicated to compile time components

     
  • Franco Ponticelli

    Logged In: YES
    user_id=422202

    Why don't add a new object to use with the codeWriter to
    delegate the generation of tags? Something like
    PEAR::HTML_Common.
    Together with doctype detection it would be very nice to use.

     
  • Franco Ponticelli

    Logged In: YES
    user_id=422202

    When the template is included inside another or wrapped, is
    there an easy way to detect the doctype of the container?

     
  • Jeff Moore

    Jeff Moore - 2004-06-11

    Logged In: YES
    user_id=31876

    >Why don't add a new object to use with the codeWriter to
    delegate the generation of tags?

    JSF uses this approach. You can select a rendering kit which can render
    each tag according to a different desired output. The idea has merit, but
    would be an incredibly large refactoring of the template compiler.
    Probably not possible for the next release.

     

Log in to post a comment.