Digital humanities

Maintained by: David J. Birnbaum ( [Creative Commons BY-NC-SA 3.0 Unported License] Last modified: 2017-01-26T22:39:26+0000

Test #2: Relax NG

Write a Relax NG schema for the following XML document, which is small news item. Start by opening this page in a web browser, selecting the XML text below, and copying and pasting it into a new XML document in <oXygen/>. Your schema should constrain the XML while also allowing for the reasonable integration of new material. Hint: you will want to use repeatable or-groups when you model mixed content, and you can read about those under Mixed content in our Relax NG content models posting. Make sure that you validate the XML file with your schema before you are done.

You may use any reference material you would like while creating your schema (books, Internet, etc.), except that you may not request or accept help from any other person (in this class or elsewhere). Should you have any questions about the test, please post them in our Relax NG discussion forum. When you are finished, upload your schema to CourseWeb, where we have created an assignment for it (you do not need to upload the XML).

<?xml version="1.0" encoding="UTF-8"?>
        <title>Animals Raise Spirits at Laguna Honda Hospital</title>
        <agency>ABC News</agency>
        <author>Dan Ashley</author>
        <date>January 25, 2017</date>
    <p>It's feeding time at a <place ref="nonspecific">farm</place> that just 
        happens to sit square in the middle of <place ref="specific">San Francisco</place>.
        And the hungry <animal type="livestock">goats</animal> and famished 
        <animal type="livestock">sheep</animal> are part of a menagerie started nearly 40 
        years ago, when someone donated two <animal type="bird">ducks</animal> to the 
        <place ref="specific">Laguna Honda Hospital and Rehabilitation Center</place>.</p> 
    <p>A nursing director approved a small temporary <place ref="nonspecific">shelter</place>, 
        which grew like a kind of urban <place ref="specific">Noah's Ark.</place></p>
    <p><q sp="cortez"><animal type="livestock">Goats</animal>, 
        <animal type="livestock">sheep</animal>, <animal type="bird">ducks</animal>, 
        <animal type="bird">geese</animal>, <animal type="pet">rabbits</animal> 
        and <animal type="pet">guinea pigs</animal>, <animal type="bird">chickens</animal>
        and <animal type="pet">cats</animal>,</q> says activity therapist Henry Cortez.</p>
    <p>There are 32 animals in all. The <place ref="nonspecific">site</place>, near 
        <place ref="specific">Mt. Sutro</place> actually began as a 
        <place ref="nonspecific">farm</place> before the gold rush and was eventually turned into 
        a <place ref="nonspecific">home</place> for the poor, where residents helped grow their own food.
        Now history has come full circle, with the animals serving a different purpose.</p>
    <p><q sp="cortez">The fun part is just watching them interact with the residents,</q> 
        says Cortez.</p>
    <p>Once inside the <place ref="nonspecific">hospital</place>, the animals are 
        the stars of a residential therapy program. Patients, limited in their ability to move and communicate
        can often connecton a different level with their calming companions, according to activity therapy 
        supervisor Cho Tai.</p>
    <p><q sp="tai">For a lot of our patients who aren't able to talk a lot, with the animals we're able 
        to help them feel normalized again,</q> says Tai.</p>
    <p>And he says, help relieve the stress of a <place ref="nonspecific">hospital</place> 
        environment for visiting families. Arlisa Rayford looks forward to seeing her granddaughters.</p>
    <p><q sp="rayford">Yes, It's fun to have the animals and the kids to see,</q> 
        says Rayford.</p>
    <p>Some of the animals are donated or rescued, while others are purchased for the program. Donations 
        also help maintain the <place ref="nonspecific">site</place>, with its 
        <place ref="nonspecific">greenhouse</place> and <place ref="nonspecific">vegetable 
    <p>All supporting a unique kind of <place ref="nonspecific">farm</place>, designed to 
        grow happiness.</p>