Re: patch for contrib/xml2
Please wait a little bit, I'll send updated patch (xpath_array() in core) tonight or tomorrow.
It seems so that there is no actual needs in other xpath-functions...
Just to recall:
- xpath_array() produces xml[] as a result -- so, it's possible to process then any of returned XML fragments, with proper type casting;
- also xpath_boolean(), xpath_string() and xpath_number() were proposed, according current functions from contrib/xml2. They are intended to return scalar value, first found by XPath _expression_. I saw serious problems with them --
e.g. it's quite ugly to return always first value of the sequence (but it might be useful in practice, surely) and, moreover, from my POV, xpath_string('/a/text()', '<a>very <b>simple</b> example</a>') should produce 'very simple example' (not 'very ' and not 'very example') -- due to XML semantics. This differs xpath_string() from other two...
So, my proposal is to include only one function and forget about that three until we have a better vision ...
I'll raise other (less important) questions with patch sent, shortly.
--
Best regards,
Nikolay
Home |
Main Index |
Thread Index