GNU bug report logs -
#63125
30.0.50; [BUG] last argument of libxml2-parse-html-region has no effect?
Previous Next
Reported by: Ruijie Yu <ruijie <at> netyu.xyz>
Date: Thu, 27 Apr 2023 16:34:02 UTC
Severity: normal
Found in version 30.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #28 received at 63125-done <at> debbugs.gnu.org (full text, mbox):
> From: Ruijie Yu <ruijie <at> netyu.xyz>
> Cc: 63125 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Sat, 29 Apr 2023 08:58:03 +0800
>
> > The response doesn't say much. What is this "base URL" argument used
> > for, and why is it named "bas URL"? What does it mean "used for error
> > messages"? And where is the up-to-date and accurate documentation of
> > this function, which explains what is this argument for?
> >
> > Without knowing all that, we cannot fix our documentation, let alone
> > code.
>
> The "base-url" is an argument to the Elisp function
> `libxml-parse-html-region'. I added Lars to the CC, who originally
> introduced this function according to git-blame, and who may have a
> better idea.
>
> The following portion are my impressions, but I'm happy to pass any
> questions you still have to the libxml2 devs if you want (or you can
> comment there directly in the linked issue on gnome's gitlab instance).
>
> -----
>
> As you pointed out, these arguments of the Elisp function are passed
> with minimal transformations and sent to the libxml2 function
> `htmlReadMemory()' function. This C function takes an argument `url',
> which is the string `base-url' or empty string if `base-url' is nil.
>
> According to Nick (the libxml2 maintainer) and my interpretation, the
> `url' parameter of the libxml2 function is simply stored inside the
> `url' field of a `xmlDoc' struct, to be used when an error message needs
> to be displayed. So, the `url' parameter practically does nothing for
> us, since we disable all libxml2-level warnings and errors in calling
> `htmlReadMemory()'.
>
> I put this url [1] to the issue assuming that it is the documentation,
> and Nick doesn't have any comment regarding the url. So this is
> probably the up-to-date, albeit not very elaborate, documentation for
> the function.
>
> [1]: https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-HTMLparser.html#htmlReadMemory
Thanks. So I've now updated our documentation with this information,
and I'm therefore closing the bug.
This bug report was last modified 2 years and 24 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.