W3C home > Mailing lists > Public > public-html@w3.org > July 2007

Re: (marks, definitions, terms, abbreviations, and variables <m>, <dfn>, <abbr>, <term>) part of my review of 3.12 Phrase elements

From: Robert Burns <rob@robburns.com>
Date: Fri, 20 Jul 2007 02:24:05 -0500
Message-Id: <5BBB3849-E904-4CC8-834B-566EFB546A26@robburns.com>
Cc: public-html@w3.org
To: Thomas Broyer <t.broyer@gmail.com>


On Jul 20, 2007, at 1:55 AM, Thomas Broyer wrote:

>
> 2007/7/20, Robert Burns:
>>
>> I like the more elaborate document conformance criteria the HTML5
>> draft provides for <dfn> and <abbr>. However, right now <dfn> either
>> encloses text nodes that are the the definition of the term or, in
>> the case of an abbreviation, it includes a text node (indirectly)
>> that is the term defined (with the @title value the definition of the
>> term). There are places in the draft, where the distinction between a
>> term and the elaborate definition is not kept completely distinct. I
>> think it has been even more difficult for authors to keep these uses
>> separate. This confusion over exactly how to use a <dfn> element is
>> one of the prime use-case/problem statements for the following
>> proposals:
>
> ...mainly because HTML4 did a very bad job at defining <DFN>: there's
> not even an example!

Agree. I did start out by saying how I  liked how HTML5 improved  
[markedly, I would add] on HTML4 here.

>> proposed additions (for <dfn>/
>>
>> Element-specific attributes:
>>         scoped (boolean)
>>         defref (string; required)
> [...]
>> Based on my proposal, the definition would be marked up with the
>> <dfn> element and the term would be marked up with the <abbr>
>> element.
> [...]
>> <p>The <dfn><abbr>Zat</abbr></dfn>, short for Zat'ni'catel, is a
>> weapon.</p>
>> <p>Jack used a <abbr>Zat</abbr> to make the boxes of evidence
>> disappear.</p>"
>>
>> My proposal would change this to:
>> <p>The <abbr>Zat</abbr>, <dfn defref='Zat'>short for Zat'ni'catel</
>> dfn>, is a weapon.</p>
>> <p>Jack used a <abbr>Zat</abbr> to make the boxes of evidence
>> disappear.</p>"
>
> Er, aren't you the man calling for "avoiding changing the meaning of
> HTML4 elements because it creates namespace collisions"?
>
> And you're proposing:
> - adding a *required* attribute
> - changing the definition of DFN to contain the definition rather
> than the term (and then introducing <TERM> instead)

Touché on the required attribute. That would relate to one of the  
type 2 name collision issues (though I've tried to say that I think  
the type 1 is so much more important than the other). On your second  
bullet point, that is the ambiguity that HTML5 and I am trying to  
address. The draft mostly treats <dfn> as the definition and not the  
term (though there are places in the draft that seem to reverse that).

> Just a few words about your example: how's "is a weapon" not part of
> the definition of "Zat"?
> I concede that the example could be better marked up adding a title
> attribute to the <abbr> with value "Zat'ni'catel" but leaving this
> aside, it's correct.
> <p>The <dfn><abbr title="Zat'ni'catel">Zat</abbr></dfn>, short for
> Zat'ni'catel, is a weapon.</p>

That was an error. I meant: it to be

<p>The <abbr>Zat</abbr>, <dfn defref='Zat'>short for Zat'ni'catel, is  
a weapon/
dfn>.</p>
<p>Jack used a <abbr>Zat</abbr> to make the boxes of evidence
disappear.</p>"

The problem with adding the title to the <abbr> is that it would need  
to be added every time the abbreviation was used (so that a UA could  
associate every instance of Zat with the definition and the  
expansion). Perhaps there are other things that could be added here  
t, since this raises the issue of an abbreviation having both an  
expansion and a definition of the expansion. Perhaps

<p>The <abbr>Zat</abbr>, <dfn defref='Zat'>short for <term  
abbref='Zat'  defref='Zat'ni'catel'>Zat'ni'catel</term>, is a weapon/
dfn>.</p>
<p>Jack used a <abbr>Zat</abbr> to make the boxes of evidence
disappear.</p>"

>> With this approach the, association is clear and the UA is not left
>> to infer what the association is based on a paragraph that may
>> contain less or more than the precise definition.
>
> I'd rather introduce a <definition> element in this case:
> <p><definition>The <dfn><abbr>Zat</abbr></dfn>, short for  
> Zat'ni'catel, is a
> weapon</definition>; Jack used a one to make the boxes of evidence
> disappear.</p>

That would be fine too. The problem is that the use of <dfn> even in  
the HTML5 draft is not clearly meant for the term. For example, what  
does it mean for <dfn> to wrap some content with the @title attribute  
set to a certain term: i.e., what do the contents of the <dfn>  
element mean. Its not clear from the draft. Perhaps I just misread,  
but I read:

"There must only be one dfn element per document for each term  
defined (i.e. there must not be any duplicate terms)."

to imply that <dfn> cannot be used to markup terms because that would  
mean we couldn't repeat the same term in the document. There wouldn't  
be much purpose in defining a term if it couldn't be used anymore.  
Now, I understand that the term is just supposed to be used over and  
over again without markup, but that places an undue burden on the  
implementations and is also inconsistent with abbr which is marked up  
repeatedly.

If you'd rather keep <dfn> meaning term and introduce <definition>  
for definition than that's fine with me. And you're right that may be  
a better way  to maintain namespace integrity. Good. I would just  
like to create an element ("foo") that contains a definition  
associated with either a term ("bar") and/or an abbreviation ("bat")   
or a variable ("bam"). I'd like those names to have some mnemonic  
value. I'd like those names to maintain namespace integrity. And I'e  
like it to work in a consistent way that authors can easily follow.

Now that I look at HTML4[1]., I see this would be a name collision:

"DFN: Indicates that this is the defining instance of the enclosed  
term."

That's a shame because I think <dfn> would be a fine name for the  
proposed definition element (<definition> works too). It also would  
still require the introduction of another element for terms since  
<fn> is only for the defining instance of a term. I intended <term>  
to be used repeatedly through the document and give the user easy  
interactive access to the definition from wherever the <term> appears  
(just like <abbr> does in the HTML5 draft).


Take care,
Rob

[1]: <http://www.w3.org/TR/html4/struct/text.html#edef-DFN>
Received on Friday, 20 July 2007 07:24:14 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:47 UTC