Print

Print


Hi all,
I have an annoying problem I can't seem to solve and I thought one of you might know the answer!

I have been using a stylesheet that Michael Fox wrote for us and I spent some time modifying it to fit our finding aids. It displays the box folder, or in our case reel and frame numbers, in two columns. This stylesheet is a modified stylesheet #2 from the Cookbook plus Michael's new code for the display of the container list.
We decided that the display was more elegant if the reel numbers were only shown when they change. So a variable is created that stores the present reel number and compares that against the previous reel number to see if it is the same or not. If it is the same, the reel number is not displayed. If it is not, the reel number is displayed along with the title of the column, Reel.

Ok, here is the code:

<xsl:when test="(../preceding-sibling::c03[1]//did/container @type='reel']=$reelnumber 
or  ../parent::c02/did/container[@type='reel']=$reelnumber)">

this is repeated for the c04 and c05 and repeated for each level (the same lines are repeated to include the previous levels.)

If the c03 is fluctuating (IE. the reel number changes frequently) or wasn't filmed at all, this doesn't display the new reel number. It only works if I take out the ../ in the second line.

If I do that, it then displays the reel and frame number if we go to a higher level, IE from c03 to c02 even if it is a continuation of the previous number. So I get repetitive numbers displayed. My tests show that nothing is being captured in that second line if the ../ is left out so it is not working as a test at all.

I hope I have explained this so you can get an idea of what the situation is.
I can send the stylesheet file and an example finding aid to anyone who is interested.

Any ideas?
Thanks a lot,
Loren

Loren Scherbak
Archives of American Art
Smithsonian Institution
202-275-1687
[log in to unmask]