3. Scalable Vector Graphics (SVG)

3.1 Some XML background

The W3C is now responsible for a wide variety of recommendations that seek to address virtually every area of Web development, but there are a couple of milestones that were critical to the development of SVG. The first is Cascading Style Sheets (CSS), which was a recognition that HTML had developed into a tool that was trying to do two different tasks. As Web sites became more and more complex this compromise was limiting further development. In addition to determining the content and structure for a website, HTML was also expected to handle the formatting. With CSS, formatting could be separated from a document's structure, allowing both greater flexibility and control (Eisenberg 2002, 44).

The second is the introduction of the eXtensible Markup Language (XML), which is meant to add functionality to the content of a website, so HTML can handle the site's structure and CSS can handle the formatting (Story 2000). XML became a W3C official recommendation in February of 1998 as a 'metamarkup' language, which means that it is a language used to create other languages (Watt 2002, xviii). While XML is written using the familiar format of tags surrounding text, and looks visually similar to HTML, XML is fundamentally different. Because XML is a metamarkup language, it does not use predefined tags, rather the tags are created to correspond with the content of the text inside the tag (Harold and Means 2002, 4). For example, in HTML the tag <body> </body> indicates where, structurally, the main body of a document begins and ends. What appears between the opening and closing part of the tag is the content that will be displayed within a Web browser. So content 'marked up' with HTML tags will look like this:

<body>This is My Content</body>

The HTML tag does not understand anything about the phrase 'This is My Content'; all it knows is that these particular characters are part of the body, and should display as the contents of the body of the webpage.

Because XML is 'extensible' it is intended to be adapted in many different ways. As a metamarkup language, XML developers must create tags that correspond with the content they hold. For example, an XML document that is meant to track the names of people who excavated a particular area might look like:

<excavatedby>John Smith</excavatedby>

This markup does not understand anything about where or how this information should be displayed in a website, but it does know that John Smith is the name of the excavator. Since XML allows Web authors to define their own tags based on the characteristics of their data, the tag <excavatedby> </excavatedby> would presumably be part of a group of tags describing content pertaining specifically to archaeology. While much that is written about XML makes the creation of tags sound like a bit of a free-for-all, this is really not the case. Like the structure of a database, where a developer is free to define whatever fields they wish, the information becomes useless if there is no system for linking to those fields and retrieving the content from the database in a meaningful way.

In order to use the content contained in an XML document, it must correspond to information that contains an agreed-upon definition of what the tags mean. When XML tags are created and then grouped together in a specific way, they form what is called an XML application. When a particular XML application is formally defined it can be organised into a 'schema' that states which XML tags will be valid for that particular XML application. The language for creating a schema is known as the Document Type Definition (DTD) (Harold and Means 2002, 5). For example, the tag <excavatedby> </excavatedby> might appear in an XML schema for archaeological reports, and can be used by others wishing to manipulate the same type of information. To take full advantage of this highly flexible system, rather than every person or organisation creating their own schema for archaeological reports, XML shows its true power when a group or discipline comes up with a mutually agreed schema that can be used by them all. This allows the information within the tags to be shared, compared and combined between different users in a way that was previously never possible.

Because XML is extensible, applications can be used to define a set of tags for use in a particular subject area, but it can also create generic support technologies that extend XML's capabilities. The defining of XML applications into schemas in the first place is an example of this, and so is the creation of the eXtensible HyperText Markup Language (XHTML). XHTML is HTML rewritten in XML syntax, so it is XML (Castro 2003, 19). Currently, some people are using XML-compatible Web browsers and parsers, and some are still using browsers that can only cope with HTML. XHTML is a way of bridging the current technology gap, allowing XML documents to be displayed by both.

XML applications can also create schemas that add specialised functionality to XML documents. Examples include Math Markup Language (MathML) for embedding mathematical equations, Resource Description Framework (RDF) for defining 'metadata' (data about data) for information held in resources like library catalogues and Scalable Vector Graphics (SVG) for encoding vector images in XML (Harold and Means 2002, xiii). This foundational progression of technologies, resulting in a whole group of flexible building blocks that include HTML, XML, and CSS in all of their various flavours, is responsible for SVG's quick maturity, but it is important to look specifically at how and why SVG was created.


© Internet Archaeology URL:
Last updated: Tue Jul 18 2006