From: Chris Hanson Date: Thu, 22 Jun 2006 04:48:33 +0000 (+0000) Subject: Implement RDF-LITERAL=?. X-Git-Tag: 20090517-FFI~998 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=b4a9d7edf4f22349a8ddf4840d7dea83769eb73c;p=mit-scheme.git Implement RDF-LITERAL=?. --- diff --git a/v7/src/xml/rdf-struct.scm b/v7/src/xml/rdf-struct.scm index 81a2e39fc..22bb05652 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.6 2006/03/09 06:23:23 cph Exp $ +$Id: rdf-struct.scm,v 1.7 2006/06/22 04:48:28 cph Exp $ Copyright 2006 Massachusetts Institute of Technology @@ -79,7 +79,7 @@ USA. (guarantee-utf8-string text 'RDF-LITERAL) (%make-rdf-literal text (if (or (not type) - (and (symbol? type) + (and (interned-symbol? type) (complete-match match-language (symbol-name type)))) type @@ -94,6 +94,10 @@ USA. (let ((type (%rdf-literal-type literal))) (and (not (absolute-uri? type)) type))) + +(define (rdf-literal=? l1 l2) + (and (string=? (rdf-literal-text l1) (rdf-literal-text l2)) + (eq? (%rdf-literal-type l1) (%rdf-literal-type l2)))) (define-record-type (%make-rdf-index subjects predicates objects) diff --git a/v7/src/xml/xml.pkg b/v7/src/xml/xml.pkg index 03118d018..3e5530cc5 100644 --- a/v7/src/xml/xml.pkg +++ b/v7/src/xml/xml.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: xml.pkg,v 1.69 2006/06/10 04:43:09 cph Exp $ +$Id: xml.pkg,v 1.70 2006/06/22 04:48:33 cph Exp $ Copyright 2001,2002,2003,2004,2005,2006 Massachusetts Institute of Technology @@ -554,6 +554,7 @@ USA. rdf-literal-language rdf-literal-text rdf-literal-type + rdf-literal=? rdf-literal? rdf-triple-object rdf-triple-predicate