See Nokogiri::XSLT::Stylesheet for creating and maniuplating Stylesheet object.
Parse the stylesheet in string
# File lib/nokogiri/xslt.rb, line 24 24: def parse string 25: Stylesheet.parse_stylesheet_doc(XML.parse(string)) 26: end
Quote parameters in params for stylesheet safety
# File lib/nokogiri/xslt.rb, line 30 30: def quote_params params 31: parray = (params.instance_of?(Hash) ? params.to_a.flatten : params).dup 32: parray.each_with_index do |v,i| 33: if i % 2 > 0 34: parray[i]= 35: if v =~ /'/ 36: "concat('#{ v.gsub(/'/, %q{', "'", '}) }')" 37: else 38: "'#{v}'"; 39: end 40: else 41: parray[i] = v.to_s 42: end 43: end 44: parray.flatten 45: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.