Semantic Data Model Rules in XML

Rules Section

The rules section may have two parts:

  1. List of rule-groups
  2. List of rules

Rule Group

rule-groups can be used for arbitrary defintions of a common set of rules. They only have to have an id, a name, and a description.

<rule-group xml:id="simple-rules">
  <m:name>Name of  rule group<m:name>  
  <m:description>Many Simple Rules</m:description>
</rule-group>

Simple Rule

A minimal rule definition has an id and a description of the rule itself.

<rule xml:id="model-language">
  <description>Every SeMoX Model must have a default assigned language. 
  I.e. for example 'en' to indicate that all descriptive text and names are 
  to be interpreted as English text</description>
</rule>

Detailed Rules

Rules may

  • belong to several rule-groups
  • have list of terms on which this rule applies to.
  • have information or refrences about implementations

Example:

<rule xml:id="description-not-empty" 
      on-terms="description" 
      groups="existence-rules">
  <description>Any description must not be empty</description>
  <implementations>
     <schematron assert-ids="not-yet-defined" rule-ids="not-yet-defined"/>
   </implementations>
</rule>
  • Currently schematron is the only implementation supported (more to follow)
  • schematron element may have sub elements of any other namespace incl. schematron namespace

TODO:

Last modified November 14, 2024: WIP: move to docsy theme (9dec5ad)