One more article came in, this time for the film volume -- that's on the back burner for the moment -- and more corrections for the NVD review. Did the corrections, and also uploaded corrections to the Sayer text I'd made this morning.
Uploaded LSPW's changes to 1609 Sonnet, and answered a question regarding catchwords.
The 1609 Sonnet has little marginal headings that we've designated as arguments, tagged with the <argument>
tag, and these were correctly marked with @rend
attributes containing float: left
or right
, but up to now I hadn't added any XSLT handlers to make them appear correctly on the site. I've now done that, and in the process we've added negative margin settings to the left-floating arguments to take them out of the way of the regular text. The right-floating ones are fine without any special handling. This is a mildly interesting issue -- should the @rend
attributes actually need to make such a distinction, or is this just a product of the XHTML document instance? This is almost too complicated to figure out, but I'm tending more and more to the opinion that CSS is more than adequate as a layout and description language, so the more simply we can pass it through to the XHTML output, the better. Ultimately we might be able to use pure XML+CSS, but of course then we wouldn't get any annotations or interactivity.
Cleaned up some of the CSS for the reference links, to left-align the text instead of justifying it, and also worked through the references XML document itself, removing pointless placeholders and inserting a standard text for references which are not complete yet.
Implemented the second option for reference linking, and got it all working. Briefly:
- When the XQuery retrieves a document from the db, it checks for
<ref type="reference">
tags. If it finds any, it creates a<back>
element containing a<div type="references">
element. - For each ref link it finds in the document, it retrieves the matching reference
<div>
from the references subcollection and puts it into the<div>
above. This means the XML document now has a matching explanatory text for each unique reference in its back matter. - The XSLT then detects the presence of these, and turns each
<ref>
tag into a link which calls some JavaScript. - The JavaScript pops up the reference information on the right of the screen.
The display of reference info looks very similar to that of note info, but it's not; the notes are displayed through pure CSS using :target
, but the references cannot be set to position: fixed
because they're frequently very long and need to scroll, so they're set to position: absolute
and just placed next to the calling reference link.
We now have a growing body of references, some already marked up (by EM) and others still in text format (by LCC). We now need to think about how best to link these references into the display of documents. The form of the references looks like this:
<div xml:id="apolon"> <head>Apollon</head> <p> Dieu grec de la lumière. Il est fils de Zeus et de Léto, [...]</p> <listBibl> <bibl> “Apollon.” Le Petit Robert: Dictionnaire illustré des noms propres. 1994. </bibl> <bibl>Second sample bibliographical entry.</bibl> </listBibl> </div>
and they're linked like this:
<ref type="reference" target="references.xml#apolon">Apolon</ref>
There are two approaches we could take:
- The links could call out to some AJAX script which retrieves the reference on the fly from the database, and then shows it on the page. This has the advantage that it's much easier to code on the backend; the only thing that needs to be changed in the rendering code is the XSLT output (to create the link that calls the AJAX script), and the rest is a matter of creating a simple XQuery to grab the item and return it to the page. The disadvantage is likely to be speed (it will take a few seconds for a reference to appear).
- When a document is retrieved from the database, all reference items it links to are also retrieved, and injected into the document somewhere; then the rendering code can make links that work in the same way as the current embedded notes (footnotes). The advantage here is that the page will be more responsive when you're clicking on reference links (no need to wait for an AJAX transaction), but the disadvantage is that the XQuery that retrieves the document needs to dismantle and reconstruct it in order to insert the references into the right place. This is what the Coldesp code does, but in that case it uses the
<back>
element of the<text>
to insert the retrieved items; in the case of our Mariage documents, it's likely that many will have a<back>
element as part of the transcribed document structure, so the reference data will have to go somewhere in the header (presumably). The XQuery that does this is also a bit more tricky and takes a little longer, so initial document display speed would be affected.
I think on balance I should attempt #2, which is in any case probably the more solid alternative when it comes to making coherent standalone XML documents accessible to outside consumers of the site content.
We now have a growing body of references, some already marked up (by EM) and others still in text format (by LCC). We now need to think about how best to link these references into the display of documents. The form of the references looks like this:
<div xml:id="apolon"> <head>Apollon</head> <p> Dieu grec de la lumière. Il est fils de Zeus et de Léto, [...]</p> <listBibl> <bibl> “Apollon.” Le Petit Robert: Dictionnaire illustré des noms propres. 1994. </bibl> <bibl>Second sample bibliographical entry.</bibl> </listBibl> </div>
and they're linked like this:
<ref type="reference" target="references.xml#apolon">Apolon</ref>
LW had reported instances of stanzas which on the original page have no space between them, and are delimited only by an indent in the first line; these were showing up with spaces between them, and the problem wasn't solved by setting margin-top: 0
on the <lg>
tags. The reason was that there's also a default bottom margin on stanza elements, so any stanza followed immediately by another with no space needs a margin-bottom: 0
setting too.
LSPW continues to work on the 1609 Sonnet markup, and referred three issues to me today; one was my problem (the CSS was failing to centre an <h2>
derived from a <head>
inside the main body of the text), one is still open (I can't find any instances of the problem), and the third is part of our gradual refinement of the way we handle letter-spacing. Many of the headers have big spaces between letters, and the initial transcription handled these by adding actual space characters; subsequent attempts to refine the spacing have run into problems, and we're now implementing what we probably should have done in the first place, which is careful use of letter-spacing
values expressed in ems, which can be carried straight over into the XHTML as CSS inline style properties, and also leave the text itself properly searchable.
SR has written XSLT that is intended to parse a collection of XML files and generate an ODD file which, when processed through ROMA, will give you a completely constrained schema. Took me a while to get it working, but I've managed to run it on the Mariage documents and get an ODD file; tomorrow I'll run it through ROMA and see what pops out. This will be a great way to constrain our schema.