Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:5674 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4585 invoked by uid 1010); 23 Nov 2003 08:44:26 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 4561 invoked from network); 23 Nov 2003 08:44:26 -0000 Received: from unknown (HELO miranda.org) (209.58.150.153) by pb1.pair.com with SMTP; 23 Nov 2003 08:44:26 -0000 Received: (qmail 11268 invoked by uid 546); 23 Nov 2003 08:44:26 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 23 Nov 2003 08:44:26 -0000 Date: Sun, 23 Nov 2003 03:44:26 -0500 (EST) X-X-Sender: adam@miranda.org To: Rob Richards cc: internals@lists.php.net In-Reply-To: <008801c3b14a$10105d30$f7dea8c0@cyberware.local> Message-ID: References: <027c01c3b105$44a93ac0$f7dea8c0@cyberware.local> <008801c3b14a$10105d30$f7dea8c0@cyberware.local> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] SimpleXML XPath Namespace Support From: adam@trachtenberg.com (Adam Maccabee Trachtenberg) On Sat, 22 Nov 2003, Rob Richards wrote: > But xpath isn't shared across the objects, so calling > simplexml_ce_register_ns with different sxe objects will result in > multiple XPath contexts each having their own registered namespaces Ah. I see. Okay, I've prepared a modified patch that defers namespace registration until the call to simplexml_ce_xpath_search(). Inside that function, I iterate through the nsmapptr->nsmap hash and register all the namespaces. Since nsmapptr is shared across the objects this should be okay, right? Check out: http://www.trachtenberg.com/patches/simplexml_xpath_ns_patch.txt -adam PS: At a minimum, we should probably do some validity checks on the prefix, so people can't register an empty or invalid prefix. I'll look into this. -- adam@trachtenberg.com