From: Chris Hanson Date: Thu, 9 Nov 2006 19:43:54 +0000 (+0000) Subject: Change bnode mechanism so that user-supplied names are used only for X-Git-Tag: 20090517-FFI~846 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=ade2d39361f8240df2948c1d530f7afa3681ca20;p=mit-scheme.git Change bnode mechanism so that user-supplied names are used only for parsing. --- diff --git a/v7/src/xml/rdf-struct.scm b/v7/src/xml/rdf-struct.scm index 0b24af9b4..43870a6e3 100644 --- a/v7/src/xml/rdf-struct.scm +++ b/v7/src/xml/rdf-struct.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: rdf-struct.scm,v 1.20 2006/10/29 06:17:56 cph Exp $ +$Id: rdf-struct.scm,v 1.21 2006/11/09 19:43:54 cph Exp $ Copyright 2006 Massachusetts Institute of Technology @@ -75,18 +75,16 @@ USA. (write-rdf/nt-bnode bnode port)))) (define (make-rdf-bnode #!optional name) - (cond ((default-object? name) - (let ((name (generate-bnode-name))) - (let ((bnode (%make-rdf-bnode name))) - (hash-table/put! *rdf-bnode-registry* name bnode) - bnode))) - ((and (string? name) - (complete-match match-bnode-name name)) - (hash-table/intern! *rdf-bnode-registry* name - (lambda () - (%make-rdf-bnode name)))) - (else - (error:wrong-type-argument name "RDF bnode name" 'RDF-BNODE)))) + (if (default-object? name) + (let ((name (generate-bnode-name))) + (let ((bnode (%make-rdf-bnode name))) + (hash-table/put! *rdf-bnode-registry* name bnode) + bnode)) + (begin + (guarantee-string name 'MAKE-RDF-BNODE) + (hash-table/intern! *rdf-bnode-registry* + (string-append "X" name) + make-rdf-bnode)))) (define (generate-bnode-name) (let loop ()