Need an Input on the below XPath requirement:
XML:
<component>
    <Bundle>
        <entry>
            <resource>
                <Condition>
                    <id value="123456"/>
                </Condition>
            </resource>
            <search>
                <mode value="match"/>
            </search>
        </entry>
        <entry>
            <resource>
                <Condition>
                    <id value="123456"/>
                </Condition>
            </resource>
            <search>
                <mode value="match"/>
            </search>
        </entry>
        <entry>
            <resource>
                <Condition>
                    <id value="654321"/>
                </Condition>
            </resource>
            <search>
                <mode value="include"/>
            </search>
        </entry>        
    </Bundle>   
</component>

XSLT:
<xsl:with-param name="entries" select="//Bundle/entry/resource/Condition[not(id/@value=following::Condition/id/@value)]"/>

Currently it is eliminating duplicate condition entries. Now need to enhance it to
consider <entry> with <mode value="match"/> and its respective conditions only.
tried with different approaches likes //Bundle/entry[<<expression>>]/resource/Condition[not(id/@value=following::Condition/id/@value)] and //Bundle/entry/resource/Condition[not(id/@value=following::Condition/id/@value) and ../../<<expression>>]
Not giving expected result. Any input will be helpful.
expected output:
<Condition>
    <id value="123456"/>
</Condition>

want only conditions which are not duplicates as well as matching <mode value="match"/> only.

Xpath: evaluate condition at parent node along with filtering duplicate entries
Consider the following example of Muenchian grouping:
XSLT 1.0
<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:strip-space elements="*"/>

<xsl:key name="k1" match="entry[search/mode/@value='match']" use="resource/Condition/id/@value" />

<xsl:template match="/component">
    <output>
        <xsl:copy-of select="Bundle/entry[search/mode/@value='match'][count(. | key('k1', resource/Condition/id/@value)[1]) = 1]/resource/Condition"/>
    </output>
</xsl:template>

</xsl:stylesheet>

Applied to your input example, this will return:
Result
<?xml version="1.0" encoding="UTF-8"?>
<output>
  <Condition>
    <id value="123456"/>
  </Condition>
</output>


In XSLT 2.0 or higher, you could reduce this to:
<xsl:stylesheet version="2.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>

<xsl:template match="/component">
    <output>
        <xsl:for-each select="distinct-values(Bundle/entry[search/mode/@value='match']/resource/Condition/id/@value)">
            <Condition>
                <id value="{.}"/>
            </Condition>
        </xsl:for-each> 
    </output>
</xsl:template>

</xsl:stylesheet>

