Docunext


Bug in Ruby s XSLT Binding

January 31st, 2010

I might have found a bug in Ruby's XSLT bindings:

require 'rubygems'
require 'rake'
require 'xml/xslt'

task :default => :some
@mybuild = 'dkjfh'

task :some do
  publish('blah')
  publish('blah')
end

def publish(ok)
  xslt = XML::XSLT.new()
  xslt.xml = 'ok'
  xslt.xsl = 'sheet.xsl'
  hi = { 'dabuild' => @mybuild }
  new = { 'section' => 'oj', 'subsection' => 'milk' }
  new.merge!(hi)
  puts new
  xslt.parameters = new
  html = xslt.serve
  puts html
end
/var/www/dev/ruby-experiments/xslt_prob$ rake
(in /var/www/dev/ruby-experiments/xslt_prob)
sectionojsubsectionmilkdabuilddkjfh
dkjfh
sectionojsubsectionmilkdabuilddkjfh'
Invalid expression
runtime error
Evaluating user parameter dabuild failed
nil
Yearly Indexes: 2003 2004 2006 2007 2008 2009 2010 2011 2012 2013 2015 2019 2020 2022