HTML is a declarative mark-up language

On Jan 28, 2009, at 2:11 PM, Ian Hickson wrote:
> On Wed, 28 Jan 2009, Roy T. Fielding wrote:
>>
>> HTML is a declarative mark-up language, first and foremost, and  
>> should
>> be defined as such even if the behavioral aspects triggered by  
>> rendering
>> cause the DOM to be modified on the fly.  There is considerable  
>> value in
>> defining what is valid HTML for both what-goes-over-the-wire and what
>> gets rendered on a browser.
>
> You've said this before, but you never replied to the last e-mail I  
> sent
> on the thread trying to work out what made you believe this:
>
>    http://lists.w3.org/Archives/Public/public-html/2008Nov/0420.html

I didn't reply to it because there seemed no point.  You say that it
doesn't require DOM, CSS, or scripting, yet the entire spec is
defined in terms of the effect on DOM, the impact of CSS, and the
behavior of scripting.  If you try to read the spec from the perspective
of someone whose implementation does not have a DOM, for whom CSS
is an entirely orthogonal concept because there is no rendering or
presentation being implemented, and for which scripting is irrelevant,
then I think you will discover that HTML5 as currently drafted doesn't
even define the base mark-up.  That is not an unusual perspective.

The vast majority of systems that implement HTML do so for the purpose
of generating hypertext that is usable on a huge number and variety
of platforms, only a few of which involve general-purpose web browsers
or what you would call a web application. [And, generally speaking, when
we do add CSS and scripting we do everything that we can possibly do
to avoid is being authored inside the HTML.]

If I ask a simple question, like:

    what does the name attribute on the "a" (anchor) element mean?

how do I find the answer in HTML5? Well, supposedly I look at the ToC
for the a element, find it eventually under "Text-level Semantics" at
<http://www.w3.org/TR/html5/text-level.html#the-a>, and discover that
there is apparently no "name" attribute for <a> and, further, that <a>
doesn't even mean anchor any more.  Brilliant.

Oh, but maybe it's defined in the operational behavior ...

"The activation behavior of <a> elements that represent hyperlinks
is to run the following steps:"  Nope, that's DOM.

You'd almost think that name was removed, but then if we happen to be
reading the section on Web Browsers we find...

<http://www.w3.org/TR/html5/history.html#scroll-to-fragid>

"4. If there is an <a> element in the DOM that has a name attribute
  whose value is exactly equal to fragid, then the first such element
  in tree order is the indicated part of the document; stop the  
algorithm here.

The name attribute is used but never defined, AFAICT.  I just happened
to run across this error in the first element that I looked at in
the HTML5 spec today, and it is hidden because the declarative language
is being obscured by the behavioral descriptions.

> Without understanding where you're coming from, it's hard to  
> understand
> your position. I really _would_ like to understand why you believe  
> this;
> if I understood that, maybe I would agree with you. Currently, I do  
> not.

Yes, it would be nice if you would understand the perspective of
someone who is working in the CMS industry, or the HTTP server industry,
or the Web authoring tools industry.  However, that is not a gating
factor on accepting issues.  To truly understand where I am coming
from we'd have to go back in time and revisit the many discussions
that I had about HTML in 1993-94 that eventually fed into HTML 2.0.
I simply don't have time to do that.

....Roy

Received on Thursday, 29 January 2009 01:48:30 UTC