processing documents.
;;; -*-Scheme-*-
;;;
-;;; $Id: load.scm,v 1.6 2002/11/20 19:46:27 cph Exp $
+;;; $Id: load.scm,v 1.7 2002/12/07 04:13:39 cph Exp $
;;;
;;; Copyright (c) 2001, 2002 Massachusetts Institute of Technology
;;;
(with-working-directory-pathname (directory-pathname (current-load-pathname))
(lambda ()
(package/system-loader "xml" '() 'QUERY)))
-(add-subsystem-identification! "XML" '(0 2))
\ No newline at end of file
+(add-subsystem-identification! "XML" '(0 3))
\ No newline at end of file
;;; -*-Scheme-*-
;;;
-;;; $Id: xml-output.scm,v 1.2 2002/11/20 19:46:27 cph Exp $
+;;; $Id: xml-output.scm,v 1.3 2002/12/07 04:13:58 cph Exp $
;;;
-;;; Copyright (c) 2001 Massachusetts Institute of Technology
+;;; Copyright (c) 2001, 2002 Massachusetts Institute of Technology
;;;
;;; This file is part of MIT Scheme.
;;;
(write-string "</" port)
(write-xml-name (xml-element-name element) port)
(write-string ">" port))
- (write-string "/>" port))))
+ (write-string " />" port))))
+
+(define-method write-xml ((pi xml-comment-rtd) port)
+ (write-string "<!--" port)
+ (write-string (xml-comment-text pi) port)
+ (write-string "-->" port))
(define-method write-xml ((pi xml-processing-instructions-rtd) port)
(write-string "<?" port)
;;; -*-Scheme-*-
;;;
-;;; $Id: xml-parser.scm,v 1.12 2002/11/20 19:46:27 cph Exp $
+;;; $Id: xml-parser.scm,v 1.13 2002/12/07 04:14:09 cph Exp $
;;;
-;;; Copyright (c) 2001 Massachusetts Institute of Technology
+;;; Copyright (c) 2001, 2002 Massachusetts Institute of Technology
;;;
;;; This file is part of MIT Scheme.
;;;
(terminated-region-parser "character data" alphabet:char-data "]]>"))
(define parse-comment ;[15]
- (let ((match-body
- (terminated-region-matcher "comment" alphabet:xml-char "--")))
+ (let ((parse-body
+ (terminated-region-parser "comment" alphabet:xml-char "--")))
(*parser
- (sbracket "comment" "<!--" "-->"
- (noise match-body)))))
+ (encapsulate
+ (lambda (v)
+ (make-xml-comment (vector-ref v 0)))
+ (sbracket "comment" "<!--" "-->"
+ parse-body)))))
(define parse-cdata-section ;[18,19,20,21]
(bracketed-region-parser "CDATA section" "<![CDATA[" "]]>"))
;;; -*-Scheme-*-
;;;
-;;; $Id: xml-struct.scm,v 1.6 2002/11/20 19:46:27 cph Exp $
+;;; $Id: xml-struct.scm,v 1.7 2002/12/07 04:14:19 cph Exp $
;;;
-;;; Copyright (c) 2001 Massachusetts Institute of Technology
+;;; Copyright (c) 2001, 2002 Massachusetts Institute of Technology
;;;
;;; This file is part of MIT Scheme.
;;;
attributes
contents)
+(define-structure (xml-comment
+ (type-descriptor xml-comment-rtd))
+ text)
+
(define-structure (xml-processing-instructions
(type-descriptor xml-processing-instructions-rtd)
(print-procedure
;;; -*-Scheme-*-
;;;
-;;; $Id: xml.pkg,v 1.10 2002/11/20 19:46:27 cph Exp $
+;;; $Id: xml.pkg,v 1.11 2002/12/07 04:13:49 cph Exp $
;;;
-;;; Copyright (c) 2001 Massachusetts Institute of Technology
+;;; Copyright (c) 2001, 2002 Massachusetts Institute of Technology
;;;
;;; This file is part of MIT Scheme.
;;;
make-xml-!element
make-xml-!entity
make-xml-!notation
+ make-xml-comment
make-xml-declaration
make-xml-document
make-xml-dtd
set-xml-!entity-value!
set-xml-!notation-id!
set-xml-!notation-name!
+ set-xml-comment-text!
set-xml-declaration-encoding!
set-xml-declaration-standalone!
set-xml-declaration-version!
xml-!notation-name
xml-!notation-rtd
xml-!notation?
+ xml-comment-rtd
+ xml-comment-text
+ xml-comment?
xml-declaration-encoding
xml-declaration-rtd
xml-declaration-standalone