Create Your Blog in XML

Assignment 2 — XML Foundations Fall 2008

Assigned: Thursday, September 11th, 2008
Due: Thursday, September 18th, 2008


Think about how to represent the things that you care about in XML. Create structures that represent concepts. Start building your blog with some sample data. The goal of this assignment is to start working on the best way of representing your blog in XML.


Based on the application scenario created in Assignment 1, the next task is to create XML structures representing the data model. The focus is on structuring data so that it can be easily reused using XML technologies. XML technologies provide access to XML structures (most importantly, elements and attributes), so these structures should be the ones representing the application data. Do not create a model that is overly elaborate, because of the feedback from later assignments which will help you to improve the XML structures. On the other hand, make sure that the most important structures are represented by XML structures, so that they can be easily accessed using XML technologies.

Many design decisions in XML are based on preferences and Best Practices. Since this assignment is very early in the course, you will need to revise some of the XML structures later. However, the one thing that you can already do and that is important in all cases of XML design is to be consistent. So if there are certain similar design decisions, make a choice about how to address them, and then apply this method consistently. This consideration is more important in more complex scenarios, but even for small scenarios there often are self-similar part of the data model which should be addressed in a consistent way.

Deciding on a certain design is much easier if you have use cases that you identify as important for your application area. Focus on supporting these use cases as good as possible. For example, the race blog example from Assignment 1 could have as use cases the need to compile you personal bests for different distances. So the things that are important are to find races of the same distance, find your time for this race, and its date. Therefore, you probably want to make the race distance machine-readable (what about distance units?) as well as the time; the date should be part of the complete entry anyway. This could be a first approach:

<entry date="2006-11-05">
	<title>My First New York City Marathon</title>
	<text> … your race report … </text>
	<result race="New York City Marathon" distance="26.2" time="2:08:32"/>

The formats for date and duration are something that is structured as well (YYYY-MM-DD and H:MM:SS), but we can safely assume that are easy ways to work with these structures even though they are not represented by XML structures.

Submit a non-trivial XML instance document according to the scenario you have described in Assignment 1. Explain the use cases for each facet explicitly. Describe and justify the design decisions you have applied.

Creative Commons License Please send comments to
Last modification: Monday, 02-Feb-2009 01:00:13 EST
valid CSS! valid XHTML 1.0!