
March 25th, 2012, 10:13 AM
|
|
Registered User
|
|
Join Date: Mar 2012
Posts: 3
Time spent in forums: 35 m 40 sec
Reputation Power: 0
|
|
|
How do I split/divide a string in XSL?
This is my code and the only thing that is not working is that I am getting a time like this:
Code:
2012-03-24T15:00:00+00:00
Code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<table border="1">
<tr bgcolor="#9acd32">
<th>Event</th>
<th>Group</th>
<th>Time</th>
</tr>
<xsl:for-each select="Diary/Event">
<xsl:if test="@Classification = ''Some classification">
<tr>
<td><a href="http://www.example.com/somepage.php" target="_blank"><xsl:value-of select="@EventName"/></a></td>
<td><xsl:value-of select="@EventGroup"/></td>
<td><xsl:value-of select="@Time"/></td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Do you know what do I need to add in order to split the string of the time? Can you show an example please?
Thanks!
|