From 890ec3dfa21aa6553fabc1ea9307b25bfa61a4bf Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 22 Feb 2007 18:39:43 +0000 Subject: [PATCH] Change WRITE-RDF/TURTLE-TRIPLES to elide unreferenced bnodes. --- v7/src/xml/turtle.scm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/v7/src/xml/turtle.scm b/v7/src/xml/turtle.scm index 6b239bed8..56c4edbe9 100644 --- a/v7/src/xml/turtle.scm +++ b/v7/src/xml/turtle.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: turtle.scm,v 1.21 2007/02/22 18:39:13 cph Exp $ +$Id: turtle.scm,v 1.22 2007/02/22 18:39:43 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -603,14 +603,13 @@ USA. 3 (lambda (t) (let ((s (rdf-triple-subject t))) - (if (uri? s) - 0 - (if (= (count-matching-items triples - (lambda (t) - (eq? (rdf-triple-object t) s))) - 1) - 1 - 2))))) + (cond ((uri? s) 0) + ((= (count-matching-items triples + (lambda (t) + (eq? (rdf-triple-object t) s))) + 1) + 1) + (else 2))))) (let ((inline-bnode (let ((in-line (group-triples-by-subject in-line))) (lambda (bnode) -- 2.25.1