471,610 Members | 1,376 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,610 software developers and data experts.

Trying to Group Data

I am trying to group data. I have a daily record that contains multiple projects and
multiple items in the project. I would like to roll the daily data into project 1 and all
the items that go with it and then project 2 and all the items that go with it. I have
a start but am unsure of where to go. I am attaching the files that I have.

Any help would be appreciated.

Thanks,
Dave

====================

<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="StatusReportProject.xsl" ?>

<TimeSheet>
<DailyTime Date="05/01/2005">
<WorkHours>
<Time Period="Day" Start="8:00 am" End="5:00 pm" />
<Time Period="Lunch" Start="12:00 pm" End="1:00 pm" />
<Time Period="AfterHours" Start="9:00 pm" End="11:00 pm" />
</WorkHours>
<Project Name="Project 1">
<Task Name="Task 1.1">
<WorkItemList Item="Task 1.1 - Item 1" />
<WorkItemList Item="Task 1.1 - Item 2" />
</Task>
<Task Name="Task 1.2">
<WorkItemList Item="Task 1.2 - Item 1" />
<WorkItemList Item="Task 1.2 - Item 2" />
</Task>
</Project>
<Project Name="Project 2">
<Task Name="Task 2.1">
<WorkItemList Item="Task 2.1 - Item 1" />
<WorkItemList Item="Task 2.1 - Item 2" />
</Task>
<Task Name="Task 2.2">
<WorkItemList Item="Task 2.2 - Item 1" />
<WorkItemList Item="Task 2.2 - Item 2" />
</Task>
</Project>
</DailyTime>

<DailyTime Date="05/02/2005">
<WorkHours>
<Time Period="Day" Start="7:00 am" End="4:00 pm" />
<Time Period="Lunch" Start="11:00 pm" End="12:00 pm" />
<Time Period="AfterHours" Start="9:00 pm" End="11:00 pm" />
</WorkHours>
<Project Name="Project 3">
<Task Name="Task 3.1">
<WorkItemList Item="Task 3.1 - Item 1" />
<WorkItemList Item="Task 3.1 - Item 2" />
</Task>
<Task Name="Task 3.2">
<WorkItemList Item="Task 3.2 - Item 1" />
<WorkItemList Item="Task 3.2 - Item 2" />
</Task>
</Project>
<Project Name="Project 1">
<Task Name="Task 1.1">
<WorkItemList Item="Task 1.1 - Item 1" />
<WorkItemList Item="Task 1.1 - Item 2" />
</Task>
<Task Name="Task 1.3">
<WorkItemList Item="Task 1.3 - Item 1" />
<WorkItemList Item="Task 1.3 - Item 2" />
</Task>
</Project>
</DailyTime>
</TimeSheet>

================================================== =

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/TimeSheet">
<HTML>
<HEAD>
<TITLE>Project Status Report</TITLE>
</HEAD>
<BODY>
<xsl:for-each select="DailyTime/Project">
<xsl:value-of select="@Name"/><br></br>
<xsl:call-template name="callTask"/>
<hr></hr>
</xsl:for-each>
</BODY>
</HTML>
</xsl:template>

<xsl:template name="callTask">
<xsl:for-each select="Task">
<OL>
<xsl:value-of select="@Name"/>
<xsl:call-template name="callWorkItemList"/>
</OL>
</xsl:for-each>
</xsl:template>

<xsl:template name="callWorkItemList">
<xsl:for-each select="WorkItemList">
<OL>
<xsl:value-of select="@Item"/>
</OL>
</xsl:for-each>
</xsl:template>

</xsl:stylesheet>

========================================
Nov 12 '05 #1
0 1076

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Denis St-Michel | last post: by
1 post views Thread by David Horowitz | last post: by
6 posts views Thread by syvman | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by MichaelMortimer | last post: by
reply views Thread by CCCYYYY | last post: by
1 post views Thread by ZEDKYRIE | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.