Re: [PHP-XML-DEV] DomXPath extension

[email protected] (Jason Barnett) Sat, 24 Jul 2004 07:08:07 -0400
Newsgroups php.xml.dev
Message-ID <[email protected]>
Christian Stocker wrote:
> Rob and me were talking about that the other day. I don't think that 
> anyone is working right now on it, but we at least decided on the API 
> for it. It should be loosely based on the W3C specs 
> (http://www.w3.org/TR/2004/NOTE-DOM-Level-3-XPath-20040226/xpath.html#XPathEvaluator 
> ), for example:
> 
> $xp = new DomXPath($doc);
> $xp->evaluate($xpathExpression[, $contextnode [, $type]]);
> 

Wow... I'd actually not seen that spec before (only the one designed for us 
users).  I've just now read it all and its pretty easy to understand.

> 
> This can all go into ext/dom/xpath.c, no need for writing a new 
> extension. And Jason, you're of course very welcome to extend this. It 
> shouldn't be that hard, with the already existing code as a template.
> 

To be honest I've never written any extensions or PHP source before so this will 
be fun to try, but obviously whatever I come up with is not going to be optimal. 
  But I want to see this get done so I'll give it my best shot... and let you 
all make suggestions or just improve it yourselves.