(bug 24781) Define XML namespace for API output. Also created the referenced URL...
authorRoan Kattouw <catrope@users.mediawiki.org>
Fri, 13 May 2011 16:34:36 +0000 (16:34 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Fri, 13 May 2011 16:34:36 +0000 (16:34 +0000)
includes/api/ApiFormatXml.php

index 53a04dd..3f39eb9 100644 (file)
@@ -36,6 +36,7 @@ if ( !defined( 'MEDIAWIKI' ) ) {
 class ApiFormatXml extends ApiFormatBase {
 
        private $mRootElemName = 'api';
+       public static $namespace = 'http://www.mediawiki.org/xml/api/';
        private $mDoubleQuote = false;
        private $mXslt = null;
 
@@ -66,7 +67,7 @@ class ApiFormatXml extends ApiFormatBase {
                }
                $this->printText(
                        self::recXmlPrint( $this->mRootElemName,
-                               $this->getResultData(),
+                               array( 'xmlns' => self::$namespace ) + $this->getResultData(),
                                $this->getIsHtml() ? - 2 : null,
                                $this->mDoubleQuote
                        )