*matchingRuleFound = PR_FALSE; if (NS_FAILED(rv = aRule->GetAttributeCount(count)))	return(rv); for (PRInt32 loop=0; loop<count; loop++) { PRInt32			attribNameSpaceID; nsCOMPtr<nsIAtom>	attribAtom; if (NS_FAILED(rv = aRule->GetAttributeNameAt(loop, attribNameSpaceID, *getter_AddRefs(attribAtom)))) continue; nsAutoString		attribValue; if (NS_FAILED(rv = aRule->GetAttribute(attribNameSpaceID, attribAtom, attribValue))) continue;
PRInt32    count; rv = aRule->GetAttributeCount(count); if (NS_FAILED(rv)) return(rv);
RDFGenericBuilderImpl::IsTemplateRuleMatch(nsIContent *aNode, nsIContent *aRule, PRBool *matchingRuleFound){	nsresult		rv = NS_OK;	PRInt32			count;	*matchingRuleFound = PR_FALSE;	if (NS_FAILED(rv = aRule->GetAttributeCount(count)))	return(rv);	for (PRInt32 loop=0; loop<count; loop++)	{		PRInt32			attribNameSpaceID;		nsCOMPtr<nsIAtom>	attribAtom;		if (NS_FAILED(rv = aRule->GetAttributeNameAt(loop, attribNameSpaceID, *getter_AddRefs(attribAtom))))			continue;		nsAutoString		attribValue;		if (NS_FAILED(rv = aRule->GetAttribute(attribNameSpaceID, attribAtom, attribValue)))			continue;		if ((attribNameSpaceID == kNameSpaceID_XUL) && (attribAtom.get() == kContainerAtom))		{			// check and see if aNode is a container			nsAutoString	nodeValue;			if (NS_SUCCEEDED(aNode->GetAttribute(kNameSpaceID_RDF, kContainerAtom, nodeValue)))			{				if (nodeValue.EqualsIgnoreCase(attribValue))				{					*matchingRuleFound = PR_TRUE;					break;				}			}		}	}	return(rv);}