[EMAIL PROTECTED] (Christian Stocker) wrote in news:[EMAIL PROTECTED]:
>> Looking at the two approaches, I preferred using DOMXML and as it was >> based on libxml2 & libxslt it seemed to be the better option. > > I don't get that. The new DOM and XSL extension is still based on > libxml2 and libxslt. Actually, the whole XML support in PHP 5 is now > based on libxml2 (meaning SimpleXML, ext/xml et al. as well) The two *PHP4* approaches, the other being Expat + Sablotron. > Transitioning from DOMXML/PHP4 to DOM/PHP5 isn't really that > complicated. [snip] > I agree that writing code, which should work on PHP4 and PHP 5 is a > little bit more complicated A "little bit more complicated" than "isn't really that complicated"! Translating function calls isn't something my current level of PHP can readily handle (although I'll work on improving that for the future). That's why I mentioned that the approach BEST suited to MY current abilities is to have my existing PHP4 DOMXML scripts and new PHP5 DOM scripts selected by a PHP version 'sensing' script. > (see http://alexandre.alapetite.net/doc-alex/domxml-php4-php5/ Thank you. I had seen that but it covers only some of DOMXML's XML functions and none of it's XSLT functions. Of course it's good that Alexandre has published his code and it should be of help in the future when I'm learning how to translate function calls. >> To a 'certain' extent the timing of the change is out of my hands as, >> like the majority of users, my website is hosted on a shared web >> server whose settings are out of my control. > > But he will inform you some time in advance, right? ;) Of course! Again, the point is that PHP4 DOMXML scripts will fail on webhosts' servers when they replace PHP4 with PHP5, unless a workaround has been put in place by each website's maintainer. > Furthermore it was marked (as you realized) experimental, so "we" > warned you ;) I accept that based on my level of knowledge of PHP, I made a mistake in using an experimental function and didn't sufficiently heed the warning. At the time I had naively thought that as DOMXML used the same libraries that were going to be used in PHP5's XML/XSLT support, that my code would also work in the future PHP5. My background is not in programming as you might have realised :) >> My hope for the future is that PHP remains accessible and attractive >> to new users. It could be all too easy for the core PHP 'guru' >> developers to become blase about this aspect of the language. > > Drop your "guru" conspiracy, please ;) "Guru" is used to highlight that the core developers must be experts. It's possible that as their level of expertise grows, PHP's complexity increases, resulting in a more difficult learning curve for beginners and that this is something to guard against. Cheers, Scrumpy :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php