;;; -*-Scheme-*-
;;;
-;;; $Id: compile.scm,v 1.3 2001/07/14 11:44:13 cph Exp $
+;;; $Id: compile.scm,v 1.4 2001/07/16 20:40:20 cph Exp $
;;;
;;; Copyright (c) 2001 Massachusetts Institute of Technology
;;;
(for-each compile-file
'("xml-struct"
"xml-chars"
- "xml-parser"
- ;;"xml-output"
- ))))
+ "xml-output"
+ "xml-parser"))))
(cref/generate-constructors "xml")
(sf "xml.con")
(sf "xml.ldr")))
\ No newline at end of file
;;; -*-Scheme-*-
;;;
-;;; $Id: ed-ffi.scm,v 1.2 2001/07/12 03:24:32 cph Exp $
+;;; $Id: ed-ffi.scm,v 1.3 2001/07/16 20:40:23 cph Exp $
;;;
;;; Copyright (c) 2001 Massachusetts Institute of Technology
;;;
(standard-scheme-find-file-initialization
'#(("xml-chars" (runtime xml parser) system-global-syntax-table)
("xml-struct" (runtime xml structure) system-global-syntax-table)
+ ("xml-output" (runtime xml output) system-global-syntax-table)
("xml-parser" (runtime xml parser) system-global-syntax-table)))
\ No newline at end of file
;;; -*-Scheme-*-
;;;
-;;; $Id: test-parser.scm,v 1.4 2001/07/12 05:08:16 cph Exp $
+;;; $Id: test-parser.scm,v 1.5 2001/07/16 20:40:25 cph Exp $
;;;
;;; Copyright (c) 2001 Massachusetts Institute of Technology
;;;
(test-directory (merge-pathnames dir root)))
'("valid/sa" "valid/ext-sa" "valid/not-sa"
"invalid"
- "not-wf/sa" "not-wf/ext-sa" "not-wf/not-sa"))))
\ No newline at end of file
+ "not-wf/sa" "not-wf/ext-sa" "not-wf/not-sa"))))
+
+(define (run-output-tests root output)
+ (let ((root
+ (merge-pathnames "xmlconf/xmltest/"
+ (pathname-as-directory root)))
+ (output (pathname-as-directory output)))
+ (for-each (lambda (pathname)
+ (write-string ";")
+ (write-string (file-namestring pathname))
+ (write-string ":\t")
+ (let ((v (ignore-errors (lambda () (test-parser pathname)))))
+ (cond ((not v)
+ (write-string "No match.")
+ (newline))
+ ((condition? v)
+ (write-condition-report v (current-output-port))
+ (newline))
+ (else
+ (write-string "Parsed: ")
+ (write v)
+ (newline)
+ (call-with-output-file
+ (merge-pathnames (file-pathname pathname) output)
+ (lambda (port)
+ (write-xml v port)))))
+ v))
+ (directory-read (merge-pathnames "valid/sa/*.xml" root)))))
\ No newline at end of file
;;; -*-Scheme-*-
;;;
-;;; $Id: xml.pkg,v 1.5 2001/07/16 18:54:48 cph Exp $
+;;; $Id: xml.pkg,v 1.6 2001/07/16 20:40:28 cph Exp $
;;;
;;; Copyright (c) 2001 Massachusetts Institute of Technology
;;;
(files "xml-chars" "xml-parser")
(parent ())
(export ()
- parse-xml-document))
\ No newline at end of file
+ parse-xml-document))
+
+(define-package (runtime xml output)
+ (files "xml-output")
+ (parent ())
+ (export ()
+ write-xml))
\ No newline at end of file