Advertisement
Guest User

Untitled

a guest
Dec 4th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. <xsl:template match="your-html-element">
  2. <div class="color-every-other">
  3. <xsl:variable name="content" select="path-to-content"/>
  4. <xsl:for-each select="tokenize($content, ' ')">
  5. <xsl:choose>
  6. <xsl:when test="position() mod 2 != 0">
  7. <span><xsl:value-of select="concat(., ' ')"/></span>
  8. </xsl:when>
  9. <xsl:otherwise>
  10. <xsl:value-of select="concat(., ' ')"/>
  11. </xsl:otherwise>
  12. </xsl:choose>
  13. </xsl:for-each>
  14. </div>
  15. </xsl:template>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement