2008/7/13 Charlie Savage <[EMAIL PROTECTED]>: > I agree on the subdirectory, but I would vote its called xml and not libxml > - mostly because that is what it already is. Or is there some compatibility > issue with other ruby xml libraries? > > In truth though, its a fairly academic discussion. From a a user > perspective they'll just say require 'libxml' and how the code is actually > pulled in irrelevant. > > >> >> As Dan said in another thread too, we can set >> >> XML = LibXML > > I interpret that to mean the C code should change the name of the module it > defines from XML to LibXML. Right now libxslt defines a module called XSLT, > and the xpath code defines a class called XPath (should be a module). In > other words, the libraries are naming the modules after the functionality > they provide, versus the library name. > > Either way is of course fine, and I can't see how one way is better than the > other. Since this decision was made long ago, changing it strikes me as > arbitrary, mostly change for changes sake. What benefit does it offer that > would make it worth it?
It follows general practice -- of naming the project, gem, lib directory and main module all the same. This is done to prevent people from stepping on each other toes, plus of course it provides convenience and consistency. Also, to use XML as our top-level namespace is to claim a sort of ownership to that name --in which case we might as well name the project "xml" too. Of course, we could argue that LibXML is *THE* xml library, so the namespace is appropriate. I'm just not sure that's really fair. What if the REXML considered itself in a similar light for Ruby and had decided to use XML as it's namespace? Then again, who does have legitimate claim to the XML namespace? Matz? So one could argue this either way. As you say, it is somewhat academic. But I think it's just generally better to stick with the general practice, if we can. Note, a possible alternative is to use LibXML::XML:: T. _______________________________________________ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel