Assignment 2: Scenarios

Below, you can find a number of different scenarios. You have each been assigned a scenario. Note that this is an individual assignment!

Create an XSLT Stylesheet that can execute the XML-transformation for ‘your’ scenario to an HTML-result. Make sure that the resulting HTML file will be linked to, and therefore formatted accordingly to, the Stylesheet used on the Bookandbyte-website, which can be found at <http://bookandbyte.org/style2007.css>. Name your file [your surname]-DMT_Assignment2a, in accordance with the BDMS Style Sheet.

In all scenarios, you will be asked to count items in the XML file. The counts must be calculated by the XSLT file; do not count the number by hand yourself.

Danae Barmpoudi Swift.xml Create a list of all the titles mentioned in the main text [<body><p>]. Italicize
all titles and sort them in alphabetic order. If the title is a book [as indicated by @type], indicate this by placing “(book)” in brackets behind the title. Such an indication is not necessary for titles of other types. Also display the sentence: “In this satire, Swift refers to … other satires”. On the place of the dots, give the number of referenced satires, displayed in bold.
Charlotte Boelens Tempest.xml Create a list of all of Prospero’s speeches. Note that all speeches are encoded using the <sp> element and that Prospero’s name is abbreviated to ‘Pro.’ in the document. Sort the speeches in alphabetic order. If the spoken text (within an individual <ab> element) consists of less than 100
characters, display the total number of characters in between brackets. N.B. The length of a string of text can be calculated using the string-length() function. Also display the sentence: “In this play, … speeches are spoken by the character Prospero.”.
Antonia Dalivalle Yeats.xml Create a list of all the nouns in the poem. In this TEI file, all words are encoded separately and the syntactic categories are indicated using the POS (“Part of Speech” attribute). Singular nouns have been assigned the code
“NN” and plural nouns have the code “NNS”. Sort all the nouns in alphabetic order. If the noun in in the plural, indicate this by placing “(plural)” in brackets behind the title. Also display the sentence: “This poem contains … nouns”.
Lucy Drew Allingham.xml Create a bullet list: display the title of each poem in bold and sort the list
alphabetically. Furthermore, provide the text of the first line of each poem.
If a poem has multiple stanzas/linegroups [lg], list the number of linegroups between brackets in italics. Display the sent
ence “In this Allingham collection, there are … poems.”
Erik-Jan Dros Rossetti.xml This is an encoded version of Rossetti’s collection “Poems (1870)”. Create a bulleted list, in which all the poem titles are displayed in alphabetic order. Also give information about the number of lines; display the line count in brackets, directly after the poem titles. Finally, display the following
sentence: “This volume contains … line groups consisting of three
lines (tercets) and … line groups consisting of four lines (quatrains)”.
Pim Geenen BBCNews_rss.xml Create a bulleted list which displays the title, the description and the date of each news item, encoded in an <item> element. Ignore all the news items about sports, however. The list can be filtered by making use of the value of the <link> element. If it contains the word “sport”, you can
assume that this item is about sports. Sort the items in reverse chronological order, using the value of the <pubDate” element. Also display the sentence “The RSS feed of the World section of the BBC News web site contains … news items.”
Alexandros Gougousis Davis.xml This is a digitisation of Thomas Osborne Davis’ A Chronology of Ireland.
Create a table, consisting of two columns. In the left column, display any personal names refered to in the chronology [<ps>, which can have children <rn> (rank name), <fn> (first name) and <sn> (surname)]. The personal names that appear in the
text have all been encoded using the <ps> element, however. Names that have not been encoded can be ignored. In the right column, display the date at which these persons are mentioned. Sort the table by the date under which the name is mentioned.
Display the sentence: “In this chronology, the Treaty of Limerick is mentioned … times.” Note that events are encoded as <term>s; treaties specifically as
[@type=”law”].
Martina di Gregorio WintersTale.xml Create a list of all of the speeches spoken by either Leontes or Perdita. Note that all speeches are encoded using the <sp> element and that the names of these characters are abbreviated to “Leo.”, and to “Perd.”. Sort the speeches in alphabetical order. If a speech contains a stage direction, add the phrase “(contains stage direction)” in italics. Also
display the sentence: “This play contains … speeches in total. … of
these are spoken by Perdita, … of these are spoken by Leontes.”.
Khrystyna Kernytska Mendeley.xml Create a bulleted list containing all the titles in this bibliography. The titles must be sorted alphabetically and shown in italics. Also display the following sentence: “This bibliography contains … monographs and … journal articles. The bibliography contains … titles in total, and … of these have been published before 2010.”
Roos Knigge ubl070.xml Create a bulleted list which displays all the prints which are described in the XML file. The prints are encoded using the <c02> element. The prints must be sorted according to the name of the artist (which is encoded in the
<origination> element). Display the following sentence: “This file contains … prints. … of these have been produced by Rembrandt van
Rijn”.
Sam Koster PennMuseum2.xml This is an excerpt of the historic collection owned by the University of Pennsylvania Museum of Archaeology and Anthropology. Display the sentence: “This Penn Museum’s catalogue excerpt contains records on … objects. … of the objects are from the Neolithic period”. Create a list of all the objects from the Neolithic period (<period>Neolithic</period>). Sort the list by <emuIRN>, which you display. If a <description> element is available, display the contents of this element in bold. Also display the location on which the object was found (as encoded in the <provenience> element).
Adele Pusiol RomeoAndJuliet.xml This is an encoded version of Shakespeare’s Rome and
Juliet. Create a stylesheet which can display both the total number of speeches (encoded in the <sp> element), and the total
number of stage directions (encoded in the <stage> element). Create a
bulleted list which displays the words that are spoken by Tybald.
Not that these <sp> elements all contain a <speakers> element with the value “Tyb:”. These
lines must be sorted alphabetically.
Naomi Remijn BBCNews_rss.xml Create a stylesheet which displays the total number of news items, and the total number of items in the “sports” category. Note that the links to the items in this latter category all contain the word “sport”.
Create a bulleted  list which displays the news items from the “Entertainment and Arts” section.
The links to these items all contain the code “entertainment-arts”.For these news items, display the title, the URL (from the <link> element)and the date of each news item. Sort the items in chronological order, using the
value of the <pubDate” element.
Jacqueline Schaepman Hamlet.xml Create a list of all of Horatio’s speeches. Note that all speeches are encoded using the <sp> element and that Horatio’s name is abbreviated to
‘Hor.’ in the document. Sort the speeches in alphabetic order. If the spoken text (within an individual <ab> element) consists of less than 100
characters, display the total number of characters in between brackets. N.B. The length of a string of text can be calculated using the string-length() function. Also display the sentence: “This play contains … speeches. … of these are spoken by the character Horatio.”.
Loren Snel let451.xml Create a numbered list, containing all the sentences in this letter of Vincent van Gogh. Note that all sentences are encoded using the <ab> element. For
each sentence, add information about the total number of characters in
between brackets. Also display the sentence “This letter contains …
sentences, and … notes”. The notes are all encoded in a <div>
element, with the value “notes”.
Elena Truan Tempest.xml This is an encoded version of Shakespeare’s The Tempest. Write a stylesheet which can produce the following sentence: “The Tempest consists of … acts. The character Caliban has … speeches”. Note that
the acts of the play are are all encoded using a <div> element. All the speeches in the play are encoded using the <sp> element. Caliban’s name is abbreviated into “Cal.”. Create a numbered list of all the notes in the <noteStmt> of the TeiHeader, and a bulleted list displaying all the subjects in the <textClass> element which contain the phrase “16th century”.
Sam de Vries DHQ.xml This file is a TEI-encoded version of an article in the Digital Humanities Quarterly. Create a stylesheet that can produce the following sentence: “This article contains … paragraphs, and … section headings.  …. paragraphs
contain a footnote”. Footnotes are encoded using the <ptr> element.
Also create a bulleted list which displays the full references in the article’s bibliography. These references can be found in the <listBibl> element. Display only those references whose title consist of less than 25 characters.
Riënne van Wingerden dorianGray.xml Write a stylesheet which can produce the following sentence: “Wilde’s novel Dorian Gray consists
of … chapters and … pages”.
Chapters are encoded in <div> elements with a type=”chapter”
attribute. To produce information about the number of pages, you can make use of the <pb> element.
Also create a bulleted list that contains all the paragraphs in the novel that consist of less than 100 characters. Sort these paragraphs in alphabetic order. N.B. The
length of a string of text can be calculated using the string-length() function.
Lot Woittiez goodReads.xml This file contains data from the GoodReads website. It has data about a specific title, next to data about books, which, according to readers, are related to this title. In the section that is encoded using the element <popular_shelves>,
count both the total number of shelves the book is added to, and the number of shelves that have a count of 50 or higher.
Additionally, create a bulleted list which shows all books this title is
related. Only show those titles which have a rating of 4 or higher. Show the
author name, the title in italics and the year of publication. This list must be sorted on the basis of the
rating, in a descending order.
Meg Zhao nyt-bestsellers.xml This file gives information about a list of bestsellers that was published by the New York Times in June 2016. Write a stylesheet that can
count the total number of books in the list, and the total number of books
that have been on the list for longer than 10 weeks (this information can be found in the element <weeks_on_list>). Als create a bulleted
list which shows all the books which are new on the list (i.e. where <weeks_on_list> is zero). For these new titles, display the title in italics, the author name, and, if available, a description. The list must be sorted alphabetically by title.