From Wikisource
Jump to navigation Jump to search

Draft of specification of a Microformat-like set of HTML classes in order to add semantics information to Wikisource pages. It's based on HTML id and class attributes, and is to be integrated in templates and used with Proofread Pages or any sort of header template. All attributes are optional and may used as values for either the "id" or "class" attributes.

Sets of attributes[edit]


Id or class Description Exemples of Wikicode
ws-wikipedia The name of the correspondant page on Wikipedia
<span id="ws-wikipedia">Fables of La Fontaine</span>
ws-wikiquote The name of the correspondant page on Wikiquote
<span id="ws-wikiquote">Fables of La Fontaine</span>
ws-commons The name of the correspondant page on Wikimedia Commons
<span id="ws-commons">Fables of La Fontaine</span>
ws-key The sort key of the page
<span id="ws-key">Fables</span>
ws-metadata Name of the page that holds the metadata for the book. Used to point to, rather than replicate, metadata that already exists elsewhere.
<span id="ws-metadata">The Original Fables of La Fontaine</span>
ws-noinclude This tag prevents the entire page being included in the exported book. Pages within ws-summary and other metadata will still be read as usual. This tag is useful for a page that describes a book as a collection of pages with metadata, but does not itself belong in the final result.
<span id="ws-noinclude"></span>
ws-noexport class in order to say to the exportations tools that the html node with this class mustn't be exported. Usefull for navigation templates.
<div class="ws-noexport">MY NAV TEMPLATE</div>

Book and chapter[edit]

Id or class Description Exemples of Wikicode
ws-type The type of publication. Values : "book", "collection", "journal", "phdthesis", "dictionary".
<span id="ws-type" style="display:none;">book</span>
ws-title The title of the book
<span id="ws-title">The Original Fables of La Fontaine rendered into English prose</span>
ws-author The author(s)
<span id="ws-author">[[Author:Jean de La Fontaine|Jean de La Fontaine]]</span>
ws-translator The translator(s)
<span id="ws-translator">[[Author:Frederick Colin Tilney|Frederick Colin Tilney]]</span>
ws-illustrator The illustrator(s)
<span id="ws-illustrator">[[Author:Frederick Colin Tilney|Frederick Colin Tilney]]</span>
ws-school The School
<span id="ws-school">MIT</span>
ws-publisher The publisher
<span id="ws-publisher">J. M. Dent; E. P. Dutton</span>
ws-year The year of publication
<span id="ws-year">1913</span>
ws-place The place(s) of publication
<span id="ws-place">London; New York</span>
ws-progress The progress state of the book. Same values as Prooferead Pages ie "T", "V", "C", "MS", "OCR", "X", "L".
<span id="ws-progress">T</span>
ws-volume The current volume of the book
<span id="ws-volume">Book 1</span>
ws-chapter The current chapter
<span id="ws-chapter">The Unhappily Married Man</span>
ws-pages The pages od the source book showed by the wiki page
pages <span id="ws-pages">18-36</span>
ws-summary The table of contents of the book : will be used to create navigation between the different chapters like the Prooferead pages extension does.
<span id="ws-summary">* [[The Original Fables of La Fontaine/The Two Mules|The Two Mules]]   [[Page:La Fontaine - The Original Fables Of, 1913.djvu/19|19]]</span>
ws-scan The name of the scan of the book without any namespace.
<span id="ws-scan">Champollion - Lettres écrites d’Égypte et de Nubie en 1828 et 1829.djvu</span>
ws-cover Name of the picture that is the cover of the book. For page of multi-pages file do like in the exemple
<span id="ws-cover">Champollion - Lettres écrites d’Égypte et de Nubie en 1828 et 1829.djvu/3</span>
ws-pagenum class in order to say to the exportation tools that the title of the html node with this class is the name of a page trancluded. Done in order to be only added to MediaWiki:Proofreadpage pagenum template
<span class="pagenum ws-pagenum" id="{{{num}}}" title="{{{page}}}"></span>


Id or class Description Exemples of Wikicode
ws-name The name of the author
<span id="ws-name">Jean de La Fontaine</span>
ws-description Short text on the author
<span id="ws-description">French fabulist.</span>
ws-birthdate Birth date of the author
<span id="ws-birthdate">1621</span>
ws-deathdate Death date of the author
<span id="ws-deathdate">1695</span>
ws-image Name of an image of the author
<span id="ws-image">Jean de La Fontaine.jpg</span>

Exemples of implementation[edit]

Wikisource fr[edit]

These microformats is implemented in templates like fr:Modèle:Proofreadpage header template and fr:Modèle:Titre. A JavaScript API is also created and used by tools like citeBox.js Tpt 21:39, 16 December 2011 (UTC)Reply[reply]