DOM 2 Core. Ungetestet, aber die 1er tests laufen wieder, daher rein damit.

This commit is contained in:
dlichteblau
2005-12-04 18:43:49 +00:00
parent 0e994ba607
commit 74cb5b7f8c
15 changed files with 1299 additions and 811 deletions

View File

@ -1,9 +1,20 @@
(in-package :cxml)
(defun unparse-document-to-octets (doc &rest initargs)
(let ((sink (apply #'make-octet-vector-sink initargs)))
(dom:map-document sink doc :include-default-values t)))
(defun %unparse-document (sink doc canonical)
(dom:map-document sink
doc
:include-doctype (if (and canonical (>= canonical 2))
:canonical-notations
nil)
:include-default-values t))
(defun unparse-document (doc character-stream &rest initargs)
(let ((sink (apply #'make-character-stream-sink character-stream initargs)))
(dom:map-document sink doc :include-default-values t)))
(defun unparse-document-to-octets (doc &rest initargs &key canonical)
(%unparse-document (apply #'make-octet-vector-sink initargs)
doc
canonical))
(defun unparse-document (doc character-stream &rest initargs &key canonical)
(%unparse-document
(apply #'make-character-stream-sink character-stream initargs)
doc
canonical))