I need to remove the plan options for the same multiple value occurrence
test.xml
<p base="OptionDesc"></p>
Input XML value having:
<PlanMaps>
<PlanMap>
<PlanCode>10049</PlanCode>
<Strategy>F</Strategy>
<OptionDesc>Option 2424809</OptionDesc>
</PlanMap>
<PlanMap>
<PlanCode>10049</PlanCode>
<Strategy>F</Strategy>
<OptionDesc>Option 2424796</OptionDesc>
</PlanMap>
<PlanMap>
<PlanCode>10049</PlanCode>
<Strategy>F</Strategy>
<OptionDesc>Option 2414596</OptionDesc>
</PlanMap>
<PlanMap>
<PlanCode>30019</PlanCode>
<Strategy>V</Strategy>
<OptionDesc>Option 2414600</OptionDesc>
</PlanMap>
</PlanMaps>
XSL I have tried:
<xsl:template match="PlanMaps">
<xsl:apply-templates select="document('../../../../test.xml')"/>
</xsl:template>
<xsl:template match="p[@base='OptionDesc'][parent::entry/@outputclass='plans']">
<p base="OptionDesc">
<xsl:text>(</xsl:text>
<xsl:value-of select="PlanMaps/PlanMap/OptionDesc"/>
<xsl:text>)</xsl:text>
</p>
</xsl:template>
Expectation of result when the Strategy
value is "F" and when PlanCode
value (10049) is same for multiple occurrence(two or more), then result should be empty like below
<p base="OptionDesc"></p>
<p base="OptionDesc">(Option 2414600)</p>
Here I need the XSL without mentioning the value of plancode in XSL.
question from:
https://stackoverflow.com/questions/65937765/need-to-remove-the-plan-value-for-multiple-condition 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…