Fix documentation of libxml-parse-* functions

* doc/lispref/text.texi (Parsing HTML/XML):
* src/xml.c (Flibxml_parse_html_region, Flibxml_parse_xml_region):
Update the documentation regarding the use of BASE-URL argument.
(Bug#63125)
This commit is contained in:
Eli Zaretskii 2023-04-29 09:39:15 +03:00
parent 5dd784961d
commit b4f2f49978
2 changed files with 13 additions and 5 deletions

View file

@ -5510,7 +5510,7 @@ contents of an SQLite database.
@section Parsing HTML and XML
@cindex parsing html
Emacs can be compiled with built-in libxml2 support.
Emacs can be compiled with built-in @file{libxml2} support.
@defun libxml-available-p
This function returns non-@code{nil} if built-in libxml2 support is
@ -5529,8 +5529,10 @@ mistakes.
If @var{start} or @var{end} are @code{nil}, they default to the values
from @code{point-min} and @code{point-max}, respectively.
The optional argument @var{base-url}, if non-@code{nil}, should be a
string specifying the base URL for relative URLs occurring in links.
The optional argument @var{base-url}, if non-@code{nil}, should be
used for warnings and errors reported by the @file{libxml2} library,
but Emacs currently calls the library with errors and warnings
disabled, so this argument is not used.
If the optional argument @var{discard-comments} is non-@code{nil},
any top-level comment is discarded. (This argument is obsolete and

View file

@ -280,7 +280,10 @@ DEFUN ("libxml-parse-html-region", Flibxml_parse_html_region,
If START is nil, it defaults to `point-min'. If END is nil, it
defaults to `point-max'.
If BASE-URL is non-nil, it is used to expand relative URLs.
If BASE-URL is non-nil, it is used if and when reporting errors and
warnings from the underlying libxml2 library. Currently, errors and
warnings from the library are suppressed, so this argument is largely
ignored.
If you want comments to be stripped, use the `xml-remove-comments'
function to strip comments before calling this function. */)
@ -298,7 +301,10 @@ DEFUN ("libxml-parse-xml-region", Flibxml_parse_xml_region,
If START is nil, it defaults to `point-min'. If END is nil, it
defaults to `point-max'.
If BASE-URL is non-nil, it is used to expand relative URLs.
If BASE-URL is non-nil, it is used if and when reporting errors and
warnings from the underlying libxml2 library. Currently, errors and
warnings from the library are suppressed, so this argument is largely
ignored.
If you want comments to be stripped, use the `xml-remove-comments'
function to strip comments before calling this function. */)