[cxml-cvs] CVS cxml/xml

dlichteblau dlichteblau at common-lisp.net
Sat Nov 24 00:04:16 UTC 2007


Update of /project/cxml/cvsroot/cxml/xml
In directory clnet:/tmp/cvs-serv31472

Modified Files:
	unparse.lisp xml-parse.lisp 
Log Message:
fixed DTD serialization bugs, thanks to _3b for the report


--- /project/cxml/cvsroot/cxml/xml/unparse.lisp	2007/11/18 18:43:11	1.23
+++ /project/cxml/cvsroot/cxml/xml/unparse.lisp	2007/11/24 00:04:16	1.24
@@ -286,6 +286,8 @@
 		 (%write-rod "EMPTY" sink))
 	       ((eq m :PCDATA)
 		 (%write-rod "#PCDATA" sink))
+	       ((eq m :ANY)
+		 (%write-rod "ANY" sink))
 	       ((atom m)
 		 (unparse-string m sink))
 	       (t
@@ -306,13 +308,13 @@
 		     (%write-rune #/\) sink))
 		   (*
 		     (walk (second m))
-		     (%write-rod #/* sink))
+		     (%write-rune #/* sink))
 		   (+
 		     (walk (second m))
-		     (%write-rod #/+ sink))
+		     (%write-rune #/+ sink))
 		   (?
 		     (walk (second m))
-		     (%write-rod #/? sink)))))))
+		     (%write-rune #/? sink)))))))
     (walk model))
   (%write-rune #/> sink)
   (%write-rune #/U+000A sink))
--- /project/cxml/cvsroot/cxml/xml/xml-parse.lisp	2007/10/14 18:40:26	1.74
+++ /project/cxml/cvsroot/cxml/xml/xml-parse.lisp	2007/11/24 00:04:16	1.75
@@ -1098,7 +1098,8 @@
        (prog1
 	   (setf (gethash element-name (dtd-elements dtd))
 		 (make-elmdef :name element-name :content content-model))
-	 (sax:element-declaration (handler *ctx*) element-name content-model)))
+	 (when content-model
+	   (sax:element-declaration (handler *ctx*) element-name content-model))))
       ((null content-model)
         e)
       (t
@@ -2101,8 +2102,7 @@
       (wf-error input "Malformed or invalid content model: ~S." (mu content)))
     (p/S? input)
     (expect input :\>)
-    (when *validate*
-      (define-element (dtd *ctx*) name content))
+    (define-element (dtd *ctx*) name content)
     (list :element name content)))
 
 (defun maybe-compile-cspec (e)




More information about the Cxml-cvs mailing list