Statistics with Domino6.5, XML + XSL + JavaScript to achieve tasks

xiaoxiao2021-03-06  175

1. The first is the XML document (experimental data, will automatically generate XML files through the agent)

Statics.xml? OpenPage

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

xyn XXXXXXXXXXXXXXXXXXXXX how to make statics USING XML 2004-08-01 2004-08-08 going well ... 20 Jzokay, ZZQ DDDDDDD chenjun 444444444444444 SBB, OA SBB, OA 2004-08-01 2004-08-08 DONE 2 WW Well Done !!!

Administrator 4444444444455555555 test pertask4sbb.nsf on r6.5 it dons't support chinese very well, be careful! < / Content> 2004-08-01 2004-08-08 doing 10 jzokay Be Careful wangqiang 4444444444555555555 test pertask4sbb.nsf on r6.5 IT Dons't Support Chinese Very Well, Be Careful! 2004-08-01 2004-08-08 doing < Hours> 10 JZOKAY Be Careful xyn 111111111111 The Web of Our Company as so as possibal 2004-08-01 2004-08-25 on the Way 10 XIGONG sooner, better

Xyn 3333333333 do search in r6.5, get ready for other program do search in r6.5 2004-08-01 2004-08-08 doing 30 jzokay < PJ> sooner, better wangqiang 1111111111 xxxxxxx ccccccccccc 2004-08-01 2004-08-08 DONE 12 jzokay Okokokokokokokok

wangyang 1223344556788 VVVVVVVVVVVVV MMMMMMMMMMMMMMMMMMMMMMMMMMMMMM 2004-08-01 2004-08-08 DONE 20 ww good !!

wangyang 44444444444555766666666 tttttttttttttt zzzzzzzzzzzzzzzz 2004-08-01 2004-08-08 DONE 7 zzq Okokokokokokok xyn 585858585858585 UUUUUUUUUUUUUUUUUUUUUUUU SSSSSSSSSSSSSSSSSSSSSSSSSS 2004-08-01 2004-08-08 on its Way 10 jzokay okkokokokokokko

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

2, Style2.xsl? OpenPage

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

username
Title FileID Content END AT Hours pingjia < TD> < TD> <

TD> < / XSL: Stylesheet>

========================================= 3, form: My task | MyTask

Domain: Thisuser, AUSER (specified one user), Time1 (start time of the query), Time2 (the end time of the query)

Jsheader:

VAR XML = New ActiveXObject ("Microsoft.xmLDom"); XML.Assync = false; XML.Load ("statics.xml? openpage);

// Spectacle Function WriteHeader () {var htm = "

"htm = HTM " "HTMLBODY = HTMLBODY "
Current User "HTM = HTM " Task Title "HTM = HTM " Document Number " HTM = HTM " Task content " HTM = HTM " Start time " htm = htm " End Time "HTM = HTM " Current Status "HTM = HTM " Workload "HTM = HTM " Person in charge "Htm = htm " evaluation "Return HTM}

// No matter what, all task record function loadall () {

VAR XSL = New ActiveXObject ("Microsoft.xmLDom"); xsl.async = false; xsl.load ("style2.xsl"); var Soruce = Xml.TransformNode (XSL) Var obj = document.getlementByid ("D1") Obj.innerhtml = Soruce}

/ / Over the current user's task record function loadbyuser () {var obj = document.getlementByid ("thisuser") VAR items = Xml.selectnodes ("// tasks / task [username = ' obj.value " "" ); Var i var total = 0 var htmlbody = "" f (iTems.Length! = 0) {for (i = 0; i "htmlbody = HTMLBody "

" items.Item (i) .childNodes.Item (0) .NodeTypedValue "HTMLBODY = HTMLBODY " items.Item (i) .childnodes.Item 1) .NodeTypedValue "" HTMLBODY = HTMLBODY "" items.Item (i) .childnodes.Item (2) .NodeTypedValue "HTMLBODY = HTMLBODY " Items.Item (i) .childnodes.Item (3) .NodeTypedValue " "HTMLBODY = HTMLBODY " " items.Item (i) .childnodes.Item (4) .NodeTypedValue "" HTMLBODY = HTMLBODY "" Items.Item (i) .childNodes.Item (5) .NodeTypedValue "" HTMLBODY = HTMLBODY Items .item (i) .childnodes.Item (6) .NodeTypedValue "" HTMLBODY = HTMLBODY "" items.Item (i) .childNodes.Item (7) .NodeTypedValue " HTMLBODY = HTMLBODY "" Items.Indes.IldNodes.Idnod (8) .NodeTypedValue "" HTMLBODY = HTMLBODY " items.Item (i) .childnodes .item (9) .NodeTypedValue "HTMLBODY =

HTMLBODY "Total = Total PARSEINT (Items.Item (i) .childNodes.Item (7) .NodeTypedValue)} {document.getyle! =") {document.getElementByid ("D1"). InnerHTML = WriteHeader () HTMLBODY ";} else {document.write (" Did not find a record that meets the specified condition! ")} //document.write (HTMLBODY); //Document.write (" < / Table> ") // Alert (Total)} else {document.write (" Did not find a record of the specified condition! ")}} // According to the username, the start time, check the task record within a time And statistical workload

Function LoadByuser_1 (username, time1, time2) {// Time1 = Time1.Replace ("-", ""). Replace ("-", ") // Time2 = Time2.Replace (" - "," ") .replace ("-", ") var obj = document.getlementByid (" auser ") // alert (Time2) var items = Xml.selectNodes (" // Tasks / Task [username = '" Obj.Value " '] "); // var items = Xml.selectnodes (" // Tasks / Task [username =' " Obj.value " 'and endtime> " Time1 " and endtime <" TIME2 "] "); Var I var total = 0 var htmlbody = "" = {for (i = 0; i Time1 && items.Item (i) .childnodes.Item (5) .NodeTypedValue = Time1 && items.Item i) .childNodes.Item (5) .NodeTypedValue <= TIME2) {// alert ("ok") //} htmlbody = htmlbody

" items.Item i) .childNodes.Item (0) .NodeTypedValue "" HTMLBODY = HTMLBODY "" items.Item (i) .childnodes.Item (1) .NodeTypedValue "" HTMLBODY = HTMLBODY "" items.ite M (i) .childNodes.Item (2) .NodeTypedValue "" HTMLBODY = HTMLBODY "" items.Item (i) .childnodes.Item (3) .NodeTypedValue "Htmlbody = HTMLBODY " " items.item (i) .childnodes.Item (4) .NodeTypedValue

转载请注明原文地址:https://www.9cbs.com/read-128349.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.059, SQL: 9