From: Adam Maccabee Trachtenberg

> That's why I create a new xmlXPathNewContext inside
simplexml_ce_register_ns.
>
> +      if (!sxe->xpath) {
> +   sxe->xpath = xmlXPathNewContext((xmlDocPtr) sxe->document->ptr);
> + }

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 (by registered
namespaces I refer to ones the user adds via the register_ns call) and
depending upon which object is used to search with (it may even be one which
wasnt used with a register_ns call), would then determe which ones are used.
I am not sure if this is the correct behavior as it seems that all the
namesapces from nsmap should be used for the query.

Rob

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to