r55749 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55748‎ | r55749 | r55750 >
Date:08:05, 2 September 2009
Author:tstarling
Status:reverted (Comments)
Tags:
Comment:
Fix for r53194: according to the XSLT 1.0 spec, the MIME type should be text/xml or application/xml. In XSLT 2.0, it is application/xslt+xml. Either way, text/xsl is wrong.
Modified paths:
  • /trunk/phase3/includes/api/ApiFormatXml.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiFormatXml.php
@@ -173,7 +173,7 @@
174174 $this->setWarning( 'Stylesheet should have .xsl extension.' );
175175 return;
176176 }
177 - $this->printText( '<?xml-stylesheet href="' . $nt->escapeLocalURL( 'action=raw' ) . '" type="text/xsl" ?>' );
 177+ $this->printText( '<?xml-stylesheet href="' . $nt->escapeLocalURL( 'action=raw' ) . '" type="text/xml" ?>' );
178178 }
179179
180180 public function getAllowedParams() {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r53194(bug 19528) Added XSLT parameter to API queries in format=xmlbtongminh21:37, 13 July 2009

Comments

#Comment by Tim Starling (talk | contribs)   05:26, 30 September 2009

It's since been reported that IE only accepts text/xsl. I'm not particularly interested in supporting an IE proprietary protocol alone and breaking standards-compliant browsers. Maybe MS can be convinced to change this behaviour for a 9.0 release.

#Comment by Bryan (talk | contribs)   21:16, 3 November 2009

Do other browsers break by sending type=text/xsl? It looks like Mozilla, Opera and Chrome support text/xsl.

#Comment by Platonides (talk | contribs)   22:11, 23 January 2010

Reverted by r61419

Status & tagging log