namespace fixes

This commit is contained in:
dlichteblau
2006-08-20 14:59:34 +00:00
parent 111b5db45a
commit 8f2254d820
3 changed files with 8 additions and 3 deletions

View File

@ -111,8 +111,10 @@
<ul class="nomargin">
<li>Serialization fixes (thanks to Nathan Bird, Donavon Keithley).</li>
<li>characters.lisp cleanup (thanks to Nathan Bird).</li>
<li>Namespace normalizer bugfixes.</li>
<li>Minor changes: clone-node on document as an extension. DOM
class hierarchy reworked. New function parse-empty-document.</li>
class hierarchy reworked. New function parse-empty-document.
Fixed the DOM serializer to not throw away local names.</li>
</ul>
<p class="nomargin"><tt>rel-2006-01-05</tt></p>
<ul class="nomargin">

View File

@ -88,6 +88,7 @@
(push
(sax:make-attribute :qname (dom:name a)
:value (dom:value a)
:local-name (dom:local-name a)
:namespace-uri (dom:namespace-uri a)
:specified-p (dom:specified a))
results)))

View File

@ -38,6 +38,8 @@
:chained-handler chained-handler))
(defun normalizer-find-prefix (handler prefix)
(when (zerop (length prefix))
(setf prefix #"xmlns"))
(block t
(dolist (bindings (xmlns-stack handler))
(dolist (attribute bindings)
@ -54,7 +56,7 @@
(return-from t attribute))))))
(defun make-xmlns-attribute (prefix uri)
(if prefix
(if (and (plusp (length prefix)) (not (equal prefix #"xmlns")))
(sax:make-attribute
:qname (concatenate 'rod #"xmlns:" prefix)
:namespace-uri *xmlns-namespace*
@ -112,7 +114,7 @@
(rename-attribute
a
(sax:attribute-local-name uri-binding)))
((null prefix-binding)
((and prefix (null prefix-binding))
(push-namespace prefix u))
(t
(loop