From d9fe9dfd51c56789a74225b5b714cfe6ca418166 Mon Sep 17 00:00:00 2001
From: dlichteblau
diff --git a/xml/package.lisp b/xml/package.lisp index c0d1550..580af19 100644 --- a/xml/package.lisp +++ b/xml/package.lisp @@ -58,6 +58,7 @@ #:unparse-attribute #:cdata #:text + #:doctype #:xml-parse-error #:well-formedness-violation diff --git a/xml/unparse.lisp b/xml/unparse.lisp index abf8796..a9a2482 100644 --- a/xml/unparse.lisp +++ b/xml/unparse.lisp @@ -564,6 +564,12 @@ (defmacro with-namespace ((prefix uri) &body body) `(invoke-with-namespace (lambda () ,@body) ,prefix ,uri)) +(defun doctype (name public-id system-id &optional internal-subset) + (sax:start-dtd *sink* name public-id system-id) + (when internal-subset + (sax:unparsed-internal-subset *sink* internal-subset)) + (sax:end-dtd *sink*)) + (defun maybe-emit-start-tag () (when *current-element* ;; starting child node, need to emit opening tag of parent first: