         
         guard let env = serd_env_new(&base) else { throw RDFParserError.internalError("Failed to construct parser context") }
         
-        var context = ParserContext(env: env, handler: handleTriple)
+        var context = ParserContext(env: env, handler: handleTriple, produceUniqueBlankIdentifiers: produceUniqueBlankIdentifiers)
         _ = try withUnsafePointer(to: &context) { (ctx) throws -> SerdStatus in
             guard let reader = serd_reader_new(inputSyntax.serdSyntax!, UnsafeMutableRawPointer(mutating: ctx), serd_free_handle, serd_base_sink, serd_prefix_sink, serd_statement_sink, serd_end_sink) else { fatalError() }
             

    
    var inputSyntax: RDFSyntax
    var defaultBase: String
    
    public init(syntax: RDFSyntax = .turtle, base defaultBase: String = "http://base.example.org/") {
        self.inputSyntax = syntax
        self.defaultBase = defaultBase
    }

    @discardableResult
    public func parse(string: String, handleTriple: @escaping (Term, Term, Term) -> Void) throws -> Int {
        switch inputSyntax {
        case .ntriples, .turtle:
            return try serd_parse(string: string, handleTriple: handleTriple)
        default:
            let p = RDFXMLParser()
            try p.parse(string: string, tripleHandler: handleTriple)

            if case .blank = subj.type {
                if let t = blankNodes[subj.value] {
                    subj = t
                } else if produceUniqueBlankIdentifiers {
                    let id = NSUUID().uuidString
                    let b = Term(value: id, type: .blank)
                    blankNodes[subj.value] = b
                    subj = b
                } else {
                    subj = Term(value: subj.value, type: .blank)
                }
            }
            if case .blank = obj.type {
                if let t = blankNodes[obj.value] {
                    obj = t
                } else if produceUniqueBlankIdentifiers {
                    let id = NSUUID().uuidString
                    let b = Term(value: id, type: .blank)
                    blankNodes[obj.value] = b
                    obj = b
                } else {
                    obj = Term(value: obj.value, type: .blank)
                }
            }

