123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- <?xml version="1.0" encoding="utf-8" ?>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
- <xsl:template match="/">
- <html>
- <head>
- <title>日志查询列表</title>
- <style>
- body,BlueIdea,team,blue_ID,blue_name,blue_text,blue_time,blue_class{ font: 12px "宋体", "Arial", "Times New Roman"; }
- table { font-size: 12px; border: 0px double; border-color: #99CC99 #99CC99 #CCCCCC #CCCCCC; cellpadding:3;cellspacing:3; bgcolor:#eeeeee; text-decoration: blink}
- span { font-size: 12px; color: red; }
- .keybutton { cursor:hand; font-size: 12px; color: #003300; background: #ffffff; border: 0px solid;}
- </style>
- <script>
- <xsl:comment>
- <![CDATA[
- var OnePageNum=50;
- var PageNum=1;
- var XMLPageNum=1;
- function pages(Num)
- {
- stylesheet=document.XSLDocument;
- source=document.XMLDocument;
- nodes=source.documentElement.childNodes;
- len=nodes.length;
- for(i=1;i<=(len/OnePageNum);i++);
- XMLPageNum=i;
- var firstNum=0;
- var lastNume=0;
- if (Num=="first") {PageNum=1;}
- if (Num=="previous") {if (PageNum>1) PageNum -=1;}
- if (Num=="next") {if (PageNum<XMLPageNum) PageNum +=1;}
- if (Num=="last") {PageNum =XMLPageNum;}
- sortField=document.XSLDocument.selectSingleNode("//@expr");
- firstNum=OnePageNum*(PageNum-1)+1;
- lastNum=OnePageNum*(PageNum-1)+OnePageNum;
- text="childnumber(this)>="+firstNum+" & childnumber(this)<="+lastNum;
- sortField.value=text;
- Layer1.innerHTML=source.documentElement.transformNode(stylesheet);
- }
- ]]>
- </xsl:comment>
- </script>
- </head>
- <body>
- <table align="center" width="740" >
- <tr>
- <td>
- <button id="cmdfirstPage" class="keybutton" onclick="pages('first');" >首页</button>
- <button id="cmdpreviousPage" class="keybutton" onclick="pages('previous');" >上一页</button>
- <button id="cmdnextPage" class="keybutton" onclick="pages('next');">下一页</button>
- <button id="cmdlastPage" class="keybutton" onclick="pages('last');">尾页</button>
- </td>
- </tr>
- </table>
- <div id="Layer1" name="Layer1"> <xsl:apply-templates select="data" /></div>
- </body>
- </html>
- </xsl:template>
- <xsl:template match="data">
- <table width="740" border="0" align="center" cellpadding="1" cellspacing="1" bordercolordark="#ffffff" bordercolorlight="#ADAAAD">
- <tr bgcolor="#FFCC99" align="center">
- <td height="20"><strong>变量名称</strong></td>
- <td><strong>值</strong></td>
- <td><strong>发生时间</strong></td>
- <td><strong>报警内容</strong></td>
- </tr>
- <xsl:apply-templates select="subdata" order-by="varname"/>
- </table>
- </xsl:template>
- <xsl:template match="subdata">
- <xsl:if expr="childnumber(this)>=1 & childnumber(this)<=50 ">
- <tr align="center">
- <xsl:apply-templates select="varname" />
- <xsl:apply-templates select="value" />
- <xsl:apply-templates select="happentime" />
- <xsl:apply-templates select="warncontent" />
- </tr>
- </xsl:if>
- </xsl:template>
- <xsl:template match="varname">
- <td bgcolor="#eeeeee" height="16">
- <xsl:value-of />
- </td>
- </xsl:template>
- <xsl:template match="value">
- <td bgcolor="#f3f3f3">
- <xsl:value-of />
- </td>
- </xsl:template>
- <xsl:template match="happentime">
- <td bgcolor="#efefef">
- <xsl:value-of />
- </td>
- </xsl:template>
- <xsl:template match="warncontent">
- <td bgcolor="#f3f3f3" align="left" style="padding-left:20px;">
- <xsl:value-of />
- </td>
- </xsl:template>
- </xsl:stylesheet>
|