[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Question about isolating records

Subject: Re: [xsl] Question about isolating records
From: "Mark Wilson pubs@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 4 Sep 2015 00:55:05 -0000

Never mind, I was able to figure it out.

On 9/3/2015 5:08 PM, Mark Wilson pubs@xxxxxxxxxxxx wrote:
Thanks, your suggestion solved that problem. Now I have a slightly different problem.

In a file of 6000 <Item> elements, I need to locate only <Item> elements where <Shelfmark> contains more than one instance of the word 'Crawford'. See example below. I regret that I do not know regex, so I do not know how to construct the XPath expression for XSLT.

Once I do that, I assume I may tokenize the element to construct new <Item> elements with <Shelfmark> elements that contain a single instance of 'Crawford XXX.'


<Shelfmark>Crawford 0153. Crawford 0154. Crawford 0155.</Shelfmark>
<Title>Complete catalogue of the postage stamps of British North America and the West Indies ... May, 1895.</Title>

On 9/2/2015 8:07 AM, Alan Painter alan.painter@xxxxxxxxx wrote:
<xsl:sequenceselect="//Record[count(./descendant-or-self::*/text()[matches(., 'Crawford')]) gt 1]"/>

Current Thread