Hi everyone,I've pushed out a libxslt 0.7.0 release to match yesterday's libxml 0.7.0 release.
Changes: * Ability to reuse the same stylesheet multile times * Simpler api * Compatibility layer for pre-0.7.0 versions * Major rewrite, resulting in significantly less code * Updated RDocs. To see the difference, here is the new API: stylesheet_doc = XML::Document.file('stylesheet_file') stylesheet = XSLT::Stylesheet.new(stylesheet_doc) xml_doc = XML::Document.file('xml_file') result_doc = stylesheet.apply(xml_doc) And here is the old way: xsl_file = File.expand_path('files/fuzface.xsl') xslt = XML::XSLT.file(xsl_file) xml_file = File.expand_path('files/fuzface.xml') xslt.doc = XML::Document.file(xml_file) stylesheet = xslt.parse result_string = stylesheet.apply(xml_doc) The old API had a number of issues:* The XSLT namespace was nested in XML - that seems like a bad idea now that libxslt is its own gem
* Stylesheets could only be opened from files * A stylesheet could only be used once * A needless parse call was required * The result of the apply transformation was returned as a stringBy having libxslt read and work with XML::Documents more naturally, I was able to remove roughly 50% of the bindings code and at the same time provide more functionality.
Note that for backwards compatibility, I added some Ruby code in the bindings that mimics the old API (would be nice if it spit out deprecation warnings, suppose we could borrow the code Rail's uses for that).
So give it a try, and report any bugs. Charlie
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel