engine.owl2_rl_datatypes

OWL 2 RL datatype inventory and literal value-space membership tests.

These helpers support read-only predicate builtins used by OWL 2 RL dt-* rules. They are not a complete XSD processor; they cover the OWL 2 RL supported datatype set with facet and hierarchy checks needed for rule guards.

Attributes

OWL2_RL_SUPPORTED_DATATYPES

Functions

literal_value_in_datatype(→ bool)

Return whether literal's data value is in datatype's value space.

Module Contents

engine.owl2_rl_datatypes.OWL2_RL_SUPPORTED_DATATYPES: Final[frozenset[rdflib.term.URIRef]]
engine.owl2_rl_datatypes.literal_value_in_datatype(literal: rdflib.term.Literal, datatype: rdflib.term.URIRef) → bool

Return whether literal’s data value is in datatype’s value space.

Only OWL 2 RL supported datatype IRIs are recognized. Ill-typed literals (typed literals whose lexical form does not map to a value) are members of rdfs:Literal only.

Parameters:
  • literal – An RDFLib literal term.

  • datatype – A datatype IRI.

Returns:

True when the literal’s data value is contained in the datatype’s value space under the OWL 2 RL supported datatype set; False otherwise.