[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Do some elements contain strings from other elemen

Subject: RE: Do some elements contain strings from other elements?
From: "W Charlton" <XSLList@xxxxxxxxxx>
Date: Thu, 27 Jan 2011 15:33:56 -0000
RE:  Do some elements contain strings from other elemen
Andrew,

That was quick!

Yes, exactly that. I couldn't have put it better myself


William Charlton
The yMonda team
yMonda Limited
w: www.ymonda.net

-----Original Message-----
From: Andrew Welch [mailto:andrew.j.welch@xxxxxxxxx]
Sent: 27 January 2011 15:20
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Do some elements contain strings from other elements?

On 27 January 2011 15:12, W Charlton <XSLList@xxxxxxxxxx> wrote:
>
> I have what appears a simple compare() problem.
>
> I have the following XML.
> <XML>
>            <SplitNameList>
>                        <SplitName>
>                                    <GivenName>ANDREW</GivenName>
>                                    <FamilyName>SMITH</FamilyName>
>                        </SplitName>
>                        <SplitName>
>                                    <GivenName>DONALD</GivenName>
>                                    <FamilyName>DUCK</FamilyName>
>                        </SplitName>
>            </SplitNameList>
>            <FulNameList>
>                        <FullName>DAVID JONES</FullName>
>                        <FullName>ANDREW J SMITH</FullName>
>                        <FullName>JOHN SMITH</FullName>
>            </FulNameList>
> </XML>
>
> I need to know if any of the Family Names match in the two lists. Either
of these two lists could be quite long and this is in the middle of a load
of logic. All I need here is a True/False. It doesnt have to be an exact
match just as long as it matches the FamilyName.
>
> Sadly I am restricted to XSL 1

It's not clear what you are asking - are you saying return true if any
of the <FamilyName>s are contained in the <FullName>s ?  So in the
above, because SMITH is in at least one of the <FullName>s, then it
should return true.



--
Andrew Welch
http://andrewjwelch.com

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.