if (!InProlog(this)) return;
nsXMLProcessingInstruction::GetStyleSheetInfo(nsAWritableString& aUrl,                                              nsAWritableString& aTitle,                                              nsAWritableString& aType,                                              nsAWritableString& aMedia,                                              PRBool* aIsAlternate){  nsresult rv = NS_OK;  aUrl.Truncate();  aTitle.Truncate();  aType.Truncate();  aMedia.Truncate();  *aIsAlternate = PR_FALSE;  if (!mTarget.Equals(NS_LITERAL_STRING("xml-stylesheet"))) {    return;  }  nsAutoString href, title, type, media, alternate;  GetAttrValue("href", href);  if (href.IsEmpty()) {    // if href is empty then just bail    return;  }  GetAttrValue("title", title);  title.CompressWhitespace();  aTitle.Assign(title);  GetAttrValue("alternate", alternate);  // if alternate, does it have title?  if (alternate.Equals(NS_LITERAL_STRING("yes"))) {    if (aTitle.IsEmpty()) { // alternates must have title      return;    } else {      *aIsAlternate = PR_TRUE;    }  }  GetAttrValue("media", media);  aMedia.Assign(media);  ToLowerCase(aMedia); // case sensitivity?  GetAttrValue("type", type);  nsAutoString mimeType;  nsAutoString notUsed;  SplitMimeType(type, mimeType, notUsed);  if (!mimeType.IsEmpty() && !mimeType.EqualsIgnoreCase("text/css")) {    aType.Assign(type);    return;  }  // If we get here we assume that we're loading a css file, so set the  // type to 'text/css'  aType.Assign(NS_LITERAL_STRING("text/css"));  nsCOMPtr<nsIURI> url, baseURL;  if (mInner.mDocument) {    mInner.mDocument->GetBaseURL(*getter_AddRefs(baseURL));  }  rv = NS_MakeAbsoluteURI(aUrl, href, baseURL);  if (!*aIsAlternate) {    if (!aTitle.IsEmpty()) {  // possibly preferred sheet      nsAutoString prefStyle;      mInner.mDocument->GetHeaderData(nsHTMLAtoms::headerDefaultStyle,                                      prefStyle);      if (prefStyle.IsEmpty()) {        mInner.mDocument->SetHeaderData(nsHTMLAtoms::headerDefaultStyle,                                        title);      }    }  }  return; }