From def668345a77f22135918691321bc55cdd5ac4d5 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 30 Jan 2006 20:23:05 +0000 Subject: [PATCH] Change all references from IRI to URI. --- v7/doc/ref-manual/io.texi | 86 +++++++++++++++---------------- v7/src/xdoc/xdoc.scm | 18 +++---- v7/src/xml/xhtml.scm | 30 +++++------ v7/src/xml/xml-names.scm | 106 +++++++++++++++++++------------------- v7/src/xml/xml-output.scm | 8 +-- v7/src/xml/xml-parser.scm | 56 ++++++++++---------- v7/src/xml/xml-rpc.scm | 6 +-- v7/src/xml/xml-struct.scm | 26 +++++----- v7/src/xml/xml.pkg | 32 ++++++------ v7/src/xml/xpath.scm | 12 ++--- 10 files changed, 190 insertions(+), 190 deletions(-) diff --git a/v7/doc/ref-manual/io.texi b/v7/doc/ref-manual/io.texi index 6737e7bdd..deab818c0 100644 --- a/v7/doc/ref-manual/io.texi +++ b/v7/doc/ref-manual/io.texi @@ -1,9 +1,9 @@ @c This file is part of the MIT/GNU Scheme Reference Manual. -@c $Id: io.texi,v 1.11 2005/05/20 02:14:24 cph Exp $ +@c $Id: io.texi,v 1.12 2006/01/30 20:22:41 cph Exp $ @c Copyright 1991,1992,1993,1994,1995 Massachusetts Institute of Technology @c Copyright 1996,1997,1999,2000,2001 Massachusetts Institute of Technology -@c Copyright 2002,2003,2004,2005 Massachusetts Institute of Technology +@c Copyright 2002,2003,2004,2005,2006 Massachusetts Institute of Technology @c See file scheme.texinfo for copying conditions. @node Input/Output, Operating-System Interface, Environments, Top @@ -3042,20 +3042,20 @@ document uses them. Consequently, it must be possible to compare non-associated names with associated names. @cindex Internationalized Resource Identifier -@cindex IRI, of XML name +@cindex URI, of XML name @cindex qname, of XML name An @acronym{XML} name consists of two parts: the @dfn{qname}, which is a symbol, possibly including a namespace prefix; and the -@dfn{Internationalized Resource Identifier} (@acronym{IRI}), which +@dfn{Internationalized Resource Identifier} (@acronym{URI}), which identifies an optional namespace. -@deffn procedure make-xml-name qname iri +@deffn procedure make-xml-name qname uri Creates and returns an @acronym{XML} name. @var{Qname} must be a symbol -whose name satisfies @code{string-is-xml-name?}. @var{Iri} must be an -@code{xml-namespace-iri} record. The returned value is an @acronym{XML} +whose name satisfies @code{string-is-xml-name?}. @var{Uri} must be an +@code{xml-namespace-uri} record. The returned value is an @acronym{XML} name that satisfies @code{xml-name?}. -If @var{iri} is the @dfn{null} namespace (satisfies +If @var{uri} is the @dfn{null} namespace (satisfies @code{null-xml-name-prefix?}), the returned value is a symbol equivalent to @var{qname}. This means that an ordinary symbol can be used as an @acronym{XML} name when there is no namespace associated with the name. @@ -3063,9 +3063,9 @@ to @var{qname}. This means that an ordinary symbol can be used as an For convenience, @var{qname} may be a string, in which case it is converted to a symbol using @code{make-xml-qname}. -For convenience, @var{iri} may be a string, in which case it is -converted to an @code{xml-namespace-iri} record using -@code{make-xml-namespace-iri}. +For convenience, @var{uri} may be a string, in which case it is +converted to an @code{xml-namespace-uri} record using +@code{make-xml-namespace-uri}. @end deffn @deffn procedure xml-name? object @@ -3077,8 +3077,8 @@ Returns @code{#t} if @var{object} is an @acronym{XML} name, and Returns the @dfn{qname} of @var{xml-name} as a symbol. @end deffn -@deffn procedure xml-name-iri xml-name -Returns the @dfn{IRI} of @var{xml-name} as an @code{xml-namespace-iri} +@deffn procedure xml-name-uri xml-name +Returns the @dfn{URI} of @var{xml-name} as an @code{xml-namespace-uri} record. @end deffn @@ -3112,9 +3112,9 @@ Returns the @dfn{local part} of @var{xml-name} as a symbol. The next procedure compares two @acronym{XML} names for equality. The rules for equality are slightly complex, in order to permit comparing names in the @acronym{DTD} with names in the document body. So, if both -of the names have non-null namespace @acronym{IRI}s, then the names are +of the names have non-null namespace @acronym{URI}s, then the names are equal if and only if their local parts are equal and their -@acronym{IRI}s are equal. (The prefixes of the names are not considered +@acronym{URI}s are equal. (The prefixes of the names are not considered in this case.) Otherwise, the names are equal if and only if their qnames are equal. @@ -3165,51 +3165,51 @@ Returns @code{#t} if @var{object} is the null prefix, otherwise returns @end deffn These next procedures define the data abstraction for namespace -@acronym{IRI}s. Conceptually, an @acronym{IRI} is a string with a +@acronym{URI}s. Conceptually, an @acronym{URI} is a string with a particular syntax, but this implementation uses an abstract representation that speeds up type and equality testing. Two -@acronym{IRI}s are tested for equality using @code{eq?}. +@acronym{URI}s are tested for equality using @code{eq?}. -@deffn procedure make-xml-namespace-iri string -@var{String} must be a syntactically valid @acronym{IRI} encoded in -@acronym{UTF-8}. Returns the corresponding @acronym{IRI}. +@deffn procedure make-xml-namespace-uri string +@var{String} must be a syntactically valid @acronym{URI} encoded in +@acronym{UTF-8}. Returns the corresponding @acronym{URI}. @end deffn -@deffn procedure xml-namespace-iri? object -Returns @code{#t} if @var{object} is an @acronym{IRI} record, otherwise +@deffn procedure xml-namespace-uri? object +Returns @code{#t} if @var{object} is an @acronym{URI} record, otherwise returns @code{#f}. @end deffn -@deffn procedure xml-namespace-iri-string iri -@var{Iri} must satisfy @code{xml-namespace-iri?}. Returns a newly -allocated string that is a copy of the string used to create @var{iri}. +@deffn procedure xml-namespace-uri-string uri +@var{Uri} must satisfy @code{xml-namespace-uri?}. Returns a newly +allocated string that is a copy of the string used to create @var{uri}. @end deffn -The @acronym{IRI} of an @acronym{XML} name may be null if there is no -namespace associated with the name. The null @acronym{IRI} is +The @acronym{URI} of an @acronym{XML} name may be null if there is no +namespace associated with the name. The null @acronym{URI} is abstracted by the following two procedures. Note that the null -@acronym{IRI} satisfies the predicate @code{xml-namespace-iri?}. +@acronym{URI} satisfies the predicate @code{xml-namespace-uri?}. -@deffn procedure null-xml-namespace-iri -Returns the null @acronym{IRI} record. +@deffn procedure null-xml-namespace-uri +Returns the null @acronym{URI} record. @end deffn -@deffn procedure null-xml-namespace-iri? object -Returns @code{#t} if @var{object} is the null @acronym{IRI} record, +@deffn procedure null-xml-namespace-uri? object +Returns @code{#t} if @var{object} is the null @acronym{URI} record, otherwise returns @code{#f}. @end deffn -The following values are two distinguished @acronym{IRI} records. +The following values are two distinguished @acronym{URI} records. -@defvr variable xml-iri -@code{xml-iri} is the @acronym{IRI} reserved for use by the -@acronym{XML} recommendation. This @acronym{IRI} must be used with the +@defvr variable xml-uri +@code{xml-uri} is the @acronym{URI} reserved for use by the +@acronym{XML} recommendation. This @acronym{URI} must be used with the @samp{xml} prefix. @end defvr -@defvr variable xmlns-iri -@code{xmlns-iri} is the @acronym{IRI} reserved for use by the -@acronym{XML} namespace recommendation. This @acronym{IRI} must be used +@defvr variable xmlns-uri +@code{xmlns-uri} is the @acronym{URI} reserved for use by the +@acronym{XML} namespace recommendation. This @acronym{URI} must be used with the @samp{xmlns} prefix. @end defvr @@ -3513,18 +3513,18 @@ The @code{xml-!notation} record represents a notation declaration. @code{xml-external-id} record. @end deftp -@deftp {record type} xml-external-id id iri +@deftp {record type} xml-external-id id uri @vindex @findex xml-external-id? @findex make-xml-external-id @findex xml-external-id-id -@findex xml-external-id-iri +@findex xml-external-id-uri @findex set-xml-external-id-id! -@findex set-xml-external-id-iri! +@findex set-xml-external-id-uri! The @code{xml-external-id} record is a reference to an external @acronym{DTD}. This reference consists of two parts: @var{id} is a public @acronym{ID} literal, corresponding to the @samp{PUBLIC} -keyword, while @var{iri} is a system literal, corresponding to the +keyword, while @var{uri} is a system literal, corresponding to the @samp{SYSTEM} keyword. Either or both may be present, depending on the context. Each is represented as a string. @end deftp diff --git a/v7/src/xdoc/xdoc.scm b/v7/src/xdoc/xdoc.scm index e9a1a692a..d5b285feb 100644 --- a/v7/src/xdoc/xdoc.scm +++ b/v7/src/xdoc/xdoc.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: xdoc.scm,v 1.2 2004/11/26 15:17:27 cph Exp $ +$Id: xdoc.scm,v 1.3 2006/01/30 20:23:05 cph Exp $ -Copyright 2003,2004 Massachusetts Institute of Technology +Copyright 2003,2004,2006 Massachusetts Institute of Technology This file is part of MIT/GNU Scheme. @@ -354,7 +354,7 @@ USA. (define (generate-xdoc-html root) (if (not (xd:xdoc? root)) (error "Top level element must be :" root)) - (html:html (xdoc-attributes root 'xmlns html-iri) + (html:html (xdoc-attributes root 'xmlns html-uri) "\n" (html:head #f "\n " @@ -1291,7 +1291,7 @@ USA. (xml-name=? name 'style) (and (xml-name-prefix=? name 'xmlns) (not (string=? (xml-attribute-value attr) - (xml-namespace-iri-string xdoc-iri))))))) + (xml-namespace-uri-string xdoc-uri))))))) (define (merged-attribute? attr) (let ((name (xml-attribute-name attr))) @@ -1404,11 +1404,11 @@ USA. ;;;; XDOC element data types -(define xdoc-iri - (make-xml-namespace-iri "http://mit.edu/2003/XDOC")) +(define xdoc-uri + (make-xml-namespace-uri "http://mit.edu/2003/XDOC")) (define (xdoc-name? name) - (xml-name-iri=? name xdoc-iri)) + (xml-name-uri=? name xdoc-uri)) (define (xdoc-name=? name local) (and (xdoc-name? name) @@ -1476,10 +1476,10 @@ USA. (let ((qname (symbol-append 'xd: local))) `(BEGIN (DEFINE ,qname - (STANDARD-XML-ELEMENT-CONSTRUCTOR ',qname XDOC-IRI + (STANDARD-XML-ELEMENT-CONSTRUCTOR ',qname XDOC-URI ,(eq? content-type 'empty))) (DEFINE ,(symbol-append qname '?) - (LET ((NAME (MAKE-XML-NAME ',qname XDOC-IRI))) + (LET ((NAME (MAKE-XML-NAME ',qname XDOC-URI))) (LAMBDA (OBJECT) (AND (XML-ELEMENT? OBJECT) (XML-NAME=? (XML-ELEMENT-NAME OBJECT) NAME))))) diff --git a/v7/src/xml/xhtml.scm b/v7/src/xml/xhtml.scm index 53d4c8de2..271a36544 100644 --- a/v7/src/xml/xhtml.scm +++ b/v7/src/xml/xhtml.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: xhtml.scm,v 1.19 2006/01/28 02:50:42 cph Exp $ +$Id: xhtml.scm,v 1.20 2006/01/30 20:20:40 cph Exp $ Copyright 2002,2003,2004,2005,2006 Massachusetts Institute of Technology @@ -27,12 +27,12 @@ USA. (declare (usual-integrations)) -(define html-iri-string "http://www.w3.org/1999/xhtml") -(define html-iri (make-xml-namespace-iri html-iri-string)) +(define html-uri-string "http://www.w3.org/1999/xhtml") +(define html-uri (make-xml-namespace-uri html-uri-string)) (define (html-element? object) (and (xml-element? object) - (xml-name-iri=? (xml-element-name object) html-iri))) + (xml-name-uri=? (xml-element-name object) html-uri))) (define (guarantee-html-element object caller) (if (not (html-element? object)) @@ -43,7 +43,7 @@ USA. (define (html-element-name? object) (and (xml-name? object) - (xml-name-iri=? object html-iri))) + (xml-name-uri=? object html-uri))) (define (guarantee-html-element-name object caller) (if (not (html-element-name? object)) @@ -109,7 +109,7 @@ USA. (append-map! (lambda (style) (list style "\n")) styles)) - (html:html (xml-attrs 'xmlns html-iri + (html:html (xml-attrs 'xmlns html-uri attrs) items) '("\n"))))) @@ -139,15 +139,15 @@ USA. (empty? (pair? (cdddr form)))) `(BEGIN (DEFINE ,(symbol-append 'HTML: name) - (STANDARD-XML-ELEMENT-CONSTRUCTOR ',name HTML-IRI ,empty?)) + (STANDARD-XML-ELEMENT-CONSTRUCTOR ',name HTML-URI ,empty?)) (DEFINE ,(symbol-append 'HTML: name '?) - (STANDARD-XML-ELEMENT-PREDICATE ',name HTML-IRI)) + (STANDARD-XML-ELEMENT-PREDICATE ',name HTML-URI)) (DEFINE-HTML-ELEMENT-CONTEXT ',name ',context))) (ill-formed-syntax form))))) (define (define-html-element-context qname context) (hash-table/put! element-context-map - (make-xml-name qname html-iri) + (make-xml-name qname html-uri) context) qname) @@ -250,9 +250,9 @@ USA. (define-html-element ul block) (define-html-element var inline) -(define (html:href iri . contents) +(define (html:href uri . contents) (apply html:a - (xml-attrs 'href iri) + (xml-attrs 'href uri) contents)) (define (html:id-def tag . contents) @@ -264,13 +264,13 @@ USA. (define (html:id-ref tag . contents) (apply html:href (string-append "#" tag) contents)) -(define (html:rel-link rel iri) +(define (html:rel-link rel uri) (html:link 'rel rel - 'href iri)) + 'href uri)) -(define (html:style-link iri) +(define (html:style-link uri) (html:link 'rel "stylesheet" - 'href iri + 'href uri 'type "text/css")) (define (html:http-equiv name value) diff --git a/v7/src/xml/xml-names.scm b/v7/src/xml/xml-names.scm index e11ebd5d0..de08fefdc 100644 --- a/v7/src/xml/xml-names.scm +++ b/v7/src/xml/xml-names.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: xml-names.scm,v 1.9 2005/12/13 15:30:28 cph Exp $ +$Id: xml-names.scm,v 1.10 2006/01/30 20:20:42 cph Exp $ -Copyright 2003,2004,2005 Massachusetts Institute of Technology +Copyright 2003,2004,2005,2006 Massachusetts Institute of Technology This file is part of MIT/GNU Scheme. @@ -27,38 +27,38 @@ USA. (declare (usual-integrations)) -(define (make-xml-name qname iri) +(define (make-xml-name qname uri) (let ((qname (make-xml-qname qname)) - (iri (make-xml-namespace-iri iri))) - (if (null-xml-namespace-iri? iri) + (uri (make-xml-namespace-uri uri))) + (if (null-xml-namespace-uri? uri) qname (begin - (check-prefix+iri qname iri) - (%make-xml-name qname iri))))) + (check-prefix+uri qname uri) + (%make-xml-name qname uri))))) -(define (check-prefix+iri qname iri) +(define (check-prefix+uri qname uri) (if (let ((s (symbol-name qname))) (let ((c (find-prefix-separator s))) (case c ((#f) #f) - ((ILLEGAL) iri) + ((ILLEGAL) uri) (else (let ((prefix (utf8-string->symbol (string-head s c)))) (or (and (eq? prefix 'xml) - (not (eq? iri xml-iri))) + (not (eq? uri xml-uri))) (and (eq? prefix 'xmlns) - (not (eq? iri xmlns-iri))))))))) - (error:bad-range-argument iri 'MAKE-XML-NAME))) + (not (eq? uri xmlns-uri))))))))) + (error:bad-range-argument uri 'MAKE-XML-NAME))) -(define (%make-xml-name qname iri) +(define (%make-xml-name qname uri) (let ((uname (let ((local (xml-qname-local qname))) (hash-table/intern! (hash-table/intern! expanded-names - iri + uri make-eq-hash-table) local (lambda () - (make-expanded-name iri + (make-expanded-name uri local (make-eq-hash-table))))))) (hash-table/intern! (expanded-name-combos uname) @@ -146,13 +146,13 @@ USA. (define (xml-name-qname=? name qname) (eq? (xml-name-qname name) qname)) -(define (xml-name-iri name) - (cond ((xml-qname? name) (null-xml-namespace-iri)) - ((combo-name? name) (expanded-name-iri (combo-name-expanded name))) - (else (error:not-xml-name name 'XML-NAME-IRI)))) +(define (xml-name-uri name) + (cond ((xml-qname? name) (null-xml-namespace-uri)) + ((combo-name? name) (expanded-name-uri (combo-name-expanded name))) + (else (error:not-xml-name name 'XML-NAME-URI)))) -(define (xml-name-iri=? name iri) - (eq? (xml-name-iri name) iri)) +(define (xml-name-uri=? name uri) + (eq? (xml-name-uri name) uri)) (define (xml-name-prefix name) (xml-qname-prefix @@ -266,59 +266,59 @@ USA. (write (combo-name-qname name) port)))) (define-record-type - (make-expanded-name iri local combos) + (make-expanded-name uri local combos) expanded-name? - (iri expanded-name-iri) + (uri expanded-name-uri) (local expanded-name-local) (combos expanded-name-combos)) -;;;; Namespace IRI +;;;; Namespace URI -(define (make-xml-namespace-iri object) +(define (make-xml-namespace-uri object) (if (string? object) (begin - (if (not (string-is-namespace-iri? object)) - (error:bad-range-argument object 'MAKE-XML-NAMESPACE-IRI)) - (hash-table/intern! namespace-iris object + (if (not (string-is-namespace-uri? object)) + (error:bad-range-argument object 'MAKE-XML-NAMESPACE-URI)) + (hash-table/intern! namespace-uris object (lambda () - (%make-xml-namespace-iri object)))) + (%make-xml-namespace-uri object)))) (begin - (guarantee-xml-namespace-iri object 'MAKE-XML-NAMESPACE-IRI) + (guarantee-xml-namespace-uri object 'MAKE-XML-NAMESPACE-URI) object))) -(define (string-is-namespace-iri? object) +(define (string-is-namespace-uri? object) ;; See RFC 1630 for correct syntax. (utf8-string-valid? object)) -(define namespace-iris +(define namespace-uris (make-string-hash-table)) -(define-record-type - (%make-xml-namespace-iri string) - xml-namespace-iri? - (string %xml-namespace-iri-string)) +(define-record-type + (%make-xml-namespace-uri string) + xml-namespace-uri? + (string %xml-namespace-uri-string)) -(define (guarantee-xml-namespace-iri object caller) - (if (not (xml-namespace-iri? object)) - (error:not-xml-namespace-iri object caller))) +(define (guarantee-xml-namespace-uri object caller) + (if (not (xml-namespace-uri? object)) + (error:not-xml-namespace-uri object caller))) -(define (xml-namespace-iri-string iri) - (string-copy (%xml-namespace-iri-string iri))) +(define (xml-namespace-uri-string uri) + (string-copy (%xml-namespace-uri-string uri))) -(define (null-xml-namespace-iri? object) - (eq? object null-namespace-iri)) +(define (null-xml-namespace-uri? object) + (eq? object null-namespace-uri)) -(define (null-xml-namespace-iri) - null-namespace-iri) +(define (null-xml-namespace-uri) + null-namespace-uri) -(define null-namespace-iri - (make-xml-namespace-iri "")) +(define null-namespace-uri + (make-xml-namespace-uri "")) -(define (error:not-xml-namespace-iri object caller) - (error:wrong-type-argument object "an XML namespace IRI" caller)) +(define (error:not-xml-namespace-uri object caller) + (error:wrong-type-argument object "an XML namespace URI" caller)) -(define xml-iri - (make-xml-namespace-iri "http://www.w3.org/XML/1998/namespace")) +(define xml-uri + (make-xml-namespace-uri "http://www.w3.org/XML/1998/namespace")) -(define xmlns-iri - (make-xml-namespace-iri "http://www.w3.org/2000/xmlns/")) \ No newline at end of file +(define xmlns-uri + (make-xml-namespace-uri "http://www.w3.org/2000/xmlns/")) \ No newline at end of file diff --git a/v7/src/xml/xml-output.scm b/v7/src/xml/xml-output.scm index c70590a6b..ed6f2c7e9 100644 --- a/v7/src/xml/xml-output.scm +++ b/v7/src/xml/xml-output.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: xml-output.scm,v 1.38 2006/01/26 05:53:49 cph Exp $ +$Id: xml-output.scm,v 1.39 2006/01/30 20:20:43 cph Exp $ Copyright 2001,2002,2003,2004,2005 Massachusetts Institute of Technology @@ -461,15 +461,15 @@ USA. (write-indent col ctx) (emit-string "PUBLIC " ctx) (quoted-string (xml-external-id-id id)) - (if (xml-external-id-iri id) + (if (xml-external-id-uri id) (begin (write-indent col ctx) - (quoted-string (xml-external-id-iri id))))) + (quoted-string (xml-external-id-uri id))))) (begin (write-indent col ctx) (emit-string "SYSTEM" ctx) (emit-string " " ctx) - (quoted-string (xml-external-id-iri id)))))) + (quoted-string (xml-external-id-uri id)))))) (define (write-indent col ctx) (if col diff --git a/v7/src/xml/xml-parser.scm b/v7/src/xml/xml-parser.scm index f54d8faed..4f1e1da56 100644 --- a/v7/src/xml/xml-parser.scm +++ b/v7/src/xml/xml-parser.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: xml-parser.scm,v 1.65 2005/12/13 15:30:39 cph Exp $ +$Id: xml-parser.scm,v 1.66 2006/01/30 20:20:44 cph Exp $ -Copyright 2001,2002,2003,2004,2005 Massachusetts Institute of Technology +Copyright 2001,2002,2003,2004,2005,2006 Massachusetts Institute of Technology This file is part of MIT/GNU Scheme. @@ -566,28 +566,28 @@ USA. (tail (loop (cdr attrs)))) (let ((qname (car uname)) (p (cdr uname))) - (let ((get-iri (lambda () (make-xml-namespace-iri value))) - (forbidden-iri - (lambda (iri) - (perror p "Forbidden namespace IRI" iri)))) - (let ((guarantee-legal-iri - (lambda (iri) - (if (or (eq? iri xml-iri) - (eq? iri xmlns-iri)) - (forbidden-iri iri))))) + (let ((get-uri (lambda () (make-xml-namespace-uri value))) + (forbidden-uri + (lambda (uri) + (perror p "Forbidden namespace URI" uri)))) + (let ((guarantee-legal-uri + (lambda (uri) + (if (or (eq? uri xml-uri) + (eq? uri xmlns-uri)) + (forbidden-uri uri))))) (cond ((xml-name=? qname 'xmlns) - (let ((iri (get-iri))) - (guarantee-legal-iri iri) - (cons (cons (null-xml-name-prefix) iri) tail))) + (let ((uri (get-uri))) + (guarantee-legal-uri uri) + (cons (cons (null-xml-name-prefix) uri) tail))) ((xml-name-prefix=? qname 'xmlns) (if (xml-name=? qname 'xmlns:xmlns) (perror p "Illegal namespace prefix" qname)) - (let ((iri (get-iri))) + (let ((uri (get-uri))) (if (xml-name=? qname 'xmlns:xml) - (if (not (eq? iri xml-iri)) - (forbidden-iri iri)) - (guarantee-legal-iri iri)) - (cons (cons (xml-name-local qname) iri) tail))) + (if (not (eq? uri xml-uri)) + (forbidden-uri uri)) + (guarantee-legal-uri uri)) + (cons (cons (xml-name-local qname) uri) tail))) (else tail)))))) *prefix-bindings*))) unspecific) @@ -600,20 +600,20 @@ USA. (p (cdr uname))) (if *in-dtd?* qname - (let ((iri (lookup-namespace-prefix qname p attribute-name?))) - (if (null-xml-namespace-iri? iri) + (let ((uri (lookup-namespace-prefix qname p attribute-name?))) + (if (null-xml-namespace-uri? uri) qname - (%make-xml-name qname iri)))))) + (%make-xml-name qname uri)))))) (define (lookup-namespace-prefix qname p attribute-name?) (let ((prefix (xml-qname-prefix qname))) (cond ((eq? prefix 'xmlns) - xmlns-iri) + xmlns-uri) ((eq? prefix 'xml) - xml-iri) + xml-uri) ((and attribute-name? (null-xml-name-prefix? prefix)) - (null-xml-namespace-iri)) + (null-xml-namespace-uri)) (else (let ((entry (assq prefix *prefix-bindings*))) (if entry @@ -621,7 +621,7 @@ USA. (begin (if (not (null-xml-name-prefix? prefix)) (perror p "Undeclared XML prefix" prefix)) - (null-xml-namespace-iri)))))))) + (null-xml-namespace-uri)))))))) ;;;; Processing instructions @@ -1027,10 +1027,10 @@ USA. (define *general-entities*) (define *entity-expansion-nesting* '()) -(define (make-external-id id iri p) +(define (make-external-id id uri p) (if *standalone?* (perror p "Illegal external reference in standalone document")) - (make-xml-external-id id iri)) + (make-xml-external-id id uri)) ;;;; Document-type declarations diff --git a/v7/src/xml/xml-rpc.scm b/v7/src/xml/xml-rpc.scm index 7a7518c14..729ade41d 100644 --- a/v7/src/xml/xml-rpc.scm +++ b/v7/src/xml/xml-rpc.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: xml-rpc.scm,v 1.3 2005/03/25 18:43:12 cph Exp $ +$Id: xml-rpc.scm,v 1.4 2006/01/30 20:20:45 cph Exp $ -Copyright 2003,2004,2005 Massachusetts Institute of Technology +Copyright 2003,2004,2005,2006 Massachusetts Institute of Technology This file is part of MIT/GNU Scheme. @@ -306,7 +306,7 @@ USA. (define (rpc-elt name empty?) (let ((make-elt (standard-xml-element-constructor name - (null-xml-namespace-iri) + (null-xml-namespace-uri) empty?))) (if empty? (lambda () diff --git a/v7/src/xml/xml-struct.scm b/v7/src/xml/xml-struct.scm index c0b7eed76..12964d4ec 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.50 2006/01/26 05:44:33 cph Exp $ +$Id: xml-struct.scm,v 1.51 2006/01/30 20:20:46 cph Exp $ Copyright 2001,2002,2003,2004,2005,2006 Massachusetts Institute of Technology @@ -259,7 +259,7 @@ USA. (id (lambda (object) (or (not object) (public-id? object)))) - (iri canonicalize + (uri canonicalize (lambda (object) (and object (canonicalize-char-data object))))) @@ -419,7 +419,7 @@ USA. (define-xml-printer external-id (lambda (dtd) (or (xml-external-id-id dtd) - (xml-external-id-iri dtd)))) + (xml-external-id-uri dtd)))) (define (xml-attribute-namespace-decl? attr) (let ((name (xml-attribute-name attr))) @@ -430,22 +430,22 @@ USA. (keep-matching-items (xml-element-attributes elt) xml-attribute-namespace-decl?)) -(define (xml-element-namespace-iri elt prefix) +(define (xml-element-namespace-uri elt prefix) (let ((value (find-xml-attr (if (null-xml-name-prefix? prefix) 'xmlns (symbol-append 'xmlns: prefix)) elt))) (and value - (make-xml-namespace-iri value)))) + (make-xml-namespace-uri value)))) -(define (xml-element-namespace-prefix elt iri) - (let ((iri (xml-namespace-iri-string iri))) +(define (xml-element-namespace-prefix elt uri) + (let ((uri (xml-namespace-uri-string uri))) (let ((attr (find-matching-item (xml-element-attributes elt) (lambda (attr) (and (xml-attribute-namespace-decl? attr) - (string=? (xml-attribute-value attr) iri)))))) + (string=? (xml-attribute-value attr) uri)))))) (and attr (let ((name (xml-attribute-name attr))) (if (xml-name=? name 'xmlns) @@ -481,8 +481,8 @@ USA. (write-char #\" port)) (apply xml-attrs items)))))) -(define (standard-xml-element-constructor qname iri empty?) - (let ((name (make-xml-name qname iri))) +(define (standard-xml-element-constructor qname uri empty?) + (let ((name (make-xml-name qname uri))) (if empty? (lambda items (make-xml-element name (apply xml-attrs items) '())) @@ -491,8 +491,8 @@ USA. (if (not attrs) '() attrs) (flatten-xml-element-content items)))))) -(define (standard-xml-element-predicate qname iri) - (let ((name (make-xml-name qname iri))) +(define (standard-xml-element-predicate qname uri) + (let ((name (make-xml-name qname uri))) (lambda (object) (and (xml-element? object) (xml-name=? (xml-element-name object) name))))) @@ -569,7 +569,7 @@ USA. (cond ((xml-content-item? value) value) ((symbol? value) (symbol-name value)) ((number? value) (number->string value)) - ((xml-namespace-iri? value) (xml-namespace-iri-string value)) + ((xml-namespace-uri? value) (xml-namespace-uri-string value)) ((list-of-type? value xml-nmtoken?) (nmtokens->string value)) (else (error:wrong-type-datum value "XML string value")))) diff --git a/v7/src/xml/xml.pkg b/v7/src/xml/xml.pkg index 9858e9856..7e5f1566c 100644 --- a/v7/src/xml/xml.pkg +++ b/v7/src/xml/xml.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: xml.pkg,v 1.61 2006/01/28 02:48:36 cph Exp $ +$Id: xml.pkg,v 1.62 2006/01/30 20:20:41 cph Exp $ Copyright 2001,2002,2003,2004,2005,2006 Massachusetts Institute of Technology @@ -36,30 +36,27 @@ USA. (files "xml-names") (parent (runtime xml)) (export () - + error:not-xml-name - error:not-xml-namespace-iri + error:not-xml-namespace-uri error:not-xml-nmtoken error:not-xml-qname guarantee-xml-name - guarantee-xml-namespace-iri + guarantee-xml-namespace-uri guarantee-xml-nmtoken guarantee-xml-qname make-xml-name make-xml-name-hash-table - make-xml-namespace-iri + make-xml-namespace-uri make-xml-nmtoken make-xml-qname null-xml-name-prefix null-xml-name-prefix? - null-xml-namespace-iri - null-xml-namespace-iri? + null-xml-namespace-uri + null-xml-namespace-uri? string-is-xml-name? string-is-xml-nmtoken? - xml-iri xml-name-hash - xml-name-iri - xml-name-iri=? xml-name-local xml-name-local=? xml-name-prefix @@ -67,17 +64,20 @@ USA. xml-name-qname xml-name-qname=? xml-name-string + xml-name-uri + xml-name-uri=? xml-name=? xml-name? - xml-namespace-iri-string - xml-namespace-iri? + xml-namespace-uri-string + xml-namespace-uri? xml-nmtoken-string xml-nmtoken? xml-qname-local xml-qname-prefix xml-qname-string xml-qname? - xmlns-iri) + xml-uri + xmlns-uri) (export (runtime xml) %make-xml-name string-composed-of? @@ -184,7 +184,7 @@ USA. set-xml-element-name! set-xml-entity-ref-name! set-xml-external-id-id! - set-xml-external-id-iri! + set-xml-external-id-uri! set-xml-parameter-!entity-name! set-xml-parameter-!entity-value! set-xml-parameter-entity-ref-name! @@ -242,7 +242,7 @@ USA. xml-entity-ref-name xml-entity-ref? xml-external-id-id - xml-external-id-iri + xml-external-id-uri xml-external-id? xml-misc-content-item? xml-misc-content? @@ -327,8 +327,8 @@ USA. html-element-names html-element? html-external-id? - html-iri html-public-id? + html-uri html:a html:a? html:abbr diff --git a/v7/src/xml/xpath.scm b/v7/src/xml/xpath.scm index 7e614cc6c..2b2bd5003 100644 --- a/v7/src/xml/xpath.scm +++ b/v7/src/xml/xpath.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: xpath.scm,v 1.3 2004/08/12 06:18:44 cph Exp $ +$Id: xpath.scm,v 1.4 2006/01/30 20:20:47 cph Exp $ Copyright 2003,2004 Massachusetts Institute of Technology @@ -117,11 +117,11 @@ USA. (make-xml-name qname (expand-prefix prefix node))))) (define (expand-prefix prefix node) - (cond ((eq? prefix 'xml) xml-iri) - ((eq? prefix 'xmlns) xmlns-iri) + (cond ((eq? prefix 'xml) xml-uri) + ((eq? prefix 'xmlns) xmlns-uri) (else (let loop ((node node)) - (or (xml-element-namespace-iri (node-item node) prefix) + (or (xml-element-namespace-uri (node-item node) prefix) (let ((parent (parent-node node))) (if (not (element-node? parent)) (error:bad-range-argument prefix 'EXPAND-PREFIX)) @@ -359,11 +359,11 @@ USA. (simple-node-test (lambda (node) (and (element-node? node) - (xml-name-iri=? (node-name node) (expand-prefix prefix node)))))) + (xml-name-uri=? (node-name node) (expand-prefix prefix node)))))) ((attribute) (simple-node-test (lambda (node) - (xml-name-iri=? (node-name node) + (xml-name-uri=? (node-name node) (expand-prefix prefix (node-parent node)))))) ((namespace) null-node-test) (else (error:bad-range-argument type 'NODE-TEST:PREFIX:*)))) -- 2.25.1