Beruflich Dokumente
Kultur Dokumente
or style of writing. Structured authoring helps maintain consistency in the structure of content.
For example, an organization might define a chapter and sections within the chapter as:
Sample
Structure for a Chapter
Structured
Authoring Example: Sample Structure for a Section
In this post, we will look at the first and the most important part of implementing structured authoring
systems, defining the content structure.
Assuming we are creating a content structure for a particular document, we have to analyze:
Thus, the Address section must have a To section while the CC and BCC sections are optional. However, if
both CCand BCC are used then CC must precede BCC.
Next we take define the TO, CC, and BCC elements as containing one or more email addresses:
Finally, we define Body as starting with a mandatory Salutation (we are sticklers for etiquette! :-)) followed
by the Message which must have at least one Para. This Para can be followed by one or
more Para, List, and/or Imageelements in any order. Finally, there is the mandatory Signature section.
We define the Para as containing Text with the option of having Hyperlink, Bold and/or Italic elements.
Just as we defined a Para, we can define List and its constituents as:
Thus, you can see that defining the content structure has to be an extremely meticulous exercise resulting in a
detailed content definition. This is typically the job of an information architect.
The previous post, Structured Authoring: Defining the Content Structure, described the first step in
adopting structured authoring; analyzing and defining the content structure.
However, as of now, the content structure is on paper. The next step is to use technology
to encode and enforcethe defined content structure.
So what kind of technology would we need?
When choosing a technology for structured authoring, your primary requirement is that the chosen technology
should allow you to define the content structure.
So, you should be able to:
identify the start and end of each piece of content. For example, the start and end of the body of an
email.
describe/label each piece of content using terms relevant to you. For example, give the body of the
email a name such as Message.
specify relationships that exist between pieces of content. For example, every mail starts with
an Address. Each Address must contain a To, CC, or BCC section. It can also contain any or all of
these sections. But when more than one of the sections are present, they must be in the specified
order. That is, if a mail has To and BCC, then To must come before BCC.You get the picture, so we
specify which pieces of content are mandatory and which are optional.
These are just some of the most requirements and one technology that meets all these is
eXtensible Markup Language, known popularly by its acronym XML.
A First Look at XML
XML is a markup language that helps you to define and use tags to describe content.
This is a very basic explanation of XML. As you can see from the example, the XML document describes and
structures the content in a human-readable form.
In an earlier post, Structured Authoring: Introducing XML, we saw the role XML had to play in structured
documentation. Now let us take a look at how the implementation works.
In the post titled Structured Authoring: Defining the Content Structure, we discussed how to go about
analysing the content and breaking it up into smaller units. While the content analysis and definition is a pen-
and-paper exercise, the content structure has to be defined using technology so that it can be enforced.
This is where the Document Type Definition (DTD) or Schema comes in.
For the purpose of this preliminary discussion, we are going to use DTD and Schema as
analogous terms.
What does a Document Type Definition (DTD) do?
A document type definition, or a DTD as it is commonly called, defines the structure of a document. It
specifies the document structure in terms of the tags that may can be used in a document, where and when
these tags can be used, and the attributes that each of the tags may have.
Every unique document will have its own DTD or Schema. For example, there will be separate DTDs for user
manuals, release notes, case studies, and API references.
When an author wishes to create a particular type of document, the author has to base the document on the
relevant DTD.
The DTD itself is an XML document and must adhere to all rules of XML.
Validating an XML Document Against the DTD
When a DTD is associated with an XML document, the XML document is compared against the DTD to
ensure it is structured as specified by the DTD. This process of comparison is called validation and it is
performed by the validating parser.
When the XML document adheres to the structure defined in the DTD, it is said to be valid.
What Happens If an XML Document is Invalid?
When you are in the authoring stage, the XML editor typically warns you that the document is invalid, but you
can save the document. However, when you generate the output or process the document in any way, the
invalid document will not be processed. This means that, typically, this document is omitted from the output.
So, the DTD is the foundation on which the structured authoring system is built.
In the four posts in this series that explains Structured Authoring looked at:
In this post, we look at a Document Type Definition (DTD), which is the formal definition of a content
structure.
Consider the following image which shows a sample DTD for an email.