[libxml-devel] Libxml directory structure

Sean Chittenden sean at chittenden.org
Thu Jul 17 11:08:08 EDT 2008


>> require 'libxml'     # LibXML::XML::*
>> require 'libxml/xml' # XML::*
>>
>> That concept works for me... though I'd invert it.
>>
>> require 'libxml'      # XML::*
>> require 'ilbxml/app'  # LibXML::XML::*
>>
>> Where 'libxml.rb' does the include, and libxml/app ('gem', or
>> whatever), does not.  ??
>
> It's very unintuitive :(
>
> Is the issue backward compatibility? If so, I point out that we still
> support the original naming, which includes LibXML, for backward
> compatibility:
>
>   require 'xml/libxml'
>
> While I don't think we ought to support this backward compatibility
> indefinitely, might it not suffice until we make the libxml-ruby =>
> libxml package name transition?
>
> If on the other hand, it is not backward compatibility, but rather the
> lack of brevity, then consider this alternative.Instead of
>
>  require 'libxml/xml'
>
> as I have suggested, what about
>
>  require 'xml'
>
> which makes sense, since that is in effect the end result, ie. XML
> loaded at the toplevel namespace.


That's a gem related question, IMHO, but I like that concept best, to  
be honest.

require 'libxml'
require 'xml'

I think LibXML::XML::* is rather redundant and a waste of keystrokes,  
however, and that it should be LibXML::* and XML::*.  $0.02.  -sc


--
Sean Chittenden
sean at chittenden.org





More information about the libxml-devel mailing list