nsCOMPtr<nsIRDFResource>	res1 = do_QueryInterface(dom1);
nsCOMPtr<nsIRDFResource>	res1; if (NS_FAILED(rv = dom1->GetResource(getter_AddRefs(res1)))) { res1 = null_nsCOMPtr(); }
XULSortServiceImpl::GetNodeValue(nsIContent *node1, nsIRDFResource *sortProperty, sortPtr sortInfo,				nsString &cellVal1, PRBool &isCollationKey){	nsresult		rv;	cellVal1 = "";	isCollationKey = PR_FALSE;	nsCOMPtr<nsIDOMXULElement>	dom1 = do_QueryInterface(node1);	if (!dom1)	return(NS_ERROR_FAILURE);	nsCOMPtr<nsIRDFResource>	res1 = do_QueryInterface(dom1);	// Note: don't check for res1 QI failure here.  It only succeeds for RDF nodes,	// but for XUL nodes it will failure; in the failure case, the code below gets	// the cell's text value straight from the DOM		if ((sortInfo->naturalOrderSort == PR_FALSE) && (sortInfo->sortProperty))	{		rv = GetResourceValue(res1, sortProperty, sortInfo, cellVal1, isCollationKey);		if (cellVal1.Length() == 0)		{		        nsCOMPtr<nsIContent>	cell1;			if (NS_SUCCEEDED(rv = GetTreeCell(sortInfo, node1, sortInfo->colIndex,				getter_AddRefs(cell1))) && (cell1))			{				rv = GetTreeCellValue(sortInfo, cell1, cellVal1);			}		}	}	else if (sortInfo->naturalOrderSort == PR_TRUE)	{		rv = node1->GetAttribute(kNameSpaceID_None, sortInfo->kNaturalOrderPosAtom, cellVal1);	}	return(rv);}