Drawing of troll sitting by Jenny K Blake Troll Awareness Society

Supporting the existence, freedom and cooperation with the troll population of Norway

Troll image Copyright © jennykblake, Brown Cheese Please, 2003, Schibsted

Home Troll facts
Troll tips
About Contact Site accessibility and security Site upgrade plan

Site upgrade plan using XML

Why use XML?

In order to update the information in some sections of the site, XML (eXtensible Markup Langauage) will be used in the source code in separate XML files. As HTML (Hypertext Markup Language) only describes how data is to be presented, such as font type and size, we need to use XML to identify data or describe it (Perugini, 2003). XML allows the author of a site to create their own custom tags relevant to the data they are describing (Møller & Schwartzbach, 2003).

Some advantages

Once the data that we want to update is stored in a specially identified XML container, it can easily be transported for updating. The changes only involve data and not presentation and, therefore, using XML is a lot quicker than making the changes to the HTML each time.

Also, the plain text used in XML allow it to be a software and hardware independent tool for carrying information, as long as the custom tags used are defined in a Document Type Definition (DTD) statement, so that the computer can understand them. This data can then also be shared with other organisations, such as news agencies, if needed. It also makes the data more available to reading machines, such as screen readers (W3 Schools).

Some disadvantages


Creating the XML document will involve a fair amount of effort, as the strict syntax rules of XML mean that any error made will stop the document from being processed, not like HTML. Not only must it be well-formed by using the correct syntax, a valid XML document must also conform to the rules of DTD.

Using an XML document in order to regularly update an HTML web page involves different applications and programs in order to, firstly, make the changes to the XML document and then to transfer these changes to the HTML page. It is not as straightforward as updating HTML directly.

Although this process may initially take some time, in the long run it will mean that updates can be made more quickly and, therefore, the site will hold more accurate and up to date information.

Which information will be affected?

The dynamic data that will need to be regularly updated is the data on troll characteristics and troll sightings. This information will grow as people sight trolls and submit the new information. Even older troll characteristics information will be altered as corrections are made to data that has since been discredited. At present this information is found on the Troll facts page and there is currently a relatively small amount of information on characteristics and sightings for each troll type. Also, there is currently no information on the troll subtypes Raglefantene, Rimtusse and Harding on the website. This information can be updated almost immediately by speaking to the troll hunter. Later, additional troll subtypes may also be discovered.

So, for example, the XML tags that might be used to describe the contents of the Troll types heading in the HTML might be:

<troll types>
   
    <troll type="forest troll">

        <troll subtype>

            <name>Tusseladd</name>

            <characteristics>3 heads</characteristics>

            <sightings>Jötunnheimen</sightings>

        </troll subtype>
   
    </troll>

</troll types>


References

Møller, A & Schwartzbach, M.I. (2003). HTML vs. XML. Retrieved 31 May, 2011, from http://www.brics.dk/~amoeller/XML/xml/htmlvsxml.html

Perugini, S. (2003). HTML versus XML. Retrieved 31 May, 2011, from http://courses.cs.vt.edu/~cs1204/XML/htmlVxml.html

XML Tutorial. Available from http://www.w3schools.com/xml/default.asp

Further readings

Charles Sturt University (2011). Web page formatting, tables, and links. Module 3, Fundamentals of Web Publishing, from http://interact.csu.edu.au/portal/site/INF446_201130_W_D/page/85c59993-ff35-4239-804d-61542ed2ba28

Charles Sturt University (2011). XML and cascading style sheets (CSS). Module 4, Fundamentals of Web Publishing, from http://interact.csu.edu.au/portal/site/INF446_201130_W_D/page/85c59993-ff35-4239-804d-61542ed2ba28

Difference between HTML and XML. Available from http://www.differencebetween.net/technology/difference-between-html-and-xml/

Druell, N. (2006). General advantages and disadvantages of html vs xml and xhtml. Retrieved 31 May, 2011, from http://e-articles.info/e/a/title/General-advantages-and-disadvantages-of-HTML-vs-XML-and-XHTML/

Goldsonam (2011). What is the difference between HTML and XML? Retrieved 31 May, 2011, from http://techforum4u.com/content.php/318-What-is-the-difference-between-HTML-and-XML

HTML vs XML. Available from http://www.visualbuilder.com/java/xml/tutorial/html-vs-xml/