Re: [PHP-XML-DEV] [domxml] namespaces / exception / extensionname

[email protected] (Shane Caraveo)
Newsgroups php.xml.dev
Message-ID <[email protected]>
Christian Stocker wrote:
> Hi
> 
> As said before, domxml5 developement was started and we already
> have some working proof-of-concept code. Now we're not sure about some
> "details" and I'd like to ask this list about your opinion:
> 
> - Namespaces: Should we use a "domxml" namespace or just go the
> traditional way? the new domxml (called domxml5 for the time being) will
> have a fully OO interface, but it doesn't really matter if we use
> namespaces or not;) there's not much difference for the extension itseld

It would be nice if this was developed as a dual pupose extension, for 
php4.x and php5.  Then being put into pecl, people could dowload this 
and have an improved domxml for installations that wont update to php 5 
for some time.  I think extension development needs to stop being 
focused on the next release, and start focusing on supporting what is 
out there.  4.3.x will be in use for a long time before the majority 
switch to php5.

> - Exceptions: Here again. To use as default or not? W3C Standards rely a
> lot on Exceptions, so it would be nice to have and Rob summed it up quite
> right:

Absolutely exceptions, it is the standard.  When there is a standard for 
something, it should be followed as closely as possible.  It aids in 
documentation and understanding when we do that.  If dual development is 
done, then on php4 errors would be be used.

Also, are function names going to follow the standard or are they being 
phpized?  (getElementById or get_element_by_id)  Again, I think the DOM 
standard should be followed, and not php's standard.


> - Extension Name: It looks like domxml5 will be more or less completely
> uncompatible to domxml4, so you have to port your applications before you
> can upgrade to PHP5 ('though, it should be possible to write a wrapper in
> PHP-Userland..). With this in mind, should we really replace the domxml
> with a new one or just introduce a new, different extension and fade out
> the old in a later php5 version. This would make upgrading to PHP5 for
> people using domxml much easier, as they don't have to go through the
> domxml code immediately.

use a new name....xmldom, libxml, or just plain dom.

> Furthermore, domxml is a very misleading name for the whole extension.
> domxml is not only about DOM stuff, since a long time. It has support for
> XSLT, XPath, Validation, XInclude, etc... Furthermore libxml2 would allow
> for implementing more XML stuff like XML Schema/relaxng Validation, SAX,
> XMLTextReader Interface etc... Therefore IMHO a more generic name would be
> a "Good Thing".
> 

Do an XML (or LIBXML) namespace, and have subnamespaces for each.

LIBXML_DOM
LIBXML_SCHEMA
LIBXSLT
...etc...


Shane
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.