tag = NS_LITERAL_STRING(kRDFSeq);
tag = NS_LITERAL_STRING("RDF:Seq");
RDFXMLDataSourceImpl::SerializeContainer(nsIOutputStream* aStream,                                         nsIRDFResource* aContainer){static const char kRDFBag[] = "RDF:Bag";static const char kRDFSeq[] = "RDF:Seq";static const char kRDFAlt[] = "RDF:Alt";    nsresult rv;    const PRUnichar* tag;    // Decide if it's a sequence, bag, or alternation, and print the    // appropriate tag-open sequence    if (IsA(mInner, aContainer, kRDF_Bag)) {        tag = NS_LITERAL_STRING(kRDFBag);    }    else if (IsA(mInner, aContainer, kRDF_Seq)) {        tag = NS_LITERAL_STRING(kRDFSeq);    }    else if (IsA(mInner, aContainer, kRDF_Alt)) {        tag = NS_LITERAL_STRING(kRDFAlt);    }    else {        NS_ASSERTION(PR_FALSE, "huh? this is _not_ a container.");        return NS_ERROR_UNEXPECTED;    }    rdf_BlockingWrite(aStream, "  <", 3);    rdf_BlockingWrite(aStream, tag);    // Unfortunately, we always need to print out the identity of the    // resource, even if was constructed "anonymously". We need to do    // this because we never really know who else might be referring    // to it...    nsXPIDLCString s;    if (NS_SUCCEEDED(aContainer->GetValue( getter_Copies(s) ))) {        nsAutoString uri = NS_ConvertUTF8toUCS2(s);        rdf_MakeRelativeRef(NS_ConvertUTF8toUCS2(mURLSpec), uri);        rdf_EscapeAttributeValue(uri);        if (uri.First() == PRUnichar('#')) {            // Okay, it's actually identified as an element in the            // current document, not trying to decorate some absolute            // URI. We can use the 'ID=' attribute...            static const char kIDEquals[] = " ID=\"";            uri.Cut(0, 1); // chop the '#'            rdf_BlockingWrite(aStream, kIDEquals, sizeof(kIDEquals) - 1);        }        else {            // We need to cheat and spit out an illegal 'about=' on            // the sequence.             static const char kAboutEquals[] = " about=\"";            rdf_BlockingWrite(aStream, kAboutEquals, sizeof(kAboutEquals) - 1);        }        rdf_BlockingWrite(aStream, uri);        rdf_BlockingWrite(aStream, "\"", 1);    }    rdf_BlockingWrite(aStream, ">\n", 2);    // First iterate through each of the ordinal elements (the RDF/XML    // syntax doesn't allow us to place properties on RDF container    // elements).    nsCOMPtr<nsISimpleEnumerator> elements;    rv = NS_NewContainerEnumerator(mInner, aContainer, getter_AddRefs(elements));    if (NS_FAILED(rv)) return rv;    while (1) {        PRBool hasMore;        rv = elements->HasMoreElements(&hasMore);        if (NS_FAILED(rv)) return rv;        if (! hasMore)            break;        nsCOMPtr<nsISupports> isupports;        rv = elements->GetNext(getter_AddRefs(isupports));        if (NS_FAILED(rv)) return rv;        nsCOMPtr<nsIRDFNode> element = do_QueryInterface(isupports);        NS_ASSERTION(element != nsnull, "not an nsIRDFNode");        if (! element)            continue;        rv = SerializeMember(aStream, aContainer, element);        if (NS_FAILED(rv)) return rv;    }    // close the container tag    rdf_BlockingWrite(aStream, "  </", 4);    rdf_BlockingWrite(aStream, tag);    rdf_BlockingWrite(aStream, ">\n", 2);    // Now, we iterate through _all_ of the arcs, in case someone has    // applied properties to the bag itself. These'll be placed in a    // separate RDF:Description element.    nsCOMPtr<nsISimpleEnumerator> arcs;    rv = mInner->ArcLabelsOut(aContainer, getter_AddRefs(arcs));    if (NS_FAILED(rv)) return rv;    PRBool wroteDescription = PR_FALSE;    while (! wroteDescription) {        PRBool hasMore;        rv = arcs->HasMoreElements(&hasMore);        if (NS_FAILED(rv)) return rv;        if (! hasMore)            break;        nsIRDFResource* property;        rv = arcs->GetNext((nsISupports**) &property);        if (NS_FAILED(rv)) return rv;        // If it's a membership property, then output a "LI"        // tag. Otherwise, output a property.        if (! IsContainerProperty(property)) {            rv = SerializeDescription(aStream, aContainer);            wroteDescription = PR_TRUE;        }        NS_RELEASE(property);        if (NS_FAILED(rv))            break;    }    return NS_OK;}