[uf-new] Microformat for implementing RFC2119

Dr Orlovsky MA dr.orlovsky at googlemail.com
Thu Aug 9 10:04:10 PDT 2007


Dear microformats community,
  
I am writing to propose a new microformat, as outlined below:

I. Background and the problem
------------------------------
I've been looking into the possibility to semantically markup 
RFC2119 [1] keywords (like MUST, SHOULD BE etc) in the HTML version of
some technical specifications. The problem is that none of the existing
HTML 4.10 and proposed HTML5 tags are suitable enough for this task.

[1] please see http://tools.ietf.org/rfc/rfc2119.txt for details


II. Proposed solution
---------------------
1. The most simple solution of the problem is to make a new atomic
class-type microformat. The name of the class microformat, according to
the microformat.org guidelines should be simple and easy to understand.
I propose the following variants:

class="rfc2119"
class="imperative"

The former has a number of benefits, especially it represents existing
words from a human language as related to the lexical mood of the
RFC2119 directive.

This class can be used as an attribute of the HTML4/5 inline tags, like
span, b, i, em, strong etc. In my opinion, the most direct and simple
solution will be to use the 'b' tag, which was re-implemented in HTML5
to "represent a span of text to be stylistically offset from the normal
prose without conveying any extra importance, such as key words in a
document abstract, product names in a review, or other spans of text
whose typical typographic presentation is boldened"
(http://www.whatwg.org/specs/web-apps/current-work/#the-b). 
RFC2119 keywords are usually written in uppercase letters (a sort of
'typographical boldening'), which can be easily implemented using CCS
(see the example at the end of this mail). On the other hand, generally
used 'span' tag is much more unspecific and has 3 excessive letters over
the 'b' :-).

2. Another option is to use the 'lang' attribute of the inline tag:
<b lang="rfc2119">should be</b>. The most significant drawback of this
approach is that the value of the 'lang' attribute must be a valid
RFC3066 code, and in XHTML documents it belongs to a different namespace
than the tag itself.

3. The last possibility to implement this microformat is to use the
'title' attribute in the inline tag. This will give an additional visual
representation (tooltip in graphical browsers), however it would also
make it impossible to assign CSS styles in non-completely-CSS2 compliant
browsers like IE6, which is the most abundant browser at the present
times.


III. Rationale and benefits
---------------------------
The new microformat for RFC2119 keywords would give a number of
benefits, specifically:

1. It will bring new functionality to site-searching engines
(especially local site-searching); for instance, implementing this 
format in RFC/W3C specification will allow more precise targeting 
during the searches: a request like "HTML5 canvas NEAR class:rfc2119"
will return links to the documents containing specific formal
RFC-defined declaraions of the 'canvas' HTML5 tag (the specified search
string is just an example, and does not propose any new RFC2119-related
microformat search syntax).

2. Moreover, local web-page searching facilities of existing web
browsers can be also augmented with the invention of the proposed
microformat. For instance, one can create a Firefox extension making
navigation through formal declarations in large technical specifications
much easier.

3. It will promote development of new complex microformats which
will allow semantic markup of the full sentences containing formal
RFC2119 definitions, like
<dfn class="rfc2119">
       <span class="subject">XHTML 1.0 documents</span>
       <b class="imperative">MUST</b>
       <span class="action">
               use the <code>id</codeattribute 
       </span>
       <span class="condition">
               when defining fragment identifiers
       </span>
</dfn>
Tags and class names in the example above are custom and used only to
demonstrate one of the possible usages of the proposed microformat in
future.

4. The last (but not the least) important thing is that the new
microformat will allow styling and restyling of all RFC2119 keywords
with CSS2 directives like

b.imperative, b[title='imperative'], b[lang='rfc2119'] { 
       text-transform: uppercase; 
       color: red; 
       font-weight: normal;
}

An extra advantage can be given with the "white-space: nowrap"
directive, which would prevent wrapping of the two-word RFC2119 keywords
like 'should be'.


Sincerely yours
Dr. Maxim A. Orlovsky,
Arhont Ltd
www.arhont.com




More information about the microformats-new mailing list