namespace fixes
This commit is contained in:
@ -111,8 +111,10 @@
|
|||||||
<ul class="nomargin">
|
<ul class="nomargin">
|
||||||
<li>Serialization fixes (thanks to Nathan Bird, Donavon Keithley).</li>
|
<li>Serialization fixes (thanks to Nathan Bird, Donavon Keithley).</li>
|
||||||
<li>characters.lisp cleanup (thanks to Nathan Bird).</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
|
<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>
|
</ul>
|
||||||
<p class="nomargin"><tt>rel-2006-01-05</tt></p>
|
<p class="nomargin"><tt>rel-2006-01-05</tt></p>
|
||||||
<ul class="nomargin">
|
<ul class="nomargin">
|
||||||
|
|||||||
@ -88,6 +88,7 @@
|
|||||||
(push
|
(push
|
||||||
(sax:make-attribute :qname (dom:name a)
|
(sax:make-attribute :qname (dom:name a)
|
||||||
:value (dom:value a)
|
:value (dom:value a)
|
||||||
|
:local-name (dom:local-name a)
|
||||||
:namespace-uri (dom:namespace-uri a)
|
:namespace-uri (dom:namespace-uri a)
|
||||||
:specified-p (dom:specified a))
|
:specified-p (dom:specified a))
|
||||||
results)))
|
results)))
|
||||||
|
|||||||
@ -38,6 +38,8 @@
|
|||||||
:chained-handler chained-handler))
|
:chained-handler chained-handler))
|
||||||
|
|
||||||
(defun normalizer-find-prefix (handler prefix)
|
(defun normalizer-find-prefix (handler prefix)
|
||||||
|
(when (zerop (length prefix))
|
||||||
|
(setf prefix #"xmlns"))
|
||||||
(block t
|
(block t
|
||||||
(dolist (bindings (xmlns-stack handler))
|
(dolist (bindings (xmlns-stack handler))
|
||||||
(dolist (attribute bindings)
|
(dolist (attribute bindings)
|
||||||
@ -54,7 +56,7 @@
|
|||||||
(return-from t attribute))))))
|
(return-from t attribute))))))
|
||||||
|
|
||||||
(defun make-xmlns-attribute (prefix uri)
|
(defun make-xmlns-attribute (prefix uri)
|
||||||
(if prefix
|
(if (and (plusp (length prefix)) (not (equal prefix #"xmlns")))
|
||||||
(sax:make-attribute
|
(sax:make-attribute
|
||||||
:qname (concatenate 'rod #"xmlns:" prefix)
|
:qname (concatenate 'rod #"xmlns:" prefix)
|
||||||
:namespace-uri *xmlns-namespace*
|
:namespace-uri *xmlns-namespace*
|
||||||
@ -112,7 +114,7 @@
|
|||||||
(rename-attribute
|
(rename-attribute
|
||||||
a
|
a
|
||||||
(sax:attribute-local-name uri-binding)))
|
(sax:attribute-local-name uri-binding)))
|
||||||
((null prefix-binding)
|
((and prefix (null prefix-binding))
|
||||||
(push-namespace prefix u))
|
(push-namespace prefix u))
|
||||||
(t
|
(t
|
||||||
(loop
|
(loop
|
||||||
|
|||||||
Reference in New Issue
Block a user