| Beyond DTDs: constraining data content | Table of contents | Indexes | Context-Sensitive Documentation in Industrial Process Plants | |||
Aspects, Effectivities, and Variants |
|
Dr. Hans Holger Rath |
| Director Consulting |
| STEP Stürtz Electronic Publishing GmbH Technologiepark Würzburg-Rimpar Pavillon 7 D-97222 Rimpar Germany Phone: +49.(0)9365.8062.0 Fax: +49.(0)9365.8062.66 Email: consulting@step.de Web: www.step.de |
Biographical notice: |
Dr. Hans Holger Rath |
ABSTRACT: |
| aspect commercial publications effectivity technical documentation ![]() variant |
Tailored/customized documents become more and more important in technical documentation and commercial publications. Technical documents have to be tailored to the customer's environment (country, user skills). Commercial publications have to fit the readers' needs (interests, knowledge, level of requested detail). This paper presents the basic ideas behind variants, aspects, and effectivities. It shows where they are useful and how they are applied. This paper gives several SGML based approaches, and discusses their advantages and disadvantages. |
Introduction |
|
| aerospace industry individual documentation telecommunication industry |
Technical documentation is the classic application field for documents with general and customer/reader specific content. Especially aerospace industry with its huge amounts of documents and its customer oriented products uses various techniques to produce all the customer documentation with all its variants controlled by effectivities or aspects. The telecommunication industry (switches) is a second application field of technical documentation with aspects. The products — mainly hardware and software — are also very individual solutions and need individual documentation. The individual documents are controlled by parameters like 'installed features', 'delivered parts', 'country', and 'user skills'. |
| personal edition reader profile |
But not only technical documentation needs tailored/customized documents, even mass publications like newspapers or magazines should be produced customer oriented by the publishing houses. This could end up in personal editions: some readers prefer sports, others prefer financial information, again others look only for politics and local news. Electronic delivery would be the best way to bring the information to the consumer. The generation of the personalized publications depends on reader profiles like 'interests', 'knowledge', and 'level of requested detail'. |
The Problem |
|
| variant condition |
Variants are controlled by so-called aspects or effectivities . Examples for aspects/effectivities are 'user skill level', 'country', 'installed features for customers A, B, and C', or 'modifications for customers X, Y, and Z'. Each text block belonging to a variant carries a condition. The condition contains an assignment of the aspect with a concrete value — e.g., skill-level=expert and country=USA
. The document carries a field for the variant control. When a variant should be generated this field is filled with the needed aspect combination — e.g., (skill-level=intermediate and skill-level=expert) or country=UK
. Every text block which a condition that evaluates to 'true' will be displayed; all other text blocks will be hidden — e.g., all texts for intermediate and expert users as well as all texts for UK customers will be visible. |
dangling link ![]() hyperlink ![]() |
The problem becomes even more complex when link targets are inside variants. Link source and target anchors have to be synchronized considering the possible variants of the document to ensure that no dangling link exists. |
| document life-cycle |
These differences between SGML structure and variant structure as well as the links have to be taken into account by the listed three stages of the document life-cycle: capturing, management, publication.
|
| dynamic variant static variant |
A further problem occurs when the effectivities are evaluated for publication. It might be possible that from a logical point of view lower effectivities are stronger (= more restrictive) than upper effectivities or lower effectivities contradict upper effectivities. Note: A clever algorithm and a powerful condition language are needed to detect these contradictions. But these problems are out of the scope of this paper. |
Example |
|
The following example will be used later on for every presented SGML concept. |
Given Doctype |
|
This simple doctype should help arguing for and against the several SGML concepts. |
<!DOCTYPE doc [ <!ELEMENT doc - - (chapter+) > <!ELEMENT chapter - O (head, (para)+) > <!ELEMENT head - - (#PCDATA) > <!ELEMENT para - - (#PCDATA) > ]> |
Given Variants |
|
There are the aspects skill
(= user skill level) and country
(= country where product is installed) with the possible values EXPERT
/ BEGINNER
and USA
/ GERMANY
. |
The following four document variants result from these aspects and settings Note: : |
Chapter 1: Hardware Installation |
Before you start with the installation of your hardware check if you have 110 voltage. |
Chapter 1: Hardware Installation |
Before you start with the installation of your hardware check if you have 110 voltage. |
You can check the voltage with a voltmeter. |
Chapter 1: Hardware Installation |
Before you start with the installation of your hardware check if you have 220 voltage. |
Chapter 1: Hardware Installation |
Before you start with the installation of your hardware check if you have 220 voltage. |
You can check the voltage with a voltmeter. |
These four variants are marked up as shown below: |
Expert in USA: |
<doc> <chapter> <head>Hardware Installation</head> <para>Before you start with the installation of your hardware check if you have 110 voltage.</para> </doc> |
Beginner in USA: |
<doc> <chapter> <head>Hardware Installation</head> <para>Before you start with the installation of your hardware check if you have 110 voltage.</para> <para>You can check the voltage with a voltmeter.</para> </doc> |
Expert in Germany: |
<doc> <chapter> <head>Hardware Installation</head> <para>Before you start with the installation of your hardware check if you have 220 voltage.</para> </doc> |
Beginner in Germany: |
<doc> <chapter> <head>Hardware Installation</head> <para>Before you start with the installation of your hardware check if you have 220 voltage.</para> <para>You can check the voltage with a voltmeter.</para> </doc> |
| ANY element CONCUR feature EMPTY element attribute element marked section processing instruction |
SGML Helps ... or not? |
EMPTY Elements |
|
Two EMPTY elements added as inclusion exceptions to the root element mark the start and end of a variant text block. ID and IDREF links connect the elements, whereby this connection is only semantic. |
Example: |
<!DOCTYPE doc [
<!ELEMENT doc - - (chapter+)
+(var—st, var—end) >
<!ELEMENT chapter - O (head, (para)+) >
<!ELEMENT head - - (#PCDATA) >
<!ELEMENT para - - (#PCDATA) >
<!ELEMENT var—st - O EMPTY >
<!ATTLIST var—st cond CDATA #REQUIRED
id ID #REQUIRED
refid IDREF #REQUIRED >
<!ELEMENT var—end - O EMPTY >
<!ATTLIST var—end id ID #REQUIRED
refid IDREF #REQUIRED >
]>
<doc>
<chapter>
<head>Hardware Installation</head>
<para>Before you start with the installation of your hardware check
if you have <VAR—ST COND="COUNTRY=USA" ID=VS1 REFID=VE1>110<VAR-END
ID=VE1 REFID=VS1><VAR—ST COND="COUNTRY=GERMANY" ID=VS2 REFID=VE2>220<VAR-END
ID=VE2 REFID=VS2> voltage.</para>
<VAR—ST COND="SKILL=BEGINNER" ID=VS3 REFID=VE3>
<para>You can check the voltage with a voltmeter.</para>
<VAR-END ID=VE3 REFID=VS3>
</doc> |
Pro : EMPTY elements support free placement of variants even over element boundaries. |
Processing Instructions |
|
Two processing instructions mark the start and end of a variant text block. The processing instructions have to carry the same information as the empty elements do. |
Example: |
<!DOCTYPE doc [ <!ELEMENT doc - - (chapter+) > <!ELEMENT chapter - O (head, (para)+) > <!ELEMENT head - - (#PCDATA) > <!ELEMENT para - - (#PCDATA) > ]> <doc> <chapter> <head>Hardware Installation</head> <para>Before you start with the installation of your hardware check if you have <?VAR ST COND="COUNTRY=USA" ID=VS1 REFID=VE1>110<?VAR END ID=VE1 REFID=VS1><?VAR ST COND="COUNTRY=GERMANY" ID=VS2 REFID=VE2>220<?VAR END ID=VE2 REFID=VS2> voltage.</para> <?VAR ST COND="SKILL=BEGINNER" ID=VS3 REFID=VE3> <para>You can check the voltage with a voltmeter.</para> <?VAR END ID=VE3 REFID=VS3> </doc> |
Pro : Processing instructions support free placement of variants even over element boundaries. |
Marked Sections |
|
Use of marked section provides an SGML solution which guarantees correct nesting and validation but supports only simple conditions (INCLUDE or IGNORE and no boolean expressions). |
Marked Section and EMPTY Element |
|
The EMPTY element is added as an inclusion exception to the root element of the DTD. |
Example: |
<!DOCTYPE doc [
<!ELEMENT doc - - (chapter+)
+(var) >
<!ELEMENT chapter - O (head, (para)+) >
<!ELEMENT head - - (#PCDATA) >
<!ELEMENT para - - (#PCDATA) >
<!ELEMENT var - O EMPTY >
<!ATTLIST var cond CDATA #REQUIRED >
]>
<doc>
<chapter>
<head>Hardware Installation</head>
<para>Before you start with the installation of your hardware check
if you have <VAR COND="COUNTRY=USA"><![ INCLUDE [110]]>
<VAR
COND="COUNTRY=GERMANY"><![ INCLUDE [220]]> voltage.</para>
<VAR COND="SKILL=BEGINNER"><![ INCLUDE [
<para>You can check the voltage with a voltmeter.</para>
]]>
</doc> |
Pro : Use of marked section provides an SGML solution which guarantees correct nesting and validation. Empty elements can carry complex conditions. |
Contra : Tool support is needed to validate and build the variants. Most viewers and browsers cannot generate variants on-the-fly, because marked sections are static. |
SGML Feature CONCUR |
|
Attributes and Elements |
|
Each existing element which might be a variant border becomes a condition attribute |
Example: |
<!DOCTYPE doc [ <!ELEMENT doc - - (chapter+) > <!ELEMENT chapter - O (head, (para)+) > <!ELEMENT head - - (#PCDATA) > <!ELEMENT para - - (#PCDATA | inl-var)* > <!ATTLIST para cond CDATA #REQUIRED > <!ELEMENT inl-var - - (#PCDATA) > <!ATTLIST inl-var cond CDATA #REQUIRED > ]> <doc> <chapter> <head>Hardware Installation</head> <para>Before you start with the installation of your hardware check if you have <INL-VAR COND="COUNTRY=USA">110</INL-VAR><INL-VAR COND="COUNTRY=GERMANY">220</INL-VAR> voltage.</para> <para COND="SKILL=BEGINNER">You can check the voltage with a voltmeter.</para> </doc> |
Pro : SGML structure and variant structure are harmonized. The concept is easy to implement in tools. |
Special Variant Elements |
|
Example: |
<!DOCTYPE doc [ <!ELEMENT doc - - (chapter+) > <!ELEMENT chapter - O (head, (para | pl-var)+) > <!ELEMENT head - - (#PCDATA) > <!ELEMENT para - - (#PCDATA | inl-var)* > <!ELEMENT pl-var - - (para)+ > <!ATTLIST pl-var cond CDATA #REQUIRED > <!ELEMENT inl-var - - (#PCDATA) > <!ATTLIST inl-var cond CDATA #REQUIRED > ]> <doc> <chapter> <head>Hardware Installation</head> <para>Before you start with the installation of your hardware check if you have <INL-VAR COND="COUNTRY=USA">110</INL-VAR><INL-VAR COND="COUNTRY=GERMANY">220</INL-VAR> voltage.</para> <PL—VAR COND="SKILL=BEGINNER"> <para>You can check the voltage with a voltmeter.</para> </PL-VAR> </doc> |
Pro : SGML structure and variant structure are harmonized. The concept is easy to implement in tools. |
ANY Element |
|
Only one variant element with content ANY is added as inclusion exception to the root element of the DTD. A condition attribute carries the aspect settings. |
Example: |
<!DOCTYPE doc [
<!ELEMENT doc - - (chapter+)
+(var) >
<!ELEMENT chapter - O (head, (para)+) >
<!ELEMENT head - - (#PCDATA) >
<!ELEMENT para - - (#PCDATA) >
<!ELEMENT var - - ANY >
<!ATTLIST var cond CDATA #REQUIRED >
]>
<doc>
<chapter>
<head>Hardware Installation</head>
<para>Before you start with the installation of your hardware check
if you have <VAR COND="COUNTRY=USA">110</VAR><VAR
COND="COUNTRY=GERMANY">220</VAR> voltage.</para>
<VAR COND="SKILL=BEGINNER">
<para>You can check the voltage with a voltmeter.</para>
</VAR>
</doc> |
Pro : SGML structure and variant structure are harmonized. Only one element is needed. |
| inherited element content |
New Content Model INHERIT |
The variant element is added as inclusion exception to the root element. |
Note:
|
Example: |
<!DOCTYPE doc [
<!ELEMENT doc - - (chapter+)
+(var) >
<!ELEMENT chapter - O (head, (para)+) >
<!ELEMENT head - - (#PCDATA) >
<!ELEMENT para - - (#PCDATA) >
<!ELEMENT var - - INHERIT >
<!ATTLIST var cond CDATA #REQUIRED >
]>
<doc>
<chapter>
<head>Hardware Installation</head>
<para>Before you start with the installation of your hardware check
if you have <VAR COND="COUNTRY=USA">110</VAR><VAR
COND="COUNTRY=GERMANY">220</VAR> voltage.</para>
<VAR COND="SKILL=BEGINNER">
<para>You can check the voltage with a voltmeter.</para>
</VAR>
</doc> |
Pro : SGML structure and variant structure are harmonized. Only one element is needed. No specialized tool support is needed if INHERIT would become part of SGML. |
Contra : The placement of variant boundaries is restricted to the balanced SGML element boundaries. |
Conclusion |
|
If ISO's SGML committee would introduce the new content model INHERIT some of the problems would be solved. |
| Beyond DTDs: constraining data content | Table of contents | Indexes | Context-Sensitive Documentation in Industrial Process Plants | |||