[html4all] Numbered headings (was HTMLWG)

Vlad Alexander (XStandard) vlad.alexander at xstandard.com
Mon Nov 26 09:02:17 PST 2007


Hi Lachlan,

> the different tag name has no effect on the
> complexity of implementing that particular feature.
>From my experience as a software engineer, it sure does. Here are the options:

1. Leave the well tested C++ class for h1 alone and build a new class for h element. Since h can only be used inside section element, test the new h class in the context of that element.

2. Add a lot of IF statements to h1 C++ class for different behavior based on the context of where the h1 element is used. Then re-test h1 in all contexts.

Most software engineers will opt of option 1.

>that sounds like an overly restrictive feature
You need to be restrictive if you want to generate markup that is valid, accessible and based on best-practice. The section/h construct needs to be implemented in a structured way in order for it to be used correctly. Examples of structured constructs are table, ol, ul and dl. See how definition lists can be implemented (almost like a table structure):
http://misc.xstandard.com/html4all/dl.gif

The section/h construct needs to be implemented in a similar manner.


> There is nothing in the spec that prohibits content
> from occurring before the section's heading element.
Too bad :-(

Regards,
-Vlad
http://xhtml.com


-------- Original Message --------
From: Lachlan Hunt
Date: 2007-11-26 11:08 AM
> Vlad Alexander (XStandard) wrote:
>> <html>
>> 	<body>
>> 		<h1></h1>
>> 		<section>
>> 			<h1></h1>
>> 			<p></p>
>> 		</section>
>> 	</body>
>> </html>
>>
>> In the context of the section element, the authoring tool may draw a
>> line around the h1 element (and section element) and not let users
>> enter content before the h1 element. The authoring tool may also not
>> let users delete the h1 element inside the section element.
>>
>> In the context of the body element (outside the section element), h1
>> can be deleted, content can be entered before it and there is no line
>> around it.
>>
>> So in different contexts, the authoring tool needs to treat the same
>> element (h1) in different ways. This creates problems for tool
>> vendors.
> 
> How could this particular issue possibly be resolved by using an <h> 
> element instead of an <h1> element?  AFAICT, the different tag name has 
> no effect on the complexity of implementing that particular feature.
> 
> (FWIW, that sounds like an overly restrictive feature. There is nothing 
> in the spec that prohibits content from occurring before the section's 
> heading element.)
> 





More information about the List_HTML4all.org mailing list