You don't say which titles appear, under the <scopecontent> or the
<did> Also you don't say if your <scopecontent> is an upper level -
above the <dsc> - or within a <c> level element. I would suggest that
you check to see what node your for-each is starting at. Your select
statement says, in effect, look for all titles under current node. So,
if your current node happens to be <did> then it will only find the
title under the <did>. Personally, for searching I like to use
Xquery. It works on oXygen, if you have that, and is rather
straightforward. It is in the same family as XSL, but is better suited
Robert Young Walser wrote:
> Searching our giant EAD instance with XSL is producing strange results. The EAD document includes item-level descriptions which often include multiple titles: a primary title in the <did><unittitle><title> and sometimes multiple alternate titles in <scopecontent><p><title> tags.
> We've been using xsl stylesheets to locate text in these titles using these xsl statements:
> After creating a node-set of all the items in the collection
> <xsl:for-each select=".//title">
> <xsl:if test="contains(string(.) , $SearchTitle)">
> code to display the item
> What is odd is that the results are consistent but not what I'd expect.
> The search string is only found some of the time when the test is true. In other words, the xsl consistently misses some items for which the test should be true. Any advice on tracing this mystery?
> Bob Walser
> The James Madison Carpenter Project
L. Dale Patterson [log in to unmask]
Archivist-Records Administrator 973-408-3195
United Methodist Church Archives fax: 973-408-3909
Madison, NJ 07940 http://www.gcah.org