Bill Walton wrote:> Four hours later I get email that they''ve > installed it. Thing is, the documentation didn''t generate, and when I > execute ''gem list --local'' it''s not listed as an installed gem.It hasn''t been gemified. I just started using this too and really wish there was a gem for deployment purposes. Last month Chad Fowler gave a talk on making gems at our local Ruby Users Group. Maybe I''ll try my hand at gemifying it. Otherwise, any volunteers? :) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Agreed, Making the xslt''s will be the longest process, especially if you are new to it. Some books: I would suggest picking up XSLT by WROX And of course the pocket reference by orielly If you need some help I wouldn''t mind helping as I would like to look into how ruby handles xml/xslt -----Original Message----- From: rubyonrails-talk@googlegroups.com [mailto:rubyonrails-talk@googlegroups.com] On Behalf Of Stef T Sent: Sunday, August 20, 2006 8:53 AM To: rubyonrails-talk@googlegroups.com Cc: rails@lists.rubyonrails.org; bill.walton@charter.net Subject: [Rails] Re: Ruby/XSLT Hello Bill, Well, from the completely cursory glance given to it, it appears to be a front end to libxslt. Basically, when I did this in perl (don''t hate ;), it was pretty much the same. Have your ruby program ''open'' the xml source file, open the xslt, apply the xslt (using the serve function here) and then print out the output. What more info do you need ? (Honestly asked btw) Regards Stef (ps. as with anything XSLT related, your going to spend about 4 days getting your stylesheet correct, and 1 minute on the transformation itself ;) Bill Walton wrote:> Anybody got any experience using this ( > http://greg.rubyfr.net/pub/packages/ruby-xslt/files/README.html ) ? I > asked my hosting company (a2hosting.com) about XSLT processors for > Rails and mentioned this one. Four hours later I get email that > they''ve installed it. Thing is, the documentation didn''t generate, > and when I execute ''gem list --local'' it''s not listed as an installed gem. > > Any info would really be appreciated. > > Thanks, > Bill > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Anybody got any experience using this ( http://greg.rubyfr.net/pub/packages/ruby-xslt/files/README.html ) ? I asked my hosting company (a2hosting.com) about XSLT processors for Rails and mentioned this one. Four hours later I get email that they''ve installed it. Thing is, the documentation didn''t generate, and when I execute ''gem list --local'' it''s not listed as an installed gem. Any info would really be appreciated. Thanks, Bill -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060820/81c86962/attachment-0001.html
Hello Bill, Well, from the completely cursory glance given to it, it appears to be a front end to libxslt. Basically, when I did this in perl (don''t hate ;), it was pretty much the same. Have your ruby program ''open'' the xml source file, open the xslt, apply the xslt (using the serve function here) and then print out the output. What more info do you need ? (Honestly asked btw) Regards Stef (ps. as with anything XSLT related, your going to spend about 4 days getting your stylesheet correct, and 1 minute on the transformation itself ;) Bill Walton wrote:> Anybody got any experience using this ( > http://greg.rubyfr.net/pub/packages/ruby-xslt/files/README.html ) ? I > asked my hosting company (a2hosting.com) about XSLT processors for > Rails and mentioned this one. Four hours later I get email that > they''ve installed it. Thing is, the documentation didn''t generate, > and when I execute ''gem list --local'' it''s not listed as an installed gem. > > Any info would really be appreciated. > > Thanks, > Bill > > --~--~---------~--~----~------------~-------~--~----~ > You received this message because you are subscribed to the Google > Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk@googlegroups.com > To unsubscribe from this group, send email to > rubyonrails-talk-unsubscribe@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk > -~----------~----~----~----~------~----~------~--~--- >
Hi Stef, Thanks for your response! I''m going to change-up the order below a little to make my reply read more easily. Stef T wrote:> What more info do you need ? (Honestly asked btw)I always presume goodwill ;-)> Well, from the completely cursory glance given to it, it appears to be > a front end to libxslt.And on libxml. Are either / both of these included in Ruby or Rails? If so, which one?> Have your ruby program ''open'' the xml source file, open the xslt, apply > the xslt (using the serve function here) and then print out the output.I''m already wondering about the ''print out the output'' part. As a test, I took a sample XML file and embedded the reference to the XSL file in it ( adding <?xml-stylesheet type="text/xsl" href="stylesheets\ccr_xslt\ccr_20060328.xsl"?> as the second line of the file). Both FF and IE6 support this level of XSLT natively and opening the XML file with either browser renders a correctly styled HTML page. OTOH, when I do a ''render :file => "same XML file"'' via my Rails controller, the page renders but does not have the XSL applied. If I do the render :file on the translated HTML file, it renders that OK. I don''t understand this and it worries me a little. Based on the browsers'' behavior when I open the file through the File menu, it seems like this ought to work via the render :file if Rails just passed the XML file through to the browser. Any thoughts / ideas on what might be going on here and/or how to fix it would be greatly appreciated! Best regards, Bill
Hi Clayton, Clayton Cottingham wrote:> Making the xslt''s will be the longest process, > especially if you are new to it.''Luckily'', the XSLT''s been furnished. All I have to do is make it work ;-)> Some books: > I would suggest picking up XSLT by WROX > And of course the pocket reference by oriellyI picked up the ''XSLT Quickly'' from Manning a few weeks ago to get me started. Thanks for the suggestions, though, as (assuming I can get this working) I''ll be adding to that shorthly.> If you need some help I wouldn''t mind helping as I > would like to look into how ruby handles xml/xsltExcellent!!! Please consider yourself asked. I''ve got a feeling I''m definitely going to need some help on this. The biggest potential problem I''m looking at at the moment is that I''m using InstantRails on WinXP for development. I was able to get my host (a2hosting.com) to install the Ruby/XSLT gem for me, but the documentation didn''t gen. In fact, when I run ''gem list --local'' I don''t even see it. I''ll contact you off-list. Thanks for offering. Best regards, Bill
Hello Bill :) Bill Walton wrote:>> What more info do you need ? (Honestly asked btw) > > I always presume goodwill ;-) >good way to be, a very good way, sometimes painful, but, *smiles* good show :)>> Well, from the completely cursory glance given to it, it appears >> to be a front end to libxslt. > > And on libxml. Are either / both of these included in Ruby or Rails? > If so, which one? >If you mean are ''libxml'' or ''libxslt'' included in RoR, then no. These are linux libraries. If you mean the ''ruby wrappers'' (ruby-xml) come as ''standard'', then no, however, there is a way to have rails generate out xml by using a .rxml file. Have a look around http://wiki.rubyonrails.org/rails/pages/HowtoGenerateXml ;)>> Have your ruby program ''open'' the xml source file, open the xslt, >> apply the xslt (using the serve function here) and then print out the >> output. > > I''m already wondering about the ''print out the output'' part. As a > test, I took a sample XML file and embedded the reference to the XSL > file in it ( adding <?xml-stylesheet type="text/xsl" > href="stylesheets\ccr_xslt\ccr_20060328.xsl"?> as the second line of > the file). Both FF and IE6 support this level of XSLT natively and > opening the XML file with either browser renders a correctly styled > HTML page. > > OTOH, when I do a ''render :file => "same XML file"'' via my Rails > controller, the page renders but does not have the XSL applied. If I > do the render :file on the translated HTML file, it renders that OK. > I don''t understand this and it worries me a little. Based on the > browsers'' behavior when I open the file through the File menu, it > seems like this ought to work via the render :file if Rails just > passed the XML file through to the browser. Any thoughts / ideas on > what might be going on here and/or how to fix it would be greatly > appreciated! >Well, now, this is the interesting part :) Ideally, there should be a sort of '':after_filter'' on the method that you use to generate the XML. Inside the :after_filter, you would load the stylesheet in much the same way that the ruby-xsl shows. This way, your still using rails and you have set the ''filter'' to perform after the generation (so in the future, if someone needs the un-translated XML, then can get it). The header content-type would be different, but, you could probably change that without too much trouble in the :after_filter .. Thats my thinking. I am unsure if IE/FF include libxslt in there by default, but, leaving this to the individual browser to deal with is dangerous at best. Mean to say, your assuming that all XSLT engines will follow ''the standard'', whereas if you do the transformation yourself, at least you know that the -exact- -same- structure of results is sent to all clients. Hopefully this makes sense, and I am interested in the solution you go with. If its sufficiently ''weird'', this could be a great problem to distrac... urm.. occupy my work time tomorrow ;) Regards as always Stef