Re: HTML is a declarative mark-up language

On Thu, 29 Jan 2009, Jirka Kosek wrote:
> 
> I'm not asking for listing 40 attributes but for adding just one link 
> that will point to section defining these 40 global attributes. So every 
> reader will easily find that element XYZ has those 5 element specific 
> attributes and also shares other global attributes.

So you are asking for a link saying "Common attributes" linking to:

   http://www.whatwg.org/specs/web-apps/current-work/#global-attributes

...to be added to every element's definition?

I've so far tried to avoid redundant links like that.

Isn't it self-explanatory that the attributes that apply to every element 
also apply to each element listed in the spec...?


> Yep, some formalism would it be something like DTD/RELAX NG content 
> models or something different will be really useful. Let's take <a> 
> element as an example. Spec in 4.6.1 says:
> 
> Content model:
> Transparent, but there must be no interactive content descendant.
> 
> Now tell me how can I find which elements I can use inside <a>?

It depends on the element's ancestors, as described under the definition 
of "transparent".


> I was trying to follow link around "Transparent" and read target text 
> and then follow other links, ... Maybe it is because late time here, but 
> I was unable to find this answer.

The text in HTML5 is pretty lawyery here, I admit. As the spec says in the 
introduction, "more approachable tutorials and authoring guides can 
provide a gentler introduction to the topic".

I'm not sure what to do about the definition of "transparent"... would 
examples help, maybe?


> Having something like hyperlinked grammar is much straightforward there.

The problem with <a> is that actually I know of no formal gramar capable 
of describing the actual content model of <a>. So I don't know how to 
provide a non-prose formalism for <a>'s content model.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Thursday, 29 January 2009 23:31:21 UTC