xsl-list
[Top] [All Lists]

Re: [xsl] Question about isolating records

2015-09-03 19:55:12
Never mind, I was able to figure it out.
Mark

On 9/3/2015 5:08 PM, Mark Wilson pubs(_at_)knihtisk(_dot_)org 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.'

Thanks,
Mark

<Item>
      <PDF>016667517</PDF>
<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>
   </Item>

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


--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>