Wikipedia:Canonicalization

From Free net encyclopedia

Note: Canonicalization is not the same as Canonization

Wiki canonicalization is the algorithm by which the text of links (in [single] or [[double]] pair of square brackets) is converted to a URI.

  • Precede URIs with "http:", "ftp:", "gopher:", "mailto:", or "news:", with no pair of brackets, to create links automatically (this is not canonicalization). This includes links to .gif, .jpg, .jpeg or .png URIs; it does not display the image inline.
  • A single pair of square brackets is for an in-line link to another site. For example, [http://www.wiktionary.org/] produces this: [1], while [http://www.wiktionary.org/ Wiktionary] produces this: Wiktionary.
  • A double pair of square brackets creates an intra-wiki link, which is a link to a Wikipedia article. The special syntax [[wiktionary:verb]] allows you to link to an article on another Wiki (in this case, Wiktionary's entry for verb); see InterWiki. Use Interlanguage links to create the links at the top and bottom of articles that link to the same article in another language.
    1. Whitespace is converted to underscores (for example, the page "Star Trek" is actually located at "Star_Trek"). Multiple consecutive underscores and spaces are contracted to just one underscore.
    2. Leading or trailing whitespace/underscores are removed.
    3. Character references are replaced with their raw character (for example if you write "département" it will link to département).
    4. For Interwiki or Interlanguage Links, processing stops here. For other links:
      1. Illegal characters are stripped (such as ^)
      2. The first character is capitalised.
      3. If there is a namespace prefix (Talk:, Wikipedia:, User:, etc.), the first character of the article name (what comes after the colon) is also capitalised.

Example: [[ death in   Vegas  ]] creates a link to the page Death_in_Vegas , and appears as death in Vegas .

See also