Structured Authoring: Introducing XML

iBruk Consulting > Tutorials > Structured Documentation > Structured Authoring: Introducing XML

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 enforce the 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 won’t bore you further! 🙂
  • 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.

Sample XML File - Email
XML and Structured Authoring: A Sample XML File

XML is best explained using an example. Consider an email that could be represented as:

  • Content enclosed in <> is called a tag.
  • Tags are used to identify and describe the content.
  • Tags are always used in pairs and enclose relevant content within them. <tag_name> is called a start tag, while </tag_name> is called a end tag.
  • Tag names are something you decide to suit the content you are describing. For example, we have used <message> to describe the email body.
  • You can have tags within tags to create a hierarchy for the content and establish a relationship between various pieces of content. For example, you have an outer tag <email> which contains the tags <address>, <subject>, and <message>. This can be interpreted as an email contains an address, subject, and message.

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.

We will talk more about XML in the next post!

9 thoughts on “Structured Authoring: Introducing XML

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: