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.

 

Linda Boutellier 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.
Rowy van Dijk 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.”.
Katya Dmitrieva 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”.
Mariska van Elst 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 sentence “In this Allingham collection, there are … poems.”
Anne van Engelen let451.xml Create a numbered bullet list, containing all the lines in the English translation of the letter. If a line contains a note, indicate this by supplying the text “(contains note)” directly after the line. Also display the
sentence “This letter contains … lines”.
Lisette Grimmius 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)”.
Marjorie Heijselaar 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.”
Natalie Hoage 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”].
Eva de Jonge 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.”.
Oskar Knötschke dorianGray.xml Create a bulleted list that contains all the examples of direct speech in the novel “Dorian Gray” which contain the word “Dorian”. Note that all speeches are encoded using the <q> element. Sort the speeches alphabetically.

Display the sentence “Wilde’s novel Dorian Gray contains … instances of direct speech and … of these contain the word ‘Dorian’.”

Emily Klerks 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.”
Joery Kragten 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”.
Pleuni van Laarhoven 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).
Manuel Llano PennMuseum.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.” On the place of the dots, give the number in bold. Create a list of all knives (<object_name>Knife</object_name>).
Sort the list by <emuIRN>, which you display.
If a date at which the knife was made is known, display it in bold. Also
display the material of which each knife consist; if more than one material is used, separate them by commas.
Amber Malik 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.
Cornalijn Meinders 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.
Rianne Mense 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.”.
Lotte Oudejans 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”.
Helène Pannekoek 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”.
Athina Papadopoulou ShakespearePoems.xml This is an encoded version of Shakespeare’s Complete Poems. Create a stylesheet which can produce the following sentence: “This volume contains … sonnets,
and … other poems.”. Note that all poems are encoded in a <div>
element. The two different types of poems can be distinguished using the
“type” attributes of these <div> elements.Also print the full text of Sonnet 17. To select the sonnet, make use of the “n” attribute of the <div> element.
Lolita Sahakjan 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.
Lotte Savelsberg 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.
Bob Schofield 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.
Gerline Sonneveld Mendeley.xml Write a stylesheet which can produce the following sentence: “This bibliography contains … references. … of these are journal articles. Information about the reference type can be found in the <ref-type> element.
Create a bulleted list containing all the references to articles in the journal “Digital Humanities Quarterly”. The journal title is mentioned in the <periodical> element). For each of these refereces, display the author name, the full title in italcs, and the year of publication. The references must be sorted alphabetically, using the last name of the authors.
Sophie Stelzig Ead.xml Create a bulleted list which displays all the correspondence files which are described in the XML document. The letters are all encoded using the <c02> element. Of these letters, you only need to display the <unittitle>. The prints must be sorted according to the title of these correspondence files. These are encoded in the <unittitle> element.
Display the following sentence: “This file contains … correspondence
files.”.
Kim van Toorn Nyt-RSS.XML Create a stylesheet that can produce the following sentence: “This file contains … news items. …. Of these are about Paris.”. When the <description> element of an item contains the word ‘Paris’, you can
assume that this item is about this city. Additionally, create a bulleted
list which shows all items in which the title contains the word ‘Trump’. For
each items, display the title in bold, the description and the publication
data. Sort the list alphabetically by title.
Leneth Witte 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.
On Ki Yip 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 <similar_books>, count both the total number of books, and the number of books which have an average rating of four and higher. Additionally create a bulleted list which shows all books which were published after 2013.
Show the author name, the title in italcs and the year of publication. This list must be sorted alphabetically
by title.