But since you went ahead with swapping XML => LibXML, that probably
best anyway. I wonder about one thing though, is backward
compatibility best preserved with:

  XML = LibXML

or as you have it:

  module XML
    include LibXML
  end

Hmm, good question. I bet either way probably works. I suppose the global variable would be easier to override though versus the include (can you uninclude something?).

I got started down the include route to make XML::XSLT work.

module XML
  include LibXSLT
end

But I suppose that could also be a global variable. So...I don't have an opinion either way.

FYI, I moved to XSLT to LibXSLT to be consistent. Although when I started using it, I found it to be a bit ugly. Take a look:

  # Create a new XSL Transform
  stylesheet_doc = LibXML::Document.file('files/fuzface.xsl')
  stylesheet     = LibXSLT::Stylesheet.new(stylesheet_doc)

  # Transform a xml document
  xml_doc = LibXML::Document.file('files/fuzface.xml')
  result = stylesheet.apply(xml_doc)


Notice how hard it becomes to distinguish the namespaces (LibXML and LibXSLT). Compare:

  # Create a new XSL Transform
  stylesheet_doc = XML::Document.file('files/fuzface.xsl')
  stylesheet     = XSLT::Stylesheet.new(stylesheet_doc)

Thoughts?

Charlie

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
libxml-devel mailing list
libxml-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/libxml-devel

Reply via email to