Huge step forward: complete working Mariage, with working search!
On a roll today. In an effort to demonstrate that something was wrong with the XQuery generator, I created a really simple project in a test Cocoon, and found that the <exist:match>
tags were coming back exactly as expected. That meant there was something particular that I was doing in my Mariage find.xq file which must be resulting in the loss of the tags. After much hacking around, I found a solution -- although I still don't understand why it works. First of all, I had to make sure I was adding the exist namespace to the <teiCorpus>
element in which I was returning the results; I hadn't been doing that, which meant that the match tags had an unbound prefix. Second, and most important, I had to rewrite the actual file so that I constructed the output document in a slightly different way. I had been generating it using a lot of embedded functions, with local variables containing (for instance) search results, then querying that local document in order to get its contents and drop them into the return document. This worked, and the search is now functional on my local test copy of Mariage.
The only thing I can think of that might have caused the problem is that during the process of constructing the document in memory, and then querying it, elements in the exist namespace were somehow lost. In any case, I now have a solution, and we can think about deploying it first thing Monday. I can chop down that Cocoon in the same way I chopped down the latest one, and just push it up either into the main Tomcat or into the dev one. Greg and I can decide on Monday.
Unfortunately, porting the fix back to the old (mariage_3) project didn't help; still getting no search results there. All the more reason to rush out a new deployment.
Next I'm going to try extracting ScanCan in the same manner, and see if that works as advertised...