This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: compare two lists of values question


Try something like this.
<xsl:template match="name">
<xsl:if test="not(. = following::node()) and not(. =
preceding::node())" >
<xsl:value-of select="." />
</xsl:if>
</xsl:template>

This will display values that are unique.

--- "Friedlander, Hal" <Hal@solspark.com> wrote:
> I'm assuming this is kind of a novice level
> question.
> I need to compare two lists of values and display
> the value of any name
> element not in both lists.
> The xml is like this:
> <Merchants>
> <USMerchants>
> 	<name>store1</name>
> 	<name>store2</name>
> 	<name>store3</name>
> 	<name>store4</name>
> 	<name>store5</name>
> 	<name>store6</name>
> </USMerchants>
> <UKMerchant>
> 	<name>store1</name>
> 	<name>store2</name>
> 	<name>store3</name>
> 	<name>store4</name>
> 	<name>store5</name>
> 	<name>store99</name>
> </UKMerchant>
> </Merchants>
> 
> Using MSXML3 parser.
> 
> Thanks in advance,
> Hal Friedlander
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> 


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]