unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: David Engster <deng@randomsample.de>
To: Christopher Wellons <wellons@nullprogram.com>
Cc: 26533-done@debbugs.gnu.org
Subject: bug#26533: 26.0.50; xml-parse-region's symbol-qname argument is ignored
Date: Mon, 17 Apr 2017 17:33:07 +0200	[thread overview]
Message-ID: <874lxncamk.fsf@engster.org> (raw)
In-Reply-To: <87fuh8bkco.fsf@tengu.zeus.nullprogram.com> (Christopher Wellons's message of "Sun, 16 Apr 2017 08:36:07 -0400")

Christopher Wellons writes:
> A bug was introduced in aea67018 that causes the special "symbol-qnames"
> value for PARSE-NS to be ignored, as if it were nil. This information is
> discarded by the change to xml-parse-attlist, so functions further down
> the line see the argument as if it was set to nil.
>
> Here's an example of the bug:
>
>     (with-temp-buffer
>       (insert "<root a:b='c'></root>")
>       (let ((xml-default-ns ()))
>         (xml-parse-region nil nil nil nil 'symbol-qnames)))
>
> Prior to this commit (Emacs 25.1 and earlier) the result is:
>
>     ((root ((b . "c"))))
>
> After this commit:
>
>     ((root ((a:b . "c"))))
>
> This is the same as PARSE-NS being set to nil.

Thanks for the report.

You are right that the fix for bug #23440 was not correct. I now pushed
a hopefully better version to master.

Note however that your test above has two problems: First, it's invalid
XML since you're using an undeclared prefix (so the parser should rather
throw an error, but I'm not eager to make the xml parser more strict, as
there's a lot of invalid XML in the wild). Second, I don't understand
why you let-bind `xml-default-ns' to nil. This will break namespace
expansion, and it will actually do this for the whole Emacs session if
xml.el gets autoloaded during the above.

-David





  reply	other threads:[~2017-04-17 15:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-16 12:36 bug#26533: 26.0.50; xml-parse-region's symbol-qname argument is ignored Christopher Wellons
2017-04-17 15:33 ` David Engster [this message]
2017-04-17 16:29   ` Christopher Wellons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874lxncamk.fsf@engster.org \
    --to=deng@randomsample.de \
    --cc=26533-done@debbugs.gnu.org \
    --cc=wellons@nullprogram.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).