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-03-15 21:34:41 +00:00
Родитель 58a5b2b931
Коммит 497ed774fe
3 изменённых файлов: 8 добавлений и 7 удалений

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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