Getting by with a little help from sourceforge and twitter

As you can no doubt tell, I don’t know a lot about xquery, database applications, or how data is called/manipulated/displayed in eXist–there’s a whole host of other “things I don’t know” but that I also don’t have names for yet. I’ll try to explain what I’m doing in laywoman’s terms, but if you know what I’m really talking about, do let me know. I can use all the help I can get!  I have to thank Joe Wicentowski @joewiz and Patrick Murray-John @patrickmj for trying to help me figure this stuff out.

  • Success in getting the title changed! After renaming the application in exide’s app descriptors and tweaking a few other places, I tried to search the app globally for title strings (“Shakespeare,” “shakespeare’s,” “works in TEI, &c), and while this showed me lots of places that also needed to be tweaked for the NiC app, it didn’t turn up the title. Which, incidentally, is in the most logical place of all: index.html. Maybe using the edit/find in files [app] doesn’t search .html? Anyway, it’s there, and I changed it.
  • Fixed the footer, and in the meantime, learned which of the style sheets holds the which style information. I renamed and re-pointed exist.css to exist-nic.css, just so I don’t forget in the future. Now Novels in Context bears a Creative Commons BY-SA free culture license, in anticipation of whenever it goes live.
  • I continue to try to get rid of the outline/table of contents display feature that the Shakespeare DB model uses–it makes perfect sense for plays (with scene directions, acts, scenes, and cast lists) and poems (though, admittedly, it works best in the collected sonnets file, less so in single-poem files), but little sense for smaller excerpted portions. These should be displayed automatically, after the main list of works and work types. I was able to get the files to display by changing the <p>s to <lg>s and basically formatting it like The Phoenix and the Turtle, but you couldn’t see the full text unless you first click through the “Stanzas.” I know this is done in the APP.XQL file, around line 80:

declare function app:outline($node as node(), $model as map(*), $details as xs:string) {
let $details := $details = “yes”
let $work := $model(“work”)/ancestor-or-self::tei:TEI
let $current := $model(“work”)
(:If the work is a play:)

  • I’ve been trying to create a new if/then fork, which will basically search for files with particular prose elements in $work/tei:text/tei:body/, and display each. I’m assuming this, too, goes in the APP.XQL file. So far, no luck making this work–I’ve discovered that there’s a templating module located in shared-resources/content that also seems to have some role to play here, in addition to TEI2HTML.XQL. But to facilitate the process…
  • I’ve streamlined the XML files to have a <title> element identifying the section title, whether authorially- or editorially-given; an <epigraph> (or not, with <bibl> and <cit> elements as well), and a series of <p>s. I can imagine cases where the paragraphs will contain snippets of poetry, or the excerpt may be a poem or a part of a play, with its own structural demands. But for the moment, this is fine:

<title type=”authorial”>Number 4, Saturday, 31 March 1750</title>
<epigraph xml:lang=”la”>
<l>Simul et jucunda et idonea dicere Vitae.</l>
<p>The works of fiction, with which the present generation seems more particularly
delighted, are such as <span ana=”editorial.xml#realism” type=”positive”>exhibit
life in its true state, diversified only by accidents that daily happen in the
world, and influenced by passions and qualities which are really to be found in
conversing with mankind.</span></p>
<p>This kind of writing may be termed not improperly the <span ana=”editorial.xml#genre”>
<span ana=”editorial.xml#term”>comedy of romance</span>, and is to be conducted nearly by
the rules of comic poetry.</span> Its province is <span ana=”editorial.xml#purpose”
type=”positive”>to bring about natural events by easy means, and to keep up
curiosity without the help of wonder</span>: it is therefore precluded from the
<span ana=”editorial.xml#genre” type=”negative”>machines and expedients of the
heroic romance</span>, and can neither employ <span ana=”editorial.xml#romance”>giants
to snatch away a lady from the nuptial rites</span>, nor <span ana=”editorial.xml#romance”>
knights to bring her back from captivity</span>; it can <span ana=”editorial.xml#romance”>
neither bewilder its personages in desarts, nor lodge them in imaginary castles</span>.</p>

Front page, with test function placeholder.
Front page, with test function placeholder.


Displaying the XML document--note that the file doesn't actually display, only the tei:header info!
Displaying the XML document–but the file doesn’t actually display, only the tei:header info!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: