Module: Sinatra::XSLView
- Defined in:
- lib/sinatra/xslview.rb
Overview
Renders output based upon XML and XSL In practice, I use Builder to create the XML to be transformed As such, I do not plan on adding support for parameters, like Rack-XSLView TODO: cache stylesheets
Instance Method Summary collapse
Instance Method Details
#xslview(myxml, myxsl, params = {}) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/sinatra/xslview.rb', line 16 def xslview(myxml,myxsl,params={}) xslt = XML::XSLT.new() xslt.xml = myxml xslt.parameters = params unless params.empty? xslt.xsl = .xslviews + myxsl xslt.serve end |