Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:29656 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93242 invoked by uid 1010); 22 May 2007 10:11:48 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 93227 invoked from network); 22 May 2007 10:11:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 May 2007 10:11:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=kenashkov@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kenashkov@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.132.240 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: kenashkov@gmail.com X-Host-Fingerprint: 209.85.132.240 an-out-0708.google.com Received: from [209.85.132.240] ([209.85.132.240:13842] helo=an-out-0708.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C8/A4-46001-1E1C2564 for ; Tue, 22 May 2007 06:11:46 -0400 Received: by an-out-0708.google.com with SMTP id d31so447001and for ; Tue, 22 May 2007 03:11:42 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=OfNfUFDijy0ET9bmUEovFZkiFDuGyjNzlY148aeDVOAkvkBi5aEb5yp/HKXBE3T4xCOfMddpsyKcUUi9POr179rYOeM4pz8KwJJuV+knLqmcrHggZTozGxNHAxJzW3yLupgMw6t5g7QgLUdSazEL/HK6h59cwbYkRhTEnlOls+M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=GULagdgRPl1DtZbKy5rWtlvfDZxC9DcGhzbfpdiccqej20XXm4XwLnNysvG/YgM9+5dpZ7lTlKAkURc0Y1Y7U1Rj5WtTrjUihJNrF58XKY39F4anvv9WWopJLaBQcAioOUsUVrnrypxn4BMvELCQMMvtqZ9RWPbOKXwflLFFLpw= Received: by 10.100.190.8 with SMTP id n8mr3674356anf.1179828701342; Tue, 22 May 2007 03:11:41 -0700 (PDT) Received: by 10.100.166.5 with HTTP; Tue, 22 May 2007 03:11:41 -0700 (PDT) Message-ID: <261daaa10705220311i76ef448cvd52314206cad7401@mail.gmail.com> Date: Tue, 22 May 2007 13:11:41 +0300 To: "Christian Stocker" Cc: internals@lists.php.net In-Reply-To: <4652BCDB.1040900@liip.ch> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_149914_16210062.1179828701268" References: <261daaa10705220123m41b254a6p6b44d21b29ad1d4c@mail.gmail.com> <4652BCDB.1040900@liip.ch> Subject: Re: [PHP-DEV] unexpected behaviour in SimpleXML (php 5.2.2) From: kenashkov@gmail.com ("Vesselin Kenashkov") ------=_Part_149914_16210062.1179828701268 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 5/22/07, Christian Stocker wrote: > > I can't answer on your first topic, but the second: > > > That's how it works also in ext/dom (and IMHO as it's supposed to work), > but the "workaround" is easy: > > $r2 = $z->xpath('./*'); Thank for looking and replying. I have to clarify... Actually I would expect at least the third example ------------- $z = clone $x->level1_node1[0]; $r3 = $z->xpath('/*'); print $r3[0]->getName();//prints rootnode ------------- to print level1_node1. But as well at least to me looks logical even the second to print level1_node1, because the xpath() method is acalled on the level1_node1, not the rootnode. I think that it is incorrect that the object (the xml strcuture) $z is still treated like the object $x when it comes to Xpath. In fact they are different object with different structures and the Xpath expressions must return different results (IMHO). works as you would expect it. > > chregu > > -- > christian stocker | Liip AG | schoeneggstrasse 5 | ch-8004 zurich > phone +41 44 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71 > http://www.liip.ch/ | christian.stocker@liip.ch | GnuPG 0x5CE1DECB Vesselin Kenashkov P.S. sorry for the double post - reply issue. ------=_Part_149914_16210062.1179828701268--