Sha256: c5b3173917bf70d131326231748407bd6c7a82043069ecdabb9a21f2ffc759f3
Contents?: true
Size: 705 Bytes
Versions: 51
Compression:
Stored size: 705 Bytes
Contents
# Copyright (c) 2012 National ICT Australia Limited (NICTA). # This software may be used and distributed solely under the terms of the MIT license (License). # You should find a copy of the License in LICENSE.TXT or at http://opensource.org/licenses/MIT. # By downloading or using this software you accept the terms and the liability disclaimer in the License. require 'singleton' module OmfCommon class RelaxNGSchema include Singleton SCHEMA_FILE = "#{File.dirname(__FILE__)}/../../protocol/#{OmfCommon::PROTOCOL_VERSION}.rng" def initialize @rng = File.read(SCHEMA_FILE) end def validate(document) Nokogiri::XML::RelaxNG(@rng).validate(document) end end end
Version data entries
51 entries across 51 versions & 1 rubygems