XSLT vs XSLT4r transformation of xml

Issues related to building and deploying Ruby on Rails.
no avatar
Posts: 1
Joined: Wed Nov 11, 2009 12:41 am

XSLT vs XSLT4r transformation of xml

by ascott » Wed Nov 11, 2009 12:45 am

I'm writing an application that has a link to a database-stored file location for a zipped xml file. I want the link to unzip the file to a temp directory, apply an xslt transformer, and open the report in a new window. I have the unzip functionality working. I tried using 'require xml/libxslt' but it couldn't find the xslt library. I used 'require xslt' and it compiled fine but the implentation didn't work. I decided to use the xslt4r modules from the RAA Repositories. I'm getting an error from the line "sheet = XSLT::Stylesheet.new( stylesheet )"... "Must pass in an XML::Document instance". if I change the code to "sheet = XSLT::Stylesheet.new( stylesheet, arguments )" I get the error: "wrong number of arguments (2 for 1)". This leads me to believe that the "require xslt" is not binding to xslt4r but to the previous xslt module. I find little documentation for the installation of xslt4r. Is there a way to verify that xslt4r is intalled correctly and that 'require xslt' is referencing it. Or can you tell me if my implementation is incorrect. Any help is greatly appreciated.

Return to Ruby on Rails