[cxml-cvs] CVS cxml/xml
dlichteblau
dlichteblau at common-lisp.net
Sun Oct 14 20:19:35 UTC 2007
Update of /project/cxml/cvsroot/cxml/xml
In directory clnet:/tmp/cvs-serv30396/xml
Modified Files:
sax-handler.lisp
Log Message:
HAX namespace stuff
* xml/sax-handler.lisp (HAX:START-ELEMENT, HAX:END-ELEMENT):
Declare and undeclare the xhtml namespace on elements called
"HTML".
--- /project/cxml/cvsroot/cxml/xml/sax-handler.lisp 2007/10/14 19:04:36 1.10
+++ /project/cxml/cvsroot/cxml/xml/sax-handler.lisp 2007/10/14 20:19:35 1.11
@@ -429,6 +429,15 @@
(defmethod hax:start-element ((handler abstract-handler) name attributes)
(setf name (runes:rod-downcase name))
+ (when (equal name "html")
+ (sax:start-prefix-mapping handler "" "http://www.w3.org/1999/xhtml")
+ (when *include-xmlns-attributes*
+ (push (make-attribute :namespace-uri "http://www.w3.org/2000/xmlns/"
+ :local-name nil
+ :qname "xmlns"
+ :value "http://www.w3.org/1999/xhtml"
+ :specified-p t)
+ attributes)))
(sax:start-element handler
"http://www.w3.org/1999/xhtml"
name
@@ -440,7 +449,9 @@
(sax:end-element handler
"http://www.w3.org/1999/xhtml"
name
- name))
+ name)
+ (when (equal name "html")
+ (sax:end-prefix-mapping handler "")))
(defmethod hax:characters ((handler abstract-handler) data)
(sax:characters handler data))
More information about the Cxml-cvs
mailing list