DS Specifications
Domain SpecificationsListsVocabularies
main
main
  • DS Specifications Overview
  • Domain Specifications
    • DS-V7
      • DS-V7 - Changelog
      • DS-V7 - Developer Notes
      • DS-V7 - Grammar
        • Domain Specification
          • @Context
          • Domain Specification Node
          • Property Node
          • Class Node
          • DataType Node
          • Enumeration Node
        • Verification Report
          • Verification Report Node
          • Error Entry Node
          • Error List for the domain-specific verification
        • DS-Path
      • DS-V7 - Examples
    • DS-V6
    • DS-V5
      • DS-V5 - Grammar
        • VerificationReport
          • Error List for the basic verification
          • Verification of schema.org annotations
          • Error List for the Meta verification of DS (unfinished)
          • Error List for the DS-based verification
        • Grammar and semantics of Domain Specifications
          • Enumeration Node
          • Property Node
          • Domain Specification Node
          • Class Node
          • Terms used in Domain Specifications
          • @Context
          • DataType Node
      • DS-V5 - Examples
    • DS-V4
    • DS-V3
      • DS-V3 - Examples
      • DS-V3 - Grammar
        • VerificationReport
          • Error List for the basic verification
          • Verification of schema.org annotations
          • Error List for the DS-based verification
          • Error List for the Meta verification of DS
        • Grammar and semantics of Domain Specifications
          • SDO Enumeration
          • SDO Property
          • Domain Specification
          • SDO Class
          • SDO Datatype
          • @Context
    • DS-V2
      • DS-V2 - Grammar
        • Grammar and semantics of Domain Specifications
          • Grammar Documentation for node type "RestrictedEnumeration"
          • Grammar Documentation for node type "CustomEnumerationValue"
          • Grammar Documentation for node type "Enumeration"
          • Grammar Documentation for node type "Property"
          • Grammar Documentation for node type "RestrictedProperty"
          • Grammar Documentation for node type "DomainSpecification"
          • Grammar Documentation for node type "RestrictedClass"
          • Grammar Documentation for node type "EnumerationValue"
          • Grammar Documentation for node type "Class"
          • Grammar Documentation for node type "DataType"
        • Numeric Pattern
        • Grammar Documentation for node type "VerificationReport"
          • Grammar Documentation for node type "Error"
          • Error codes for Verification Reports
        • Rules Grammar
          • Grammar Documentation for node type "ComplexRule"
          • Grammar Documentation for node type "DateRule"
          • Grammar Documentation for node type "TextRule"
          • Grammar Documentation for node type "TimeRule"
          • Grammar Documentation for node type "NumberRule"
          • Grammar Documentation for node type "BooleanRule"
          • Grammar Documentation for node type "DateTimeRule"
      • DS-V2 - Examples
    • DS-V1
      • DS-V1 - Examples
      • DS-V1 - Grammar
  • SDO-Verification
  • Lists
    • List-V1
  • Vocabularies
  • DS-Vocabulary
    • Input
      • Vocabulary for Domain Specifications
      • DS-Vocabulary
    • DS-Vocab-V1
Powered by GitBook
On this page
  • Content
  • Node types of the DS grammar
  1. Domain Specifications
  2. DS-V2

DS-V2 - Grammar

PreviousDS-V2NextGrammar and semantics of Domain Specifications

Last updated 4 years ago

The grammar for DS-V2 is given in . The grammar consists of different node-types, that are used to construct a Domain Specification. A Domain Specification is a tree-shaped JSON, like the annotations it should represent.

Content

  • Node-types of this grammar (below)

Node types of the DS grammar

Each node object must have a $type indicating the type of the Node. This helps to know which node is handled AND improves the readability of the structure, little trade-off is the extra property on each node.

Possible Node types:

  • DomainSpecification - Root node of a DS

  • RestrictedClass - A type(class) from SDO with syntactic restrictions (properties are restricted)

  • Class - A type(class) from SDO without syntactic restrictions

  • RestrictedProperty - A property from SDO with syntactic restrictions (range is restricted)

  • Property - A property from SDO without syntactic restrictions

  • DataType - A data type from SDO

  • RestrictedEnumeration - An enumeration from SDO with syntactic restrictions (possible values are restricted)

  • Enumeration - An enumeration from SDO without syntactic restrictions

  • EnumerationValue - An enumeration value from SDO (must be stated in the vocabulary as an enumeration value)

  • CustomEnumerationValue - A custom enumeration, that is not stated in the vocabulary as an enumeration value

Rules have also their own types:

  • TextRule, applies only to text values according to SDO data types (Text, URL)

  • BooleanRule, applies only to boolean values according to SDO data types (Boolean)

  • DateRule, applies only to date values according to SDO data types (Date)

  • TimeRule, applies only to Time values according to SDO data types (Time)

  • DateTimeRule, applies only to DateTime values according to SDO data types (DateTime)

  • NumberRule, applies only to numeric values according to SDO data types (Number, Integer, Float)

  • ComplexRule, applies as a logical connector between rules/checks

CustomEnumerationValue is a new concept that should bridge the broken enumeration modelling of Schema.org. It should help to define valid enumeration values, although they are not part of the Schema.org vocabulary. This is NECESSARY since the goodrelations features were included in the SDO vocabulary, but didn't match the enumeration modelling. Most notably: the expected/allowed enumeration values are not stated as such in the vocabulary, making it hard to list/validate the expected values for that enumeration (ironically, that is what enumerations are for). Possible enumeration values are sometimes stated as an example in the description of the enumeration, at most. See

BNF
The grammar and semantics of Domain Specifications
Examples for grammar nodes
The grammar and semantics of Rules
The grammar and semantics of Numeric Patterns
The grammar and semantics of Verification Reports
The grammar and semantics of Errors
List of Error Codes
https://schema.org/PaymentMethod