Bug 286073 internal code should use application/xml rather than text/xml

patch by bug@annevankesteren.nl r=peterv sr=peterv
This commit is contained in:
timeless%mozdev.org 2005-11-02 07:42:54 +00:00
parent 26a02e8e50
commit 3c37f44c08
3 changed files with 8 additions and 7 deletions

View File

@ -445,7 +445,7 @@ CheckLoadURI(nsIURI *aUri, nsIURI *aReferrerUri,
PRInt16 decision = nsIContentPolicy::ACCEPT;
rv = NS_CheckContentLoadPolicy(nsIContentPolicy::TYPE_STYLESHEET,
aUri, aReferrerUri, aContext,
NS_LITERAL_CSTRING("text/xml"), nsnull,
NS_LITERAL_CSTRING("application/xml"), nsnull,
&decision);
NS_ENSURE_SUCCESS(rv, rv);

View File

@ -759,7 +759,7 @@ txMozillaXMLOutput::createResultDocument(const nsAString& aName, PRInt32 aNsID,
doc->SetContentType(NS_LITERAL_STRING("text/html"));
}
else {
doc->SetContentType(NS_LITERAL_STRING("text/xml"));
doc->SetContentType(NS_LITERAL_STRING("application/xml"));
}
// Set up script loader of the result document.

View File

@ -235,10 +235,10 @@ txStandaloneXSLTProcessor::transform(txXPathNode& aSource,
/**
* Parses the XML Stylesheet PIs associated with the
* given XML document. If a stylesheet PIs is found with type="text/xsl"
* or type="text/xml" the href pseudo attribute value will be appended to
* the given href argument. If multiple text/xsl stylesheet PIs
* are found, the first one is used.
* given XML document. If a stylesheet PIs is found with type="text/xsl",
* type="text/xml" or type="application/xml" the href pseudo attribute
* value will be appended to the given href argument. If multiple XSLT
* stylesheet PIs are found, the first one is used.
*/
void txStandaloneXSLTProcessor::getHrefFromStylesheetPI(Document& xmlDocument,
nsAString& href)
@ -257,7 +257,8 @@ void txStandaloneXSLTProcessor::getHrefFromStylesheetPI(Document& xmlDocument,
tmpHref.Truncate();
parseStylesheetPI(data, type, tmpHref);
if (type.EqualsLiteral("text/xsl") ||
type.EqualsLiteral("text/xml")) {
type.EqualsLiteral("text/xml") ||
type.EqualsLiteral("application/xml")) {
href = tmpHref;
return;
}