This document specifies VRevdoc, a VDoc extension for extracting and emitting ReSpec documents.

This document has not been reviewed. This is a draft document and may be updated, replaced or obsoleted by other documents at any time.

This document is part of the ValOS kernel specification.

The format is implemented and supported by @valos/revdoc npm package.

VRevdoc is a VDoc extension which can produce ReSpec documents.

§ The VRevdoc fabric namespace of the library ontology of @valos/revdoc

'VRevdoc' namespace provides vocabulary and definitions which are tailored for emitting ReSpec html output documents.

§ VRevdoc IRI prefixes

Prefix IRI
rdf http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfs http://www.w3.org/2000/01/rdf-schema#
xsd http://www.w3.org/2001/XMLSchema#
owl http://www.w3.org/2002/07/owl#
dc http://purl.org/dc/elements/1.1/
VRevdoc https://valospace.org/revdoc/0#
VKernel https://valospace.org/kernel/0#
VDoc https://valospace.org/vdoc/0#

§ VRevdoc VDoc classes The class of classes which are defined by vdoc or a vdoc extension

rdfs:subClassOf description

#Document

VDoc:Chapter A titled, possibly numbered chapter document node A ReSpec specification document
instance properties The class of all valosheath type prototype properties. VRevdoc:preferredPrefix VRevdoc:baseIRI

#Example

VDoc:Node A document tree Node A ReSpec example node

#Definition

VDoc:Node A document tree Node A ReSpec term definition document node

#Package

VDoc:Reference A reference document node A package reference document node

#ABNF

VDoc:CharacterData A character data document node An ABNF section node

#JSONLD

VDoc:CharacterData A character data document node An JSONLD section node

#RegEx

VDoc:CharacterData A character data document node An RegEx section node

#Turtle

VDoc:CharacterData A character data document node An Turtle section node

#VSX

VDoc:CharacterData A character data document node An VSX section node

#Command

VDoc:ContextPath A context-based path document node A single command reference node

#Invokation

VDoc:ContextPath A context-based path document node A command plus its parameters document node

#CommandLineInteraction

VRevdoc:Example A ReSpec example node A command line interaction sequence document node

#Tooltip

VDoc:Node A document tree Node A hoverable tooltip document node
instance properties The class of all valosheath type prototype properties. VRevdoc:tooltipContent

§ VRevdoc VDoc properties The class of properties which are defined by vdoc or a vdoc extension

rdfs:domain rdfs:range

#preferredPrefix

VRevdoc:Document A ReSpec specification document rdfs:Literal
description The preferred prefix of an ontology namespace

#baseIRI

VRevdoc:Document A ReSpec specification document rdfs:Resource
description The base IRI of an ontology namespace

#package

VDoc:Node A document tree Node rdfs:Literal
description A package name

#version

VDoc:Node A document tree Node rdfs:Literal
description A semver string

#introduction

VDoc:Node A document tree Node rdfs:Literal
description VRevdoc introduction section

#tooltipContent

VRevdoc:Tooltip A hoverable tooltip document node VDoc:Node A document tree Node
description The tooltip content

#deprecatedInFavorOf

rdfs:Resourcexsd:string
description The preferred resource in favor of the subject resource.

#indexLabel

rdfs:Resourcerdfs:Literal
description User-readable label for index references *to* the subject resource

§ VRevdoc remaining vocabulary

rdf:type rdfs:subClassOf

§ VRevdoc JSON-LD context term definitions

Term Definition @id @type @container
restriction
@base https://valospace.org/revdoc/0#
VRevdoc:tooltipContent #tooltipContent @id

VRevdoc lightly extends basic VDoc extraction with some ReSpec specific primitives and specifies a ReSpec html emission transformation.

§ VRevdoc extraction rules

Rule name Inter-node rdf:type Owner property Body property ';rest' property Comment
example VRevdoc:Example VDoc:content VDoc:content dc:title Example node

§ VRevdoc extractee API

API identifier rdf:type
aggregate
c
bulleted
numbered
ref
identifize
cpath
cbase
em
strong
heading
ins
del
q
blockquote
example
abnf
jsonld
turtle
regexp
vsx
dfn
pkg
command
invokation
inv6n
cli
tooltip
filterKeysWithAnyOf
filterKeysWithAllOf
filterKeysWithNoneOf
valosRaemFieldClasses VState:FieldVState:FieldVState:EventLoggedFieldVState:CoupledFieldVState:GeneratedFieldVState:TransientFieldVState:AliasField
filterKeysWithFieldReduction
prepareTestDoc
extractExampleText

§ VRevdoc emission output

VRevdoc emits html which makes use of ReSpec primitives.

§ VRevdoc emission rules

VRevdoc provides html emission rules for VDoc:Document VRevdoc:Document VDoc:Chapter VDoc:Reference VRevdoc:Invokation VRevdoc:Command VRevdoc:Example VRevdoc:Tooltip