This site is supported by donations to The OEIS Foundation.

MediaWiki

From OeisWiki
Jump to: navigation, search


This article page is a stub, please help by expanding it.


OEIS Wiki uses the MediaWiki server.

Site name
{{SITENAME}} = OeisWiki
MediaWiki version
{{CURRENTVERSION}} = 1.30.0[1]

Future

Output as HTML5 doctype

Note: The current version of MediaWiki used by OEIS Wiki does not support output as HTML5 doctype.

The use of HTML5 by MediaWiki is controlled by $wgHtml5 (introduced in version: 1.16.0 (r53034)). This is set to true (output normal wiki pages as HTML5) by default.

Output as XHTML 1.0 Strict doctype

If $wgWellFormedXml is true, the markup will be constructed so it can still be processed as XML. (See XHTML5 and Polyglot Markup: HTML-Compatible XHTML Documents.)

In version 1.16.0, this implies the doctype is changed to XHTML 1.0 Strict to make named character references work in XML.

Named character references

Note: From version 1.17, named character references are avoided.[2]

Polyglot markup uses only the following five predefined named entity references of XML 1.0:

  • &
  • <
  • >
  • '
  • "

The HTML that MediaWiki outputs is in general valid XML. Rather than be dependent on external DTDs to define HTML named entities such as &mdash; and &nbsp; (which would complicate using the simple HTML5 <!DOCTYPE html>), MediaWiki PHP code does not use named entities apart from four of the five predefined named entity references in basic XML:

  • &lt; <
  • &gt; >
  • &amp; &
  • &quot; "

When necessary to encode apostrophe ' , MediaWiki code follows the advice at List of XML and HTML character entity references#Entities representing special characters in XHTML and uses the numeric reference &#39; (or &#x0027; in hexadecimal), because the named entity &apos; was never defined in legacy HTML.

Instead of using named entities in MediaWiki code, you should:

  • simply use the UTF-8 (or UTF-16, but NOT UTF-32) character directly (by copying and pasting the glyph, or using the editor's "Special characters" menu);
  • or use a numeric character reference;
    • particularly for the non-breaking space you can use &#160; (or &#x00A0; in hexadecimal), although using runs of non-breaking spaces for layout is usually a mistake.

See the "Named entity references and XML well-formedness" discussion on wikitech-l.

Semantic MediaWiki

Main article page: Semantic MediaWiki

In order to allow the use of microdata attributes in Wikitext, set $wgAllowMicrodataAttributes to true.

See also


Notes

  1. MediaWiki 1.21.1 is the latest (as of 2013-05-29) release version.
  2. HTML5#Avoid HTML named entitiesMediaWiki.org.

External links