/ 14.Jan.2008
Choose your version from libxml's download page. Install in the usual way, probably adding something like --prefix=/usr/local/ to ./configure
Choose your version from libxslt's download page. Same install as libxml.
something like ruby gem install ruby-xslt
Add the following to environment.rb:
require 'xml/xslt'
TextFilters.define :xml, "XML" do
require 'xml/xslt'
def render_text(text)
xslt = XML::XSLT.new()
xslt.xml = text
xslt.xsl = "/path/to/the/xslt/file.xslt"
out = xslt.serve()
return out
end
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href='foo.xslt' type='text/xsl'?>
<foo>
<bar>
<baz>{{ 'this is foo' }}</baz>
</bar>
</foo>
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href='foo.xslt' type='text/xsl'?>
<foo>
<bar>
<baz>
<![CDATA[
<a href="{{ 'foo' | link }}">foo</a>
]]>
</baz>
</bar>
</foo>
micro theme by seaofclouds, and powered with Mephisto Hosting by hostingrails.com
Sorry, comments are closed for this article.