W3C home > Mailing lists > Public > www-html@w3.org > April 2003

[XHTML2] purpose attribute

From: Ernest Cline <ernestcline@mindspring.com>
Date: Sat, 05 Apr 2003 20:10:44 -0500
To: <www-html@w3.org>
CC: <tantek@cs.stanford.edu>
Message-ID: <3E8F3844.430.26670E1@localhost>

I suggest the following attribute be added in XHTML2. It should be 
either part of the Core Attribute Collection or its own attribute 
collection that is part of the Common Attribute Collection. (I'm not 
certain which.)

The purpose attribute tells the purpose of the element in the document. 
Some of the existing link types are suited for use within a document 
such as: Contents, Index, Glossary, and Copyright where such 
information is embedded within the document instead of being in a 
separate document. In addition, several other possibilities such as 
None to indicate that the element contains no semantically importation 
information and is intended solely to aid the presentation should be 
added to support purposes appropriate for description of pieces of 
documents instead of the relationship of an external document.

It might also be possible to replace the <style> element and the use of 
the <script> element in the document head with <meta 
purpose="Stylesheet"> and <meta purpose="Script">.

The following explains the genesis of the idea, which came to me as I 
was writing a reply in another thread.

On 5 Apr 2003 at 12:38, Tantek wrote:

> On 4/5/03 10:38 AM, "Ernest Cline" <ernestcline@mindspring.com> wrote:


> > Therefore, switching from <br/> to <l></l> or &ls; will not cause
> > poorly written pages to be done any better.  They will only cause them
> > to be done differently.
> This is true, except for the fact that even when people start using XHTML2,
> they will start by writing "backwards compatible" XHTML2.  I know, such a
> notion is quite unpopular perhaps in this forum, but the reality is that
> there is less of a chance for <l></l> to be misused simply because (at
> first) it won't be widely supported enough for it to be misused.
> So there will be a window of time when people *might* start switching to
> using some of the more semantic XHTML elements while they are transitioning
> to XHTML2.
> > Either solution will avoid the problems
> > associated with an element that can only be empty.
> True, this is a general problem, I believe Todd Fahrner characterized it as
> "Separators considered harmful" (in reference to both <br/> and <hr/> from
> structural and semantic viewpoints).

I wasn't really thinking about <hr/> when I started the original 
thread, but your comment got me thinking about it. Since <hr/> is a 
purely presentational empty element whose current functionality can be 
replaced entirely by borders, it doesn't really serve any current 
purpose. This suggests two approaches. One would be to drop the idea of 
<hr> entirely while the other would be to change it to a non-empty 
element whose content serves some purpose.

If the empty <hr/> element were changed into a non-empty <separator> 
element, we could have something like:

  <separator src="bar.png">**************</separator>

so that on a browser that does not use images, such as Lynx, the 
desired textual method of separating what is above from what is below 
would be given by the content of the element. The markup would be 
semantically valid as it would indicate the the element has no purpose 
beyond separating what is above from what is below, and therefore has 
no semantic content and could be totally ignored if the user-agent so 
desired. The main problem is that this would be a purely presentational 
element and the design philosophy of XHTML2 is to avoid those. Not only 
that, but the effect can still be achieved thru the use of appropriate 

The only reason I can think of for incorporating such an element in 
XHTML2 is to indicate that content that the author desires to be 
rendered is not semantically important. (Despite any purpose behind the 
spec, people will do with it whatever they want, if it achieves the 
presentational effect they want. All the XHTML2 spec can do is provide 
a means of rendering such desires less harmful.) This could occur 
however in contexts other than a horizontal separator. This suggests a 
common attribute and not a special purpose element. A yes/no attribute 
is rather limited and so my thinking led me to the proposal at the 
start of this document. Instead of using <separator 
src="bar.png">*******</separator>, I think <div src="bar.png" 
purpose="None">*******</div> would serve just as well in my opinion,  
and without including a purely presentational 
Received on Saturday, 5 April 2003 20:10:26 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:03 UTC