Reputation: 2134
Like if
<email>[email protected]</email>
how can I get xsl to just give me smith.com?
Upvotes: 1
Views: 69
Reputation: 66781
Use the function substring-after()
The substring-after function returns the substring of the first argument string that follows the first occurrence of the second argument string in the first argument string, or the empty string if the first argument string does not contain the second argument string. For example, substring-after("1999/04/01","/") returns 04/01, and substring-after("1999/04/01","19") returns 99/04/01.
<xsl:template match="email">
<xsl:value-of select="substring-after(., '@')"/>
</xsl:template>
Upvotes: 1