Spezialisierung ist Alleinstellungsmerkmal von DITA und damit das Wichtigste, was es in der technischen Redaktion in den letzten Jahrzehnten gegeben hat. Dieses Tutorial zeigt, warum Spezialisierung wichtig ist, was es genau bedeutet und wie Sie es erfolgreich umsetzen.
22. HTML Elemente : Formatierung
Bezug auf der Visualisierung in Ihrem Browser
<h1>Titel</h1>!
<p>Text mit einige <i>Formatierung</i>.</p>!
<h2>Titel auf zweite Ebene</h2>!
<p>Und noch etwas <b>fette</b> Text</p>!
<ul>!
<li>• Erster Punkt</li>!
<li>• Zweiter Punkt</li>!
</ul>
23. XML Elemente : Semantik
Bezug auf Bedeutung der Elemente in deren Kontext
<topic>!
<title>Performing a task</title>!
<shortdesc>Just one sentence</shortdesc>!
<body>!
<p>First paragraph in this task</p>!
<section>!
<title>Subtask</title>!
<p>Another paragraph</p>!
</section>!
</body>!
</topic>
39. MinimalerTopicTyp
Keine Spezialisierung oder Einschränkung (“.mod” Datei) erforderlich
highlightDomain!
utilitiesDomain!
indexingDomain!
hazardstatementDomain
abbreviateDomain!
programmingDomain!
softwareDomain!
uiDomain!
topic.mod
<!DOCTYPE topic SYSTEM "minitopic.dtd">
40. Verfügbarkeit “PUBLIC”
Eindeutige PUBLIC ID Schlüssel - muß nicht wirklich existieren
highlightDomain!
utilitiesDomain!
indexingDomain!
hazardstatementDomain
abbreviateDomain!
programmingDomain!
softwareDomain!
uiDomain!
topic.mod
<!DOCTYPE topic PUBLIC "-//IDN ditadocs.com//DTD Mini Topic//EN" "minitopic.dtd">
41. Wie erzähle ich es meine OT ?
XML Katalog bildet PUBLIC IDs ab auf lokale Dateien
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//IDN ditadocs.com//DTD Mini Topic//EN""
"minitopic.dtd">
<topic id="topic_vck_2nc_sn">
<title>Topic title</title>
<body>
<p>Topic paragraph</p>
</body>
</topic>
<!-- Custom DTDs defined by JANG Communication / ditadocs.com -->
<public publicId="-//IDN ditadocs.com//DTD Mini Topic//EN""
uri="minitopic.dtd" "
xml:base="plugins/com.ditadocs.minitopic/dtd/">"
</public>
43. Extremes Constraint-Modul
Constraints definieren Inhalts-Entitäten neu
!
<?xml version="1.0" encoding="UTF-8"?>
<!-- ======================================
Constraint Module: Paragraphs with only text.
Copyright (c) 2014 JANG Communication
====================================== -->
<!ENTITY topic-constraints "(topic TextOnlyTopic-c)" >
<!ENTITY % p.content
" ( #PCDATA )
">"
TextOnlyTopicConstraints.mod
44. Nicht alles ausschließen ?
Definition der schon bekannten Entitäten wegen Verarbeitungsreihenfolge
!
<?xml version=”1.0” encoding=”UTF-8”?>"
<!-- Constraint module: highlights-only paragraphs "
Copyright (c) 2010 Eliot Kimber -->"
!
<!ENTITY topic-constraints “(topic HighlightsOnlyTopic-c)” >"
!
<!ENTITY % b "b" >
<!ENTITY % i "i" >
<!ENTITY % u "u" >
!
<!ENTITY % p.content "(#PCDATA |
%b; |
%i; |
%u;)*"
>"
HighlightsOnlyTopicConstraints.mod
45. Constraints aktivieren
Reihenfolge der Definitionen in der DTD ist wichtig
!
<!-- DOMAINS ATTRIBUTE OVERRIDE -->"
!
<!ENTITY included-domains "&topic-constraints;" >
!
<!-- CONTENT CONSTRAINT INTEGRATION -->"
!
<!ENTITY % TextOnlyTopic-c-def
SYSTEM "TextOnlyTopicConstraint.mod">
%TextOnlyTopic-c-def;
!
<!-- TOPIC ELEMENT INTEGRATION -->"
!
..."
TextOnlyTopic.dtd
1
!
!
2
46. Einschränkung der Gültigkeit
Nur an Stellen, die im Constraint-Modul neu definiert wurden
!
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//IDN ditadocs.com//DTD TextOnlyTopic//EN" "
"TextOnlyTopic.dtd">
!
<topic id="topic_vck_2nc_sn">
<title>Topic title</title>
<body>
<p>Topic paragraph with <term>Invalid</term> content.</p>"
<note>The <term>Term</term> element is still valid here.</note>
</body>
</topic>
MyTestDoc.dita
52. Vererbung über “class”Attribut
Zeigt komplette Abstammung des Elements
@class = “- topic/body task/taskbody mytask/mytaskbody “
Elemente
DTD Module
Struktur
@class = “+ topic/p mydomain-d/mypara “
Elemente
DTD Module
Domain
53. Semantische Erweiterung
Ermöglicht einfache und bequeme Bereicherung der Inhalte
The basic principle in phenomenology is the episteme,
or "putting the world within brackets". Whatever we
may see in the outside world, we try to disregard. Not
by closing our eyes, but by looking at the way we look
at the world. The foreground (the world) becomes the
background and the act of looking becomes the focus of
our attention. Of course, this reflection (in an almost
literal sense) can be repeated endlessly.
philosophy-termterm
54. Elementdefinition
Mehrere Elemente können in einem Modul kombiniert werden
!
<!-- ELEMENT NAME ENTITIES -->
<!ENTITY % philo-term "philo-term" >
<!-- ELEMENT DECLARATIONS -->
<!ENTITY % philo-term.content " (#PCDATA)* " >
<!ENTITY % philo-term.attributes ' %univ-atts; ' >"
<!ELEMENT philo-term %philo-term.content; >
<!ATTLIST philo-term %philo-term.attributes; >
<!-- SPECIALIZATION ATTRIBUTE DECLARATIONS -->
<!ATTLIST philo-term %global-atts; "
class CDATA "+ topic/term jang-d/philo-term " >
!
JangDomain.mod
55. Definition der Entitäten
Werden in der spezialisierten DTD eingebunden
!
<!ENTITY % jang-d-term "philo-term" >
<!ENTITY jang-d-att "(topic jang-d)" >"
JangDomain.ent
!
<!ENTITY % jang-d-term "
"philo-concept |"
philosopher |"
school |"
dogma"
" >
<!ENTITY jang-d-att "(topic jang-d)" >"
56. Elementdefinition
Mehrere Elemente können in einem Modul kombiniert werden
!
<!-- DOMAIN ENTITY DECLARATIONS -->
<!ENTITY % jang-d-dec SYSTEM "jangDomain.ent" >%jang-d-dec;
!
<!-- DOMAIN EXTENSIONS -->"
!
<!ENTITY % term "term | %jang-d-term; " >"
!
<!-- DOMAINS ATTRIBUTE OVERRIDE -->
<!ENTITY included-domains
"&hi-d-att;
&jang-d-att;" >"
!
<!-- DOMAIN ELEMENT INTEGRATION -->
<!ENTITY % jang-d-def SYSTEM "jangDomain.mod" >%jang-d-def;
philotopic.dtd
63. Testdokument erstellen
So lange es ungültig ist, ist Ihre DTD noch nicht richtig definiert
!
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE recipe SYSTEM "recipe.dtd" >
<recipe id="risotto-mushrooms">
<title>Risotto with mushrooms</title>
<shortdesc>A simple and fast Italian dish with a modern British twist."
</shortdesc>
<recipebody>
<recipeinfo>
<image></image>
<recipesrc>Jamie Oliver</recipesrc>
<recipestyle>Modern Italian</recipestyle>
</recipeinfo>
<recipereqs>
<ingredients>
<ingredient>500g risotto rice</ingredient>
<ingredient>250g cellery</ingredient>
<ingredient>3 cloves of garlic</ingredient>
risotto-mushrooms.xml
64. Shell DTD erstellen
Kopieren und anpassen ist eine effiziente und sichere Methode
!
<?xml version="1.0" encoding="UTF-8"?>
<!-- ============================================================= -->
<!-- HEADER -->
<!-- ============================================================= -->
<!-- MODULE: DITA Recipe DTD -->
<!-- VERSION: 1.0 -->
<!-- -->
<!-- SYSTEM: Darwin Information Typing Architecture (DITA) -->
<!-- -->
<!-- PURPOSE: DTD to describe DITA Recipes -->
<!-- -->
<!-- ORIGINAL CREATION DATE: -->
<!-- April 2014 -->
<!-- (C) Copyright JANG Communication 2014 -->
<!-- -->
<!-- ============================================================= -->"
recipe.dtd
66. Einbetten vonTopics untersagen
Generell sind Tasks innerhalb einer Task erlaubt
!
<!-- ============================================================= -->
<!-- TOPIC NESTING OVERRIDE -->
<!-- ============================================================= -->
<!-- Redefine the infotype entity to exclude
other topic types and disallow nesting -->
<!ENTITY % recipe-info-types
"no-topic-nesting" >
!
recipe.dtd
67. Modul-Datei erstellen
Kopieren der "task.mod" und referenzieren in der neuen DTD
!
<!-- ============================================================= -->
<!-- TOPIC ELEMENT INTEGRATION -->
<!-- ============================================================= -->
<!-- Embed topic to get generic elements -->
<!ENTITY % topic-type PUBLIC
"-//OASIS//ELEMENTS DITA 1.2 Topic//EN"
"../../base/dtd/topic.mod"
>
%topic-type;
<!-- Embed recipe to get specific elements -->
<!ENTITY % recipe-typemod SYSTEM "recipe.mod"
>
%recipe-typemod;
technicalContent/dtd/task.mod recipe.mod
72. Entitäten-Datei referenzieren
Über SYSTEM oder per PUBLIC ID via "catalog-dita.xml"
!
<!-- TOPIC ENTITY DECLARATIONS -->
<!ENTITY % recipe-dec
PUBLIC "-//IDN ditadocs.com//DITA Recipe//EN"
"recipe.ent"
>%recipe-dec;"
!
<!-- DOMAINS ATTRIBUTE OVERRIDE -->
<!ENTITY included-domains
"&task-att;"
&recipe-att;
&taskbody-constraints;
"
>
recipe.dtd
73. Rezepte editieren in XML
Sicherstellen, daß alle Autoren den gleichen Struktur folgen