Subject: Re: [xsl] Question about isolating records From: "Mark Wilson pubs@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 2 Sep 2015 16:25:12 -0000 |
Thanks everyone for the answers -- I can try both versions. Mark On 9/2/2015 8:07 AM, Alan Painter alan.painter@xxxxxxxxx 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@xxxxxxxxxxxxxxxx > <mailto:kontakt@xxxxxxxxxxxxxxxx> > <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx > <mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>> 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 <>)
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Question about isolating , Alan Painter alan.pa | Thread | Re: [xsl] Question about isolating , Wolfgang Laun wolfga |
[xsl] XSL-List Guidelines, B Tommie Usdin btusd | Date | Re: [xsl] Question about isolating , Wolfgang Laun wolfga |
Month |