From 210b948cac85bb47d5d5af64345f3eaa112a9d82 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 25 Sep 2003 16:48:14 +0000 Subject: [PATCH] Efficiency tweak to XML-ELEMENT-NAMESPACE-IRI. --- v7/src/xml/xml-struct.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/v7/src/xml/xml-struct.scm b/v7/src/xml/xml-struct.scm index dcbcac616..3994626e6 100644 --- a/v7/src/xml/xml-struct.scm +++ b/v7/src/xml/xml-struct.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: xml-struct.scm,v 1.30 2003/09/24 22:39:12 cph Exp $ +$Id: xml-struct.scm,v 1.31 2003/09/25 16:48:14 cph Exp $ Copyright 2001,2002,2003 Massachusetts Institute of Technology @@ -679,9 +679,10 @@ USA. (define (xml-element-namespace-iri elt prefix) (let ((attr (find-matching-item (xml-element-attributes elt) - (lambda (attr) - (or (and (xml-name=? (car attr) 'xmlns) - (null-xml-name-prefix? prefix)) + (if (null-xml-name-prefix? prefix) + (lambda (attr) + (xml-name=? (car attr) 'xmlns)) + (lambda (attr) (and (xml-name-prefix=? (car attr) 'xmlns) (xml-name-local=? (car attr) prefix))))))) (and attr -- 2.25.1