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. -- [EMAIL PROTECTED] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php