rv = nsRDFParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("type"), type); if (NS_FAILED(rv)) return rv;
nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("type"), type);
XULContentSinkImpl::AddProcessingInstruction(const nsIParserNode& aNode){    static const char kStyleSheetPI[] = "<?xml-stylesheet";    static const char kOverlayPI[] = "<?xul-overlay";    nsresult rv;    FlushText();    // XXX For now, we don't add the PI to the content model.    // We just check for a style sheet PI    nsAutoString text(aNode.GetText());    if (text.Find(kOverlayPI) == 0) {        // Load a XUL overlay.        nsAutoString href;        rv = nsRDFParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("href"), href);        if (NS_FAILED(rv)) 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;        // Add the overlay to our list of overlays that need to be processed.        nsCOMPtr<nsIURI> url;        rv = NS_NewURI(getter_AddRefs(url), href, mDocumentURL);        if (NS_FAILED(rv)) {            return NS_OK; // The URL is bad, move along. Don't propogate for now.        }        rv = mPrototype->AddOverlayReference(url);        if (NS_FAILED(rv)) return rv;    }    // If it's a stylesheet PI...    else if (text.Find(kStyleSheetPI) == 0) {        nsAutoString href;        rv = nsRDFParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("href"), href);        if (NS_FAILED(rv)) 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;        rv = nsRDFParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("type"), type);        if (NS_FAILED(rv)) return rv;        nsAutoString title;        rv = nsRDFParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("title"), title);        if (NS_FAILED(rv)) return rv;        title.CompressWhitespace();        nsAutoString media;        rv = nsRDFParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("media"), media);        if (NS_FAILED(rv)) return rv;        media.ToLowerCase();        nsAutoString alternate;        rv = nsRDFParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("alternate"), alternate);        if (NS_FAILED(rv)) return rv;        rv = ProcessStyleLink(nsnull /* XXX need a node here */,                              href, alternate.EqualsWithConversion("yes"),  /* XXX ignore case? */                              title, type, media);        if (NS_FAILED(rv)) return rv;    }    return NS_OK;}