Specs/HTML/2.1.0/Extensions/Cite

Changes since Specs/HTML/1.6.0/Extensions/Cite

 * T198221: Support directionality for reference

Preliminaries
An example with transcluded reference content,

renders as follows. (Note the references section was autogenerated)

Ref and References
First one Second one Named one Reused Reused again

property rather than copying the HTML dom in the  property. But, both formats are considered valid and Parsoid accepts both formats when serializing HTML to wikitext.

If  is specified, it is the client's responsibility to make sure that the element id is present in the DOM. If both  and   are specified, Parsoid uses the html property and ignores the id property.

Auto-generated references blocks
If the source wikitext had &lt;ref> tags but no corresponding &lt;references> tag to generate references, Parsoid auto-generates references blocks for every set of refs that need it. As of HTML version 1.2.1, for all such auto-generated reference block, the data-mw will have the autoGenerated property set to true.

Responsive wrappers
In T159894, support was added for the cite extension's  parameter, which presents the references section as multiple columns based on the browser window size. This is achieved by wrapping the ordered list with a div. Of note, since this is part of the extension content, the transclusion annotations are placed on the wrapper.

Directionality
A  class is added to the reference list item based on the   attribute specified on the reference definition. For example, First one

Error representation
Parsoid's Cite implementation does not inline the i18n error text in the HTML. It instead annotates the erroneous  with a   value in the typeof attribute and the i18n error key in the   property  as shown in the following excerpt: typeof="mw:Extension/ref mw:Error" data-mw='{"name":"ref","attrs":{"name":"example"},"errors":[{"key":"cite_error_ref_no_text"}]}' Clients like VisualEditors will need to recognize these new attributes and display the actual error message in the correct language with parameters such as the name expanded in the error message text.

As part of T51538 the full suite of error conditions provided by Core Cite extension are being added to Parsoid Cite extension. Parsoid's Cite implementation will use the same mechanism for annotating the other error types.

CSS based configuration
The display of footnotes, etc. are configured via CSS. This differs from the design of the legacy extension. See the announcement and task. FIXME: Say more ...