In this exercise, we begin to develop a document type for an XML résumé. Developing a document type begins with deciding what elements to include. There is no need to rush into coding a Document Type Definition (DTD). This exercise provides further practice at developing well-formed XML, with the additional goal in mind of developing a DTD based on this document in the next exercise.
A DTD defines the elements, attributes, and their relationship for a type of XML document. In individual XML document of the type defined is an "instance" of that type of document. To develop a DTD, you can start by developing an XML file containing the elements and attributes you want.
A typical résumé includes information, such as:
- the name of person seeking a job
- contact information
- a list of skills
- jobs held
- educational background
Each of these can be broken down further into their own child elements. For example, an item in the educational background would include each educational institution attended, each of which has a name and a location, a degree conferred, and a year in which the degree was awarded.
Tip: You can use Google to find online examples of résumés. Review the structure of some samples while developing your structure.
Step 1: Decide on a set of elements.
The résumé should include the elements of a typical résumé, including: name and contact information, skills, educational background, and work history.
Start by compiling a list of those elements in text file. You can work out relationships among the elements by indenting, for example:
education
school attended
degree earned (bachelor of arts, master of science, etc.)
year degree was earned
location of school
city
state
Step 2: Create an XML instance
Translate your list of elements into an XML instance file that contains sample information. Make sure that the instance is well-formed.
A part of an XML résumé follows.
<resume>
<!-- complete content goes here -->
<school>
<name>Austin Community College</name>
<degree>Associates of Applied Science</degree>
<year>1988</year>
<location>
<city>Austin</city>
<state>Texas</state>
</location>
</school>
</resume>
Step 3: Save your file and upload to Blackboard
Save the file as yourName-resume.xml, where yourName is your first initial and last name (for example, vmorrow-resume.xml).
Include the file in a ZIP archive (yourName-resume.zip) and upload to the Blackboard.