unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
Cc: 34685@debbugs.gnu.org, wenbushi <wenbushi@gmail.com>,
	Noam Postavsky <npostavs@gmail.com>
Subject: bug#34685: 26.1; function nnrss-get-namespace-prefix always returns nil
Date: Tue, 10 Aug 2021 15:48:06 +0200	[thread overview]
Message-ID: <87fsvhza09.fsf@gnus.org> (raw)
In-Reply-To: <87tujymvhy.fsf@turtle-trading.net> (Benjamin Riefenstahl's message of "Mon, 09 Aug 2021 18:30:01 +0200")

Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net> writes:

> I originally just copied this from the output of the debugger, so this
> is what nnrss-get-namespace-prefix gets passed.  I just checked, the
> structure is the result of xml-parse-region, is that supposed to create
> something that matches the use of dom-search?  When I try it on some
> test XML it does create this same structure again.
>
> Test code:
>
>     (with-temp-buffer
>       (insert "<rss xmlns:content='http://purl.org/rss/1.0/modules/content/'>
>                  <channel />
>                </rss>")
>       (xml-parse-region (point-min) (point-max)))

Ah, I see.  xml-parse-region returns a list of dom objects, while
libxml-parse-xml-region just returns a single object, which is probably
where the confusion here originates from.  (dom.el was written after
libxml2 support was added, and written with the output from that in
mind.)

>> (And send a new patch; I've applied your test (adjusted).)
>
> See below.

Thanks; applied to Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





      reply	other threads:[~2021-08-10 13:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAF6JJ+AzMnvHrh8bPnjyoK+TyTaO3AWO3ZBLAfeTPTUqVWZF1w@mail.gmail.com>
2019-04-05  0:50 ` bug#34685: 26.1; function nnrss-get-namespace-prefix always returns nil Noam Postavsky
2019-04-12 10:21 ` Noam Postavsky
2019-04-12 11:55   ` Noam Postavsky
2019-09-26 22:34     ` Lars Ingebrigtsen
     [not found]       ` <877dgx76x0.fsf@arrian.i-did-not-set--mail-host-address--so-tickle-me>
2021-08-09 12:13         ` Lars Ingebrigtsen
2021-08-09 16:30           ` Benjamin Riefenstahl
2021-08-10 13:48             ` Lars Ingebrigtsen [this message]

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=87fsvhza09.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=34685@debbugs.gnu.org \
    --cc=b.riefenstahl@turtle-trading.net \
    --cc=npostavs@gmail.com \
    --cc=wenbushi@gmail.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).