Jon Bosker
Usenet Archive
- Joined
- Sep 26, 2003
- Messages
- 6
- Reaction score
- 0
Hi
I am trying to get my timesheet report to look good but my date keeps repeating and I do not want it to. I cannot understand how to implement the Meuchian technique here though it seems to be along the right lines.
Can anyone help me? I struggle with this XML stuff
At the moment my output looks like:
8/08/2003 7:25 AM 7:31 AM
8/08/2003 7:32 AM 5:23 PM
But I want it to look like:
8/08/2003 7:25 AM 7:31 AM
7:32 AM 5:23 PM <-- no date on 2nd line becuase it is the same
My data looks something like this:
<?xml version="1.0" standalone="yes"?>
<NewDataSet>
<timeDataDetails>
<Date>8/08/2003</Date>
<StartTime>7:25 AM</StartTime>
<EndTime>7:31 AM</EndTime>
</timeDataDetails>
<timeDataDetails>
<Date>8/08/2003</Date>
<StartTime>7:32 AM</StartTime>
<EndTime>5:23 PM</EndTime>
</timeDataDetails>
</NewDataSet>
and my style sheet looks something like this (note: I am outputting to HTML table):
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html><body><table> <xsl:for-each select="/NewDataSet/timeDataDetails"> <tr> <td><xsl:value-of select="Date"/></td> <td><xsl:value-of select="StartTime"/></td> <td><xsl:value-of select="EndTime"/></td> </tr> </xsl:for-each> </table></body></html>
I am trying to get my timesheet report to look good but my date keeps repeating and I do not want it to. I cannot understand how to implement the Meuchian technique here though it seems to be along the right lines.
Can anyone help me? I struggle with this XML stuff
At the moment my output looks like:
8/08/2003 7:25 AM 7:31 AM
8/08/2003 7:32 AM 5:23 PM
But I want it to look like:
8/08/2003 7:25 AM 7:31 AM
7:32 AM 5:23 PM <-- no date on 2nd line becuase it is the same
My data looks something like this:
<?xml version="1.0" standalone="yes"?>
<NewDataSet>
<timeDataDetails>
<Date>8/08/2003</Date>
<StartTime>7:25 AM</StartTime>
<EndTime>7:31 AM</EndTime>
</timeDataDetails>
<timeDataDetails>
<Date>8/08/2003</Date>
<StartTime>7:32 AM</StartTime>
<EndTime>5:23 PM</EndTime>
</timeDataDetails>
</NewDataSet>
and my style sheet looks something like this (note: I am outputting to HTML table):
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html><body><table> <xsl:for-each select="/NewDataSet/timeDataDetails"> <tr> <td><xsl:value-of select="Date"/></td> <td><xsl:value-of select="StartTime"/></td> <td><xsl:value-of select="EndTime"/></td> </tr> </xsl:for-each> </table></body></html>