Re: domxml in PHP5

From: Date: Thu, 10 Apr 2003 19:48:31 +0000
Subject: Re: domxml in PHP5
References: 1  Groups: php.xml.dev 
Request: Send a blank email to php-xml-dev+get-68@lists.php.net to get a copy of this message
At 10:37 4/10/2003, Christian Stocker wrote: [ ... ]
Here's my suggestion (and I think, if there are more people than just me contributing, we should be able to reach this) - Go over the whole "memory/free" stuff and clean it up. - Seperate php_domxml.c in different files. maybe just the different modules (xslt/xpath/dom/parser/etc..), or maybe even for each class (document, node, text, etc) a file (not shure, what's more feasible) - use namespaces. Got already a patch from Tal for that. - use setters/getters. $domtext->data = "hello" should be possible with PHP5 (the properties in domxml at the moment are a joke and shouldn't be used..), this will allow much more dom-compliance - Implement first most of the dom-standard. Then we add some of the convenience methods libxml2 has (get_content() et al. They are not in the dom-standard, but make the life for domxml-programmers a lot easier and they are also much faster than using the "traditional" dom methods)
- ability to register an output_encoding handler and default output encoding. Provide default 'mbstring','iconv','recode' on a C level. I've been working with domxml together with mysql the last couple of days, and since MySQL doesn't have UTF-8 encoding (and it's even questionable if we should output UTF-8 to browsers already) I found myself wrapping every 'node_value' into mb_translate_encoding(). I know it's a 'nice-to-have', but I think this is the kind of convenience people are used to from PHP.
- Lastly, if there's time, add as much BC as possible. Or we just provide a PEAR-wrapper, which makes transition from domxml/PHP4.3 to domxml/PHP5 easier.
Met vriendelijke groeten / With kind regards, Webmaster IDG.nl Melvyn Sopacua <@JE> Hosting: $5 per month. Domain name: $15, your site being down twice a week: Priceless. http://www.bash.org/?42663

« previous php.xml.dev (#68) next »