Reverse detail from Kakelbont MS 1, a fifteenth-century French Psalter. This image is in the public domain. Daniel Paul O'Donnell

Forward to Navigation

Cædmon Citation Network - Week 10

Posted: Jul 25, 2016 10:07;
Last Modified: Jul 25, 2016 10:07

---

Hi all,

It is week 10 already, and I feel like I am nowhere near where I thought I would be with regards to this project. While the list of the sources we need for our data collection on Zotero are as complete as we can know at present, not everything on the list has been collected yet. I was in high spirits at the beginning of last week thinking that the collection of sources was nearly complete, however I realised later on that I had missed a good chunk of the list. It turned out that I had some filters set that were omitting a portion of the 700-ish books and articles. To make a long story short, more collection is still needed!

This will mean more inter-library loan books will need to be ordered and scanned, and more articles will need to be transferred to the GLOBUS folder. Thankfully the book scanner is back up and running again! If it holds out it should make the process painless and a good deal quicker than scanning things on the photocopier.

My plan for this week is to:

- finish scanning the inter-library loan books I currently have checked out (there are about four left to scan)

- finish collecting EVERYTHING on the Zotero list, keeping track of how many inter-library loan books are due to come in so I can account for future scanning time.

- transfer all electronic copies of articles and books to the GLOBUS folder (the internet guy is FINALLY coming on Tuesday to hook up my apartment, so I can work on this every night starting tomorrow)

- And then, if by some miracle I finish everything before the end of the week, I will begin data collection.

To be quite honest, I have been very frustrated with myself and the fact that I have not begun the data collection sooner. I suppose that collecting and organising hundreds of articles just takes longer than I imagined. I really have been working at it steadily throughout the summer, trying to maintain a level of organisation that allows information on the project to transfer easily between myself, Dan, Garret, and anyone else that might happen to work on the project. Although scanning and photocopying seem like menial tasks, I think I need to remind myself that such tasks take time and are necessary to keep our project organised and moving forward.

I do hope though that if Dan has any concerns with the pace of the project that he will let me know, as I do not want to drag things out way longer than he was expecting. The project IS moving forward, however slow it may have seemed the past couple of weeks. Although collecting and organising the sources is not the most exciting part of the job to write updates about, you all can be assured that it is almost complete and the data collection will begin very soon! I am very much looking forward to beginning this part of the project, seeing what we find, and facing the challenges that I am sure we will encounter.

Until later,

Colleen

----  

Extracting a catalogue of element names from a collection of XML documents using XSLT 2.0

Posted: Sep 15, 2011 17:09;
Last Modified: May 23, 2012 19:05

---

We are trying to build a single stylesheet to work with the documents of two independent journals. In order to get a sense of the work involved, we wanted to create a catalogue of all elements used in the published articles. This means loading as input document directories’ worth of files and then going through extracting and sorting the elements across all the input documents.

Here’s the stylesheet that did it for us. It is probably not maximally optimised, but it currently does what we need. Any suggestions for improvements would be gratefully received.

Some notes:

  1. Our goal was to pre-build some templates for use in a stylesheet, so we formatted the elements names into xsl templates.
  2. Although you need to use this sheet with an input document, the input document is not actually transformed (the files we are extracting the element names from are loaded using the collection() function). So it doesn’t matter what the input document is as long as it is valid XML (we used the stylesheet itself)
<?xml version="1.0"?> 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">

<!-- this output is because we are going to construct 
ready-made templates for each element -->
    <xsl:output method="text"/>

<!-- for pretty printing -->
    <xsl:variable name="newline">
        <xsl:text> 
        </xsl:text>
    </xsl:variable>

<!-- Load the files 
in the relevant directories -->
    <xsl:variable name="allFiles"
    select="collection(iri-to-uri('file:///some/path/to/the/directories?select=*.xml;
    recurse=yes'))"/>

<!-- Dump their content into a single big pile -->
    <xsl:variable name="everything">
        <xsl:copy-of select="$allFiles"/>
    </xsl:variable>

<!-- Build a key for all elements using their name -->
    <xsl:key name="elements" match="*" use="name()"/>

