$subElemIndName = null;
}
+ if ( isset( $elemValue['_subelements'] ) ) {
+ foreach ( $elemValue['_subelements'] as $subElemId ) {
+ if ( isset( $elemValue[$subElemId] ) && !is_array( $elemValue[$subElemId] ) ) {
+ $elemValue[$subElemId] = array( '*' => $elemValue[$subElemId] );
+ }
+ }
+ unset( $elemValue['_subelements'] );
+ }
+
$indElements = array();
$subElements = array();
foreach ( $elemValue as $subElemId => & $subElemValue ) {
public function getAllowedParams() {
return array(
- 'xslt' => null,
- 'includexmlnamespace' => false,
- );
- }
-
- public function getParamDescription() {
- return array(
- 'xslt' => 'If specified, adds <xslt> as stylesheet. This should be a wiki page '
- . 'in the MediaWiki namespace whose page name ends with ".xsl"',
- 'includexmlnamespace' => 'If specified, adds an XML namespace'
+ 'xslt' => array(
+ ApiBase::PARAM_HELP_MSG => 'apihelp-xml-param-xslt',
+ ),
+ 'includexmlnamespace' => array(
+ ApiBase::PARAM_DFLT => false,
+ ApiBase::PARAM_HELP_MSG => 'apihelp-xml-param-includexmlnamespace',
+ ),
);
}
-
- public function getDescription() {
- return 'Output data in XML format' . parent::getDescription();
- }
}