# MIT License module Rack class XSLView def initialize(app, options) @my_path_info = String.new @app = app @myhash = {} @options = {:myxsl => nil}.merge(options) if @options[:myxsl] == nil @xslt = XML::XSLT.new() @xslt.xsl = File.join(File.dirname(__FILE__), 'output.xhtml10.xsl') else @xslt = @options[:myxsl] end end def call(env) if checknoxsl(env) @app.call(env) else unless @options[:passenv] == nil @options[:passenv].each { |envkey| if (mp = env[envkey]) @myhash[envkey] = "#{mp}" end } @xslt.parameters = @myhash end status, headers, body = @app.call(env) # Obtain entire request body parts = '' body.each { |part| parts << part.to_s } # TODO Refactor if ((parts.include? "