⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fancy-hist.xsl

📁 JSP页面代码排错
💻 XSL
📖 第 1 页 / 共 4 页
字号:
<?xml version="1.0" encoding="UTF-8" ?>
<!--
  Copyright (C) 2005, 2006 Etienne Giraudy, InStranet Inc
  Copyright (C) 2005, 2007 Etienne Giraudy

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-->

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
   <xsl:output
         method="xml" indent="yes"
         doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
         doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
         encoding="UTF-8"/>

   <xsl:variable name="apos" select="&quot;'&quot;"/>
   <xsl:key name="lbc-code-key"        match="/BugCollection/BugInstance" use="concat(@category,@abbrev)" />
   <xsl:key name="lbc-bug-key"         match="/BugCollection/BugInstance" use="concat(@category,@abbrev,@type)" />
   <xsl:key name="lbp-class-b-t"  match="/BugCollection/BugInstance" use="concat(Class/@classname,@type)" />

<xsl:template match="/" >

<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
      <title>
         FindBugs (<xsl:value-of select="/BugCollection/@version" />) 
         Analysis for 
         <xsl:choose>
            <xsl:when test='string-length(/BugCollection/Project/@projectName)>0'><xsl:value-of select="/BugCollection/Project/@projectName" /></xsl:when>
            <xsl:otherwise><xsl:value-of select="/BugCollection/Project/@filename" /></xsl:otherwise>
         </xsl:choose>
      </title>
      <style type="text/css">
         html, body, div, form {
            margin:0px;
            padding:0px;
         }
         body {
            padding:3px;
         }
         a, a:link , a:active, a:visited, a:hover {
            text-decoration: none; color: black;
         }
         #navlist {
                 padding: 3px 0;
                 margin-left: 0;
                 border-bottom: 1px solid #778;
                 font: bold 12px Verdana, sans-serif;
         }
         #navlist li {
                 list-style: none;
                 margin: 0;
                 display: inline;
         }
         #navlist li a {
                 padding: 3px 0.5em;
                 margin-left: 3px;
                 border: 1px solid #778;
                 border-bottom: none;
                 background: #DDE;
                 text-decoration: none;
         }
         #navlist li a:link { color: #448; }
         #navlist li a:visited { color: #667; }
         #navlist li a:hover {
                 color: #000;
                 background: #AAE;
                 border-color: #227;
         }
         #navlist li a.current {
                 background: white;
                 border-bottom: 1px solid white;
         }
         #filterWrapper {
            margin-bottom:5px;
         }
         #displayWrapper {
            margin-top:5px;
         }
         .message {
            background:#BBBBBB;
           border: 1px solid #778;
         }
         .displayContainer {
            border:1px solid #555555;
            margin-top:3px;
            padding: 3px;
            display:none;
         }
         #summaryContainer table,
         #historyContainer table {
            border:1px solid black;
         }
         #summaryContainer th,
         #historyContainer th {
            background: #aaaaaa;
            color: white;
         }
         #summaryContainer th, #summaryContainer td,
         #historyContainer th, #historyContainer td {
            padding: 2px 4px 2px 4px;
         }
         .summary-name {
            background: #eeeeee;
            text-align:left;
         }
         .summary-size {
            background: #eeeeee;
            text-align:center;
         }
         .summary-priority-all {
            background: #dddddd;
            text-align:center;
         }
         .summary-priority-1 {
            background: red;
            text-align:center;
         }
         .summary-priority-2 {
            background: orange;
            text-align:center;
         }
         .summary-priority-3 {
            background: green;
            text-align:center;
         }
         .summary-priority-4 {
            background: blue;
            text-align:center;
         }

         .bugList-level1 {
            margin-bottom:5px;
         }
         .bugList-level1, .bugList-level2, .bugList-level3, .bugList-level4 {
            background-color: #ffffff;
            margin-left:15px;
            padding-left:10px;
         }
         .bugList-level1-label, .bugList-level2-label, .bugList-level3-label, .bugList-level4-label {
            background-color: #bbbbbb;
            border: 1px solid black;
            padding: 1px 3px 1px 3px;;
         }
         .bugList-level2-label, .bugList-level3-label, .bugList-level4-label {
            border-width: 0px 1px 1px 1px;
         }
         .bugList-level4-label {
            background-color: #ffffff;
            border: 0px 0px 1px 0px;
         }
         .bugList-level4 {
            border: 0px 1px 1px 1px;
         }

         .bugList-level4-inner {
            border-style: solid;
            border-color: black;
            border-width: 0px 1px 1px 1px;
         }
         .b-r {
            font-size: 10pt; font-weight: bold; padding: 0 0 0 60px;
         }
         .b-d {
            font-weight: normal; background: #ccccc0;
            padding: 0 5px 0 5px; margin: 0px;
         }
         .b-1 {
            background: red; height: 0.5em; width: 1em;
            margin-right: 0.5em;
         }
         .b-2 {
            background: orange; height: 0.5em; width: 1em;
            margin-right: 0.5em;
         }
         .b-3 {
            background: green; height: 0.5em; width: 1em;
            margin-right: 0.5em;
         }
         .b-4 {
            background: blue; height: 0.5em; width: 1em;
            margin-right: 0.5em;
         }

      </style>
      <script type='text/javascript'><xsl:text disable-output-escaping='yes'><![CDATA[
         var menus            = new Array('summary','info','history','listByCategories','listByPackages');
         var selectedMenuId   = "summary";
         var selectedVersion  = -1;
         var selectedPriority = 4;
         var lastVersion      = 0;
         var includeFixedIntroducedBugs;

         var bPackageNamesPopulated = false;

         var filterContainerId              = "filterWrapper";
         var historyControlContainerId      = "historyControlWrapper";
         var messageContainerId             = "messageContainer";
         var summaryContainerId             = "summaryContainer";
         var infoContainerId                = "infoContainer";
         var historyContainerId             = "historyContainer";
         var listByCategoriesContainerId    = "listByCategoriesContainer";
         var listByPackagesContainerId      = "listByPackagesContainer";

         var idxCatKey = 0; var idxCatDescr = 1; var idxBugCat = 1;
         var idxCodeKey = 0; var idxCodeDescr = 1; var idxBugCode = 2;
         var idxPatternKey = 2; var idxPatternDescr = 3; var idxBugPattern = 3;
         var idxBugKey = 0; var idxBugDescr = 6;
         var idxBugClass = 6, idxBugPackage = 7;

         // main init function
         function init() {
            loadFilter();
            selectMenu(selectedMenuId);
            lastVersion = versions.length - 1;
         }

         // menu callback function
         function selectMenu(menuId) {
            document.getElementById(selectedMenuId).className="none";
            document.getElementById(menuId).className="current";
            if (menuId!=selectedMenuId) {
               hideMenu(selectedMenuId);
               selectedMenuId = menuId;
            }
            if (menuId=="summary")           displaySummary();
            if (menuId=="info")              displayInfo();
            if (menuId=="history")           displayHistory();
            if (menuId=="listByCategories")  displayListByCategories();
            if (menuId=="listByPackages")    displayListByPackages();
         }

         // display filter
         function loadFilter() {
            var versionsBox = document.findbugsForm.versions.options;
            versionsBox[0] = new Option(" -- All Versions -- ","-1");
            versionsBox.selectedIndex = 0;
            if (versions.length>=1) {
               for (x=0; versions.length>1 && x<versions.length; x++) {
                  versionsBox[x+1] = new Option(" Bugs at release: "+versions[versions.length-x-1][1], versions[versions.length-x-1][0]);
               }
            }

            var prioritiesBox = document.findbugsForm.priorities.options;
            prioritiesBox[0] = new Option(" -- All priorities -- ", "4");
            prioritiesBox[1] = new Option(" P1 bugs ", "1");
            prioritiesBox[2] = new Option(" P1 and P2 bugs ", "2");
            prioritiesBox[3] = new Option(" P1, P2 and P3 bugs ", "3");
         }

         // display a message
         function displayMessage(msg) {
            var container = document.getElementById(messageContainerId);
            container.innerHTML = "<div class='message'>"+msg+"</div>";
         }

         // reset displayed message
         function resetMessage() {
            var container = document.getElementById(messageContainerId);
            container.innerHTML = "";
         }

         function hideMenu(menuId) {
            var container = menuId+"Container";
            document.getElementById(container).style.display="none";
         }

         // filter callback function
         function filter() {
            var versionsBox = document.findbugsForm.versions.options;
            selectedVersion = versionsBox[versionsBox.selectedIndex].value;

            var prioritiesBox = document.findbugsForm.priorities.options;
            selectedPriority = prioritiesBox[prioritiesBox.selectedIndex].value;

            selectMenu(selectedMenuId);
         }

         // includeFixedBugs callback function
         function includeFixedIntroducedBugsInHistory() {
            includeFixedIntroducedBugs =
              document.findbugsHistoryControlForm.includeFixedIntroducedBugs.checked;

            selectMenu(selectedMenuId);
         }

         // display summary tab

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -