def predicate(self, predicate, object, depth=1):
    write = self.write
    indent = ('  ' * depth)
    qname = self.store.namespace_manager.qname_strict(predicate)
    if isinstance(object, Literal):
        attributes = ''
        if object.language:
            attributes += (' xml:lang="%s"' % object.language)
        if object.datatype:
            attributes += (' rdf:datatype="%s"' % object.datatype)
        write(('%s<%s%s>%s</%s>\n' % (indent, qname, attributes, escape(object, ESCAPE_ENTITIES), qname)))
    elif isinstance(object, BNode):
        write(('%s<%s rdf:nodeID="%s"/>\n' % (indent, qname, object)))
    else:
        write(('%s<%s rdf:resource=%s/>\n' % (indent, qname, quoteattr(self.relativize(object)))))
def predicate(self, predicate, object, depth=1):
    write = self.write
    indent = ('  ' * depth)
    qname = self.store.namespace_manager.qname_strict(predicate)
    if isinstance(object, Literal):
        attributes = 
        if object.language:
            attributes += (' xml:lang="%s"' % object.language)
        if object.datatype:
            attributes += (' rdf:datatype="%s"' % object.datatype)
        write(('%s<%s%s>%s</%s>\n' % (indent, qname, attributes, escape(object, ESCAPE_ENTITIES), qname)))
    elif isinstance(object, BNode):
        write(('%s<%s rdf:nodeID="%s"/>\n' % (indent, qname, object)))
    else:
        write(('%s<%s rdf:resource=%s/>\n' % (indent, qname, quoteattr(self.relativize(object)))))