I need to extract value for each AvamarGrid on the basis of Day.
<AvamarGridTime Day="Monday">
<AvamarGrid>frk-opavautl921</AvamarGrid>
</AvamarGridTime>
<AvamarGridTime Day="Tuesday">
<AvamarGrid>ftc-opavautl961</AvamarGrid>
<AvamarGrid>ftc-opavbutl921</AvamarGrid>
<AvamarGrid>ptc-opavautl981</AvamarGrid>
</AvamarGridTime>
<AvamarGridTime Day="Wednesday">
<AvamarGrid>lhr-opavautl941</AvamarGrid>
</AvamarGridTime>
a
<AvamarGridTime Day="Thursday">
<AvamarGrid>sf1-its-bku-t01</AvamarGrid>
<AvamarGrid>sf1-opavautl901</AvamarGrid>
</AvamarGridTime>
<AvamarGridTime Day="Friday">
<AvamarGrid>par-opavautl921</AvamarGrid>
</AvamarGridTime>
</AvamarGrids>
I am using below XSLT
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output indent="no" />
<xsl:template match="/">
<Day>
<xsl:for-each select="//AvamarGridTime">
<xsl:if test="//AvamarGridTime[@Day="Monday"]">
<xsl:value-of select="AvamarGrid" disable-output-escaping="no" />
</xsl:if>
</xsl:for-each>
</Day>
</xsl:template>
</xsl:stylesheet>
But, getting below output, instead of just : frk-opavautl921
<?xml version="1.0" encoding="UTF-8"?><Day>frk-opavautl921ftc-opavautl961lhr-opavautl941sf1-its-bku-t01par-opavautl921</Day>