Jump to content

Template:US-president-row/doc

From Wikipedia, the free encyclopedia

Purpose

[edit]

For use on List of presidents of the United States.

Erik Möller, Deputy Director of the Wikimedia Foundation, spoke recently, in an article called Wikipedia to Add Meaning to Its Pages, about "making some of the data on Wikipedia's 15 million (and counting) articles understandable to computers as well as humans". The article referred, in particular, to "allow[ing] software to know, for example, that the numbers shown in one of the columns in this table listing U.S. presidents are dates". This template makes each row "understandable to computers", by emitting an hCalendar, or event, microformat for the presidency, with an hCard, or person, microformat for the president.

Usage

[edit]

Invariable-per-presidency Properties

  • presd-link = Name of page about presidency, without square brackets
  • presd-yob = Year of birth of president
  • presd-yod = Year of death of president
  • presd-num = Sequential number of presidency

Variable-per-presidency Properties

  • pres-img = File name of portrait of president, without square brackets
  • pres-link = Name of page about president, without square brackets
  • pres-refs = References for president, in full wiki format
  • pres-start = Start date of presidency, using {{Start date}} in the format {{Start date|YYYY|MM|DD}}
  • pres-end = End date of presidency, plain text
  • pres-party = President's party
  • eterm = Sequential number of term of executive office (president, vice-president, cabinet or other civil offices having terms congruent therewith)
  • vice = Name of page about vice-president, without square brackets

Metadata Properties

  • how-many-parts = Number of virtual subrows in the row of presidency, or, in other words, almost-common rowspan value of the cells in the row of presidency
  • how-many-parts-in-property = Number of virtual subrows in the virtual subrow of property (the kind variable per presidency and solely occupying a cell), which, unless transcending rows of presidency, will be less than how-many-parts

Example

[edit]
{| class="wikitable" style="text-align: center;"
|-
! No.
! colspan=2 | [[President of the United States|President]]
! Took office
! Left office
! Party
! Term
! colspan=2 | [[Vice President of the United States|Vice President]]
{{US-president-row
|presd-link = Presidency of George Washington
|presd-num = 1
|pres-img = Image:Washington (3).jpg
|pres-link = George Washington
|presd-yob = 1732
|presd-yod = 1799
|pres-color = #EEEEEE
|pres-party = no party
|pres-refs = <ref>{{Cite web |url=https://obamawhitehouse.archives.gov/1600/presidents/georgewashington|title=Biography of George Washington |accessdate=January 12, 2009 |date=March 12, 2007 |publisher=Whitehouse.gov|author=The [[White House]] }}</ref><ref>{{Cite web |url=http://www.americanheritage.com/people/presidents/washington_george.shtml |title=The First President: 1789–1797 George Washington "Father of his Country" |accessdate=January 12, 2009 |work=[[American Heritage (magazine)|American Heritage]] |publisher=[[Forbes]] }}</ref><ref>{{Cite web |url=http://www.history.com/presidents/washington |title=George Washington – no Political Party – 1st President – American Presidents |accessdate=January 12, 2009 |publisher=[[History (U.S. TV channel)|History]] }}</ref><ref>{{Cite web |url=http://americanpresidents.org/presidents/gwashington.asp |title=George Washington (February 22, 1732 – December 14, 1799) |accessdate=January 12, 2009 |work=American Presidents: Life Portrait |publisher=[[C-SPAN]] }}</ref>
|pres-start = {{Start date|1789|04|30}}
|pres-end = March 4, 1797
|eterm = 1
|vice-color = #EEEEEE
|vice-party = no party
|vice = [[John Adams]]
|how-many-parts = 2
|how-many-parts-in-pres-party = 2
|how-many-parts-in-eterm = 1
|how-many-parts-in-vice-color = 1
|how-many-parts-in-vice-party = 1
|how-many-parts-in-vice = 2
}}
{{US-president-row
|eterm = 2
|vice-color = {{party color|Federalist Party (United States)}}
|vice-party = Federalist
}}
|}

Render

[edit]
No. President Took office Left office Party Term Vice President
1 George Washington
(1732-1799)
[1][2][3][4]
April 30, 1789 (1789-04-30) March 4, 1797 no party 1   John Adams


2  


References

  1. ^ The White House (March 12, 2007). "Biography of George Washington". Whitehouse.gov. Retrieved January 12, 2009.
  2. ^ "The First President: 1789–1797 George Washington "Father of his Country"". American Heritage. Forbes. Retrieved January 12, 2009.
  3. ^ "George Washington – no Political Party – 1st President – American Presidents". History. Retrieved January 12, 2009.
  4. ^ "George Washington (February 22, 1732 – December 14, 1799)". American Presidents: Life Portrait. C-SPAN. Retrieved January 12, 2009.

Microformats

[edit]

The HTML mark-up produced by this template includes an hCalendar microformat that makes event details readily parsable by computer programs. This aids tasks such as the cataloguing of articles and maintenance of databases. For more information about the use of microformats on Wikipedia, please visit the Microformat WikiProject.

Classes used

The HTML classes of this microformat include:

  • attendee
  • contact
  • description
  • dtend
  • dtstart
  • location
  • organiser
  • summary
  • url
  • vevent
Please do not rename or remove these classes
nor collapse nested elements which use them.

The HTML markup produced by this template includes an hCard microformat, which makes the person's details parsable by computers, either acting automatically to catalogue articles across Wikipedia or via a browser tool operated by a reader, to (for example) add the subject to an address book or database. For more information about the use of microformats on Wikipedia, please see the microformat project.

Sub-templates

[edit]

Date-of-birth ("bday") information will only be included in the microformat if {{birth date}}, or {{birth date and age}} are used in the infobox. (Do not use these if the date is before 1583). Be cautious about using these if the person is still living, per WP:DOB.

To include a URL, use {{URL}}.

Please do not remove instances of these sub-templates.

Classes

[edit]

hCard uses HTML classes including:

  • adr
  • agent
  • bday
  • birthplace
  • category
  • country-name
  • deathdate
  • deathplace
  • extended-address
  • family-name
  • fn (required)
  • given-name
  • honorific-prefix
  • honorific-suffix
  • label
  • locality
  • n
  • nickname
  • note
  • org
  • role
  • url
  • vcard

Please do not rename or remove these classes nor collapse nested elements which use them.


References

[edit]