OwS Style Sheet Directive: obligation

Aus CTS2-LE
Zur Navigation springen Zur Suche springen

The #obligation directive triggers the execution of a set of OwS statements whenever the OwS tokenizer discovers a paragraph of a certain style.

Syntax

ObligationDirective := #obligation PrePostQualifier? StyleName => ExecutableCode  
| #obligation PrePostQualifier? StyleName de-registers all obligations for the given style and mode (pre/post)
PrePostQualifier := < Obligation is executed before a line of text with the given style is processed
| > Obligation is executed after a line of text with the given style is processed. This is the default behavior.
ExecutableCode := PackageName
| Text


Description

The #obligation directive is a simplified variant of the #pattern directive. In contrast to the #pattern directive, #obligation can be used in conjunction with other directives. For this the most common scenario where #obligation is used is the postprocessing of object definitions that had been triggered by the #heading directive. A typical example is given below

Style Sheet   Text   Comment
OwS
#heading 2 concept .Name ( .Designation[Language=de] )
Comment
OwS
#obligation Überschrift 2 => set me.Display = me.Name
Comment
Standard
Comment
Überschrift 2
Mammals (Säugetiere)
Comment
OwS.Definition
Mammals are characterized by the possession of a neocortex (a region of the brain), hair, three middle ear bones and mammary glands.
Comment


Examples