[cxml-cvs] CVS cxml/xml

dlichteblau dlichteblau at common-lisp.net
Sun Mar 4 18:30:42 UTC 2007


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

Modified Files:
	xml-parse.lisp 
Log Message:
      <li>Fixed attributes to carry an lname even without when occurring
      without a namespace.</li>

      <li>Klacks improvements: Incompatibly changed
      klacks:find-element and find-event to consider the current event
      as a result.  Added klacks-error, klacks:expect, klacks:skip,
      klacks:expecting-element.</li>


--- /project/cxml/cvsroot/cxml/xml/xml-parse.lisp	2007/02/11 18:21:22	1.65
+++ /project/cxml/cvsroot/cxml/xml/xml-parse.lisp	2007/03/04 18:30:42	1.66
@@ -948,12 +948,9 @@
       (wf-error nil "Entity '~A' is not defined." (rod-string name)))
     def))
 
-(defun xstream-open-extid (extid)
-  (let* ((sysid (extid-system extid))
-         (stream
-          (or (funcall (or (entity-resolver *ctx*) (constantly nil))
-                       (extid-public extid)
-                       (extid-system extid))
+(defun xstream-open-extid* (entity-resolver pubid sysid)
+  (let* ((stream
+          (or (funcall (or entity-resolver (constantly nil)) pubid sysid)
               (open (uri-to-pathname sysid)
                     :element-type '(unsigned-byte 8)
                     :direction :input))))
@@ -961,6 +958,11 @@
                   :name (make-stream-name :uri sysid)
                   :initial-speed 1)))
 
+(defun xstream-open-extid (extid)
+  (xstream-open-extid* (entity-resolver *ctx*)
+		       (extid-public extid)
+		       (extid-system extid)))
+
 (defun call-with-entity-expansion-as-stream (zstream cont name kind internalp)
   ;; `zstream' is for error messages
   (let ((in (entity->xstream zstream name kind internalp)))
@@ -3568,15 +3570,12 @@
 	(setf (sax:attribute-namespace-uri attribute)
 	      #"http://www.w3.org/2000/xmlns/")
 	(multiple-value-bind (prefix local-name) (split-qname qname)
-	  (declare (ignorable local-name))
 	  (when (and prefix ;; default namespace doesn't apply to attributes
 		     (or (not (rod= #"xmlns" prefix))
 			 sax:*use-xmlns-namespace*))
-	    (multiple-value-bind (uri prefix local-name)
-		(decode-qname qname)
-	      (declare (ignore prefix))
-	      (setf (sax:attribute-namespace-uri attribute) uri)
-	      (setf (sax:attribute-local-name attribute) local-name)))))))
+	    (setf (sax:attribute-namespace-uri attribute)
+		  (decode-qname qname)))
+	  (setf (sax:attribute-local-name attribute) local-name)))))
 
 ;;;;;;;;;;;;;;;;;
 




More information about the Cxml-cvs mailing list