Wikimedia

Add namespace aliases to MediaWiki's export dumps

MediaWiki allows additional aliases to be defined for each namespace (for example, "Image" is a built-in alias for the "File" namespace, and users can define their own). This data is not exported in XML dumps.

Your task is to add a <namespacealiases> element to MediaWiki's XML export dumps, which will contain the namespace aliases set up on that wiki. You will also need to add this element to the XML dump schema in XSD format.

Note: I have a couple of other things I'd like to add to the export schema, but they won't all fit in the one GCI task. Because schema updates should be kept to a minimum, I will try to push them all out together, so your patch will not be able to be merged straight away. This is not a problem; I will mark this task as accepted once I am satisfied that your code works and that your schema is correct, even though your patch is not merged.

Have a look at ApiQuerySiteinfo::appendNamespaceAliases for some code that does a similar thing.

More details: https://phabricator.wikimedia.org/T64109

Task tags

  • xml
  • mediawiki
  • php
  • xsd
  • schema

Students who completed this task

Georggi

Task type

  • code Code
  • chrome_reader_mode Documentation / Training
close

2015