new slot omit-xml-declaration-p on sink
This commit is contained in:
@ -50,6 +50,8 @@
|
|||||||
;; #-rune-is-character
|
;; #-rune-is-character
|
||||||
#:make-character-stream-sink/utf8
|
#:make-character-stream-sink/utf8
|
||||||
|
|
||||||
|
#:omit-xml-declaration-p
|
||||||
|
|
||||||
#:with-xml-output
|
#:with-xml-output
|
||||||
#:with-output-sink
|
#:with-output-sink
|
||||||
#:with-namespace
|
#:with-namespace
|
||||||
|
|||||||
@ -80,7 +80,10 @@
|
|||||||
(previous-notation :initform nil :accessor previous-notation)
|
(previous-notation :initform nil :accessor previous-notation)
|
||||||
(have-doctype :initform nil :accessor have-doctype)
|
(have-doctype :initform nil :accessor have-doctype)
|
||||||
(have-internal-subset :initform nil :accessor have-internal-subset)
|
(have-internal-subset :initform nil :accessor have-internal-subset)
|
||||||
(stack :initform nil :accessor stack)))
|
(stack :initform nil :accessor stack)
|
||||||
|
(omit-xml-declaration-p :initform nil
|
||||||
|
:initarg :omit-xml-declaration-p
|
||||||
|
:accessor omit-xml-declaration-p)))
|
||||||
|
|
||||||
#-rune-is-character
|
#-rune-is-character
|
||||||
(defmethod hax:%want-strings-p ((handler sink))
|
(defmethod hax:%want-strings-p ((handler sink))
|
||||||
@ -134,7 +137,8 @@
|
|||||||
;;;; doctype and notations
|
;;;; doctype and notations
|
||||||
|
|
||||||
(defmethod sax:start-document ((sink sink))
|
(defmethod sax:start-document ((sink sink))
|
||||||
(unless (canonical sink)
|
(unless (or (canonical sink)
|
||||||
|
(omit-xml-declaration-p sink))
|
||||||
(%write-rod #"<?xml version=\"1.0\" encoding=\"UTF-8\"?>" sink)
|
(%write-rod #"<?xml version=\"1.0\" encoding=\"UTF-8\"?>" sink)
|
||||||
(%write-rune #/U+000A sink)))
|
(%write-rune #/U+000A sink)))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user