From HTML WG Wiki
Jump to: navigation, search

Cross-referencing and subtext

Corresponds to issue number 42

Problem statement / use cases

  • Authors want to provide subordinate text that should either be parenthesized, or displayed apart from the main text.
  • Users need a mechanism to view subordinate text that is media independent so that subordinate text may displayed: 1) interactively for interactive media devices; or 2) as traditional endnotes or footnotes for print media.
  • Sites such as Wikipedia have developed clumsy server-side approaches to handling subordinate text. These solutions show a significant need for marking-up such content, though a client-side approach that separated semantics from style would be clearly superior
  • CSS3 is developing new methods of presenting semantics such a cross references and footnotes, but HTML has no dedicated means of expressing these semantics.
  • An author wants to make an explicit association between embedded content and the surrounding prose relevant to the embedded content.

[the current HTML5 draft addresses much of the needs of this issue. The only missing piece is that the HTML5 draft currently overloads the @href attribute with this subtext semantic. Instead the link/reference to subtext should be provided through its own IRI valued attribute to meet the needs of authors]

Proposed solutions

A ‘subtext’ element

An element simply to contain subtext in a main text body. For example:

... To provide everything the patient needs, staff should ensure all procedures have been provider approved<subtext>Once provider approval has been received a form 221C should accompany the patient’s chart.</subtext>. Staff should welcome ...

A ‘blocksubtext’ element

Some subordinate text might contain a block content model and therefore be unsuitable for inline parenthetical presentation for example. It may be necessary to differentiate block subordinate text from other subordinate text with a blocksubtext element.

A subtext attribute

Especially for legacy compatibility, a new subtext attribute should be introduced accepting a list of space separated URIs. Each URI should point to an element whose contents constitutes the subordinate text or note for the element containing the subtext attribute. This therefore creates a relationship between the two elements or document fragments. The first element containing the subtext attribute is the main text. The other element (or elements) referenced in the subtext attribute are the subordinate text or notes for the main text. Authors will likely want to use a SUBTEXT or BLOCKSUBTEXT element for the referenced element container, or a DIV element for legacy compatibility.

The HTML5 draft should provide an example for authors to follow using the subtext attribute along with an href attribute — both pointing to the same DIV element — to create a legacy UA compatible endnotes for a document. We expect CSS3 to provide capacities to allow authors to style subtext for the same legacy compatible document for presentation as either footnotes, endnotes or in some other way.

An anchor element for separate references

Include a @type attribute on the A anchor element to allow authors to reference figures, tables, pages and the like from within a document.

Advanced subordinate text needs

Several advanced needs that might be addressed through subtext include:

  • a rank or other means to differentiate different types of subtext (e.g., parenthetical versus footnotes)
  • support for multiple references to the same subtext note (many-to-one; perhaps subtext elements in the document head)
  • support for multiple subtext notes from the same references (one-to-many)
  • support for scoping subtext (for just a table or just a section; perhaps a scope=IDREF attribute)
  • support for explicit association of a primary text passage with subordinate text

Differences in serialization and legacy UAs

As in the introduction of any new element, legacy issues exist.

  • The XML serialization can readily add a single SUBTEXT element with a transparent content model and be parsed into the DOM in an appropriate manner.
  • For HTML5 text/html UAs, the facilitation of subordinate text requires two elements: a block and non-block variant
  • Finally for the most backwards compatibility, authors would need to use only an attribute to reference subordinate text contained in SPAN or DIV elements.

Discussion and evaluation


WG members should post feedback and other discussion to the WG’s list serve (the URI for the links below provides date information). Search on this email subject.

See also