media.ToUpperCase();
media.ToLowerCase();
XULContentSinkImpl::AddProcessingInstruction(const nsIParserNode& aNode){    static const char kStyleSheetPI[] = "<?xml-stylesheet";    static const char kCSSType[] = "text/css";    nsresult rv;    FlushText();    if (! mDataSource)        return NS_OK;    // XXX For now, we don't add the PI to the content model.    // We just check for a style sheet PI    const nsString& text = aNode.GetText();    // If it's a stylesheet PI...    if (0 == text.Find(kStyleSheetPI)) {        nsAutoString href;        if (NS_FAILED(rv = nsRDFParserUtils::GetQuotedAttributeValue(text, "href", href)))            return rv;        // If there was an error or there's no href, we can't do        // anything with this PI        if (0 == href.Length())            return NS_OK;        nsAutoString type;        if (NS_FAILED(rv = nsRDFParserUtils::GetQuotedAttributeValue(text, "type", type)))            return rv;        nsAutoString title;        if (NS_FAILED(rv = nsRDFParserUtils::GetQuotedAttributeValue(text, "title", title)))            return rv;        title.CompressWhitespace();        nsAutoString media;        if (NS_FAILED(rv =  nsRDFParserUtils::GetQuotedAttributeValue(text, "media", media)))            return rv;        media.ToUpperCase();        if (type.Equals(kCSSType)) {            // Use the SRC attribute value to load the URL            nsCOMPtr<nsIURL> url;            nsAutoString absURL;            nsCOMPtr<nsIURLGroup> urlGroup;             if (NS_SUCCEEDED(rv = mDocumentURL->GetURLGroup(getter_AddRefs(urlGroup)))) {                if (NS_FAILED(rv = urlGroup->CreateURL(getter_AddRefs(url),                                                       mDocumentURL,                                                       href,                                                       nsnull))) {                    NS_ERROR("unable to create URL for style sheet");                    return rv;                }            }            else {                if (NS_FAILED(rv = NS_NewURL(getter_AddRefs(url), absURL))) {                    NS_ERROR("unable to create URL for style sheet");                    return rv;                }            }            AsyncStyleProcessingData* d = new AsyncStyleProcessingData;            if (! d)                return NS_ERROR_OUT_OF_MEMORY;            d->mTitle=title;            d->mMedia=media;            d->mIsActive = PR_TRUE;            d->mURL      = url;            NS_ADDREF(d->mURL);            // XXX Need to create PI node            d->mElement  = nsnull;            d->mSink     = this;            NS_ADDREF(this);            nsIUnicharStreamLoader* loader;            if (NS_FAILED(rv = NS_NewUnicharStreamLoader(&loader,                                                         url,                                                          (nsStreamCompleteFunc)DoneLoadingStyle,                                                          (void *)d))) {                return rv;            }            return NS_ERROR_HTMLPARSER_BLOCK;        }    }    return NS_OK;}