lib/rdf/reasoner/rdfs.rb in rdf-reasoner-0.4.2 vs lib/rdf/reasoner/rdfs.rb in rdf-reasoner-0.4.3

- old
+ new

@@ -221,9 +221,12 @@ if respond_to?(:range) && !(ranges = Array(self.range) - [RDF::OWL.Thing, RDF::RDFS.Resource]).empty? if resource.literal? ranges.all? do |range| if [RDF::RDFS.Literal, RDF.XMLLiteral, RDF.HTML].include?(range) true # Don't bother checking for validity + elsif range == RDF.langString + # Value must have a language + resource.has_language? elsif range.start_with?(RDF::XSD) # XSD types are valid if the datatype matches, or they are plain and valid according to the grammar of the range resource.datatype == range || resource.plain? && RDF::Literal.new(resource.value, datatype: range).valid? elsif range.start_with?(RDF::Vocab::OGC) \ No newline at end of file