Digital humanities

Maintained by: David J. Birnbaum ( [Creative Commons BY-NC-SA 3.0 Unported License] Last modified: 2022-09-20T22:29:40+0000

Text #2: Relax NG

Preparatory instructions

Your goal for this test is to create a Relax NG schema for a well-formed XML document that we provide. Here are the preliminary steps we followed to prepare to do that:

  1. Open the XML document at in <oXygen/>. You can open the document directly from the Internet by typing Ctrl+u (Windows) or Cmd+u (Mac) in <oXygen/>, copying and pasting the link into the Open URL dialog box, and clicking the OK button. (Mnemonic: u is for URL.)

    The text is the lyrics of the song Now (it’s just the gas) from the 1982 musical Little Shop of Horrors. You can hear it performed on YouTube.

  2. Use File → Save as … from the <oXygen/> menu to save a copy of the XML file to your own computer.

  3. Create a new Relax NG compact syntax document in <oXygen/> and save it to the same directory as the XML, using a filename that follows our filenaming conventions.

  4. After you’ve saved the schema and the XML document, click inside the XML document to bring it into focus and then use the Document → Schema → Associate Schema … menu options to associate your schema with the XML. The schema won’t be valid yet and the XML won’t be valid against it, but you’ll fix that shortly.

Your task

Your task is to create a schema that can be used to validate the XML. The test is open book, so you can look up anything you want, but you cannot request or receive help from another person. Here are some other details:

If you get stuck you’re welcome to ask a question in the #relax-ng channel of our Slack workspace. We can’t give you the answer, but we’ll do what we can, short of that, to point you in the right direction.