Sum of the time base by date

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • saran3b2
    New Member
    • Aug 2007
    • 19

    Sum of the time base by date

    Hi all,

    Please suggest us.

    My xml file is

    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="Y:\02-Thomson\Users\A PT\xsl\vinoth-new.xsl"?>
    <report>
    <production>
    <dept></dept>
    <etype>Break</etype>
    <user>thiyagu </user>
    <date>2/5/2008</date>
    <book>Traning </book>
    <file>Programmi ng</file>
    <status>WIP</status>
    <task>RND</task>
    <starttime>11:2 4:23 PM</starttime>
    <endtime>11:46: 21 PM</endtime>
    <totaltime> 22</totaltime>
    <updateto/>
    <comment>Tea Break</comment>
    </production>
    <production>
    <etype>job</etype>
    <user>thiyagu </user>
    <date>2/5/2008</date>
    <book>Traning </book>
    <file>Programmi ng</file>
    <status>WIP</status>
    <task>RND</task>
    <starttime>11:2 4:23 PM</starttime>
    <endtime>11:46: 21 PM</endtime>
    <totaltime> 22</totaltime>
    <updateto/>
    <comment>XML QC</comment>
    </production>
    <production>
    <etype>Break</etype>
    <user>thiyagu </user>
    <date>3/5/2008</date>
    <book>Traning </book>
    <file>Programmi ng</file>
    <status>WIP</status>
    <task>RND</task>
    <starttime>11:2 4:23 PM</starttime>
    <endtime>11:46: 21 PM</endtime>
    <totaltime> 22</totaltime>
    <updateto/>
    <comment>Tea Break</comment>
    </production>
    <production>
    <etype>Job</etype>
    <user>thiyagu </user>
    <date>3/5/2008</date>
    <book>Traning </book>
    <file>Programmi ng</file>
    <status>WIP</status>
    <task>RND</task>
    <starttime>11:2 4:23 PM</starttime>
    <endtime>11:46: 21 PM</endtime>
    <totaltime> 22</totaltime>
    <updateto/>
    <comment>XMl QC</comment>
    </production>
    </report>


    I want the sum of the total time of the user based by date.


    Advance thanks for ur help
  • saran3b2
    New Member
    • Aug 2007
    • 19

    #2
    Hi,

    I got the result for this. Please ignore it.

    Any way solution is

    <xsl:value-of select="sum($re port[date=$date][user=$user]/totaltime)"/>


    QUOTE=saran3b2]Hi all,

    Please suggest us.

    My xml file is

    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="Y:\02-Thomson\Users\A PT\xsl\vinoth-new.xsl"?>
    <report>
    <production>
    <dept></dept>
    <etype>Break</etype>
    <user>thiyagu </user>
    <date>2/5/2008</date>
    <book>Traning </book>
    <file>Programmi ng</file>
    <status>WIP</status>
    <task>RND</task>
    <starttime>11:2 4:23 PM</starttime>
    <endtime>11:46: 21 PM</endtime>
    <totaltime> 22</totaltime>
    <updateto/>
    <comment>Tea Break</comment>
    </production>
    <production>
    <etype>job</etype>
    <user>thiyagu </user>
    <date>2/5/2008</date>
    <book>Traning </book>
    <file>Programmi ng</file>
    <status>WIP</status>
    <task>RND</task>
    <starttime>11:2 4:23 PM</starttime>
    <endtime>11:46: 21 PM</endtime>
    <totaltime> 22</totaltime>
    <updateto/>
    <comment>XML QC</comment>
    </production>
    <production>
    <etype>Break</etype>
    <user>thiyagu </user>
    <date>3/5/2008</date>
    <book>Traning </book>
    <file>Programmi ng</file>
    <status>WIP</status>
    <task>RND</task>
    <starttime>11:2 4:23 PM</starttime>
    <endtime>11:46: 21 PM</endtime>
    <totaltime> 22</totaltime>
    <updateto/>
    <comment>Tea Break</comment>
    </production>
    <production>
    <etype>Job</etype>
    <user>thiyagu </user>
    <date>3/5/2008</date>
    <book>Traning </book>
    <file>Programmi ng</file>
    <status>WIP</status>
    <task>RND</task>
    <starttime>11:2 4:23 PM</starttime>
    <endtime>11:46: 21 PM</endtime>
    <totaltime> 22</totaltime>
    <updateto/>
    <comment>XMl QC</comment>
    </production>
    </report>


    I want the sum of the total time of the user based by date.


    Advance thanks for ur help[/QUOTE]

    Comment

    Working...