Thanks everyone for the answers -- I can try both versions.
Mark
On 9/2/2015 8:07 AM, Alan Painter alan(_dot_)painter(_at_)gmail(_dot_)com wrote:
In case you were looking for more than one child that includes
Crawford (which would exclude cases where a single child field
included Crawford more than once), then you might want:
<xsl:sequenceselect="//Record[count(./descendant-or-self::*/text()[matches(.,
'Crawford')]) gt 1]"/>
On Wed, Sep 2, 2015 at 3:01 PM, Heiko Niemann kontakt(_at_)heiko-niemann(_dot_)de
<mailto:kontakt(_at_)heiko-niemann(_dot_)de>
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com
<mailto:xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com>> wrote:
And with XPath 1.0 this should work:
contains(substring-after((//Record),'Crawford'), 'Crawford')
Heiko
> I have an XML file with approximately 8,000 records in it (see
XML at
> bottom of page). All contain at least one occurrence of the word
> 'Crawford', but a few hundred of these records contain more than one
> occurrence of the word 'Crawford'. I need to isolate those
records with
> more than one occurrence but everything I have tried fails. Can
someone
> help with this?
> Thanks,
> Mark
>
> <List>
> <Record>
> <Field>
> <Tag>110</Tag>
> <Data>Catholic Church.$bCongregatio Sacrorum
Rituum.</Data>
> </Field>
> <Field>
> <Tag>245</Tag>
> <Data>Officium S. Margaritae Scotorum Reginae
semiduplex. A
> Sac. Rit. Congreg.
> recognitum, & approbatum. De mandato D.N.
Innocentij
> Papae XI. in Breuiario Romano
> apponen$bEt ab omnibus vtriusque sexus
Christifidelibus,
> qui ad horas canonicas
> tenentur, ad libitum recitandum die octaua
Iulij.</Data>
> </Field>
> <Field>
> <Tag>260</Tag>
> <Data>Romae :$bEx Typographia R. Cam. Apost,$c1679.</Data>
> </Field>
> <Field>
> <Tag>300</Tag>
> <Data>[8] p. ;$c20 cm. (4to)</Data>
> </Field>
> <Field>
> <Tag>500</Tag>
> <Data>'Die 21. Ianuarij [21 January] 1679.'.</Data>
> </Field>
> <Field>
> <Tag>500</Tag>
> <Data>Signed by 'Caesar Card. Fachenettus', i.e. Cesare
> Facchinetti, Prefect of the
> Congregation.</Data>
> </Field>
> <Field>
> <Tag>500</Tag>
> <Data>Woodcut coat of arms of Innocent XI.</Data>
> </Field>
> <Field>
> <Tag>500</Tag>
> <Data>The text of the office is followed by the
Congregatio
> Sacrorum Rituum's
> decree of consent.</Data>
> </Field>
> <Field>
> <Tag>700</Tag>
> <Data>Facchinetti, Cesare,$d1608-1683.</Data>
> </Field>
> <Field>
> <Tag>852</Tag>
> <Data>Crawford.B.96(9)$nxxk</Data>
> </Field>
> </Record>
> </List>
>
>
>
XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe <-list/2754769>
(by email <>)
--~----------------------------------------------------------------
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
--~--