OwS Tutorial: Mapping Properties onto Style Sheets: Unterschied zwischen den Versionen
(Die Seite wurde neu angelegt: „ <hr> {| |- ! style="text-align:left; width:4em" | Style Sheet !! !! style="text-align:left; width:40em" | Text !! !! style="text-align:left" |…“) |
|||
| Zeile 1: | Zeile 1: | ||
| + | == Motivation == | ||
| + | ;Rationale | ||
| + | :In [[OwS Tutorial: Mapping Concept Hierarchies onto Word Sections|lesson 3]] the OwS ''#heading'' directive was introduced as a means for deriving OwS object hierarchies from MS Word style sheets. Nevertheless you were still forced to place all property definitions into table which not gives an OwS document a very formal style but even requires a full restructuring of existing specification documents which you may want to turn into OwS documents. | ||
| + | :In this lesson you will learn how to assign property values by means of custom style sheets. By this OwS definitions look like prosa text which makes them more readable and gives you more flexibility in applying any layout to your OwS documents. | ||
| + | ;What you need | ||
| + | :You should have worked through [[OwS Tutorial: Mapping Concept Hierarchies onto Word Sections|lesson 3]] of this tutorial in order to have a basic understanding on how OwS utilizes MS Word styles sheets. Beside this you need your MS Word with the OwS macro installed. | ||
| + | ;Example | ||
| + | :This example builds upon the example introduced in [[OwS Tutorial: Defining a Terminology|Lesson 1]] which again implements a simple story board: | ||
| + | :''Storyboard: In order to foster semantic interoperability among its IT-systems a hospital wants to define unique terminologies for its clinics. Each clinic and each ward shall be assigned a unique code that shall be used throughout all IT-systems for referring to that clinic or ward. '' | ||
| + | == Custom OwS Style Sheets == | ||
| + | |||
| + | The use of custom style sheets follows a very simple rule: | ||
| + | |||
| + | "Any text that is formatted using a stylesheet named ''OwS.XYZ'' within the definition scope of a concept ''A'' is considered as the value of the property ''XYZ'' of the concept ''A''." | ||
| + | |||
| + | E.g. if we want to get rid of the tables for setting the value of the ''Definition'' property of a concept, we only need to define a custom style sheet ''OwS.Definition'' and format the definition text of the concept with that style sheet. | ||
| + | |||
| + | {| | ||
| + | |- | ||
| + | ! style="text-align:left; width:4em" | Style Sheet !! !! style="text-align:left; width:40em" | Text !! !! style="text-align:left" | ''Comment'' | ||
| + | |- style="vertical-align:top" | ||
| + | | Überschrift 3|| ||style="background:#fff588"| | ||
| + | {| | ||
| + | |style="text-align:left; width:3em"| | ||
| + | |<span style="font-family:Arial;font-size:100%">'''Cardiologic Clinic, Prof. Smyth (cardiologic clinic)'''</span> | ||
| + | |} | ||
| + | || || Comment | ||
| + | |- style="vertical-align:top" | ||
| + | | OwS.Definition|| ||style="background:#fff588"| | ||
| + | {| | ||
| + | |style="text-align:left; width:3em"| | ||
| + | |<span style="font-family:Times;font-size:100%">''The Cardiologic Clinic (Head: Prof. Smyth) takes responsibility for all cardiologic interventions and acute care therapies.''</span> | ||
| + | |} | ||
| + | || || Comment | ||
| + | |} | ||
| + | |||
| + | === Defining a Custom Style Sheet === | ||
| + | The definiton of a custom style sheet is done by using existing MS Word features: | ||
| + | * Write a paragraph of text that shall become the vale of a property | ||
| + | * Mark the text with the mouse and click the right mouse button. A context menu appears. | ||
| + | * Select the menu item "Formatvorlagen". Another context menu appears. Select "Auswahl als neue Schnellformatvorlage speichern...". A menu appears. | ||
| + | * In the menu type the name of the style sheet (e.g. OwS.Definition) into the entry field and click "OK". | ||
| + | Now the new style sheet is also available in the styles quick list and can easily be applied to other paragraphs of text. | ||
| + | |||
| + | === Putting Qualifiers into Style Names === | ||
| + | MS Words does not impose any restrictions on the names of style sheets. Therefore you may as well name a style sheet "OwS.Designation[Language=de][Use=Synonym]" in order to set a paragraph as the value of the ''Designation'' property with the language set to German and marking it as a synonym. | ||
| + | |||
| + | {| | ||
| + | |- | ||
| + | ! style="text-align:left; width:4em" | Style Sheet !! !! style="text-align:left; width:40em" | Text !! !! style="text-align:left" | ''Comment'' | ||
| + | |- style="vertical-align:top" | ||
| + | | Überschrift 3|| ||style="background:#fff588"| | ||
| + | {| | ||
| + | |style="text-align:left; width:3em"| | ||
| + | |<span style="font-family:Arial;font-size:100%">'''Cardiologic Clinic, Prof. Smyth (cardiologic clinic)'''</span> | ||
| + | |} | ||
| + | || || Comment | ||
| + | |- style="vertical-align:top" | ||
| + | | OwS.Designation[Language=de]|| ||style="background:#fff588"| | ||
| + | {| | ||
| + | |style="text-align:left; width:3em"| | ||
| + | |<span style="font-family:Arial;font-size:100%">Kardiologische Klinik</span> | ||
| + | |} | ||
| + | || || Comment | ||
| + | |- style="vertical-align:top" | ||
| + | | OwS.Definition|| ||style="background:#fff588"| | ||
| + | {| | ||
| + | |style="text-align:left; width:3em"| | ||
| + | |<span style="font-family:Times;font-size:100%">''The Cardiologic Clinic (Head: Prof. Smyth) takes responsibility for all cardiologic interventions and acute care therapies.''</span> | ||
| + | |} | ||
| + | || || Comment | ||
| + | |} | ||
| + | |||
| + | |||
| + | |||
| + | == Full Example == | ||
<hr> | <hr> | ||
{| | {| | ||
| Zeile 44: | Zeile 120: | ||
{| | {| | ||
|style="text-align:left; width:0em"| | |style="text-align:left; width:0em"| | ||
| − | |<span style="font-family:Arial;font-size:118%">'''T05 | + | |<span style="font-family:Arial;font-size:118%">'''T05 Clinics and Wards (0.1)'''</span> |
|} | |} | ||
|| || Comment | || || Comment | ||
Version vom 5. Oktober 2016, 18:19 Uhr
Inhaltsverzeichnis
Motivation
- Rationale
- In lesson 3 the OwS #heading directive was introduced as a means for deriving OwS object hierarchies from MS Word style sheets. Nevertheless you were still forced to place all property definitions into table which not gives an OwS document a very formal style but even requires a full restructuring of existing specification documents which you may want to turn into OwS documents.
- In this lesson you will learn how to assign property values by means of custom style sheets. By this OwS definitions look like prosa text which makes them more readable and gives you more flexibility in applying any layout to your OwS documents.
- What you need
- You should have worked through lesson 3 of this tutorial in order to have a basic understanding on how OwS utilizes MS Word styles sheets. Beside this you need your MS Word with the OwS macro installed.
- Example
- This example builds upon the example introduced in Lesson 1 which again implements a simple story board:
- Storyboard: In order to foster semantic interoperability among its IT-systems a hospital wants to define unique terminologies for its clinics. Each clinic and each ward shall be assigned a unique code that shall be used throughout all IT-systems for referring to that clinic or ward.
Custom OwS Style Sheets
The use of custom style sheets follows a very simple rule:
"Any text that is formatted using a stylesheet named OwS.XYZ within the definition scope of a concept A is considered as the value of the property XYZ of the concept A."
E.g. if we want to get rid of the tables for setting the value of the Definition property of a concept, we only need to define a custom style sheet OwS.Definition and format the definition text of the concept with that style sheet.
| Style Sheet | Text | Comment | ||||
|---|---|---|---|---|---|---|
| Überschrift 3 |
|
Comment | ||||
| OwS.Definition |
|
Comment |
Defining a Custom Style Sheet
The definiton of a custom style sheet is done by using existing MS Word features:
- Write a paragraph of text that shall become the vale of a property
- Mark the text with the mouse and click the right mouse button. A context menu appears.
- Select the menu item "Formatvorlagen". Another context menu appears. Select "Auswahl als neue Schnellformatvorlage speichern...". A menu appears.
- In the menu type the name of the style sheet (e.g. OwS.Definition) into the entry field and click "OK".
Now the new style sheet is also available in the styles quick list and can easily be applied to other paragraphs of text.
Putting Qualifiers into Style Names
MS Words does not impose any restrictions on the names of style sheets. Therefore you may as well name a style sheet "OwS.Designation[Language=de][Use=Synonym]" in order to set a paragraph as the value of the Designation property with the language set to German and marking it as a synonym.
| Style Sheet | Text | Comment | ||||
|---|---|---|---|---|---|---|
| Überschrift 3 |
|
Comment | ||||
| OwS.Designation[Language=de] |
|
Comment | ||||
| OwS.Definition |
|
Comment |
Full Example
| Style Sheet | Text | Comment | ||||
|---|---|---|---|---|---|---|
| OwS |
|
Comment | ||||
| OwS |
|
Comment | ||||
| OwS |
|
Comment | ||||
| OwS |
|
Comment | ||||
| Standard |
|
Comment | ||||
| Überschrift 2 |
|
Comment | ||||
| OwS.URI |
|
Comment | ||||
| OwS.Description |
|
Comment | ||||
| Überschrift 3 |
|
Comment | ||||
| OwS.Designation[Language=de] |
|
Comment | ||||
| OwS.Definition |
|
Comment | ||||
| Überschrift 4 |
|
Comment | ||||
| OwS.Designation[Language=de] |
|
Comment | ||||
| Überschrift 4 |
|
Comment | ||||
| OwS.Designation[Language=de] |
|
Comment | ||||
| Überschrift 3 |
|
Comment | ||||
| OwS.Designation[Language=de] |
|
Comment | ||||
| OwS.Definition |
|
Comment | ||||
| Überschrift 4 |
|
Comment | ||||
| OwS.Designation[Language=de] |
|
Comment | ||||
| Standard |
|
Comment |