Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:17490 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83147 invoked by uid 1010); 2 Aug 2005 12:43:05 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 83132 invoked from network); 2 Aug 2005 12:43:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Aug 2005 12:43:04 -0000 X-Host-Fingerprint: 212.55.154.24 relay4.ptmail.sapo.pt Linux 2.4/2.6 Received: from ([212.55.154.24:34491] helo=sapo.pt) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 4A/AC-04646-65A6FE24 for ; Tue, 02 Aug 2005 08:43:03 -0400 Received: (qmail 32582 invoked from network); 2 Aug 2005 12:42:58 -0000 Received: from unknown (HELO sapo.pt) (10.134.35.154) by relay4 with SMTP; 2 Aug 2005 12:42:58 -0000 Received: (qmail 4563 invoked from network); 2 Aug 2005 12:42:55 -0000 X-AntiVirus: PTMail-AV 0.3-0.86.2 Received: from unknown (HELO pc07653) (nunoplopes@sapo.pt@[81.193.155.234]) (envelope-sender ) by mta4 (qmail-ldap-1.03) with SMTP for ; 2 Aug 2005 12:42:55 -0000 Message-ID: <009401c5975f$b3535f40$0100a8c0@pc07653> To: "Christian Stocker" , "Ron Korving" Cc: References: <52.F1.04646.C51DDE24@pb1.pair.com><000001c5968e$951b6490$e902a8c0@thinkpad> <4e89b4260508010726198d1f45@mail.gmail.com> <16.A7.04646.DA46EE24@pb1.pair.com> <42EE6F26.4040400@ctindustries.net> <80.90.04646.35C2FE24@pb1.pair.com> <42EF2D78.20105@bitflux.ch> Date: Tue, 2 Aug 2005 13:42:53 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 Subject: Re: [PHP-DEV] is this a bug? From: nlopess@php.net ("Nuno Lopes") > On 2.8.2005 10:16 Uhr, Ron Korving wrote: >> Shouldn't PHP suppress this warning then? Right now 3 warnings are shown >> for >> just one bad statement. I think one warning would suffice. Of course this >> is >> all rather unimportant and very low-priority, but I still think it's a >> situation that could be improved. >> >> You can see the warnings at http://bugs.php.net/bug.php?id=33951 > > AFAICS these are all libxml2 warnings. We would have to start > intercepting those warnings and decide which one we want to show and > which not... Too much hassle IMHO. In your scenario, which should be > shown? > > And with the new libxml error handler code in PHP 5.1, the developer can > decide, what he wants to show and what not... See > http://www.php.net/libxml_use_internal_errors > and > http://php5.bitflux.org/xml5_1/slide_13.php > for some explenation and examples The most interesting example is at http://php.net/libxml_get_errors But while I was reading again the example I wrote, I found that libxml always returns column 0: PHP: Behind the Parser XML; $doc = simplexml_load_string($xmlstr); $xml = explode("\n", $xmlstr); print_r(libxml_get_errors()); ?> Array ( [0] => LibXMLError Object ( [level] => 3 [code] => 76 [column] => 0 [message] => Opening and ending tag mismatch: titles line 2 and title [file] => [line] => 2 ) [1] => LibXMLError Object ( [level] => 3 [code] => 76 [column] => 0 [message] => Opening and ending tag mismatch: movie line 2 and mdovie [file] => [line] => 2 ) ) This seems to be a bug to me, or the column stuff will only work when validating with a dtd/..? Nuno