unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "積丹尼 Dan Jacobson" <jidanni@jidanni.org>
To: Katsumi Yamaoka <yamaoka@jpl.org>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, 30789@debbugs.gnu.org
Subject: bug#30789: 26.0.91; xml-parse-region works but libxml-parse-html-region doesn't
Date: Tue, 13 Mar 2018 11:29:50 +0800	[thread overview]
Message-ID: <87vae0ac0h.fsf@jidanni.org> (raw)
In-Reply-To: <b4m60609866.fsf@jpl.org>

Thank you for the patch but the real answer is to do what all other
browsers do... show as much as possible.

There is no browser out there that would dream of dying on the slightest
mistake.

Anyway if you guys are really going to use XML::LibXML::Parser (?) then
maybe loosen up some of

       recover
           /parser, html, reader/

           recover from errors; possible values are 0, 1, and 2

           A true value turns on recovery mode which allows one to parse broken XML or HTML data. The recovery mode allows the parser to return the successfully parsed
           portion of the input document. This is useful for almost well-formed documents, where for example a closing tag is missing somewhere. Still, XML::LibXML will
           only parse until the first fatal (non-recoverable) error occurs, reporting recoverable parsing errors as warnings. To suppress even these warnings, use
           recover=>2.

           Note that validation is switched off automatically in recovery mode.

       validation
           /parser, reader/

           validate with the DTD; possible values are 0 and 1


      ERROR REPORTING
       XML::LibXML throws exceptions during parsing, validation or XPath processing (and some other occasions). These errors can be caught by using eval blocks. The error
       is stored in $@. There are two implementations: the old one throws $@ which is just a message string, in the new one $@ is an object from the class
       XML::LibXML::Error; this class overrides the operator "" so that when printed, the object flattens to the usual error message.

       XML::LibXML throws errors as they occur. This is a very common misunderstanding in the use of XML::LibXML. If the eval is omitted, XML::LibXML will always halt your
       script by "croaking" (see Carp man page for details).

       Also note that an increasing number of functions throw errors if bad data is passed as arguments. If you cannot assure valid data passed to XML::LibXML you should
       eval these functions.

       Note: since version 1.59, get_last_error() is no longer available in XML::LibXML for thread-safety reasons.





  reply	other threads:[~2018-03-13  3:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-12 23:38 bug#30789: 26.0.91; xml-parse-region works but libxml-parse-html-region doesn't Katsumi Yamaoka
2018-03-13  0:44 ` Lars Ingebrigtsen
2018-03-13  2:28   ` Katsumi Yamaoka
2018-03-13  3:29     ` 積丹尼 Dan Jacobson [this message]
2018-03-13 11:28       ` Lars Ingebrigtsen
2018-03-13 20:27         ` 積丹尼 Dan Jacobson
2018-03-13 22:30           ` Lars Ingebrigtsen
2018-03-13  3:31     ` Katsumi Yamaoka
2018-03-13  2:55   ` 積丹尼 Dan Jacobson

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=87vae0ac0h.fsf@jidanni.org \
    --to=jidanni@jidanni.org \
    --cc=30789@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=yamaoka@jpl.org \
    /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).