Wikipedia:WikiProject Microformats/citation

From Wikipedia, the free encyclopedia
This specification is a working draft and may change drastically, depending on input from either the Wikipedia or wider web communities.
See h-cite at microformats.org for further external development

A draft (or pseudo-) microformat; i.e. a set of defined HTML class names, for use in citations to allow our reader's browser tools and scripts to parse the values of the classed elements, allowing them to aggregate and reuse citations.

Use case[edit]

The benefit is to our readers, who can more easily import our citations into their aggregation tools (like Zotero for example) for use in their own documents (such as student essays) and tools (such as library catalogues); and to our editors who can "paste" a citation from such aggregators into a second article.

Addressing concerns[edit]

All this will do is add HTML classes to the existing markup - these are never seen, so the visual appearance of the citation templates would not change at all; and any change in the rendering time would be immeasurably small if not nil.

Support[edit]

Representatives of Zotero have said that if we publish and apply such a schema, then Zotero will parse it.

Classes[edit]

Per http://microformats.org/wiki/citation-brainstorming#web_citations

  • h-cite - root
    • dt-published - date published
    • p-author - author
    • p-name - common property instead of entry-title
    • u-url - a URL to access the cited work
    • u-uid - a URL/URI that uniquely/canonically identifies the cited work, canonical permalink. Needed?
    • p-publication -
    • dt-accessed - date the cited work was accessed
    • p-content for when the citation includes a quote


Additional[edit]

From elsewhere on http://microformats.org/wiki/citation-brainstorming

  • p-editor - editor
  • p-publisher - publishing house

Example[edit]

(Print-only parameters omitted and line breaks added, for clarity)

<span class="citation web">
Magrath, Andrea (9 December 2010). 
<a rel="nofollow" class="external text vt-p" href="http://wexample.com">"Better get to the wig store!"</a>. 
<i>Daily Mail</i>. UK
<span class="reference-accessdate">. Retrieved 12 February 2011</span>.
</span>

becomes:

<span class="citation web h-cite">
<span class="p-author">Magrath, Andrea</span> (<time class="dt-published">9 December 2010</time>). 
<a rel="nofollow" class="external text vt-p u-url" href="http://wexample.com">"Better get to the wig store!"</a>. 
<cite class="p-publication">Daily Mail</cite>. UK
<span class="reference-accessdate">. Retrieved <time class="dt-accessed">12 February 2011</time></span>.
</span>

Example 2[edit]

For:

* {{ cite book 
| isbn=978-1-4020-4520-2 
| last1=Luhmann | first1= J. G.
| last2=Russell | first2=C. T. 
| editor1-first=J. H. | editor1-last=Shirley
| editor2-first=R. W. | editor2-last=Fainbridge 
| publisher=Chapman and Hall 
| location=New York | year=1997 
| url=http://www-spc.igpp.ucla.edu/personnel/russell/papers/venus_mag/ 
| work=Encyclopedia of Planetary Sciences 
| title=Venus: Magnetic Field and Magnetosphere 
| accessdate=2009-06-28 }}

Which renders as:

  • Luhmann, J. G.; Russell, C. T. (1997). Shirley, J. H.; Fainbridge, R. W. (eds.). Venus: Magnetic Field and Magnetosphere. New York: Chapman and Hall. ISBN 978-1-4020-4520-2. Retrieved 2009-06-28. {{cite book}}: |work= ignored (help)

The HTML is (whitespace added; irrelevant attributes omitted, for clarity):

<span class="citation book">
Luhmann, J. G.; Russell, C. T. (1997). 
<a class="external text vt-p" href="http:.../">"Venus: Magnetic Field and Magnetosphere"</a>. 
In Shirley, J. H.; Fainbridge, R. W. 
<i>Encyclopedia of Planetary Sciences</i> 
(New York: Chapman and Hall). 
<a href="..." title="..." class="vt-p">ISBN</a>&nbsp;
<a href="..." title="..." class="vt-p">978-1-4020-4520-2</a>
<span class="reference-accessdate">. Retrieved 2009-06-28</span>.</span>

