Category: "Activity log"
MC keeps the transcript xml files in a subfolder in the Francotoile user on Endive (e.g. fraf1.xml). I copied those to the /Users/sarneil/Documents/Projects/french/FrancoToile/data_input/francotoile_transcripts folder on StewsSlab. From there I used the Exist client to upload them to the database:
username: admin
password: in usual place for HCMC
URL: xmldb:exist://lettuce.tapor.uvic.ca:8890/xmlrpc
once you're in, go into the francotoile/data/francotoile collection, where you'll see the dozens of XML files in the collection and use the button whose icon is a page with a plus sign to upload the file(s).
MCD reported that in the file lsqr1, the timed transcripts did not appear, but the full text did. After a couple of hours of investigation, I discovered the cause (which had an obvious fix of removing the extra "x"). The file lsqr1 contained this:
<u start="xlsrq1u2" end="lsrq1u3">
and it should have contained this:
<u start="lsrq1u2" end="lsrq1u3">
This error didn't cause a problem with validation (naturally). When the XSLT that creates the javascript for the timelines and events encountered this (get_events.php page calls events.xsl), it wrote out javascript that pointed to a nonexistant object, included no start time and pointed to a non-existant id for the next utterance (all based on the erroneous start value).
Here's the wrong javascript output:
.addEvent('','00:00:29.130',
'utterance', ' UTTERANCE .... ', 'xlsrq1u3');
Here's the javascript generated after the fix:
lsrq1t1.addEvent('00:00:23.520','00:00:29.130',
'utterance', ' UTTERANCE ... ', 'lsrq1u3');
When the page executed that code it threw a syntax error and the movie object was never defined so that's why the transcripts didn't appear.
Uploaded seven .mov files recently modified by MCD and all the data files.
I couldn't find about four data files she edited last summer. I did find earlier versions of those files, and my backups and the server backups all contained those files, as did the archive on the computer she'd used to do the editing, so I don't know where those files went. MCD will re-enter the timestamps for those files.
Also found two files (prmf4 and prmf5) that were virtually identical, including using the same document ID, which caused the site to fail if either of those files were viewed or searched. Fixed the duplicate ID, so the site mechanically works.
Found following oddities in the playback:
sngl1 : video ok, "a suivre" appears for the transcript
sngl2 : video ok, "a suivre" appears for the transcript
lsrq1 : video ok, no transcript appears
prmq1 : video ok, wrong transcript appears
prmq2 : video ok, no transcript appears
prmf5 : duplicate of prmf4
prmf4 : video ok, wrong transcript appears
cltf1 : video ok, no transcript appears
cltf2 : video ok, wrong transcript appears
eduf1 : video ok, wrong transcript appears
mixc1 : video ok, no transcript appears
mixm1 : video ok, no transcript appears
veqf1 : video ok, no transcript appears
Some of these may be data problems and some caching and indexing. MCD will go through and see.
For future reference
Came across something that might work in place of the QT-based player.
JW FLV Media Player 4.3
Player homepage and download: http://www.longtailvideo.com/players/jw-flv-player/
API documentation: http://developer.longtailvideo.com/trac/wiki/FlashAPI
get_events.php gets the data for a specified article from the eXist db. It then invokes events.xsl to transform that raw xml to create a new instance of the javascript variable movie and populate it. Here's a snippet from the xsl file that generates the necessary code for an utterance which has a who attribute. The particDesc of that utterer is assumed by this code to contain only a pers and persName element and the text in the persName element.
<xsl:when test="@who">
<!-- get the value of the who attribute, which as a pointer to an id begins with a #, and strip the # -->
<xsl:variable name="utterer" ><xsl:value-of select="translate(@who,'#','')"></xsl:value-of></xsl:variable>
<!-- get the text of the particDesc node (remember to use the tei namespace) whose id matches what's in utterer -->
<!-- this call works down through the pers and persName elements within that particDesc element, there are no other elements or text -->
<!-- for particDesc instances that have more complex internals, I'll need to be more explicit in that particDesc selector -->
<xsl:value-of select="id(@start)/../@xml:id"/>.addEvent('<xsl:value-of
select="id(@start)/@absolute"/>','<xsl:value-of select="id(@end)/@absolute"/>',
'utterance', '<div class="interviewer"><xsl:value-of
select="//tei:particDesc[@xml:id = $utterer]" /> : <xsl:apply-templates/></div>', '<xsl:value-of select="@start"/>');
</xsl:when>
Here's a snippet of the output for two utterances, the first if the who attribute of the utterance is empty and the second if the who attribute of the utterance has a value that points to a particDesc/pers/persName element containing the text "interviewer"
test1t1.addEvent('00:00:00.000','00:00:06.420','utterance', ' text here', 'test1u0');
test1t1.addEvent('00:00:06.420','00:00:18.260','utterance', '<div class="interviewer">interviewer: text here . </div>', 'test1u1');
CC asked if we could make it possible to identify who spoke each utterance. First case: interviewer and subject; case two: multiple subjects.
I will add a particdesc element with xml:id = "interviewer" and then a who="#interviewer" attribute to the u element in the data file. That's TEI.
The very major headache is trying to figure out how those utterances get into a javascript array where they are accessed by the page. I can't figure that out. My hope is to modify the xslt so that some css attributes change for utterances by the interviewer, and then for that to be passed through into the javascript array. I may experiment first with the code that winds up as the transcript of the whole dialog as it has it's own xslt file (transcript_in_div.xsl).
Met with CC and M-CD on status of FrancoToile.
Phase 1 target is 100 clips with transcripts and markup implemented in current infrastructure. Not much work for me beyond ensuring files go where they're supposed to. Video collection over summer. Transcripts in summer and fall. Markup in fall.
Phase 2 will be some form of integration with the FLORE database - not sure yet what whether that's simply a user interface umbrella, including FrancoToile videos as resources in FLORE, or something else.
Phase 3 will look at the possibility of including web2 type capabilities (accept user input, comment etc.)
MC noted that the search within one transcript (i.e. search tab) wasn't working properly.
With Dwayn Loisir (aslf1), there is something about the data that is causing major problems: javascript errors reported by the page, the xml is wrongly structured and missing text. The data in the source xml file seems OK and validates against the rng file, but it must contain apostrophes or some character that is causing the xml parser in ajax_search.php big problems.
With Antoine (secf2), the timesstamps appear OK, but in the popup text boxes, the html entity for the apostrophe (') is not rendered as the apostrophe character. This is a problem that I've seen before and one I thought I'd already fixed, but obviously not.
Tomorrow I'll test a couple more data files and see if there are any other kinds of problems. Assuming no additional issues, I'll work on the "Antoine" problem first, then the Dwayn problem.
There was an update to the apache server (httpd) on lettuce March 1 that required editing of the existing .htaccess file. Apache 2.2 has been compiled with LDAP, meaning .htaccess can be a bit less verbose.
This is the new authentication scheme:
AuthType Basic
AuthName "Restricted to username or NetLinkID"
AuthBasicProvider ldap file
AuthUserFile /path/to/.htpasswd
Require valid-user
Note the removal of an explicitly declared username. When Apache reads the file it heads off to /path/to/.htpasswd and reads it to find out the username to expect.
I'm also adding this info to the Maintenance blog.
1. The list should not appear before any search
I've modified search.php so that when the page opens or when the user tries a search with no text and no filters, the search is not done and no search report text appears.
2. Gender
No changes made.
3. Location needs to be changed- add French translation
I've put the four values for Location into the French and English language files. Those appear in the Location dropdown list on the search page. The search tests if that value appears anywhere in the residence element in the data.
4. Origin needs to be added (see Oxygen and tanslation in document)
I've put the four values for Origin into the French and English language files. Those appear in the Origin dropdown list on the search page. The search tests if that value appears anywhere in the nationality element in the data.
5. Topics
Right now the system is set up so that the items in the English Topics drop-down list are in English and the French Sujets drop-down list are in French, but the actual searches search for the French term. It's trivial to change the text that appears in the interface, but would take considerably more work to elegantly facilitate the actual search in both languages.
It appears that the data files in the database right now do not contain any of the six topic keywords:
éducation
loisirs
langue
histoire
cinéma
littérature
At least, no matter what topic I search for I get no hits. Is that correct?
If the data does have correct values, then there is something wrong with the code doing the querying, which I'll have to investigate.
6. Age
I changed the code so that people with no age do not fall into the 0-9 age bracket. People with no age cannot be found by an age-based filter - which makes sense to me.
I've put these .xml files into the eXist database for FrancoToile :
prmq1.xml
prmq2.xml
prmq3.xml
prmq4.xml
prmq5.xml
prmq6.xml
vacq1.xml
vacq2.xml
vacq3.xml
fraq1.xml
lsrq1.xml
I've put these .mov files into the media folder in the Francotoile website :
prmq1.mov
prmq2.mov
prmq3.mov
prmq4.mov
prmq5.mov
prmq6.mov
vacq1.mov
vacq2.mov
vacq3.mov
fraq1.mov
These two .mov files are missing, so are not in the Francotoile website:
fraq1.mov
lsrq1.mov
Lines to include in an .htaccess file to cause authentication to check against list of made-up user names first, then valid netlinkID's:
AuthType Basic
AuthName "Restricted to username provided by us or UVic netlink ID"
AuthAuthoritative off
Require user [made-up-user-name]
AuthUserFile [absolute/path/].htpasswd
Require valid-user
third line enables cascading authentication
fourth line lists user name(s) in local authentication file
fifth line specifies local authentication file
sixth line lists user name(s) in default authentication file
lack of line specifying another AuthUserFile causes default authentication to be invoked (ldap against netlinkIDs)
The path to the executable for editing the password file on lettuce is:
/usr/local/apache2/bin/htpasswd
Marie-Claude took a group of videos shot in Quebec on the new Sony camera and imported them in to iMovie. Although the videos played back with audio in QuickTime, iMovie was unable to detect an audio stream. The reason for this is that the video is muxed MPEG-1 (see here: http://docs.info.apple.com/article.html?artnum=42996). As a result of the camera recording in MPEG-1, image quality is not great, and file size is significant (approx. 20MB/minute).
I tried using Quicktime Pro to export a DV stream, but it does not appear to have any explicit capacity for demuxing. I downloaded MPEG Streamclip (from here: http://www.squared5.com/) and exported the video as DV25, de-interlaced video (which swells file size by a factor of about 10). iMovie happily, and quickly, imported the video with audio intact.
modified code in search page to allow user to include an empty search string (e.g. so they can specify all subjects that are male regardless of contents of transcript).
Modified code to show search interface at top of page and search results at bottom of page
In course of doing that, decided to comment out simple search and leave only advanced (which is a superset of the simple).
Also modified code to maintain values previously selected in filters.
Also modified code in the locations field so that all tests are against internationalized string value derived from array ($lang->GetEntry('keyword')) rather than literal strings. Will likely implement same sort of thing in the origin and topics fields when I get values for them from Catherine. Required some modification in code doing testing for creation of search query as well.
Met with Catherine on FranctoToile, she asked about:
- putting a .htaccess file on the site
- limiting access to all netlinkIDs AND 1 made-up user name
- allowing empty search string in the advanced search interface (so users could find e.g. all transcripts of females regardless of what those transcripts contained)
- whether we should break the collection up into subcollections, what the names for each of those sub-collections should be (possibly continents), and whether we'd then want to include an additional field in the xml data files relating with that piece of information in it.
- changing the word "Watch" to "Browse" in the English interface.
I tested the fix further and discovered that the results from a search are as quoted below. So, I pass "true" instead of "false" for the last parameter and predictably the apostrophes now appear as entities, but the search works.
Error Code: 4096
Error Message: Object of class DOMDocument could not be converted to string
File: /home1t/florevid/www/includes/helpers/ajax_search.php
Line: 58
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home1t/florevid/www/includes/helpers/ajax_search.php:47) in /home1t/florevid/www/includes/classes/session.php on line 13
Fatal error: Call to a member function GetVariable() on a non-object in /home1t/florevid/www/includes/classes/lang.php on line 26
The XML data files includes apostrophes. When those files were read in, those were escaped to html entities. Those entities were then rendered by the browser into literal apostrophes on the page. In the case of texts that ended up as strings in javascript variables for display on mouseover, the html entity appeared as a literal string. With Mike's help, figured out the solution to the problem, which was to add another boolean to the def_xml_transform function telling that function whether to treat the output as going to HTML or not (i.e. for javascript), and then modify the call to that function from the ajax_search.php page to pass a value of false for treatAsHtml.
in xmldb.php
function def_xml_transform($xml, $stylesheet, $params = false)
becomes
function def_xml_transform($xml, $stylesheet, $params = false, $asHTML = true)
and
return $xml_result->saveHTML();
becomes
if ($asHTML) {
return $xml_result->saveHTML();
}
else {
return $xml_result;
}
in ajax_search.php
$xml_result = def_xml_transform('<root>' . $xml_result . '', '../xslt/ajax_search.xsl');
becomes
$xml_result = def_xml_transform('<root>' . $xml_result . '', '../xslt/ajax_search.xsl',false,false);
Installed the exist server in the Applications directory. Then had to start it, populate the database with the appropriate collections structure (francotoile folder contains application folder and data folder, data folder contains francotoile folder, francotoile folder contains xml files). Then had to modify the variables in the php for the site to point at localhost:8080/exist/xmlrpc with appropriate user name and pw
To start the eXist server
- open a Terminal window
ssh florevid@lettuce.tapor.uvic.ca '/home1t/florevid/eXist/bin/server.sh'
To shutdown the eXist server
- open a Terminal window
ssh florevid@lettuce.tapor.uvic.ca '/home1t/florevid/eXist/bin/shutdown.sh'
To administer the db:
- open the exist.jnlp client
- URL xmldb:exist://localhost:8080/exist/xmlrpc
Problem is that the def_xml_transform method assumes output is to html, and generates an entity for each literal apostrophe in the data. If the output is in fact to a javascript string, then the ampersand in the entity is escaped to an ampersande entity leaving the hash, numeric value and semicolon as literal characters which appear in the javascript popup.
I had tracked this down and Mike Elkink suggested the easiest way to solve the problem.
To solve the problem, we have to add a new parameter to the def_xml_transform method with a default value of true and then in the call from the ajax_search set the value of that parameter to false.
in xmldb.php:
function def_xml_transform($xml, $stylesheet, $params = false)
becomes
function def_xml_transform($xml, $stylesheet, $params = false, $asHTML = true)
and
return $xml_result->saveHTML();
becomes
if ($asHTML) {
return $xml_result->saveHTML();
}
else {
return $xml_result;
}
in ajax_search.php
$xml_result = def_xml_transform('<root>' . $xml_result . '</root>', '../xslt/ajax_search.xsl');
becomes
$xml_result = def_xml_transform('<root>' . $xml_result . '</root>', '../xslt/ajax_search.xsl','false','false');
[not sure about the apostrophe delimiters around the two instances of false in that last line]
Talked with Mike Elkink and Greg about setting up a server to host FrancoToile on my mac for use at the EdMedia conference.
Downloaded and installed MAMP (universal binary) from mamp.info on the PowerPC G5 so I could host a copy of the FrancoToile site on my local computer. XAMPP (apachefriends.org) only works on Intel-based Macs, and if I used the built-in Apache server in the Mac OS, I'd then need to add the php support.
Only issues I encountered involved SQL (which I don't need to use): the MAMP gui doesn't let me turn just the SQL server off, and when I changed the default SQL pw as instructed I subsequently could not establish a connection to the SQL db.
Copied the entire FrancoToile site from my development directory into the htdocs directory.
Modified two paths in the config.php file in the FrancoToile site define('LANG_DIR'... and define('ABS_PATH'... and the videos played.
Local site is still addressing the eXist db on lettuce.
Next steps are:
to install an instance of eXist on the local computer
put the FrancoToile data into it
get the site on the localhost to successfully address that instance of the eXist db
Added two senegalese videos and empty transcript files.
Added two other videos and transcripts, but they are generating an error when trying to create the movie object and then every half second when that object is accessed. Not sure why.
Also made a few tweaks to the translation and presentation of the site.
1) get rid of PersName in display on page
2) correct spelling errors Residence - résidence, Origine - origine, plusiers - plusieurs, FR-get-results - Résultats, couple of strings to come from Marie-Claude
3) check into search on place names querying for either english name OR french name, both of which will be provided in the data
4) create a new superfolder with a static index page available to all, then put htaccess on the working subfolder, which contains all the rest of the pages of the site
Populated french internationalization file for FrancoToile with values Catherine gave me. Also made minor tweaks to page layout of banner heading and subheading.
Discovered that the text of the About page is currently using the same string of text as the tagline under the FrancoToile banner. Have to rewrite the about page to change that - simplest approach might be a simple php if/else clause around blocks of html hard coded on the page.
if ($session->GetVariable('language') == 'fr')
With Catherine and MarieClaude, reviewed francotoile. Following work to be done:
Add french text strings based on list provided by Catherine
Diagnose problem with IE6 not displaying the banner graphics and buttons properly.
Confirm how location and origin dropdowns are populated and update list of values for those lists
Apostrophe in search box causes error.
Check into code that is switching images on home page and see if that can be invoked on each page load.
Copied all the data files from Marie-Claude's computer to mine for backup, then uploaded them into the eXist db on lettuce.
Modified the xslt code in player.xsl so that only the description attribute of the persTrait element is displayed on the page (beneath the video title and above the video player object).
The current system addresses QuickTime exclusively with a function called QTMovie in movie.js. There is a RealPlayer function in the movie.js file (RPMovie), but Mike reports that he was unable to overcome the browser's built-in handler for mpg streams. If this can be resolved (perhaps using the Half-Baked prefs control panel that M&S built?) RealPlayer can be offered as an option as well. But that isn't why I'm creating this post.
The VLC plugin seems to be working now! See here: http://altair.videolan.org/~dionoea/vlc-plugin-demo/
Which means that we can offer a completely cross-platform solution for deploying Francotoile-like applications. I haven't exhaustively tested the VLC solution, but it shouldn't be too hard.
Just to be complete, a listing of what I know about movie.js and links to APIs and so forth:
QT uses (from movie.js in francotoile)
getCurrentTime
setTime
movieId
GetTime
GetTimeScale
cSeconds
newTimeScale
SetTime
QT JS ref here: http://developer.apple.com/documentation/QuickTime/Conceptual/QTScripting_JavaScript/index.html#//apple_ref/doc/uid/TP40001526
VLC API (note that this covers UP TO 0.8.5. Reports suggest that *some* breakage may occur on 0.8.6 and above. I haven't found a new API description yet) is here: http://www.videolan.org/doc/play-howto/en/ch04.html#id293635
*play() : Start playing media in the plugin.
*pause() : Pause playback.
*stop() : Stop media playback.
*fullscreen() : Switch the video to full screen.
*set_volume(vol) : Set the volume. vol has to be an int in the 0-200 range.
*get_volume() : Get the current volume setting.
*mute() : Toggle volume muting.
*set_int_variable(var_name, value) :
*set_bool_variable(var_name, value) :
*set_str_variable(var_name, value) :
*get_int_variable(var_name) :
*get_bool_variable(var_name) :
*get_str_variable(var_name) :
*clear_playlist() : Clear the playlist.
*add_item(mrl) : Append an item whose location is given by the Media Resource Locator to the playlist.
*next()
*previous()
*isplaying() : return true if the plugin is playing something.
*get_length() : Get the media's length in seconds.
*get_position() : Get the current position in the media in percent.
*get_time() : Get the current position in the media in seconds.
*seek(seconds,is_relative) : If is_relative is true, seek relatively to current time, else seek from beginning of the stream. Seek time is specified in seconds.
RealPlayer API (from 2001) is here: http://service.real.com/help/library/guides/extend/embed.htm
Wrote the xsl to distinguish two types of ref tags in francotoile data (one for links and another for popup notes). Testing took longer than I thought because the data had an illegal character in it. Sorted that out and then tests worked.
Then went through data files and modified those refs which were actually links to urls. Posted revised data files to server and to development computer and informed Catherine and Marie-Claude.
Backed up transcript files from Spartan (rather than from my mac, so there should not be any permission issues).
Commented out code in player page that was displaying the timestamp for each utterance in the "show all utterances" view - Didn't want to delete code as it includes a piece of xpath that I'll likely want to use again and might not be able to recreate from scratch.
Uploaded the three data files modified by Marie-Claude to the database.
Research best use of ref tag to use for notes and for links to external files (use type=link or type=note attribute)
Modify stylesheet in transcript-in-div to display arrow graphic after links, but not after notes.
As it happened, the URL of one of the links I was using included an apostrophe, which borked Mike's javascript code on the dynamic transcript page. With David's help, discovered the problem - only feasible solution is to correct the data.
To do: figure out how to add the arrow graphic after links in the dynamic transcript.
Spent time figuring out best approach to create a div containing the text for all the utterances in the data file presented just as the individual utterances are now.
Explored a couple of options piggy-backing on Mike's javascript code, but then in discussion with David decided it would be better to grab the raw xml and write a completely separate transformation. Will start on that tomorrow.
Also reviewed state of the files with Catherine and Marie-Claude : in resdince, we'll include some or all of city, region/province/state, country (comma separated) and have search page look for "includes" rather than "=" with the values in the drop-down including only countries and regions/provinces/states.
Posting minutes spent helping Stew with XQuery and XSLT issues.
include name, age, persTrait@description and persTrait@note elements in the GUI (between tabs and transcript)
Have all links to the Watch page call browse.php with a collection argument so that it goes straight to the list of videos.
Age categories as follows: 0-9, 10-14, 15-18, 19-25, 26-39, 40-54, 55-64, 65+. write code to work out from the age in the data file which category to use.
Use residence as current location; nationality as place of origin. Update search page and lang pages as needed
Began work on Include cleaned-up plain text with hyperlinks of transcript of whole file. Issues with the refs, specifically with untagged URLS in the refs.
I copied the eight xml files from Spartan to StewsCube (for backup) and then uploaded them into the eXist database on the server.
I also shrank the box containing the transcript so it is much more likely to appear beside rather than below the video box, and got rid of the "events" box below the "transcript" box, as we're not using it.
I have not yet written the code to handle the age checking, nor have I done the other modifications listed on the blog in my posting of Jan 19.
Here are the details on some tweaking I had to do to the data files:
Four files (accf1.xml, prmf1.xml, prmf2.xml, prmf3.xml) as you sent them to me appear to work fine.
Three files (pscf1.xml, ancf1.xml, secf2.xml) had typographical errors in the id attributes for some of the utterances, so failed. I corrected those errors, put the file back in the database and they now appear to work.
The file secf1.xml had some typographical errors which I've corrected. In addition, some the start and end attributes for some of the utterances were clearly incorrect. When I corrected those to sensible values, the sensible timestamp values did not appear to sync with the video very well. So one of you will need to go through that file again and check to make sure that the "when" events have the correct timestamp values.
At the moment, 8 videos play and the transcripts appear (1 of the 8 has syncing issues as discussed below), and all 8 are searchable.
Discussed how to handle age location and place of origin features and modifications to GUI.
Task posting arising from disucssion to follow.
We decided to
- include element to contain reference to movie file
- include a persTrait@stageInLife. Possible values to be determined by Catherine and Marie-Claude.
- add a new persTrait@origin to contain the subject's origin. Possible values to be determined by Catherine and Marie-Claude after a discussion on appropriate granularity (e.g. "Canada" vs "Quebec, Canada" or "New Brunswick, Canada" or "Manitoba, Canada")
- the "residence" element will be used to populate the "location" control in the GUI.
GUI problems:
In Firefox the minimum size for the transcript box is too wide.
In Safari, as above + the four tabs appear at the top of the box to the right of the transcript itself, rather than at the top of the box left justified above the transcript.
Large size of transcript box causes it to wrap below video display on all but the largest monitors.
Tidied up and commented the modifications I've made to the search.php file, also adjusted the presentation of the search components in the GUI.
Finished abstracting all the text strings and included entries in each of the two lang files.
Removed "Table of Contents" tab from the Player page, as this project is not including and table of contents events in the data files.
Awaiting input from Catherine tomorrow on how to handle ages (vs stage-in-life) and other bits of data I need from her.
Finished approach I started yesterday, which is kludgy but successful.
Started on approach similar to Martin's in ScanCan where I return the entire documents and append one or more square-bracketed conditions based on settings in the GUI. Wrote the additional code to take those results and turn them into format expected by this site. That's now working.
Started on abstracting the text strings that I've added to the search page. Another hour or two should complete that.
I'll have to sit down with Catherine to confirm what values are going into the data files and then how to map from those to values to compare on the page. The page right now works on the value of the selected, which is currently an integer.
Struggling trying to figure out how to compose an xquery which will filter for each of up to five parameters passed in.
Read documentation on sequence operators and other features of xquery and tried them, but without success. Got some sample code from Martin where he assembles the query, used that as a model for my "for" and "where" assembling in php.
By end of day had an idea how to do it by assembling one "for" nodeset for each of the parameters and then and-ing one "where" line for each parameter with result that only the documents which match all the parameters get through. Seems remarkably kludgy.
Figured out that the xml data files are missing a broadcast/bibl/ref element with a target attribute, which is what the xslt uses to get the name of the media file. Added that to the test file (accf1), uploaded that to the eXist db on lettuce and the standard view, search, bookmark and download functionality now works. Let Catherine and Marie-Claude know.
This structure:
<recording type="video">
<date value="2006-08-28">28 aôut 2006</date>
</recording>
must be replaced by this structure:
<recording type="video">
<date value="2006-08-28">28 aôut 2006</date>
<broadcast>
<bibl>
<ref target="media/accf1.mov">Les Accents par Jean Olivier Héron</ref>
</bibl>
</broadcast>
</recording>
...spent helping Stew figure out some more of Mike's XQuery code.
Took what I'd learned in previous posts and applied it to other instances of the id() method call on FrancoToile: specifically the bookmarks, search-in-page and transcripts files. Martin helped, particularly with the two-level call needed in the search-in-page instance.
With Greg also investigated differences in eXist configuration files between the lansdowne and FrancoToile instances - can't find any that explain the different behaviour, so now the mystery is how the lansdowne video site is working.
Have tested fairly thoroughly now against the lansdowne site and appear to be getting identical behaviour.
Still haven't investigated whether any of this will help with the problem encountered on the Map Of London site.
Next will be adding the advanced search GUI for filtering videos including grabbing the legal values for each control, and writing the xquery based on the state of those GUI controls
Compared php, javascript and eXist db files on FrancoToile and Lansdowne video sites. Eventually discovered that the code I'd written to replace Mike's id() calls included some explicit calls to the TEI namespace which had not been declared. This caused eXist to return an error. We have fixed the problem in helpers/get_events.php, but I'll have to go through all the other instances of id() and my replacement code to ensure they're properly written, either with the namespace declaration and namespace prefix, or with neither. Thanks to Martin for spotting the problem, see his post.
Not yet sure if it will also solve the problem with the Map of London site reported here.
...spent trying helping Stew figure out why one site (Lansdowne) works and the other one (FrancoToile) doesn't. After a lot of diffing between the sites, eventually discovered that the helpers/get_events.php file had a namespace error; the default namespace was being set to the tei namespace, but the query was being done with a namespace prefix of tei: which wasn't mapped to anything.
I answered a couple of questions from Catherine and MarieClaude (who were in for usual Thursday morning session) on how to encode attributes and timestamps for when and utterance elements.
They wanted to identify regions of a country in the language tag (e.g. New Brunswick rather than Quebec), so I checked into details of legal formats for the ident attribute of the language element, reported that information back to Catherine and MarieClaude and gave them a solution that meets their needs.
Catherine generously offered to include my name in a presentation she is considering proposing to the edmedia conference in Vancouver next June.
Succeeded with Martin's help in rewriting the search query on the search.php page to avoid the errors generated by the id($var) call. Now successfully gets number of hits of search string in each article in collection. Yet to do: return list of timestamps corresponding to hits - requires editing another piece of code that uses the id($var) construction
Applied that knowledge to similar problem in player.php page, so that now successfully gets list of videos in collection and plays video file. Yet to do: get the transcript to appear. No error message appears, but I suspect it is another instance of the id($var) construction.
Nov 29 add link to related post on MapOfLondon in Depts blog
I prepared a template data file and went through it with Catherine and Marie-Claude. We decided which elements to use to capture necessary information and I demonstrated how to start a new file from the template, find the necessary places to enter information, and enter information in the oXygen editor.
Based on meeting, I updated the template file and sent a copy to them, but I have yet to update the rng file to restrict tags available to only those we want to use.
They have rng and template xml files on their laptops.
- 1
- 2