Editor's Draft

Validation Report Summary Language (VRSL)
A language for summarizing validation reports

David Maus

Introduction

The idea of a unified language to express validation results grew out of the XProc.Next community group discussing the different validation steps. XProc 1.0 supports validation with XML Schema, RelaxNG, Schematron, and NVDL. With the advent of non-XML documents flowing through an XProc pipeline other validation technologies like JSON-Schema came into view. The Validation Report Summary Language (VRSL) addresses the need for a unified language for validation results by providing a vocabulary for summarizing validation reports, and a canonical serialization of such a validation report summary as XML.

VRSL conceptualizes validation as process that evaluates whether a given document is valid with respect to set of rules, a schema. The validation process might create validation results with information about parts of the document that did or did not validate with respect to the rules of the schema. A validation result conveys a human-readable message and indiciates the part of the document and/or schema that caused validation to fail.

A validation summary graph

Namespaces

Namespaces used in this document
dct http://purl.org/dc/terms/ Dublin Core Metadata Terms
rdf http://www.w3.org/1999/02/22-rdf-syntax-ns# Resource Description Framework
vrsl https://dmaus.name/ns/vrsl# Validation Report Summary Language
sh http://www.w3.org/ns/shacl# Shape Constraint Language
xsd http://www.w3.org/2001/XMLSchema# XML Schema

Ontology

Classes

CustomLocator

Describes a location through an implementation defined expression.

URI

https://dmaus.name/ns/vrsl#CustomLocator

Subclass of

Locator

LineColumnLocator

Describes a location through line and column number.

URI

https://dmaus.name/ns/vrsl#LineColumnLocator

Subclass of

Locator

Properties

column, line

Locator

Describes the location of an information item in a document.

URI

https://dmaus.name/ns/vrsl#Locator

ValidationResult

URI

https://dmaus.name/ns/vrsl#ValidationResult

Properties

instanceLocation*, message+, schemaLocation*

ValidationSummary

A validation summary provides a succinct description of the result of a validation process. It reports the validity of the document instance with respect to a schema and all validation results.

URI

https://dmaus.name/ns/vrsl#ValidationSummary

Properties

instance?, isValid?, result*

XPathLocator

Describes a location through an XPath expression.

URI

https://dmaus.name/ns/vrsl#XPathLocator

Subclass of

Locator

Properties

value

Properties

column

URI

https://dmaus.name/ns/vrsl#column

Domain

LineColumnLocator

Range

xsd:integer

instance

Connects a validation summary with the validated instance.

URI

https://dmaus.name/ns/vrsl#instance

Domain

ValidationSummary

instanceLocation

Connects a validation result with one or more significant locations in the instance document.

URI

https://dmaus.name/ns/vrsl#instanceLocation

Domain

ValidationResult

Range

Locator

isValid

The object of the predicate is a xsd:boolean that denotes the result of the validation.

URI

https://dmaus.name/ns/vrsl#isValid

Domain

ValidationSummary

Range

xsd:boolean

line

URI

https://dmaus.name/ns/vrsl#line

Domain

LineColumnLocator

Range

xsd:integer

message

A human readable description of a validation result.

URI

https://dmaus.name/ns/vrsl#message

Domain

ValidationResult

Range

rdf:langString

result

Connects a validation summary with a validation result produced by the validation process.

URI

https://dmaus.name/ns/vrsl#result

Domain

ValidationSummary

Range

ValidationResult

schemaLocation

Connects a validation result with one or more significant locations in the schema document.

URI

https://dmaus.name/ns/vrsl#schemaLocation

Domain

ValidationResult

Range

Locator

value

URI

https://dmaus.name/ns/vrsl#value

Serializations

XML Serialization

The graph is serialized as striped RDF/XML centered on the ValidationSummary node. In a striped syntax a set of triples is represented as sequence of XML elements corresponding to the subject containing child XML elements corresponding to predicates the content or attributes of which correspond to the objects.

The rules for serializing a ValidationSummary as XML are as follows:

  • The serialization starts with the ValidationSummary node as subject.

  • Subject rule: Create an element whose name is derived from the URI reference which gives the type of the subject, following the URI-QName mapping convention described in section 2.1 of the RDF/XML specification RDF/XML.

  • Predicate rule: For each predicate create an element whose name is derived from the URI reference which forms the predicate, following the URI-QName mapping convention described in section 2.1 of the RDF/XML specification RDF/XML.

  • Object rule:

    • If the object of the triple is a URI reference, add an attribute with the QName rdf:resource and make the value of this attribute a URI reference corresponding to the object. In this case, the property element is empty.

    • If the object of the triple is an instance of a class, apply the Subject rule.

    • If the object of the triple is a literal

      • For a plain literal, make the lexical form the content of the property element. If a language tag is present, add an attribute with the QName xml:lang and make the value of this attribute the language tag.

      • For a typed literal, make the lexical form the content of the property element, and add an attribute with the QName rdf:datatype and make the value of this attribute a URI reference corresponding to the URI of the datatype.

      • For an XML literal i.e. a typed literal with the datatype http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral, make the lexical form the content of the property element, and add an attribute with the QName rdf:parseType and make the value of this attribute the string Literal.

JSON Serialization

The graph is serialized as compacted JSON-LD JSON-LD centered on the ValidationSummary node using the context given in the appendix.