subtext3 html快捷,Subtext

本文讨论了HTML5中对于子文本和引用处理的不足,提出了新的元素和属性建议,如'subtext'、'blocksubtext'元素以及'subtext'属性,旨在提供一种独立于媒体的子文本呈现方式,支持交互设备和印刷媒体。此外,还提议了在'a'元素上增加'type'属性以引用文档内的其他元素,如图、表等。该提案旨在提升内容的语义性和样式分离,同时考虑了向后兼容性问题。
摘要由CSDN通过智能技术生成

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 approvedOnce provider approval has been received a form 221C should accompany the patient’s chart.. 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

EMail

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值