Storming through the last phases of the London Maps port -- need to have a working site by next week...
When running Tomcat for projects which have UTF-8-encoded text in URLS (e.g. get parameters for searches), don't forget to add the correct parameter (URIEncoding="UTF-8") in conf/server.xml:
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8" />
Forgetting this just cost me half an hour, curses.
My anomalous results problem was solved by enclosing a block of return elements in a single div instead of returning them as a comma-separated sequence of elements. I have no idea why that works, but it does. (Basically I have no idea why the sequence was failing, but no worries -- problem solved, and the changed approach is actually simpler.)
So now I have working search results, with plus, minus and quotes already functional. All that's left is the long-s substitution, and variant-spelling generation. I also have to figure out how to tag the results in the actual pages when you navigate to them.
Logging time spent at the meeting.
I've built the basic search page, and I have ft:query working with a simple search string, but I'm facing a number of issues:
- The kwic:get-summary() function was returning
<p>
and<span>
elements in no namespace, rather than in the XHTML namespace as the documentation says it should. I initially worked around this with CSS namespace selectors (see the CSS for this -- it's new, but works in Firefox, Chrome and Opera). I also reported it, and WM got back to me with the suggestion that I addenforce-xhtml=yes
to theexist:serialize
declaration. That works! - I'm getting anomalous hit counts when I count the
<exist:match>
elements in my kwic:expand()ed results. - Some results, although counted, don't seem to return anything. This is very puzzling, and I'm still trying to nail down the circumstances.
To help me in this process, I've added an "XML" link to the More Info box in every page, so anyone can take a look at the underlying XML of any page. That should probably stay there; it's extremely useful for me, and it will be for editors too, I think.
Continued working on the site with GN and have test2 ready
for SB to see.
Sent SB email re test2 url for comments/approval.
Previously, if there were more than 20 years in the range of returned data, the years appearing along the x-axis in the flot graph overwrote each other.
I changed the init-flot.js file by replacing this:
xaxis: { tickSize: 1, tickFormatter: function(val, axis) { if (!yearTotals[val]) { return val; } else { return val + '<br />' + yearTotals[val]; } } }
with this:
xaxis: { ticks: 20, tickDecimals: 0, tickFormatter: function(val, axis) { return ' ' + val; } }
The ticks limits the number of years explicitly labelled to a maximum of 20, thus taking care of the overlapping year display on the x-axis when there are lots of years in the chart.
The tickDecimals controls whether fractions of years get ticks on the x-axis. For small year ranges, if this is not set to 0, you get values like 1744.5 appearing, which is nonsensical for this dataset.
Since not all years get a tick on the x-axis, it didn't seem to make sense to display the total hits, so I've removed that from the tickFormatter.
I prefer the year label to be left justified to the left side of the column in the graph, rather than centered on the left side of the column, so I added those spaces to push the date to the left.
On the home stretch for the London Maps project.
Had a meeting with JJ today, and discussed progress so far, and what remains to be done. Today I've completed the following:
- The "Dramatic References" code is working, although a new caption ("Dramatic" instead of "Literary") now wraps the navigation box at the top left, making it a little too long -- CSS fixes needed.
- The two routemap pages have been slightly rewritten, and the routemap image for QMPS has been reworked, so that they're both static pages with locations on the maps hard-coded in the images as numbers. This makes them both consistent, and improves on the QMPS one, which wasn't working anyway on the old site.
- Several hundred targets/pointers have now been fixed; I think all are now completely consistent.
- Handling for three types of
<note>
element (editorial, authorial and marginal) has now been brought into line with the old site (although I intend to improve this, using a better popup as in the Mariage site). - Various bugs have been fixed.
The SVN repo has now been set up, and I've populated it. I've also configured the user access on two levels, doing this in the svnusers file:
# ----------------------------------------------------------------- london [london:/] @londonadmin = rw @londoneditors = r @unixadmin = r [london:/db/data] @londoneditors = rw
I tested this with one of our spare netlinks added to the londoneditors group, and found that I was able to write to /db/data, but couldn't write to /db/site. I don't think we have any other projects with any complexity in SVN permissions, so I'm blogging this in detail so we'll know how to do it next time.
Remaining major tasks:
- Another pass through documentation, adding info on
<note>
s etc. - The search system.
- Instructions for Windows users working with SVN. This will take some working out.
- Addition of NA to the list of londoneditors.
- A little routine to catch xml:id clashes on the ids.xql page.
- Checking/possible refactoring of documents in the Library subcollection.
- Templates for JJ to get started with markup.
- Addition of Library documents to the litref.xql system. Currently it only checks in the litref subcollection.
At PAB's request, added new info about the latest speaker, and associated media files.