OwS Style Sheet Directive: OwS.StyleName: Unterschied zwischen den Versionen

Aus CTS2-LE
Zur Navigation springen Zur Suche springen
K (Examples)
(Examples)
 
(2 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 17: Zeile 17:
 
MS Word paragraphs may be assigned as values to properties of the recently defined object through custom style sheets. The OwS macro processor translates any paragraph of text formatted with a stylesheet named OwS.''ABC'' into a table of the form
 
MS Word paragraphs may be assigned as values to properties of the recently defined object through custom style sheets. The OwS macro processor translates any paragraph of text formatted with a stylesheet named OwS.''ABC'' into a table of the form
  
{|
+
{|style="background:#fcfcfc"
|-
+
|- style="background:#e8e8e8"
 
! style="text-align:left; width:14em" | Style Sheet !!   !! style="text-align:left; width:40em" | Text !!   !! style="text-align:left" | ''Comment''
 
! style="text-align:left; width:14em" | Style Sheet !!   !! style="text-align:left; width:40em" | Text !!   !! style="text-align:left" | ''Comment''
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
Zeile 48: Zeile 48:
 
MS Word allows almost arbritary texts as style names. This allows for even defining a style name '''OwS.Designation[Language=de]''' which can be used for setting the German translation of a concept name through simple text formatting directives. For instance the following example
 
MS Word allows almost arbritary texts as style names. This allows for even defining a style name '''OwS.Designation[Language=de]''' which can be used for setting the German translation of a concept name through simple text formatting directives. For instance the following example
  
{|
+
{|style="background:#fcfcfc"
|-
+
|- style="background:#e8e8e8"
 
! style="text-align:left; width:14em" | Style Sheet !!   !! style="text-align:left; width:40em" | Text !!   !! style="text-align:left" | ''Comment''
 
! style="text-align:left; width:14em" | Style Sheet !!   !! style="text-align:left; width:40em" | Text !!   !! style="text-align:left" | ''Comment''
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
Zeile 90: Zeile 90:
 
will internally be processed as  
 
will internally be processed as  
  
<hr>
+
{|style="background:#fcfcfc"
{|
+
|- style="background:#e8e8e8"
|-
 
 
! style="text-align:left; width:14em" | Style Sheet !! &nbsp; !! style="text-align:left; width:40em" | Text !! &nbsp; !! style="text-align:left" | ''Comment''
 
! style="text-align:left; width:14em" | Style Sheet !! &nbsp; !! style="text-align:left; width:40em" | Text !! &nbsp; !! style="text-align:left" | ''Comment''
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
Zeile 161: Zeile 160:
  
 
<hr>
 
<hr>
{|
+
{|style="background:#fcfcfc"
|-
+
|- style="background:#e8e8e8"
 
! style="text-align:left; width:6em" | Style Sheet !! &nbsp;&nbsp;&nbsp;&nbsp; !! style="text-align:left; width:30em" | Text !! &nbsp;&nbsp;&nbsp;&nbsp; !! style="text-align:left" | ''Comment''
 
! style="text-align:left; width:6em" | Style Sheet !! &nbsp;&nbsp;&nbsp;&nbsp; !! style="text-align:left; width:30em" | Text !! &nbsp;&nbsp;&nbsp;&nbsp; !! style="text-align:left" | ''Comment''
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"

Aktuelle Version vom 29. Dezember 2016, 14:41 Uhr

Syntax

The following syntax does not define a directive to be placed into an OwS file, because the OwS.StyleName directive does not come with any commands to be placed into the text. Instead it defines a syntax for custom MS Word style sheets, that looks as follows:


CustomOwSStyle := OwS PropertyReference+ PropertyQualifer*  



Description

MS Word paragraphs may be assigned as values to properties of the recently defined object through custom style sheets. The OwS macro processor translates any paragraph of text formatted with a stylesheet named OwS.ABC into a table of the form

Style Sheet   Text   Comment
OwS
 
ABC
Text of the paragraph formatted with OwS.ABC
table generated from the OwS.ABC formatted text

The generated table is then parsed by the OwS OOL compiler into property assignments following the full definition syntax.

MS Word allows almost arbritary texts as style names. This allows for even defining a style name OwS.Designation[Language=de] which can be used for setting the German translation of a concept name through simple text formatting directives. For instance the following example

Style Sheet   Text   Comment
OwS
define concept mouse {
define a new concept named "mouse"
OwS.Designation[Language=de]
Maus
set the German translation
OwS.Definition
A mouse (plural: mice) is a small rodent characteristically having a pointed snout, small rounded ears, a body-length scaly tail and a high breeding rate.
set the concept's definition
OwS.Definition
The best known mouse species is the common house mouse (Mus musculus). It is also a popular pet. In some places, certain kinds of field mice are locally common. They are known to invade homes for food and shelter.
add some more definiton to the concept
OwS
}
close the definiton scope of the newly defined concept

will internally be processed as

Style Sheet   Text   Comment
OwS
define concept mouse {
define a new concept
OwS
 
Designation[Language=de]
Maus
Definition
A mouse (plural: mice) is a small rodent characteristically having a pointed snout, small rounded ears, a body-length scaly tail and a high breeding rate.
Definition
The best known mouse species is the common house mouse (Mus musculus). It is also a popular pet. In some places, certain kinds of field mice are locally common. They are known to invade homes for food and shelter.
set the properties of the newly defined concept
OwS
}
close the definiton scope

Examples


Style Sheet      Text      Comment
OwS #heading 2 codesystem .Name ( .URI ) see #heading directive.
OwS #heading 3-4 concept .Display ( .Name ) see #heading directive.
Überschrift 2 Clinics and Wards (http://hospital.com/clinics) A new terminology is defined.
OwS.Description This terminology provides a list of all clinics and wards. The style of this paragraph starts with "OwS.". The OwS interpreter takes the second part of the style name as a property name. Therefore this paragraph is assigned to the Description-property of the codesystem-object that represents the newly defined terminology.
Überschrift 3 Cardiologic Clinic, Prof. Smyth (cardiologic clinic) A new concept is defined.
OwS.Designation[Language=de] Kardiologische Klinik This paragraph is assigned to the Designation-property of the concept with the text language set to German ("de").
OwS.Definition The cardiologic clinic is located in the Red-House-Building. This paragraph is considered to be the definition of the concept "cardiologic clinic".
Überschrift 4    Cardiologic care ward for Women and Children (ward 51.1)
OwS.Designation[Language=de]    Kardiologische Station für Frauen und Kinder
OwS.Definition    Ward 51.1 is located on the first floor.
Überschrift 4    Cardiologic care ward for Intensive Care (ward 51.2)
OwS.Definition    Ward 51.2 is located on the third floor. Access to the ward is restricted.