NewtFire logo: a mosaic rendering of a firebelly newt
newtFire {dh}
Creative Commons License Last modified: Monday, 23-Aug-2021 12:22:34 UTC. Maintained by: Elisa E. Beshero-Bondar (eeb4 at psu.edu). Powered by firebellies.

Before you begin

Before beginning this assignment, you should prepare your workspace: Where do you want to do your coding homework this semester? You will be doing most of your coding work for this course in the <oXygen/> XML Editor. This is installed in the campus computer labs, and you may also install it on any other computer(s) you plan to work with this semester. Also, before beginning homework assignments, you need to read the related tutorials we have posted (plus notes you took in class) and keep these open and handy to consult as you are working. For the very first assignment, here is what you will need:

Goals

This assignment should give you experience with:

  1. Writing well-formed XML using elements and attributes.
  2. Making decisions in how to write XML so that it binds related kinds of information together by:
    • Nesting elements that relate to each other.
    • Thinking about the relationship between your markup and the source document.
    • Thinking of elements and attributes working together (like file folders with labels attached).
  3. Using basic features of the <oXygen/> software environment.

Try coding a poem in XML

To get started with XML coding, and working wtih a tree structure for modeling a document, start by coding a poem (which we absolutely chose because it is about trees and leaves). Our source document for this assignment is the poem Leaves by Lloyd Schwartz as posted on poets.org.

Coding the letter in <oXygen/>

Suggestions for XML markup of a source text

Remember that a well-formed XML tree requires a single root element, wrapping the entire document.

Try highlighting text that you want to tag, and using CTRL + E (Windows) or Command + E (Mac) to fill in a tag name. The oXygen editor will then insert the start and the end tag of an element where you want to wrap it around some text.

Remember that line breaks in the text are not preserved in XML. Mark up the structure of the document accordingly! Use the Format and Indent button (which we call pretty print feature in oXygen to look at the structure you are creating. Here is a screen capture showing you where to find the Format and Indent button. (Note: I have set up my oXygen Editor in dark mode, so your colors will likely look a little different than my image.)

the oXygen XML Editor's pretty-print button

Tips:

There is no single way to do this exercise, but we want you to think about how you nest levels of information (elements within elements), and the relationship between elements and attributes in XML.

When, where, and how to submit the assignment

Check and make sure you saved your file following our homework file naming rules, including giving it a .xml file extension. Submit your XML file on Canvas on Assignments (for XML Exercise 1) before our next class.