sitelist.txt 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. This document describes the XML format used to represent information about external sites known
  2. to a MediaWiki installation. This information about external sites is used to allow "inter-wiki"
  3. links, cross-language navigation, as well as close integration via direct access to the other
  4. site's web API or even directly to their database.
  5. Lists of external sites can be imported and exported using the importSites.php and exportSites.php
  6. scripts. In the database, external sites are described by the sites and site_ids tables.
  7. The formal specification of the format used by importSites.php and exportSites.php can be found in
  8. the sitelist-1.0.xsd file. Below is an example and a brief description of what the individual XML
  9. elements and attributes mean:
  10. <sites version="1.0">
  11. <site>
  12. <globalid>acme.com</globalid>
  13. <localid type="interwiki">acme</localid>
  14. <group>Vendor</group>
  15. <path type="link">http://acme.com/</path>
  16. <source>meta.wikimedia.org</source>
  17. </site>
  18. <site type="mediawiki">
  19. <globalid>de.wikidik.example</globalid>
  20. <localid type="equivalent">de</localid>
  21. <group>Dictionary</group>
  22. <forward/>
  23. <path type="page_path">http://acme.com/</path>
  24. </site>
  25. </sites>
  26. The XML elements are used as follows:
  27. * sites: The root element, containing a set of site tags. May have a version attribute with the value 1.0.
  28. * site: A site entry, representing an external website. May have a type attribute with one of the following values:
  29. ** ''unknown'': (default) any website
  30. ** ''mediawiki'': A MediaWiki site
  31. * globalid: A unique identifier for the site. For a given site, the same unique global ID must be used across all wikis in a wiki farm (aka wiki family).
  32. * localid: An identifier for the site, for use on the local wiki. Multiple local IDs may be assigned to a given site. The same local ID can be used to refer to different sites by different wikis on the same farm/family. The localid element may have a type attribute with one of the following values:
  33. ** interwiki: Used as an "interwiki" link prefix, for creating cross-wiki links.
  34. ** equivalent: Used as a "language" link prefix, for cross-linking equivalent content in different languages.
  35. * group: The site group (e.g. wiki family) the site belongs to.
  36. * path: A URL template for accessing resources on the site. Several paths may be defined for a given site, for accessing different kinds of resources, identified by the type attribute, using one of the following values:
  37. ** link: Generic URL template, often the document root.
  38. ** page_path: (for mediawiki sites) URL template for wiki pages (corresponds to the target wiki's $wgArticlePath setting)
  39. ** file_path: (for mediawiki sites) URL pattern for application entry points and resources (corresponds to the target wiki's $wgScriptPath setting).
  40. * forward: Whether using a prefix defined by a localid tag in the URL will cause the request to be redirected to the corresponding page on the target wiki (currently unused). E.g. whether http://wiki.acme.com/wiki/foo:Buzz should be forwarded to http://wiki.foo.com/read/Buzz. (CAVEAT: not yet implement, can be specified but has no effect)