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

Robert Koberg <rob@koberg.com> wrote:

> I understand that. I was asking why.

HTML (as standardised) adopted an existing idiom for flags. Attribute 
minimisation is gone in XML, but the legacy remains (and must do for UA 
compatibility).

> What I am trying to say is that it makes generating XHTML output 
> clumsy/redundant because a source XML used in an XSL transformation to a 
> templating language for runtime cannot look like

Well that's a failing of the templating language rather than XHTML as 
such. A templating language that aims at being helpful for XML should 
provide a mechanism for inclusion/exclusion of an attribute.

For example in PXTL:

   <input type="radio" checked="checked{?px_if isChecked?}"/>

There are after all many other constructs in non-XML-native templating 
languages like JSP that can result in source templates that are not 
well-formed.

-- 
Andrew Clover
mailto:and@doxdesk.com
http://www.doxdesk.com/

Received on Tuesday, 29 March 2005 00:38:23 UTC