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

Version Path
cul_scv_hydra-0.22.9.8 lib/tasks/transform.rake
cul_scv_hydra-0.22.9.7 lib/tasks/transform.rake
cul_scv_hydra-0.22.9.6 lib/tasks/transform.rake
cul_scv_hydra-0.22.9.5 lib/tasks/transform.rake
cul_scv_hydra-0.22.9.4 lib/tasks/transform.rake
cul_scv_hydra-0.22.9.3 lib/tasks/transform.rake
cul_scv_hydra-0.22.9.2 lib/tasks/transform.rake
cul_scv_hydra-0.22.9.1 lib/tasks/transform.rake
cul_scv_hydra-0.22.9 lib/tasks/transform.rake
cul_scv_hydra-0.22.8 lib/tasks/transform.rake
cul_scv_hydra-0.22.7 lib/tasks/transform.rake
cul_scv_hydra-0.22.1 lib/tasks/transform.rake
cul_scv_hydra-0.22.0 lib/tasks/transform.rake
cul_scv_hydra-0.21.0 lib/tasks/transform.rake
cul_scv_hydra-0.20.0 lib/tasks/transform.rake