OwS Style Sheet Directive: heading
Inhaltsverzeichnis
Syntax
| HeadingDirective | := | #heading Level TypeName Mask | ||
| | | #heading Level | |||
| Level | := | [1-9](-[1-9])? |
Description
The #heading directive considers a MS Word chapter or section as an OwS object definition. The #heading directive takes 3 arguments:
| argument | description |
|---|---|
| Level | The heading levels that trigger the directive. E.g. if "2-4" is provided for this argument, the directive only applies to MS Word headlines which are formatted by style sheets that are registered as level-2, level-3 and level-4 headings. |
| TypeName | The type of the object that shall be created and defined by the headline text and the section/chapter assigned to that headline. As well OwS buildin types as custom types may be devined through the #heading directive. |
| Mask | Pattern that defines how properties of the newly defined object are provided within the headline text. |
Defining the Headline Text Pattern
The Mask argument is a sequence of OwS property names and non-interpreted text. Property names shall start with a dot (.) and denote a property that is defined for the object that is to be created. Property names and non-interpreted text shall alternate within the mask. Non-interpreted text shall not include dots (because otherwise the OwS Tokenizer would consider the word following the dot as a property name). The table below gives some examples for valid mask definitions:
| mask | typename | example headline text | equivalent to |
|---|---|---|---|
| .Name | codesystem | Ingredients and Tools | define codesystem (Ingredients and Tools) { ... }
|
| .Name and Tools | codesystem | Ingredients and Tools | define codesystem (Ingredients) { ... }
|
| Ingredients and .Name | codesystem | Ingredients and Tools | define codesystem (Tools) { ... }
|
| .Name ( .Display ) | concept | sugar white (White Sugar) | define concept (sugar white) {
set .Display = (White Sugar)
...
}
|
| .Name : .Code ( .Designation[Language=de] ) | concept | sugar white:37 (Zucker) | define concept (sugar white) {
set .Code = (37)
set .Designation[Language=de] = (Zucker)
...
}
|
The following restrictions apply:
- when defining a codesystem, property, predicate or type, the Name-property shall be provided as part of the headline text
- when defining a concept, either the Name- or the Code-property shall be provided as part of the headline text. If only a Code is provided, the code of the concept is also used as the name of the concept.
Linking MS Word Sections and Definition Scopes
Examples
| Style Sheet | Text | Comment | ||
|---|---|---|---|---|
| OwS | #heading 2 codesystem .Name ( .URI) | Level 2 chapters are terminology definitions. The heading gives the name of the terminology and (in parentheses) the URI of the terminology. | ||
| OwS | #heading 3-4 concept .Display ( .Name ) | Level 3 sections are concept definitions within the terminology that coresponds to the superordinate level 2 chapter. Level 4 sections define subconcepts within the concepts defined by level 3 section. Level 3 and 4 headlines provide the display text of a concept together with its code (in parentheses). | ||
| Überschrift 2 | Clinics and Wards (http://hospital.com/clinics) | A terminology "Clinics and Wards" is defined. The definition scope of the codesystem objects reaches until the end of the level-2 chapter. | ||
| Überschrift 3 | Cardiologic Clinic, Prof. Smyth (cardiologic clinic) | A concept "cordiologic clinic" is defined. The definiton scope of this concept reaches until the end of the level-3 section. | ||
| Überschrift 4 | Cardiologic care ward for Women and Children (ward 51.1) | A concept "ward 51.1" is defined as a subconcept of "cardiologic clinic". | ||
| Überschrift 4 | Cardiologic care ward for Intensive Care (ward 51.2) | |||
| Überschrift 3 | Orthopedic Clinic, Prof. Miller (orthopedic clinic) | Another concept within the terminology "Clinics and Wards". This concept sets up a new definition scope within the definition scope of "Clinics and Wards". | ||
| Überschrift 4 | Orthopedic care ward for knee and hip patients (ward 52.1) |