No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
3 Posted Topics
Re: Try with xsl:choose. <xsl:template match="data"> <xsl:for-each select="tr"> <xsl:choose> <xsl:when test="position()=1"> <xsl:copy-of select="."/> </xsl:when> <xsl:when test="td[11] = preceding-sibling::tr/td[11] "> <xsl:copy-of select="."/> </xsl:when> <xsl:otherwise> <a>It is not matching</a> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:template> Regards, Balaji. M | |
Re: Use for-each to select all the nodes. <xsl:template match="/"> <xsl:for-each select="//CREDIT_CARD/CARD_NBR"> <xsl:value-of select="substring(., string-length(.) - 3)"/> </xsl:for-each> </xsl:template> | |
Re: If you are using XSLT 1.0, use recursive method to solve this. And example stylesheet is below. <xsl:template match="a"> <xsl:copy-of select="QTY"/> <xsl:call-template name="test"> <xsl:with-param name="s" select="QTY//QTY0101-QuantityQualifier"/> </xsl:call-template> </xsl:template> <xsl:template name="test"> <xsl:param name="s"/> <xsl:choose> <xsl:when test="$s > 1"> <xsl:copy-of select="//GIR"/> <xsl:call-template name="test"> <xsl:with-param name="s" select="$s - 1"></xsl:with-param> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:copy-of … |
The End.