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

On Jul 20, 2007, at 3:02 AM, Thomas Broyer wrote:

>
> 2007/7/20, Robert Burns:
>>
>> The draft mostly treats <dfn> as the definition and not the
>> term (though there are places in the draft that seem to reverse  
>> that).
>
> No the draft is clear:
> "The dfn element represents the defining instance of a term. The
> paragraph, description list group, or section that contains the dfn
> element contains the definition for the term given by the contents of
> the dfn element."

That is clear for what it says. However, it's not as clear as it  
could be. Regardless, I've already acknowledged that we shouldn't use  
<fn> the way I proposed, that it requires another element. However,  
I'm suggesting that a <term> element should still be added to  
complement <var> and <abbr> and that a <definition> element (or some  
name) should be added to contain the definition in more rigid markup  
( rather than relying on a nearby or association with the term.i)

It should be written with more conformance-like language. There  
should also be a sentence that guides authors on how to handle a  
<dfn> element with a title attribute set. In other words should it  
(must it) be empty? What does the content mean when the term is in  
the @title?

There may be other issue. However, the current draft is not clear  
enough. Its only clear to someone who reads it side-by-side with  
HTML4 (which I didn't do; and that's probably a good thing).

>> 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).
>
> Doh, right!
> How about slightly changing the "defining term" algorithm [1] so that
> <dfn> with a single <abbr> child having a title attribute have *two*
> "defining terms": the <abbr> textContent and title attribute value.
>
> [1] http://www.whatwg.org/specs/web-apps/current-work/#defining

I don't know what you're trying to say here.  Is it that to handle  
the case of  associating an abbreviation with its expansion and its  
definition? If so, that would be fine. The problem is that often  
times the definition will accompany the initial abbreviation in an  
element's contents (or part of an elements contents). It would be  
better to provide authors the structure they need to unambiguously  
delineate the definition itself (and only the 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.
>
> It's meant for the "defining instance of a term". Uses of the term
> elsewhere in the document should use span, abbr, code, var, samp, or i
> elements. See the last paragraph of #the-dfn starting with "The dfn
> element enables automatic cross-references."
> (Note that the source of the spec doesn't contain links and the
> program used to assemble the source and produce the drafts uses this
> algorithm to create cross-reference links. Compare
> http://svn.whatwg.org/webapps/source with the draft)

Great, I understand that and, that's almost where I think it should  
be. I already praised what HTML5 added. The only thing more I'm  
suggesting is that we add a little more to HTML5 as its is currently  
drafted. To include:

•  explicit structure for the definition text itself
• a dedicated element for terms (not just <span>, but <term>).
• a @type attribute for <var> to associate variable with common  
classes of things variables point to (like object, class,  
proposition, function, real-number, etc.).

Let me repeat this, because it seems like it's getting lost. I really  
like wht HTML5 did to elaborate these elements. I'm just proposing  a  
few enhancement to that to found it out.

Though I knew that <dfn> was used for terms (not definitions) in  
HTML4, my reading of this draft missed that totally with what's  
there. That would suggest to me that there's something wrong with the  
current draft.  Even without adopting my proposed changes, the draft  
should:

• deal with the case of <dfn> with @title set.
• provide an example of a <dfn> that involves  a term (preferably  
with <term> but with <span> otherwise) and doesn't involve <abbr>.
• provide an example of a <dfn> that involves a <var> and doesn't  
involve <abbr>.

Take care,
Rob

Received on Friday, 20 July 2007 08:27:45 UTC