rv = CreateTemplateContents(aElement, templateID, aFirstGeneratedChild);
rv = CreateTemplateContents(aElement, templateID, aContainer, aNewIndexInContainer);
RDFGenericBuilderImpl::CreateTemplateAndContainerContents(nsIContent* aElement, nsIContent** aFirstGeneratedChild){    // Generate both 1) the template content for the current element,    // and 2) recursive subcontent (if the current element refers to a    // container resource in the RDF graph).    nsresult rv;    // If we're asked to return the first generated child, then    // initialize to "none".    if (aFirstGeneratedChild)        *aFirstGeneratedChild = nsnull;    // Create the current resource's contents from the template, if    // appropriate    nsAutoString templateID;    rv = aElement->GetAttribute(kNameSpaceID_None, kTemplateAtom, templateID);    if (NS_FAILED(rv)) return rv;    if (rv == NS_CONTENT_ATTR_HAS_VALUE) {        rv = CreateTemplateContents(aElement, templateID, aFirstGeneratedChild);        if (NS_FAILED(rv)) return rv;    }    nsCOMPtr<nsIRDFResource> resource;    rv = gXULUtils->GetElementRefResource(aElement, getter_AddRefs(resource));    if (NS_SUCCEEDED(rv)) {        // The element has a resource; that means that it corresponds        // to something in the graph, so we need to go to the graph to        // create its contents.        rv = CreateContainerContents(aElement, resource, PR_FALSE, aFirstGeneratedChild);        if (NS_FAILED(rv)) return rv;    }    return NS_OK;}