Thursday 29 October 2009

Week 5 - eXtensible Markup Language (XML)

XML is an extensible mark up language that is a set of rules used to describe or create information. It is not the language itself. Produced by the world wide web consortium it is particularly good at assisting with the transfer of information without losing it's meaning. It is not designed for search but one could transfer using XML into a database to allow searching.

XML consists of a series of elements; these may also have attributes with certain values.

Elements – everything contained within a tag or between a pair of matching opening and closing tags.

Attributes – name/value pairs that assign properties to the given occurrence of a tag. (Course Notes: Lecture 5. 2.2)

A simple XML file can just define the semantics of information and no more, so only what the data means with nothing further added. Document Type Definition (DTD) is a collection of declarations providing an unambiguous way of describing the XML, the legal structure, elements, attributes and values that can be used. All XML should also be well formed, conform to a syntax set of rules eg. root elements should be used and closed. It should also be valid, conform to the grammatical rules set out in the DTD.

An XML based language specifically appropriate to my field of work is the Document Type Definition (DTD) in which we might store books within the National Policing Improvement Library. Here's a list of some of the books I’ve used so far in my MSc course.

The second example is a copy of code to deliver an RSS feed of vacancies on the NPIA main website. Simon, a web developer in my team, walked me through this step by step to help with my understanding and education for this DITA course. I found this invaluable. Makes so much more sense when it’s real.

No comments: