Welcome to WebHeadStart.org

Web Technologies

Sponsored By

WebHeadStart.org is currently in beta.
Please pardon our appearance as we work to provide you with the most comprehensive reference on today's web technologies.

Interested in advertising on WebHeadStart? Become an advertising partner today!

[WWW-HTML Mailing List Archive Home] [Messages By Thread] [Messages By Date]

why, e.g., input/@checked="checked" ?

From: Robert Koberg <rob@koberg.com>
Date: Sat, 26 Mar 2005 06:13:42 -0800
Message-ID: <42456E16.90702@koberg.com>
To: www-html@w3.org

Hi,

I generate XHTML/JSP/Velocity pages from XSL and XML. One thing always 
seems clumsy to me: that is, why was something like an INPUT's checked 
attribute be set to "checked" and not true/false?

A source XML that will be generated to a Velocity template, for example, 
would need to look like the following to maintain well-formedness:

#set ($isChecked = $page.getBoolean("isChecked"))

#if ($isChecked)
   <input type="checkbox" value="true" name="something" checked="checked"/>
#else
   <input type="checkbox" value="true" name="something"/>
#end

rather than using true/false on the checked attribute, for example:

<input type="checkbox" value="true" name="something" 
checked="${isChecked}"/>

Don't suppose there is any chance to change this? :)

best,
-Rob
Received on Saturday, 26 March 2005 14:13:52 GMT
Valid XHTML 1.0! Valid CSS! Site Map | Privacy Policy | Terms of Use | WebHeadStart.org © 2005 All Rights Reserved.