From badb2898239eef74327f3b391e79396918ed5dbe Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sat, 10 Jun 2006 03:52:00 +0000 Subject: [PATCH] Implement WRITE-RDF/NT-FILE. --- v7/src/xml/rdf-nt.scm | 9 ++++++++- v7/src/xml/xml.pkg | 5 +++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/v7/src/xml/rdf-nt.scm b/v7/src/xml/rdf-nt.scm index 6d55654c7..8f67b5730 100644 --- a/v7/src/xml/rdf-nt.scm +++ b/v7/src/xml/rdf-nt.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: rdf-nt.scm,v 1.5 2006/03/07 02:52:49 cph Exp $ +$Id: rdf-nt.scm,v 1.6 2006/06/10 03:52:00 cph Exp $ Copyright 2006 Massachusetts Institute of Technology @@ -203,6 +203,13 @@ USA. ;;;; Encoder +(define (write-rdf/nt-file triples pathname) + (call-with-output-file pathname + (lambda (port) + (for-each (lambda (triple) + (write-rdf/nt triple port)) + triples)))) + (define (write-rdf/nt triple port) (let ((s (rdf-triple-subject triple))) (cond ((uri? s) (write-uri-ref s port)) diff --git a/v7/src/xml/xml.pkg b/v7/src/xml/xml.pkg index 0b8662bae..bbd6c1520 100644 --- a/v7/src/xml/xml.pkg +++ b/v7/src/xml/xml.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: xml.pkg,v 1.67 2006/03/07 06:16:26 cph Exp $ +$Id: xml.pkg,v 1.68 2006/06/10 03:52:00 cph Exp $ Copyright 2001,2002,2003,2004,2005,2006 Massachusetts Institute of Technology @@ -571,4 +571,5 @@ USA. read-rdf/nt read-rdf/nt-file rdf/nt-file->source - write-rdf/nt)) \ No newline at end of file + write-rdf/nt + write-rdf/nt-file)) \ No newline at end of file -- 2.25.1