mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Switch some internal users of text/xml to application/xml. Bug 247024, patch
by Anne van Kesteren <bug@annevankesteren.nl>, r+sr=bzbarsky
This commit is contained in:
parent
dc29d00aa4
commit
1b833f021f
@ -177,7 +177,7 @@ inSearchService.prototype =
|
||||
// This method of loading the xml doesn't work, but it should. See bug 54237...
|
||||
var doc = document.implementation.createDocument("", "", null);
|
||||
doc.addEventListener("load", SearchFileLoadListener, false);
|
||||
doc.load(aURL, "text/xml");
|
||||
doc.load(aURL, "application/xml");
|
||||
*/
|
||||
},
|
||||
|
||||
|
@ -199,7 +199,7 @@ XBLBindings.prototype =
|
||||
if (aURL) {
|
||||
var doc = document.implementation.createDocument(null, "", null);
|
||||
doc.addEventListener("load", gDocLoadListener, true);
|
||||
doc.load(aURL, "text/xml");
|
||||
doc.load(aURL, "application/xml");
|
||||
|
||||
this.mBindingDoc = doc;
|
||||
this.mBindingURL = aURL;
|
||||
|
@ -263,7 +263,7 @@ nsPolicyViewer.prototype =
|
||||
this.mXMLHttpRequest.onload = this;
|
||||
// Override the mime type because without it XMLHttpRequest hangs
|
||||
// on certain sites that serve HTML instead ofXML.
|
||||
this.mXMLHttpRequest.overrideMimeType("text/xml");
|
||||
this.mXMLHttpRequest.overrideMimeType("application/xml");
|
||||
this.mXMLHttpRequest.open("GET", aLocation);
|
||||
this.mXMLHttpRequest.send(null);
|
||||
}
|
||||
|
@ -29,7 +29,7 @@
|
||||
function validateDOMNode(aNodeValue, aType, aIsValid) {
|
||||
var rv = false;
|
||||
|
||||
var x = dp.parseFromString('<test xmlns="http://www.mozilla.org/schema/test" xmlns:xsi="http://www.w3.org/1999/XMLSchema" xsi:type="' + aType + '">' + aNodeValue + '</test>', "text/xml");
|
||||
var x = dp.parseFromString('<test xmlns="http://www.mozilla.org/schema/test" xmlns:xsi="http://www.w3.org/1999/XMLSchema" xsi:type="' + aType + '">' + aNodeValue + '</test>', "application/xml");
|
||||
rv = getValidator().validate(x.documentElement);
|
||||
|
||||
counter++;
|
||||
@ -50,7 +50,7 @@
|
||||
function validateComplexType(aNodeValue, aType, aIsValid){
|
||||
var rv = false;
|
||||
|
||||
var x = dp.parseFromString(aNodeValue, "text/xml")
|
||||
var x = dp.parseFromString(aNodeValue, "application/xml")
|
||||
rv = getValidator().validate(x.documentElement);
|
||||
|
||||
counter++;
|
||||
|
@ -48,8 +48,8 @@ function Test(aTitle, aSourceURL, aStyleURL, aNumber, aObserver)
|
||||
this.mDone = 0;
|
||||
var xmlcontent = loadFile(aSourceURL);
|
||||
var xslcontent = loadFile(aStyleURL);
|
||||
this.mSource = gParser.parseFromString(xmlcontent, 'text/xml');
|
||||
this.mStyle = gParser.parseFromString(xslcontent, 'text/xml');
|
||||
this.mSource = gParser.parseFromString(xmlcontent, 'application/xml');
|
||||
this.mStyle = gParser.parseFromString(xslcontent, 'application/xml');
|
||||
}
|
||||
|
||||
function runTest(aTitle, aSourceURL, aStyleURL, aNumber, aObserver)
|
||||
|
@ -271,7 +271,7 @@ runItem.prototype =
|
||||
if (!refContent) {
|
||||
refContent = this.loadTextFile(this.mRefURL);
|
||||
}
|
||||
this.mRefDoc = parser.parseFromString(refContent, 'text/xml');
|
||||
this.mRefDoc = parser.parseFromString(refContent, 'application/xml');
|
||||
this.mLoaded += 4;
|
||||
break;
|
||||
case 'html':
|
||||
|
@ -824,7 +824,7 @@ function con_respondsourcetext (response, sourceText)
|
||||
|
||||
if ("markup" in sourceText)
|
||||
{
|
||||
response.channel.contentType = "text/xml";
|
||||
response.channel.contentType = "application/xml";
|
||||
response.start();
|
||||
response.append(sourceText.markup);
|
||||
response.end();
|
||||
@ -833,7 +833,7 @@ function con_respondsourcetext (response, sourceText)
|
||||
{
|
||||
maxDigits = Math.floor(Math.log(sourceLines.length) / Math.LN10) + 1;
|
||||
dd ("OFF building response {");
|
||||
response.channel.contentType = "text/xml";
|
||||
response.channel.contentType = "application/xml";
|
||||
resultSource = "<?xml version='1.0'";
|
||||
// if ("charset" in sourceText)
|
||||
// resultSource += " encoding=\"" + sourceText.charset + "\"";
|
||||
|
@ -689,7 +689,7 @@ nsSchemaLoader::Load(const nsAString& schemaURI,
|
||||
}
|
||||
|
||||
// Force the mimetype of the returned stream to be xml.
|
||||
rv = request->OverrideMimeType(NS_LITERAL_CSTRING("text/xml"));
|
||||
rv = request->OverrideMimeType(NS_LITERAL_CSTRING("application/xml"));
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
@ -746,7 +746,7 @@ nsSchemaLoader::LoadAsync(const nsAString& schemaURI,
|
||||
}
|
||||
|
||||
// Force the mimetype of the returned stream to be xml.
|
||||
rv = request->OverrideMimeType(NS_LITERAL_CSTRING("text/xml"));
|
||||
rv = request->OverrideMimeType(NS_LITERAL_CSTRING("application/xml"));
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ nsWebScriptsAccess::GetDocument(const nsACString& aDeclFilePath,
|
||||
PR_FALSE, empty, empty);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = mRequest->OverrideMimeType(NS_LITERAL_CSTRING("text/xml"));
|
||||
rv = mRequest->OverrideMimeType(NS_LITERAL_CSTRING("application/xml"));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = mRequest->Send(0);
|
||||
|
@ -153,7 +153,7 @@ int main (int argc, char* argv[])
|
||||
|
||||
if (NS_SUCCEEDED( rv )) {
|
||||
nsString str; str.AssignWithConversion(argv[2]);
|
||||
rv = pDOMParser->ParseFromString(str.get(), "text/xml",
|
||||
rv = pDOMParser->ParseFromString(str.get(), "application/xml",
|
||||
getter_AddRefs( pDOMDocument ) );
|
||||
|
||||
if (NS_SUCCEEDED( rv )) {
|
||||
@ -193,7 +193,7 @@ int main (int argc, char* argv[])
|
||||
rv = pDOMParser->ParseFromStream( pInputStream,
|
||||
"UTF-8",
|
||||
uiContentLength,
|
||||
"text/xml",
|
||||
"application/xml",
|
||||
getter_AddRefs( pDOMDocument ) );
|
||||
if (NS_SUCCEEDED( rv )) {
|
||||
printf( "DOM parse of %s successful\n", argv[2] );
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
print "Content-type: text/xml\n\n";
|
||||
print "Content-type: application/xml\n\n";
|
||||
print "<?xml version=\"1.0\"?>\n";
|
||||
|
||||
if ($ENV{'REQUEST_METHOD'} eq 'POST')
|
||||
|
@ -21,7 +21,7 @@ function execute()
|
||||
var parser = new DOMParser();
|
||||
var str =
|
||||
'<?xml version="1.0"?>\n<!DOCTYPE doc [\n<!ATTLIST d id ID #IMPLIED>\n]>\n<doc>\n <foo xmlns="foobar">One</foo> <x:bar xmlns:x="barfoo">Two</x:bar>\n <d id="id3">Three</d>\n</doc>\n';
|
||||
var doc = parser.parseFromString(str,"text/xml");
|
||||
var doc = parser.parseFromString(str,"application/xml");
|
||||
|
||||
document.getElementById("id1").firstChild.nodeValue = str;
|
||||
document.getElementById("id2").firstChild.nodeValue = doc;
|
||||
|
@ -21,7 +21,7 @@ function execute()
|
||||
var parser = new DOMParser();
|
||||
var str =
|
||||
'<?xml version="1.0"?>\n<?xml-stylesheet href="display.css" type="text/css"?>\n<!DOCTYPE doc [\n<!ATTLIST d id ID #IMPLIED>\n]>\n<doc>\n <foo xmlns="foobar">One</foo> <x:bar xmlns:x="barfoo">Two</x:bar>\n <d id="id3">Three</d>\n</doc>\n';
|
||||
var doc = parser.parseFromString(str,"text/xml");
|
||||
var doc = parser.parseFromString(str,"application/xml");
|
||||
|
||||
document.getElementById("id1").firstChild.nodeValue = str;
|
||||
document.getElementById("id2").firstChild.nodeValue = doc;
|
||||
|
@ -1569,7 +1569,7 @@ NS_IMETHODIMP mozXMLTermSession::InitStream(const nsString& streamURL,
|
||||
break;
|
||||
|
||||
case XML_DOCUMENT:
|
||||
contentType = "text/xml";
|
||||
contentType = "application/xml";
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user