Skip to main content

Module text_input

Module text_input 

Source
Expand description

Text-driven SHACL validation — the entry point the docs playground / any “paste shapes + data, get a report” caller uses.

  • Data is N3/N-Triples text (parsed by the engine’s own N3Parser). Numeric object literals are inline-encoded (so range constraints work); IRIs/strings are q_hashed and retained in a resolver (so string constraints — pattern/length/language — work).
  • Shapes are a compact JSON list (ShapeSpec) mapping 1:1 onto the ShaclConstraint vocabulary.

validate_json runs the comprehensive ShaclEngine and returns the ValidationReport as JSON.

Structs§

ConstraintSpec
One constraint in a ShapeSpec. Exactly the field for the kind is read.
ShapeSpec
One shape in the playground/JSON input.

Functions§

build_graph
Parse N3/N-Triples text into a quin graph plus a hash→lexical resolver.
shape_from_spec
Build a CompiledShape from a ShapeSpec.
validate_json
JSON-in / JSON-out convenience for the playground & WASM boundary.
validate_text
Validate N3/N-Triples data against specs and return the report.