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
  • Syntax diagram for numeric pattern
  • NumericPattern
  • NumberExpression
  • RangeExpression
  • MoreThanExclExpression
  • LessThanExclExpression
  • MoreThanInclExpression
  • LessThanInclExpression
  • MultipleOfExpression
  • OrExpression
  • AndExpression
  • NotExpression
  1. Domain Specifications
  2. DS-V2
  3. DS-V2 - Grammar

Numeric Pattern

A numeric pattern is a string which defines a valid set of numeric values.

Such a numeric pattern is used in the DS vocabulary to define constraint on numeric values, the length of strings, or the allowed cardinality of properties.

Integers and Float values (simple float without exponent letter) can be used in numeric patterns. Spaces between characters are possible, but not necessary.

Expressions for this pattern include (Val stands for a value, Expr stands for an expression):

(note: because of markdown limitations the examples in table contain ⎮ instead of | (pipe) as symbol for "or" )

Expression

pattern syntax

Number

Val1

Range

Val1 - Val2

More than excl.

> Val1

Less than excl.

< Val1

More than incl.

>= Val1

Less than incl.

<= Val1

MultipleOf

% Val1

Or

(Expr1 ⎮ Expr2 ⎮ ... ⎮ ExprN)

And

(Expr1 & Expr2 & ... & ExprN)

Not

!Expr1

Examples:

Numeric pattern

description

20

equal 20

<4

smaller than 4

>=5

bigger or equal 5

%4

multiple of 4

1-3

between 1 and 3

(0 ⎮ 1)

0 or 1

(>1 & <10)

bigger than 1 and smaller than 10

!0

not 0

1-1.337

between 1 and 1.337

((>2 & 9000)

multiple of 2 and less than 10, or multiple of 3, or bigger than 9000

Syntax diagram for numeric pattern

NumericPattern

NumberExpression

RangeExpression

MoreThanExclExpression

LessThanExclExpression

MoreThanInclExpression

LessThanInclExpression

MultipleOfExpression

OrExpression

AndExpression

NotExpression

PreviousGrammar Documentation for node type "DataType"NextGrammar Documentation for node type "VerificationReport"

Last updated 4 years ago

Syntax diagram
Syntax diagram
Syntax diagram
Syntax diagram
Syntax diagram
Syntax diagram
Syntax diagram
Syntax diagram
Syntax diagram
Syntax diagram
Syntax diagram