Sha256: 754db01909d3216d1c7dc01a66772d23ebcd8f9a1b5b45cba0f3fc6febee78fb

Contents?: true

Size: 766 Bytes

Versions: 17

Compression:

Stored size: 766 Bytes

Contents

module HealthDataStandards
  module Validate
    module Schematron
      module CProcessor


        def get_errors(document)
          document = get_document(document)
          processor.transform(document)
        end

        def processor
          return @processor if @processor
          doc = Nokogiri::XML(File.open(@schematron_file))
          doc.root["defaultPhase"] = ("errors")

          xslt = Nokogiri::XSLT(File.open(ISO_SCHEMATRON))

          result = xslt.transform(doc)
          #this is stupid but needs to be done to assocaite the xslt file with a dirctory
          result = Nokogiri::XML(result.to_s,@schematron_file)
          @processor = Nokogiri::XSLT::Stylesheet.parse_stylesheet_doc(result)
        end

      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
health-data-standards-4.3.5 lib/health-data-standards/validate/schematron/c_processor.rb
health-data-standards-4.3.4 lib/health-data-standards/validate/schematron/c_processor.rb
health-data-standards-4.3.3 lib/health-data-standards/validate/schematron/c_processor.rb
health-data-standards-4.3.2 lib/health-data-standards/validate/schematron/c_processor.rb
health-data-standards-4.3.1 lib/health-data-standards/validate/schematron/c_processor.rb
health-data-standards-4.3.0 lib/health-data-standards/validate/schematron/c_processor.rb
health-data-standards-4.2.0 lib/health-data-standards/validate/schematron/c_processor.rb
health-data-standards-4.1.0 lib/health-data-standards/validate/schematron/c_processor.rb
health-data-standards-4.0.6 lib/health-data-standards/validate/schematron/c_processor.rb
health-data-standards-4.0.5 lib/health-data-standards/validate/schematron/c_processor.rb
health-data-standards-4.0.4 lib/health-data-standards/validate/schematron/c_processor.rb
health-data-standards-4.0.3 lib/health-data-standards/validate/schematron/c_processor.rb
health-data-standards-4.0.2 lib/health-data-standards/validate/schematron/c_processor.rb
health-data-standards-4.0.1 lib/health-data-standards/validate/schematron/c_processor.rb
health-data-standards-4.0.0 lib/health-data-standards/validate/schematron/c_processor.rb
health-data-standards-3.7.0 lib/health-data-standards/validate/schematron/c_processor.rb
health-data-standards-3.6.1 lib/health-data-standards/validate/schematron/c_processor.rb