Sha256: d9d62d95f9526744f6b6ed25e844e981dbc756b33c11d207e59bb1c4c2bedb7c
Contents?: true
Size: 519 Bytes
Versions: 15
Compression:
Stored size: 519 Bytes
Contents
namespace :cul_scv_hydra do namespace :transform do task :marc => :environment do begin src_path = File.join(Rails.root,'fixtures','spec','MARCXML','3867996.xml') xsl_path = File.join(Rails.root,'config','xsl','marc_to_mods.xsl') doc = Nokogiri::XML(File.read(src_path)) xslt = Nokogiri::XSLT(File.read(xsl_path)) puts xslt.transform(doc) rescue => e puts 'Error: ' + e.message puts e.backtrace next end end end end
Version data entries
15 entries across 15 versions & 1 rubygems