and could become:

<span class="citation book h-cite">
<span class="p-author">Luhmann, J. G.</span>; <span class="p-author">Russell, C. T.</span> (<time class="dt-published">1997</time>). 
<a class="external text vt-p u-url p-name" href="http:.../">"Venus: Magnetic Field and Magnetosphere"</a>. 
In <span class="p-editor">Shirley, J. H.</span>; <span class="p-editor">Fainbridge, R. W.</span> 
<cite class="p-publication">Encyclopedia of Planetary Sciences</cite> 
(New York: <span class="p-publisher">Chapman and Hall</span>). 
<a href="..." title="..." class="vt-p">ISBN</a>&nbsp;
<a href="..." title="..." class="vt-p u-uid">978-1-4020-4520-2</a>
<span class="reference-accessdate">. Retrieved <time class="dt-accessed">2009-06-28</time></span>.</span>

by adding classes "h-cite", "u-url", "u-uid", "p-author" (twice), "p-editor" (twice), "dt-published", "p-publication", "p-name", "p-publisher" and "dt-accessed".

Mapping[edit]

Provisional mapping against properties in Module:Citation/CS1/Configuration:

  • AccessDate = dt-accessed
  • Agency =
  • AirDate = dt-published
  • ArchiveDate =
  • ArchiveFormat =
  • ArchiveURL = u-url
  • ASINTLD =
  • At =
  • Authors = p-author *
  • BookTitle =
  • Callsign =
  • Cartography =
  • Chapter =
  • ChapterFormat =
  • ChapterURL =
  • City =
  • Class =
  • Coauthors = p-author *
  • Collaboration =
  • Conference =
  • ConferenceFormat =
  • ConferenceURL =
  • Contribution =
  • Date = dt-published
  • DeadURL =
  • Degree =
  • DF =
  • DisplayAuthors = p-author *
  • DisplayEditors = p-editor *
  • Docket =
  • DoiBroken =
  • Edition =
  • Editors = p-editor *
  • Embargo =
  • Encyclopedia =
  • Episode =
  • Format =
  • ID =
  • IgnoreISBN =
  • Inset =
  • Issue =
  • Language =
  • LastAuthorAmp =
  • LayDate =
  • LayFormat =
  • LaySource =
  • LayURL =
  • MailingList =
  • Map =
  • MapFormat =
  • MapURL =
  • MessageID =
  • Minutes =
  • Mode =
  • NameListFormat =
  • Network =
  • NoPP =
  • NoTracking =
  • Number =
  • OrigYear =
  • Others =
  • Page =
  • Pages =
  • Periodical =
  • Place =
  • Program =
  • PostScript =
  • PublicationDate = dt-published
  • PublicationPlace =
  • PublisherName =
  • Quote = p-content
  • Ref =
  • RegistrationRequired =
  • Scale =
  • ScriptChapter =
  • ScriptTitle =
  • Section =
  • Season =
  • Sections =
  • Series =
  • SeriesSeparator =
  • SeriesLink =
  • SeriesNumber =
  • Sheet =
  • Sheets =
  • Station =
  • SubscriptionRequired =
  • Time =
  • TimeCaption =
  • Title = p-name
  • TitleLink =
  • TitleNote =
  • TitleType =
  • TransChapter =
  • TransMap =
  • Transcript =
  • TranscriptFormat =
  • TranscriptURL =
  • TransTitle = p-name
  • URL = u-url
  • Vauthors =
  • Veditors =
  • Via =
  • Volume =
  • Year = dt-published
  • AuthorList-First =
  • AuthorList-Last =
  • AuthorList-Link =
  • AuthorList-Mask =
  • ContributorList-First =
  • ContributorList-Last =
  • ContributorList-Link =
  • ContributorList-Mask =
  • EditorList-First =
  • EditorList-Last =
  • EditorList-Link =
  • EditorList-Mask =
  • TranslatorList-First =
  • TranslatorList-Last =
  • TranslatorList-Link =
  • TranslatorList-Mask =

To do[edit]