Remark : xsl:for-each 안에 if 조건 추가
예제1
1 2 3 4 5 6 7 8 9 10 11 12 |
<xsl:for-each select="*[local-name()='TaxInfo']"> <xsl:if test="@Category='YR'"> <xsl:value-of select="@Category"/> </xsl:if> </xsl:for-each> #Simple <xsl:for-each select="*[local-name()='TaxInfo'][@Category='YR']"> <xsl:value-of select="@Category"/> </xsl:for-each> |
예제 2
1 2 3 4 5 6 7 8 9 10 |
<xsl:for-each select="./*[local-name()='FlightDetailsRef']"> <xsl:variable name="FDKey"> <xsl:value-of select="@Key" /> </xsl:variable> <xsl:for-each select="//*[local-name()='FlightDetails'][@Key=$FDKey]"> Detail </xsl:for-each> </xsl:for-each> |