Sha256: fa2e30efea608d91638451954a3a510c855400a89ae911e5de7289bce27f51a9

Contents?: true

Size: 1.15 KB

Versions: 3

Compression:

Stored size: 1.15 KB

Contents

# Rack XSL README

Summary
-------

A rack middleware for transforming XML with XSL.

Configuration
-------------

This is how I would like it to work, but its not there yet:

<pre class="sh_ruby">
require 'xml/xslt'
require 'rack/xsl'

myxslfile = File.dirname(__FILE__) + '/app/views/layouts/xsl/html_main.xsl'
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,
  }

</pre>


Resources
---------

* <http://www.docunext.com/wiki/Rack-XSLView>
* <http://github.com/docunext/Rack-XSLView>


Thanks
------

The rack-rewrite gem was very helpful in figuring out how to write rack middleware with lots of options.

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rack-xsl-0.2.8 README.md
rack-xsl-0.2.7 README.md
rack-xsl-0.2.6 README.md