<!-- Match the root node of the input document
(since the files we are actually working on have been 
loaded using the using the collection() function, nothing 
is actually going to happen to this element) -->
    <xsl:template match="/">

       <!-- this is information required to turn the output into an 
              XSL stylesheet itself -->
        <xsl:text>&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
            version="1.0"></xsl:text>
        <xsl:value-of select="$newline"/>
        <xsl:text>&lt;!--Summary of Elements --&gt;</xsl:text>
        <xsl:value-of select="$newline"/>
        <xsl:value-of select="$newline"/>

       <!-- this invokes the collection of all elements in all the files
       in the directory for further processing -->
        <xsl:for-each select="$everything">

           <!-- This makes sure we are dealing with the first named key -->
            <xsl:for-each 
            select="//*[generate-id(.)=generate-id(key('elements',name())[1])]">

               <!-- sort them -->
                <xsl:sort select="name()"/>

                <xsl:for-each select="key('elements', name())">

                   <!-- this makes sure that only the first instance 
                    of each element name is outputted -->
                    <xsl:if test="position()=1">
                        <xsl:text>&lt;xsl:template match="</xsl:text>
                        <xsl:value-of select="name()"/>
                        <xsl:text>"> </xsl:text>
                        <xsl:value-of select="$newline"/>
                        <xsl:text>&lt;!--</xsl:text>
                        <!-- this counts the remaining occurences -->
                        <xsl:value-of select="count(//*[name()=name(current())])"/>
                        <xsl:text> occurences</xsl:text>
                        <xsl:text>--&gt;</xsl:text>
                        <xsl:value-of select="$newline"/>
                        <xsl:text>&lt;/xsl:template></xsl:text>
                        <xsl:value-of select="$newline"/>
                        <xsl:value-of select="$newline"/>
                    </xsl:if>
                </xsl:for-each>
            </xsl:for-each>
        </xsl:for-each>
        <xsl:value-of select="$newline"/>
        <xsl:text>&lt;/xsl:stylesheet></xsl:text>
    </xsl:template>
</xsl:stylesheet>
----  

Using Oxygen and Subversion client

Posted: Aug 20, 2008 15:08;
Last Modified: May 23, 2012 18:05

---

Here are instructions for using Oxygen for accessing the Littlechief Project Subversion server.

1) Open Oxygen. It should looks something like this (if you’ve used it before there may be files loaded already in the main window):

2) Select Tools then SVN Client in order to open the SVN Client. You should then be presented with a screen that looks something like this:

3) The two panels we need to use are in the top and bottom left (Repositories and Working Copy). In Repositories we will place the address of our SVN client; in Working Copies we will put the directory on our local machine (i.e. the computer we are using) where we want the files to be stored.

a) Check if the SVN repository address for the Littlechief project is listed as it is here:

If it isn’t, install the repository by selecting Repository > New Repository Location. You will be presented with a small dialogue like this:

Enter the repository address you have received separately in the blank and click O.K.

b) Check that the working directory you wish to use is loaded in the bottom left panel.

If it isn’t, add a new working directory by selecting Repository and then Check Out. A working directory dialogue like this will open:

Browse to an appropriate directory or create a new folder for the repository. Click on O.K. and Oxygen will start downloading the files to your local machine.

4) To edit a document in Oxygen, select the file you want in the “working directory” panel in SVN Client (bottom left—all our working xml files are in the folder 3_workingXML). Right click on the file and select “Open in Oxygen”:

Normally Oxygen will then pop up on your screen with the file loaded. If it doesn’t, select Oxygen from the file chooser bar (along the bottom of the desktop in Windows).

----  

Back to content

Search my site

Sections

Current teaching

Recent changes to this site

Tags

anglo-saxon studies, caedmon, citation, citation practice, citations, composition, computers, digital humanities, digital pedagogy, exercises, grammar, history, moodle, old english, pedagogy, research, student employees, students, study tips, teaching, tips, tutorials, unessay, universities, university of lethbridge

See all...

Follow me on Twitter

At the dpod blog