Skip to content

Instantly share code, notes, and snippets.

@docunext
Created October 10, 2010 14:13
Show Gist options
  • Select an option

  • Save docunext/619266 to your computer and use it in GitHub Desktop.

Select an option

Save docunext/619266 to your computer and use it in GitHub Desktop.
config.middleware.use Rack::XSLView,
:myxsl => XML::XSLT.new(),
:noxsl => ['/raw/', '/s/js/', '/s/css/', '/s/img/'],
:passenv => ['PATH_INFO', 'RACK_MOUNT_PATH', 'RACK_ENV'],
:xslfile => File.open(myxslfile) {|f| f.read },
:excludehtml => false,
:reload => true,
:tidy => { :doctype => 'omit',
:numeric_entities => 1,
:drop_proprietary_attributes => 1,
:preserve_entities => 0,
:input_encoding => 'utf8',
:char_encoding => 'utf8',
:output_encoding => 'utf8',
:error_file => '/tmp/tidyerr.txt',
:force_output => 1,
:alt_text => '',
:tidy_mark => 0,
:logical_emphasis => 1,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment