Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <xsl:template match="your-html-element">
- <div class="color-every-other">
- <xsl:variable name="content" select="path-to-content"/>
- <xsl:for-each select="tokenize($content, ' ')">
- <xsl:choose>
- <xsl:when test="position() mod 2 != 0">
- <span><xsl:value-of select="concat(., ' ')"/></span>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat(., ' ')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </div>
- </xsl:template>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement