Subject: bug#11916: 24.1.50; Making url-dav work

From: Stefan Monnier <[email-masked]>
Date: Wed, 25 Jul 2012 20:04:22 -0400

> Anyway, it's a very seldom used feature, so I just implemented what you
> suggested.

Not quite.  See below.

>  (defun xml-parse-tag-1 (&optional parse-dtd parse-ns)
>    "Like `xml-parse-tag', but possibly modify the buffer while working."
> -  (let ((xml-validating-parser (or parse-dtd xml-validating-parser))
> -	(xml-ns (cond ((consp parse-ns) parse-ns)
> -		      (parse-ns xml-default-ns))))
> +  (let* ((xml-validating-parser (or parse-dtd xml-validating-parser))
> +	 (symbol-qnames
> +	  (when (or (eq parse-ns 'symbol-qnames)
> +		    (eq (car-safe parse-ns) 'symbol-qnames))
> +	    'symbol-qnames))
> +	 (xml-ns
> +	  (cond ((symbolp (car-safe parse-ns))
> +		 (or (cdr-safe parse-ns)
> +		     xml-default-ns))
> +		((consp parse-ns) parse-ns)
> +		(parse-ns xml-default-ns))))

No, no, don't add a symbol-qnames variable here, use the same
representation I proposed for xml-ns instead.  And similarly don't add
any argument to xml-maybe-do-ns.  This should result in a patch that
touches very little code (just the computation of xml-ns above and its
use in xml-maybe-do-ns, and not much else).

        Stefan