#| -*-Scheme-*-
-$Id: turtle.scm,v 1.34 2007/10/08 03:05:41 cph Exp $
+$Id: turtle.scm,v 1.35 2007/10/12 01:24:33 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
(let ((pathname (pathname-default-type pathname "ttl")))
(call-with-input-file pathname
(lambda (port)
- (port/set-coding port 'UTF-8)
- (with-rdf-input-port port
- (lambda ()
- (post-process-parser-output
- (parse-turtle-doc (input-port->parser-buffer port))
- (if (default-object? base-uri)
- (pathname->uri (merge-pathnames pathname))
- (merge-uris
- (file-namestring pathname)
- (->absolute-uri base-uri 'READ-RDF/TURTLE-FILE))))))))))
+ (read-rdf/turtle
+ port
+ (if (default-object? base-uri)
+ (pathname->uri (merge-pathnames pathname))
+ (merge-uris
+ (file-namestring pathname)
+ (->absolute-uri base-uri 'READ-RDF/TURTLE-FILE))))))))
+
+(define (read-rdf/turtle port base-uri)
+ (port/set-coding port 'UTF-8)
+ (with-rdf-input-port port
+ (lambda ()
+ (post-process-parser-output
+ (parse-turtle-doc (input-port->parser-buffer port))
+ (->absolute-uri base-uri 'READ-RDF/TURTLE)))))
(define parse-turtle-doc
(*parser
#| -*-Scheme-*-
-$Id: xml.pkg,v 1.99 2007/08/16 14:42:08 cph Exp $
+$Id: xml.pkg,v 1.100 2007/10/12 01:24:33 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
(files "turtle")
(parent (runtime rdf))
(export ()
+ read-rdf/turtle
read-rdf/turtle-file
write-rdf/turtle
write-rdf/turtle-file