%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : www.kowitt.ac.th  /  Your IP : 216.73.216.118
Web Server : Microsoft-IIS/7.5
System : Windows NT SERVER02 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586
User : IUSR ( 0)
PHP Version : 5.6.31
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Windows/security/msscw/TransformFiles/view/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /Windows/security/msscw/TransformFiles/view/SCWKB.xsl
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
    xmlns:msxsl="urn:schemas-microsoft-com:xslt"
    xmlns:msftscw="http://www.microsoft.com/windows/security/">
    
<xsl:import href="..\scwxmlloc.xsl" /> 
<xsl:include href="Vars.xsl" /> 
    
<xsl:output method="html"/>

<xsl:key name="RoleLocalization" match="RoleLocalization/Role" use="@Name"/>
<xsl:key name="TaskLocalization" match="TaskLocalization/Task" use="@Name"/>
<xsl:key name="ServiceLocalization" match="ServiceLocalization/Service" use="@Name"/>
<xsl:variable name ="XMLAllFirewallRules" select="SCWKnowledgeBase/Firewall/FirewallRules/FirewallRule"/>

<!-- Replace the following characters plus control characters with unicode equivelents (wide characters or control characters) -->
<!-- #{}+-@.*\<>/[]| -->
  <xsl:variable name ="XSLTranslateOrig" select="'&#x0023;&#x007B;&#x007D;&#x002B;&#x002D;&#x0040;&#x002E;&#x005c;&#x003c;&#x003e;&#x002f;&#x005b;&#x005d;&#x007c;&#x0009;&#x000A;&#x000D;&#x0020;'" />
  <xsl:variable name ="XSLTranslateRepl" select="'&#xFF03;&#xFF5B;&#xFF5D;&#xFF0B;&#xFF0D;&#xFF20;&#xFF0E;&#xff3c;&#xff1c;&#xff1e;&#xff0f;&#xff3b;&#xff3d;&#xff5c;&#x2409;&#x240A;&#x240D;&#x2420;'" />
 
  <xsl:template match="SCWKnowledgeBase">
  <html>

    <!-- Initialize the localization -->				
    <xsl:comment>
      <xsl:value-of select="msftscw:InitLocVariable($UserUILanguage, 'KBLocFile', 'SCWLocStrings.xml', '..\MUI\', '..\')" /> 
    </xsl:comment>

    <!-- output title and CSS -->
    <head>
      <title>
        <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_DataName', 'KBLocFile')"/>				
      </title>
      <link rel="stylesheet" type="text/css" href="../TransformFiles/View/kb.css"/>
        
      <xsl:text disable-output-escaping="yes"><![CDATA[
      <script language="JScript">
        
            function onKeyUp(bHideShort)
            {
                switch(event.keyCode)
                {
                    case 13:
                    case 32:
                        toggleDisplay(bHideShort);
                    break;
                }
            }
        
            function toggleDisplay(bHideShort)
            {				
                divElement      = event.srcElement;
                do {
                    divElement = divElement.parentElement;
                } while ( divElement.tagName != 'DIV' );
                
                if ( bHideShort == 1 ) 
                {
                    hideSpanElement = divElement.children(0);
                    showSpanElement = divElement.children(1);
                }							
                else
                {
                    hideSpanElement = divElement.children(1);
                    showSpanElement = divElement.children(0);							
                }
    
                hideSpanElement.style.display='none';
                showSpanElement.style.display='inline';
            }
        </script>
        ]]></xsl:text>
    </head>

    <body oncontextmenu="return false;">
      <xsl:attribute name="class">kbbody</xsl:attribute>
        <table class="SEVarResultsHeaderTable" ignore="true">
          <tr>
            <td>
              <table class="SEVarResultsHeaderTableLeftCell" ignore="true">
                <tr>
                  <td class="SEVarResultsHeader">
                    <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_DataName', 'KBLocFile')"/>
                  </td>
                </tr>							
                <tr>
                  <td class="SEVarResultsDescription">
                    <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_KBDescription', 'KBLocFile')"/>
                    <BR></BR>
                    <BR></BR>									
                  </td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
      <xsl:apply-templates/>
    </body>
  </html>
</xsl:template>

<xsl:template match="Roles">
  <xsl:variable name="Server_Role">
    <xsl:apply-templates select="Role" mode="get_server_role" />
  </xsl:variable>

  <xsl:variable name="Client_Role">
    <xsl:apply-templates select="Role" mode="get_client_role"/>
  </xsl:variable>

  <div>
    <span id="shortRoleTitle">
      <table class="kbsections" width="100%" marginheight="0" marginwidth="0" cellpadding="0" cellspacing="0">
        <tr class="kbsectionheaders">
          <td width="10"></td>
          <td width="17" style="cursor:hand;" onclick="shortRoleTitle.style.display='none'; longRoleTitle.style.display='inline';">
          <img src="../TransformFiles/View/RightArrow.gif"  tabindex="0" onkeyup="onKeyUp(1)" onmouseOver="this.src='../TransformFiles/View/RightArrowHighLight.gif';" onmouseout="this.src='../TransformFiles/View/RightArrow.gif';"/></td>
          <td>
            <table class="kbsectionheaders" cellpadding="0" cellspacing="0">
              <tr>
                <td style="cursor:hand;" onclick="shortRoleTitle.style.display='none'; longRoleTitle.style.display='inline';">
                  <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_RolesHeading', 'KBLocFile')"/>				
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </span>	

    <span id="longRoleTitle" style="display:'none'">
      <table class="kbsections" width="100%" cellpadding="0" cellspacing="0">
        <tr class="kbsectionheaders">
          <td width="10"></td>
          <td width="10" style="cursor:hand;" onclick="shortRoleTitle.style.display='inline'; longRoleTitle.style.display='none';">
          <img src="../TransformFiles/View/DownArrow.gif"  tabindex="0" onkeyup="onKeyUp(0)" onmouseover="this.src='../TransformFiles/View/DownArrowHighLight.gif';" onmouseout="this.src='../TransformFiles/View/DownArrow.gif';"/></td>
          <td>
            <table class="kbsectionheaders" cellpadding="0" cellspacing="0">
            <tr>
              <td width="5"></td>
              <td style="cursor:hand;" onclick="shortRoleTitle.style.display='inline'; longRoleTitle.style.display='none';">
                <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_RolesHeading', 'KBLocFile')"/>											
              </td>
            </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td>
            <xsl:apply-templates select="msxsl:node-set($Server_Role)/Role">
              <xsl:sort select="normalize-space(DisplayName)"/>
            </xsl:apply-templates>
          </td>
        </tr>
      </table>
    </span>	
  </div>		

  <div>
    <span id="shortClientTitle">
      <table class="kbsections" width="100%" marginheight="0" marginwidth="0" cellpadding="0" cellspacing="0">
        <tr class="kbsectionheaders">
          <td width="10"></td>
          <td width="17" style="cursor:hand;" onclick="shortClientTitle.style.display='none'; longClientTitle.style.display='inline';">
          <img src="../TransformFiles/View/RightArrow.gif"  tabindex="0" onkeyup="onKeyUp(1)" onmouseOver="this.src='../TransformFiles/View/RightArrowHighLight.gif';" onmouseout="this.src='../TransformFiles/View/RightArrow.gif';"/></td>
          <td>
            <table class="kbsectionheaders" cellpadding="0" cellspacing="0">
              <tr>
                <td style="cursor:hand;" onclick="shortClientTitle.style.display='none'; longClientTitle.style.display='inline';">
                  <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FeaturesHeading', 'KBLocFile')"/>				
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </span>	

    <span id="longClientTitle" style="display:'none'">
      <table class="kbsections" width="100%" cellpadding="0" cellspacing="0">
        <tr class="kbsectionheaders">
          <td width="10"></td>
          <td width="10" style="cursor:hand;" onclick="shortClientTitle.style.display='inline'; longClientTitle.style.display='none';">
            <img src="../TransformFiles/View/DownArrow.gif"  tabindex="0" onkeyup="onKeyUp(0)" onmouseover="this.src='../TransformFiles/View/DownArrowHighLight.gif';" onmouseout="this.src='../TransformFiles/View/DownArrow.gif';"/>
          </td>
          <td>
            <table class="kbsectionheaders" cellpadding="0" cellspacing="0">
              <tr>
                <td width="5"/>
                <td style="cursor:hand;" onclick="shortClientTitle.style.display='inline'; longClientTitle.style.display='none';">
                  <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FeaturesHeading', 'KBLocFile')"/>											
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td>
            <xsl:apply-templates select="msxsl:node-set($Client_Role)/Role">
              <xsl:sort select="normalize-space(DisplayName)"/>
            </xsl:apply-templates>
          </td>
        </tr>
      </table>
    </span>	
  </div>		
</xsl:template>

<xsl:template match="Role">
  <xsl:variable name="Name" select="translate(Name, $XSLTranslateOrig, $XSLTranslateRepl)"/>
  <xsl:variable name="DisplayName" select = "DisplayName"/><!--select="normalize-space(key('RoleLocalization', @Name)/DisplayName)"/>-->
  <xsl:variable name="Description" select = "Description"/><!-- select="normalize-space(key('RoleLocalization', @Name)/Description)"/>-->
  <xsl:variable name="Details" select = "Details"/><!-- select="msftscw:getDetails(key('RoleLocalization', @Name))"/>-->
  <xsl:variable name="DependsOn_Roles" select = "DependsOn_Roles"/>
  <xsl:variable name="DependsOn_Services" select = "DependsOn_Services"/>
  <xsl:variable name="XMLRequiredFirewallRules" select="Firewall/FirewallRule"/>
  <xsl:variable name="RequiredFirewallRules" select="msftscw:getFirewallRules($XMLRequiredFirewallRules, $XMLAllFirewallRules)"/>
  
  <div>
    <span id="shortRole{$Name}">
      <table class="settingsheaderscollapsed" width="100%">
        <tr>
          <td width="5" style="cursor:hand;" onclick="shortRole{$Name}.style.display='none'; longRole{$Name}.style.display='inline';" >
            <xsl:attribute name="title">
              <xsl:if test="string-length($Description) != 0">
                <xsl:value-of select="$Description"/>&#13;&#13;</xsl:if><xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Tooltip', 'KBLocFile')"/>
            </xsl:attribute>							
            <img src="../TransformFiles/View/RightArrow.gif"  tabindex="0" onkeyup="onKeyUp(1)"  onmouseOver="this.src='../TransformFiles/View/RightArrowHighLight.gif';" onmouseout="this.src='../TransformFiles/View/RightArrow.gif';"/>
          </td>
            
          <td style="cursor:hand;" onclick="shortRole{$Name}.style.display='none'; longRole{$Name}.style.display='inline';">
            <xsl:attribute name="title">
              <xsl:if test="string-length($Description) != 0">
                <xsl:value-of select="$Description"/>&#13;&#13;</xsl:if><xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Tooltip', 'KBLocFile')"/>
            </xsl:attribute>							
            <xsl:value-of select="$DisplayName"/> 
          </td>
        </tr>
      </table>
    </span>
    
    <span id="longRole{$Name}" style="display:'none'">
      <table width="100%">
        <tr>
          <td valign="top" width="15" style="cursor:hand;" onclick="shortRole{$Name}.style.display='inline'; longRole{$Name}.style.display='none';">
            <img src="../TransformFiles/View/DownArrow.gif"  tabindex="0" onkeyup="onKeyUp(0)"  onmouseover="this.src='../TransformFiles/View/DownArrowHighLight.gif';" onmouseout="this.src='../TransformFiles/View/DownArrow.gif';"/>
          </td>
          <td>		
            <table class="sectionsexpanded" width="95%" cellpadding="0" cellspacing="0">
              <tr>
                <td  class="settingsheadersexpanded" style="cursor:hand;" onclick="shortRole{$Name}.style.display='inline'; longRole{$Name}.style.display='none';">
                  <xsl:value-of select="$DisplayName"/> 
                </td>
              </tr>
              <tr>
                <td>	
                  <table class="expanddescription" width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="5"/>
                      <td>
                        <div class="descriptionsections">
                          <xsl:if test="string-length($Description) != 0">
                            <b>
                              <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Description', 'KBLocFile')"/>
                            </b>&#160;
                            <xsl:value-of select="$Description"/>
                          </xsl:if>
                        </div>
                        <div class="descriptionsections">
                          <xsl:if test="string-length($Details) != 0">
                            <b>
                              <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Details', 'KBLocFile')"/>
                            </b>&#160;
                            <xsl:value-of select="$Details"/>
                          </xsl:if>
                        </div>
                        <div class="descriptionsections">
                          <xsl:if test="string-length($DependsOn_Roles)!=0">
                            <b>
                              <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_RequiredRoles', 'KBLocFile')"/>
                            </b>
                            <xsl:value-of select = "$DependsOn_Roles"/>
                          </xsl:if>
                        </div>
                        <div class="descriptionsections">
                          <xsl:if test="string-length($DependsOn_Services)!=0">
                            <b>
                              <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_RequiredServices', 'KBLocFile')"/>
                            </b>
                            <xsl:value-of select = "$DependsOn_Services"/>
                          </xsl:if>
                        </div>

                        <div class="descriptionsections">
                          <xsl:if test="string-length($RequiredFirewallRules) != 0">
                            <b>
                              <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_RequiredFirewallRules', 'KBLocFile')"/>
                            </b>&#160;
                            <xsl:value-of select="$RequiredFirewallRules"/>
                          </xsl:if>
                        </div>
                        <div class="descriptionsections">
                          <xsl:if test="Satisfiable">
                            <b>
                              <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Status', 'KBLocFile')"/>
                            </b>&#160;
                            <xsl:choose>
                              <xsl:when test="normalize-space(Satisfiable)='TRUE'">
                                <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Installed', 'KBLocFile')"/>
                              </xsl:when>
                              <xsl:otherwise>
                                <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_NotInstalled', 'KBLocFile')"/>
                              </xsl:otherwise>
                            </xsl:choose>
                            <xsl:text>, </xsl:text>
                            <xsl:if test="normalize-space(Selected)='TRUE'">
                              <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Selected', 'KBLocFile')"/>
                            </xsl:if>
                            <xsl:if test="normalize-space(Selected)='FALSE'">
                              <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_NotSelected', 'KBLocFile')"/>
                            </xsl:if>
                          </xsl:if>
                        </div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </span>
  </div>
</xsl:template>

<xsl:template match="Role" mode="get_server_role">
  <xsl:if test="@Type = 'Server'">	
    <xsl:copy>		
      <xsl:copy-of select="@*"/>
      <xsl:copy-of select="*"/>
      <xsl:element name="Name">
        <xsl:value-of select="translate(@Name, $XSLTranslateOrig, $XSLTranslateRepl)"/>
      </xsl:element> 
      <xsl:element name="DisplayName">
        <xsl:value-of select="normalize-space(key('RoleLocalization', @Name)/DisplayName)"/>
      </xsl:element> 
      <xsl:element name="Description">
        <xsl:value-of select="normalize-space(key('RoleLocalization', @Name)/Description)"/>
      </xsl:element> 
      <xsl:element name="Details">
        <xsl:value-of select="msftscw:getDetails(key('RoleLocalization', @Name))"/>
      </xsl:element>
    
      <xsl:if test="DependsOn/Roles">
        <xsl:element name="DependsOn_Roles">
          <xsl:for-each select="DependsOn/Roles/Role">
            <xsl:sort select="normalize-space(key('RoleLocalization', @Name)/DisplayName)"/>&#160;
            <xsl:value-of select="normalize-space(key('RoleLocalization', @Name)/DisplayName)"/>
            <xsl:if test="position() != last()">,</xsl:if>
          </xsl:for-each>
        </xsl:element>
      </xsl:if>
    
      <xsl:if test="Services/Service">
        <xsl:element name="DependsOn_Services">
          <xsl:for-each select="Services/Service">
            <xsl:sort select="normalize-space(key('ServiceLocalization', @Name)/DisplayName)"/>
            <xsl:variable name="ServiceName" select="normalize-space(@Name)"/>
            <xsl:variable name="ServiceDisplayName" select="normalize-space(key('ServiceLocalization', @Name)/DisplayName)"/>
            &#160;<xsl:value-of select="msftscw:getServiceDisplayName($ServiceDisplayName, $ServiceName)"/>
            <xsl:if test="position() != last()">,</xsl:if>
          </xsl:for-each>
        </xsl:element>
      </xsl:if>
    </xsl:copy>
  </xsl:if>
</xsl:template>

<xsl:template match="Role" mode="get_client_role">
  <xsl:if test="@Type = 'Client'">
    <xsl:copy>
      <xsl:copy-of select="@*"/>
      <xsl:copy-of select="*"/>
      <xsl:element name="Name">
        <xsl:value-of select="translate(@Name, $XSLTranslateOrig, $XSLTranslateRepl)"/>
      </xsl:element> 
      <xsl:element name="DisplayName">
        <xsl:value-of select="normalize-space(key('RoleLocalization', @Name)/DisplayName)"/>
      </xsl:element> 
      <xsl:element name="Description">
        <xsl:value-of select="normalize-space(key('RoleLocalization', @Name)/Description)"/>
      </xsl:element> 
      <xsl:element name="Details">
        <xsl:value-of select="msftscw:getDetails(key('RoleLocalization', @Name))"/>
      </xsl:element> 
      <xsl:if test="DependsOn/Roles">
        <xsl:element name="DependsOn_Roles">
          <xsl:for-each select="DependsOn/Roles/Role">
            <xsl:sort select="normalize-space(key('RoleLocalization', @Name)/DisplayName)"/>&#160;
              <xsl:value-of select="normalize-space(key('RoleLocalization', @Name)/DisplayName)"/>
              <xsl:if test="position() != last()">,</xsl:if>
          </xsl:for-each>
        </xsl:element>
      </xsl:if>
      <xsl:if test="Services/Service">
        <xsl:element name="DependsOn_Services">
          <xsl:for-each select="Services/Service">
            <xsl:sort select="normalize-space(key('ServiceLocalization', @Name)/DisplayName)"/>
            <xsl:variable name="ServiceName" select="normalize-space(@Name)"/>
            <xsl:variable name="ServiceDisplayName" select="normalize-space(key('ServiceLocalization', @Name)/DisplayName)"/>&#160;
            <xsl:value-of select="msftscw:getServiceDisplayName($ServiceDisplayName, $ServiceName)"/>
            <xsl:if test="position() != last()">,</xsl:if>
          </xsl:for-each>
        </xsl:element>
      </xsl:if>
    </xsl:copy>
  </xsl:if>
</xsl:template>

<xsl:template match="Tasks">
  <div>
    <span id="shortTasksTitle">
      <table class="kbsections" width="100%" marginheight="0" marginwidth="0" cellpadding="0" cellspacing="0">
        <tr class="kbsectionheaders">
          <td width="10"></td>
          <td width="17" style="cursor:hand;" onclick="shortTasksTitle.style.display='none'; longTasksTitle.style.display='inline';">
            <img src="../TransformFiles/View/RightArrow.gif"  tabindex="0" onkeyup="onKeyUp(1)" onmouseOver="this.src='../TransformFiles/View/RightArrowHighLight.gif';" onmouseout="this.src='../TransformFiles/View/RightArrow.gif';"/>
          </td>
          <td>
            <table class="kbsectionheaders" cellpadding="0" cellspacing="0">
              <tr>
                <td style="cursor:hand;" onclick="shortTasksTitle.style.display='none'; longTasksTitle.style.display='inline';">
                  <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_TasksHeading', 'KBLocFile')"/>							
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </span>	

    <span id="longTasksTitle" style="display:'none'">
      <table class="kbsections" width="100%" marginheight="0" marginwidth="0" cellpadding="0" cellspacing="0">
        <tr class="kbsectionheaders">
          <td width="10"></td>
          <td width="10" style="cursor:hand;" onclick="shortTasksTitle.style.display='inline'; longTasksTitle.style.display='none';">
            <img src="../TransformFiles/View/DownArrow.gif"  tabindex="0" onkeyup="onKeyUp(0)"  onmouseover="this.src='../TransformFiles/View/DownArrowHighLight.gif';" onmouseout="this.src='../TransformFiles/View/DownArrow.gif';"/>
          </td>
          <td>
            <table class="kbsectionheaders" cellpadding="0" cellspacing="0">
              <tr>
                <td width="5"></td>
                <td style="cursor:hand;" onclick="shortTasksTitle.style.display='inline'; longTasksTitle.style.display='none';">
                  <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_TasksHeading', 'KBLocFile')"/>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td>
            <xsl:apply-templates>
              <xsl:sort select="normalize-space(key('TaskLocalization', @Name)/DisplayName)"/>
            </xsl:apply-templates>
          </td>
        </tr>
      </table>
    </span>	
  </div>		
</xsl:template>

<xsl:template match="Task">
  <xsl:variable name="Name" select="translate(@Name, $XSLTranslateOrig, $XSLTranslateRepl)"/>
  <xsl:variable name="DisplayName" select="normalize-space(key('TaskLocalization', @Name)/DisplayName)"/>
  <xsl:variable name="Description" select="normalize-space(key('TaskLocalization', @Name)/Description)"/>
  <xsl:variable name="Details" select="msftscw:getDetails(key('TaskLocalization', @Name))"/>
  <xsl:variable name="XMLRequiredFirewallRules" select="Firewall/FirewallRule"/>
  <xsl:variable name="RequiredFirewallRules" select="msftscw:getFirewallRules($XMLRequiredFirewallRules, $XMLAllFirewallRules)"/>
  
  <div>
    <span id="shortTasks{$Name}">
      <table class="settingsheaderscollapsed" width="100%">
        <tr>
          <td width="5" style="cursor:hand;" onclick="shortTasks{$Name}.style.display='none'; longTasks{$Name}.style.display='inline';">
            <xsl:attribute name="title">
              <xsl:if test="string-length($Description) != 0">
                <xsl:value-of select="$Description"/>&#13;&#13;</xsl:if><xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Tooltip', 'KBLocFile')"/>				
            </xsl:attribute>							
            <img src="../TransformFiles/View/RightArrow.gif"  tabindex="0" onkeyup="onKeyUp(1)"  onmouseOver="this.src='../TransformFiles/View/RightArrowHighLight.gif';" onmouseout="this.src='../TransformFiles/View/RightArrow.gif';"/>
          </td>
          <td style="cursor:hand;" onclick="shortTasks{$Name}.style.display='none'; longTasks{$Name}.style.display='inline';">
            <xsl:attribute name="title">
              <xsl:if test="string-length($Description) != 0">
                <xsl:value-of select="$Description"/>&#13;&#13;</xsl:if><xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Tooltip', 'KBLocFile')"/>				
            </xsl:attribute>							
            <xsl:value-of select="$DisplayName"/> 
          </td>
        </tr>
      </table>
    </span>
    
    <span id="longTasks{$Name}" style="display:'none'">
      <table width="100%">
        <tr>
          <td valign="top" width="15" style="cursor:hand;" onclick="shortTasks{$Name}.style.display='inline'; longTasks{$Name}.style.display='none';">	
            <img src="../TransformFiles/View/DownArrow.gif" style="cursor:hand;" tabindex="0" onkeyup="onKeyUp(0)"  onclick="shortTasks{$Name}.style.display='inline'; longTasks{$Name}.style.display='none';"  onmouseover="this.src='../TransformFiles/View/DownArrowHighLight.gif';" onmouseout="this.src='../TransformFiles/View/DownArrow.gif';"/>
          </td>
          <td>
            <table class="sectionsexpanded" width="95%" cellpadding="0" cellspacing="0">				
             <tr>
              <td class="settingsheadersexpanded" style="cursor:hand;" onclick="shortTasks{$Name}.style.display='inline'; longTasks{$Name}.style.display='none';">
                <xsl:value-of select="$DisplayName"/>
              </td>
             </tr>
              <tr>
                <td>
                  <table class="expanddescription" width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="5"/>
                      <td>
                        <div class="descriptionsections">
                          <xsl:if test="string-length($Description) != 0">
                            <b>
                              <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Description', 'KBLocFile')"/>
                            </b>&#160;
                            <xsl:value-of select="$Description"/>
                          </xsl:if>
                        </div>
                
                        <div class="descriptionsections">
                          <xsl:if test="string-length($Details) != 0">
                            <b>
                              <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Details', 'KBLocFile')"/>
                            </b>&#160;
                            <xsl:value-of select="$Details"/>
                          </xsl:if>
                        </div>
                
                        <div class="descriptionsections">
                          <xsl:if test="Roles/Role">
                            <b>
                              <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_RequiredByRoles', 'KBLocFile')"/>
                            </b>
                            <xsl:for-each select="Roles/Role">
                              <xsl:sort select="normalize-space(key('RoleLocalization', @Name)/DisplayName)"/>&#160;
                              <xsl:value-of select="normalize-space(key('RoleLocalization', @Name)/DisplayName)"/>
                              <xsl:if test="position() != last()">,</xsl:if>
                            </xsl:for-each>
                          </xsl:if>
                        </div>
                
                        <div class="descriptionsections">
                          <xsl:if test="Services/Service">
                            <b>
                              <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_RequiredServices', 'KBLocFile')"/>
                            </b>
                            <xsl:for-each select="Services/Service">
                              <xsl:sort select="normalize-space(key('ServiceLocalization', @Name)/DisplayName)"/>&#160;
                              <xsl:value-of select="normalize-space(key('ServiceLocalization', @Name)/DisplayName)"/>
                              <xsl:if test="position() != last()">,</xsl:if>
                            </xsl:for-each>
                          </xsl:if>
                        </div>

                        <div class="descriptionsections">
                          <xsl:if test="string-length($RequiredFirewallRules) != 0">
                            <b>
                              <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_RequiredFirewallRules', 'KBLocFile')"/>
                            </b>&#160;
                            <xsl:value-of select="$RequiredFirewallRules"/>
                          </xsl:if>
                        </div>
                
                        <div class="descriptionsections">
                          <xsl:if test="Satisfiable">
                            <b>
                              <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Status', 'KBLocFile')"/>
                            </b>&#160;
                            <xsl:choose>
                              <xsl:when test="normalize-space(Satisfiable)='TRUE'">
                                <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Installed', 'KBLocFile')"/>							
                              </xsl:when>
                              <xsl:otherwise>
                                <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_NotInstalled', 'KBLocFile')"/>
                              </xsl:otherwise>
                            </xsl:choose>
                            <xsl:text>, </xsl:text>
                            <xsl:if test="normalize-space(Selected)='TRUE'">
                              <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Selected', 'KBLocFile')"/>
                            </xsl:if>
                            <xsl:if test="normalize-space(Selected)='FALSE'">
                              <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_NotSelected', 'KBLocFile')"/>
                            </xsl:if>
                          </xsl:if>
                        </div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </span>
  </div>
</xsl:template>

<xsl:template match="Services">
    <div>
    <span id="shortServicesTitle">
        <table class="kbsections" width="100%" marginheight="0" marginwidth="0" cellpadding="0" cellspacing="0">
        <tr class="kbsectionheaders">
            <td width="10"></td>
            <td width="17" style="cursor:hand;" onclick="shortServicesTitle.style.display='none'; longServicesTitle.style.display='inline';">
            
            <img src="../TransformFiles/View/RightArrow.gif"  tabindex="0" onkeyup="onKeyUp(1)" onmouseOver="this.src='../TransformFiles/View/RightArrowHighLight.gif';" onmouseout="this.src='../TransformFiles/View/RightArrow.gif';"/></td>
            <td>
                <table class="kbsectionheaders" cellpadding="0" cellspacing="0">
                    <tr>
                        <td style="cursor:hand;" onclick="shortServicesTitle.style.display='none'; longServicesTitle.style.display='inline';"><xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_ServicesHeading', 'KBLocFile')"/></td>
                    </tr>
                </table>
            </td>
        </tr>
        </table>
    </span>	

    <span id="longServicesTitle" style="display:'none'">
        <table class="kbsections" width="100%" marginheight="0" marginwidth="0" cellpadding="0" cellspacing="0">
        <tr class="kbsectionheaders">
            <td width="10"></td>
            <td width="10" style="cursor:hand;" onclick="shortServicesTitle.style.display='inline'; longServicesTitle.style.display='none';">
            <img src="../TransformFiles/View/DownArrow.gif"  tabindex="0" onkeyup="onKeyUp(0)" onmouseover="this.src='../TransformFiles/View/DownArrowHighLight.gif';" onmouseout="this.src='../TransformFiles/View/DownArrow.gif';"/></td>
            <td>
                <table class="kbsectionheaders" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="5"></td>
                        <td style="cursor:hand;" onclick="shortServicesTitle.style.display='inline'; longServicesTitle.style.display='none';"><xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_ServicesHeading', 'KBLocFile')"/></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td></td>
            <td></td>
            <td><xsl:apply-templates>
            <xsl:sort select="normalize-space(key('ServiceLocalization', @Name)/DisplayName)"/>
            </xsl:apply-templates></td>
        </tr>
        </table>
    </span>
    </div>		
</xsl:template>

<xsl:template match="Service">
    <xsl:variable name="TempName" select="translate(@Name, $XSLTranslateOrig, $XSLTranslateRepl)"/>
    <xsl:variable name="DisplayName" select="normalize-space(key('ServiceLocalization', @Name)/DisplayName)"/>
    <xsl:variable name="Description" select="normalize-space(key('ServiceLocalization', @Name)/Description)"/>
    <xsl:variable name="Details"	 select="msftscw:getDetails(key('ServiceLocalization', @Name))"/>
    <xsl:variable name="StartupMode" select="normalize-space(Startup_Default)"/>		
    <xsl:variable name="Name" select="translate($TempName, $XSLTranslateOrig, $XSLTranslateRepl)"/>
    <div>
    
    <span id="shortServices{$Name}">
    <table class="settingsheaderscollapsed" width="100%" >
    <tr>
        <td width="5" style="cursor:hand;" onclick="shortServices{$Name}.style.display='none'; longServices{$Name}.style.display='inline';" >
            <xsl:attribute name="title">
                <xsl:if test="string-length($Description) != 0">
                    <xsl:value-of select="$Description"/>&#13;&#13;</xsl:if><xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Tooltip', 'KBLocFile')"/>				
            </xsl:attribute>							
            <img src="../TransformFiles/View/RightArrow.gif"  tabindex="0" onkeyup="onKeyUp(1)" onmouseOver="this.src='../TransformFiles/View/RightArrowHighLight.gif';" onmouseout="this.src='../TransformFiles/View/RightArrow.gif';"/>
        </td>
        <td style="cursor:hand;" onclick="shortServices{$Name}.style.display='none'; longServices{$Name}.style.display='inline';">
            <xsl:attribute name="title">
                <xsl:if test="string-length($Description) != 0">
                    <xsl:value-of select="$Description"/>&#13;&#13;</xsl:if><xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Tooltip', 'KBLocFile')"/>				
            </xsl:attribute>							
            <xsl:value-of select="$DisplayName"/> 
        </td>
    </tr>
    </table>
    </span>
    
    <span id="longServices{$Name}" style="display:'none'">
    <table width="100%">
    <tr>
        <td valign="top" width="15" style="cursor:hand;" onclick="shortServices{$Name}.style.display='inline'; longServices{$Name}.style.display='none';">
            <img src="../TransformFiles/View/DownArrow.gif"  tabindex="0" onkeyup="onKeyUp(0)" onmouseover="this.src='../TransformFiles/View/DownArrowHighLight.gif';" onmouseout="this.src='../TransformFiles/View/DownArrow.gif';"/>
        </td>
        
        <td>
        <table class="sectionsexpanded" width="95%" cellpadding="0" cellspacing="0">
            <tr>
                <td class="settingsheadersexpanded" style="cursor:hand;" onclick="shortServices{$Name}.style.display='inline'; longServices{$Name}.style.display='none';">
                <xsl:value-of select="$DisplayName"/> 
                </td>
            </tr>
            
            <tr>
            <td>
                <table class="expanddescription" width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                    <td width="5"></td>
                    <td>
                        <div class="descriptionsections">
                        <xsl:if test="Satisfiable">
                        <b>
                        <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Status', 'KBLocFile')"/>
                        </b>&#160;
                        <xsl:choose>
                            <xsl:when test="normalize-space(Satisfiable)='TRUE'">
                                <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Installed', 'KBLocFile')"/>
                            </xsl:when>
                            <xsl:otherwise>
                                <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_NotInstalled', 'KBLocFile')"/>
                            </xsl:otherwise>
                        </xsl:choose>
                        <xsl:text>, </xsl:text>
                        <xsl:if test="normalize-space(Selected)='TRUE'">
                            <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Selected', 'KBLocFile')"/>
                        </xsl:if>
                        <xsl:if test="normalize-space(Selected)='FALSE'">
                            <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_NotSelected', 'KBLocFile')"/>
                        </xsl:if>
                        </xsl:if>
                        </div>

                        <div class="descriptionsections">
                        <xsl:if test="string-length($Description) != 0">
                        <b>
                            <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Description', 'KBLocFile')"/>
                        </b>&#160;
                        <xsl:value-of select="$Description"/>
                        </xsl:if>
                        </div>
                        
                        <div class="descriptionsections">
                            <xsl:if test="string-length($Details) != 0">
                                <b><xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Details', 'KBLocFile')"/></b>&#160;
                                <xsl:value-of select="$Details"/>
                            </xsl:if>
                        </div>
                        
                        <div class="descriptionsections">
                        <xsl:if test="Startup_Default">
                        <b>
                            <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_StartupDefault', 'KBLocFile')"/>
                        </b>&#160;
                        <xsl:value-of select="msftscw:getStartupMode($StartupMode)"/>
                        </xsl:if>
                        </div>
                    </td>
                    </tr>
                </table>
            </td>
            </tr>
        </table>
        </td>
        </tr>
        </table>
        </span>
    </div>
</xsl:template>

<xsl:template match="Firewall">
  <div>
    <span id="shortFirewall">
      <table class="kbsections" width="100%" marginheight="0" marginwidth="0" cellpadding="0" cellspacing="0">
        <tr class="kbsectionheaders">
          <td width="10"></td>
          <td width="17" style="cursor:hand;" onclick="shortFirewall.style.display='none'; longFirewallTitle.style.display='inline';">
            <img src="../TransformFiles/View/RightArrow.gif"  tabindex="0" onkeyup="onKeyUp(1)" onmouseOver="this.src='../TransformFiles/View/RightArrowHighLight.gif';" onmouseout="this.src='../TransformFiles/View/RightArrow.gif';"/>
          </td>
          <td>
            <table class="kbsectionheaders" cellpadding="0" cellspacing="0">
              <tr>
                <td style="cursor:hand;" onclick="shortFirewall.style.display='none'; longFirewallTitle.style.display='inline';">
                  <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallHeading', 'KBLocFile')"/>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </span>	

    <span id="longFirewallTitle" style="display:'none'">
      <table class="kbsections" width="100%" marginheight="0" marginwidth="0" cellpadding="0" cellspacing="0">
        <tr class="kbsectionheaders">
          <td width="10"/>
          <td width="10" style="cursor:hand;" onclick="shortFirewall.style.display='inline'; longFirewallTitle.style.display='none';">
            <img src="../TransformFiles/View/DownArrow.gif"  tabindex="0" onkeyup="onKeyUp(0)" onmouseover="this.src='../TransformFiles/View/DownArrowHighLight.gif';" onmouseout="this.src='../TransformFiles/View/DownArrow.gif';"/>
          </td>
          <td>
            <table class="kbsectionheaders" cellpadding="0" cellspacing="0">
              <tr>
                <td width="5"/>
                <td style="cursor:hand;" onclick="shortFirewall.style.display='inline'; longFirewallTitle.style.display='none';">
                  <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallHeading', 'KBLocFile')"/>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td>
            <xsl:apply-templates>
              <xsl:sort select="$XMLAllFirewallRules"/>
            </xsl:apply-templates>
          </td>
        </tr>
      </table>
    </span>
    </div>		
</xsl:template>

<xsl:template match="FirewallRules">
  <div>
    <span id="shortFirewallRules">
      <table class="kbsections" width="100%" marginheight="0" marginwidth="0" cellpadding="0" cellspacing="0">
        <tr class="kbsectionheaders">
          <td width="10"></td>
          <td width="17" style="cursor:hand;" onclick="shortFirewallRules.style.display='none'; longFirewallRules.style.display='inline';">
            <img src="../TransformFiles/View/RightArrow.gif"  tabindex="0" onkeyup="onKeyUp(1)" onmouseOver="this.src='../TransformFiles/View/RightArrowHighLight.gif';" onmouseout="this.src='../TransformFiles/View/RightArrow.gif';"/>
          </td>
          <td>
            <table class="kbsectionheaders" cellpadding="0" cellspacing="0">
              <tr>
                <td style="cursor:hand;" onclick="shortFirewallRules.style.display='none'; longFirewallRules.style.display='inline';">
                  <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRulesHeading', 'KBLocFile')"/>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </span>

    <span id="longFirewallRules" style="display:'none'">
      <table class="kbsections" width="100%" marginheight="0" marginwidth="0" cellpadding="0" cellspacing="0">
        <tr class="kbsectionheaders">
          <td width="10"/>
          <td width="10" style="cursor:hand;" onclick="shortFirewallRules.style.display='inline'; longFirewallRules.style.display='none';">
            <img src="../TransformFiles/View/DownArrow.gif"  tabindex="0" onkeyup="onKeyUp(0)" onmouseover="this.src='../TransformFiles/View/DownArrowHighLight.gif';" onmouseout="this.src='../TransformFiles/View/DownArrow.gif';"/>
          </td>
          <td>
            <table class="kbsectionheaders" cellpadding="0" cellspacing="0">
              <tr>
                <td width="5"/>
                <td style="cursor:hand;" onclick="shortFirewallRules.style.display='inline'; longFirewallRules.style.display='none';">
                  <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRulesHeading', 'KBLocFile')"/>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td>
            <xsl:apply-templates select="$XMLAllFirewallRules">
              <xsl:sort select="@Name"/>
            </xsl:apply-templates>
          </td>
        </tr>
      </table>
    </span>
  </div>
</xsl:template>

<xsl:template match="FirewallRule">
  <xsl:variable name="ElementId" select="translate(@Id, $XSLTranslateOrig, $XSLTranslateRepl)"/>
  <xsl:variable name="Name" select="@Name"/>
  <xsl:variable name="Description" select="@Description"/>

  <div>
    <span id="shortFirewallRule{$ElementId}">
      <table class="settingsheaderscollapsed" width="100%" >
        <tr>
          <td width="5" style="cursor:hand;" onclick="shortFirewallRule{$ElementId}.style.display='none'; longFirewallRule{$ElementId}.style.display='inline';" >
            <xsl:attribute name="title">
              <xsl:if test="string-length($Name) != 0">
                <xsl:value-of select="$Name"/>&#13;&#13;</xsl:if><xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Tooltip', 'KBLocFile')"/>
            </xsl:attribute>
            <img src="../TransformFiles/View/RightArrow.gif"  tabindex="0" onkeyup="onKeyUp(1)" onmouseOver="this.src='../TransformFiles/View/RightArrowHighLight.gif';" onmouseout="this.src='../TransformFiles/View/RightArrow.gif';"/>
          </td>
          <td style="cursor:hand;" onclick="shortFirewallRule{$ElementId}.style.display='none'; longFirewallRule{$ElementId}.style.display='inline';">
            <xsl:attribute name="title">
              <xsl:if test="string-length($Description) != 0">
                <xsl:value-of select="concat($Description, ', ')"/>&#13;&#13;</xsl:if><xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Tooltip', 'KBLocFile')"/>
            </xsl:attribute>
            <xsl:value-of select="$Name"/>
          </td>
        </tr>
      </table>
    </span>

    <span id="longFirewallRule{$ElementId}" style="display:'none'">
      <table width="100%">
        <tr>
          <td valign="top" width="15" style="cursor:hand;" onclick="shortFirewallRule{$ElementId}.style.display='inline'; longFirewallRule{$ElementId}.style.display='none';">
            <img src="../TransformFiles/View/DownArrow.gif" style="cursor:hand;" tabindex="0" onkeyup="onKeyUp(0)"  onclick="shortFirewallRule{$ElementId}.style.display='inline'; longFirewallRule{$ElementId}.style.display='none';" onmouseover="this.src='../TransformFiles/View/DownArrowHighLight.gif';" onmouseout="this.src='../TransformFiles/View/DownArrow.gif';"/>
          </td>
          <td>
            <table class="sectionsexpanded" width="95%" cellpadding="0" cellspacing="0">
              <tr>
                <td class="settingsheadersexpanded" style="cursor:hand;" onclick="shortFirewallRule{$ElementId}.style.display='inline'; longFirewallRule{$ElementId}.style.display='none';">
                  <xsl:value-of select="$Name"/>
                </td>
              </tr>
              <tr>
                <td>
                  <xsl:call-template name="DisplayFirewallRule">
                    <xsl:with-param name="XMLFirewallRule" select="."/>
                    <xsl:with-param name="DisplayName">False</xsl:with-param>
                  </xsl:call-template>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </span>
  </div>
</xsl:template>

<xsl:template name="DisplayFirewallRule">
  <xsl:param name="XMLFirewallRule"/>
  <xsl:param name="DisplayName"/>

  <xsl:variable name="ElementId" select="translate($XMLFirewallRule/@Id, $XSLTranslateOrig, $XSLTranslateRepl)"/>

  <!--Rule Attributes-->
  <xsl:variable name="Id" select="$XMLFirewallRule/@Id"/>
  <xsl:variable name="Name" select="$XMLFirewallRule/@Name"/>
  <xsl:variable name="Description" select="$XMLFirewallRule/@Description"/>
  <xsl:variable name="Group" select="$XMLFirewallRule/@Group"/>
  <xsl:variable name="ProtocolKeyword" select="$XMLFirewallRule/@ProtocolKeyword"/>
  <xsl:variable name="ProtocolNumber" select="$XMLFirewallRule/@ProtocolNumber"/>
  <xsl:variable name="Direction" select="$XMLFirewallRule/@Direction"/>
  <xsl:variable name="Program" select="$XMLFirewallRule/@Program"/>
  <xsl:variable name="Service" select="$XMLFirewallRule/@Service"/>
  <xsl:variable name="EnabledFlag" select="$XMLFirewallRule/@Enabled"/>
  <xsl:variable name="Action" select="$XMLFirewallRule/@Action"/>

  <!--Profiles-->
  <xsl:variable name="XMLProfiles"
                select="$XMLFirewallRule/Profiles/Profile"/>
  <xsl:variable name="Profiles"
                select="msftscw:getProfiles($XMLProfiles)"/>
  
  <!--Local Ports-->
  <xsl:variable name="XMLLocalPorts" select="$XMLFirewallRule/LocalPorts"/>
  <xsl:variable name="XMLLocalSpecificPorts" select="$XMLLocalPorts/Port"/>
  <xsl:variable name="XMLLocalCustomPorts" select="$XMLLocalPorts/CustomPort"/>
  <xsl:variable name="XMLLocalRegistryPorts" select="$XMLLocalPorts/RegistryPort"/>
  <xsl:variable name="LocalSpecialPorts" select="msftscw:getSpecialPorts($XMLLocalPorts)"/>
  <xsl:variable name="LocalSpecificPorts" select="msftscw:getSpecificPorts($XMLLocalSpecificPorts)"/>
  <xsl:variable name="LocalCustomPorts" select="msftscw:getCustomPorts($XMLLocalCustomPorts)"/>
  <xsl:variable name="LocalRegistryPorts" select="msftscw:getCustomPorts($XMLLocalRegistryPorts)"/>
  <xsl:variable name="LocalPorts" select="msftscw:MergeLists($LocalSpecialPorts, $LocalSpecificPorts, $LocalCustomPorts, $LocalRegistryPorts)"/>

  <!--Remote Ports-->
  <xsl:variable name="XMLRemotePorts" select="$XMLFirewallRule/RemotePorts"/>
  <xsl:variable name="XMLRemoteSpecificPorts" select="$XMLRemotePorts/Port"/>
  <xsl:variable name="XMLRemoteCustomPorts" select="$XMLRemotePorts/CustomPort"/>
  <xsl:variable name="XMLRemoteRegistryPorts" select="$XMLRemotePorts/RegistryPort"/>
  <xsl:variable name="RemoteSpecificPorts" select="msftscw:getSpecificPorts($XMLRemoteSpecificPorts)"/>
  <xsl:variable name="RemoteCustomPorts" select="msftscw:getCustomPorts($XMLRemoteCustomPorts)"/>
  <xsl:variable name="RemoteRegistryPorts" select="msftscw:getCustomPorts($XMLRemoteRegistryPorts)"/>
  <xsl:variable name="RemotePorts" select="msftscw:MergeLists($RemoteSpecificPorts, $RemoteCustomPorts, $RemoteRegistryPorts)"/>

  <!--Local Addresses-->
  <xsl:variable name="XMLLocalAddresses" select="$XMLFirewallRule/LocalAddresses"/>
  <xsl:variable name="XMLLocalV4Addresses" select="$XMLLocalAddresses/V4Address"/>
  <xsl:variable name="XMLLocalV6Addresses" select="$XMLLocalAddresses/V6Address"/>
  <xsl:variable name="XMLLocalV4Ranges" select="$XMLLocalAddresses/V4AddressRange"/>
  <xsl:variable name="XMLLocalV6Ranges" select="$XMLLocalAddresses/V6AddressRange"/>
  <xsl:variable name="XMLLocalV4Subnets" select="$XMLLocalAddresses/V4Subnet"/>
  <xsl:variable name="XMLLocalV6Subnets" select="$XMLLocalAddresses/V6Subnet"/>
  <xsl:variable name="LocalV4Addresses" select="msftscw:getAddresses($XMLLocalV4Addresses)"/>
  <xsl:variable name="LocalV6Addresses" select="msftscw:getAddresses($XMLLocalV6Addresses)"/>
  <xsl:variable name="LocalV4Ranges" select="msftscw:getRanges($XMLLocalV4Ranges)"/>
  <xsl:variable name="LocalV6Ranges" select="msftscw:getRanges($XMLLocalV6Ranges)"/>
  <xsl:variable name="LocalV4Subnets" select="msftscw:getSubnets($XMLLocalV4Subnets)"/>
  <xsl:variable name="LocalV6Subnets" select="msftscw:getSubnets($XMLLocalV6Subnets)"/>
  <xsl:variable name="LocalAddresses" select="msftscw:MergeLists($LocalV4Addresses, $LocalV6Addresses, $LocalV4Ranges, $LocalV6Ranges, $LocalV4Subnets, $LocalV6Subnets)"/>

  <!--Remote Addresses-->
  <xsl:variable name="XMLRemoteAddresses" select="$XMLFirewallRule/RemoteAddresses"/>
  <xsl:variable name="XMLRemoteV4Addresses" select="$XMLRemoteAddresses/V4Address"/>
  <xsl:variable name="XMLRemoteV6Addresses" select="$XMLRemoteAddresses/V6Address"/>
  <xsl:variable name="XMLRemoteV4Ranges" select="$XMLRemoteAddresses/V4AddressRange"/>
  <xsl:variable name="XMLRemoteV6Ranges" select="$XMLRemoteAddresses/V6AddressRange"/>
  <xsl:variable name="XMLRemoteV4Subnets" select="$XMLRemoteAddresses/V4Subnet"/>
  <xsl:variable name="XMLRemoteV6Subnets" select="$XMLRemoteAddresses/V6Subnet"/>
  <xsl:variable name="DefaultGateway" select="msftscw:getSpecialAddresses($XMLRemoteAddresses, 'DefaultGateway')"/>
  <xsl:variable name="WINSServers" select="msftscw:getSpecialAddresses($XMLRemoteAddresses, 'WINSServers')"/>
  <xsl:variable name="DHCPServers" select="msftscw:getSpecialAddresses($XMLRemoteAddresses, 'DHCPServers')"/>
  <xsl:variable name="DNSServers" select="msftscw:getSpecialAddresses($XMLRemoteAddresses, 'DNSServers')"/>
  <xsl:variable name="LocalSubnet" select="msftscw:getSpecialAddresses($XMLRemoteAddresses, 'LocalSubnet')"/>
  <xsl:variable name="RemoteSpecialAddresses" select="msftscw:MergeLists($DefaultGateway, $WINSServers, $DHCPServers, $DNSServers, $LocalSubnet)"/>
  <xsl:variable name="RemoteV4Addresses" select="msftscw:getAddresses($XMLRemoteV4Addresses)"/>
  <xsl:variable name="RemoteV6Addresses" select="msftscw:getAddresses($XMLRemoteV6Addresses)"/>
  <xsl:variable name="RemoteV4Ranges" select="msftscw:getRanges($XMLRemoteV4Ranges)"/>
  <xsl:variable name="RemoteV6Ranges" select="msftscw:getRanges($XMLRemoteV6Ranges)"/>
  <xsl:variable name="RemoteV4Subnets" select="msftscw:getSubnets($XMLRemoteV4Subnets)"/>
  <xsl:variable name="RemoteV6Subnets" select="msftscw:getSubnets($XMLRemoteV6Subnets)"/>
  <xsl:variable name="RemoteAddresses" select="msftscw:MergeLists($RemoteSpecialAddresses, $RemoteV4Addresses, $RemoteV6Addresses, $RemoteV4Ranges, $RemoteV6Ranges, $RemoteV4Subnets, $RemoteV6Subnets)"/>

  <!--Interfaces-->
  <xsl:variable name="XMLInterfaces" select="$XMLFirewallRule/Interfaces/Interface"/>
  <xsl:variable name="Interfaces" select="msftscw:getInterfaces($XMLInterfaces)"/>

  <!--ICMPs-->
  <xsl:variable name="XMLICMPs" select="$XMLFirewallRule/ICMPs/ICMP"/>
  <xsl:variable name="ICMPs" select="msftscw:getICMPs($XMLICMPs)"/>

  <html>
    <body>
      <div>
        <table class="expanddescription" width="100%" cellpadding="0" cellspacing="0">
          <tr>
            <td width="5"/>
            <td>
              <div class="descriptionsections">
                <xsl:if test="$DisplayName = 'True'">
                  <xsl:if test="string-length($Name) != 0">
                    <b>
                      <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleName', 'KBLocFile')"/>
                    </b>&#160;
                    <xsl:value-of select="$Name"/>
                  </xsl:if>
                </xsl:if>
              </div>
              <div class="descriptionsections">
                <xsl:if test="string-length($Description) != 0">
                  <b>
                    <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleDescription', 'KBLocFile')"/>
                  </b>&#160;
                  <xsl:value-of select="$Description"/>
                </xsl:if>
              </div>
              <div class="descriptionsections">
                <xsl:if test="string-length($Group) != 0">
                  <b>
                    <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleGroup', 'KBLocFile')"/>
                  </b>&#160;
                  <xsl:value-of select="$Group"/>
                </xsl:if>
              </div>
              <div class="descriptionsections">
                <xsl:if test="string-length($ProtocolKeyword) != 0">
                  <b>
                    <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleProtocolKeyword', 'KBLocFile')"/>
                  </b>&#160;
                  <xsl:value-of select="$ProtocolKeyword"/>
                </xsl:if>
              </div>
              <div class="descriptionsections">
                <xsl:if test="string-length($ProtocolNumber) != 0">
                  <b>
                    <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleProtocolNumber', 'KBLocFile')"/>
                  </b>&#160;
                  <xsl:value-of select="$ProtocolNumber"/>
                </xsl:if>
              </div>
              <div class="descriptionsections">
                <xsl:if test="string-length($Direction) != 0">
                  <b>
                    <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleDirection', 'KBLocFile')"/>
                  </b>&#160;
                  <xsl:value-of select="$Direction"/>
                </xsl:if>
              </div>
              <div class="descriptionsections">
                <xsl:if test="string-length($Program) != 0">
                  <b>
                    <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleProgram', 'KBLocFile')"/>
                  </b>&#160;
                  <xsl:value-of select="$Program"/>
                </xsl:if>
              </div>
              <div class="descriptionsections">
                <xsl:if test="string-length($Service) != 0">
                  <b>
                    <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleService', 'KBLocFile')"/>
                  </b>&#160;
                  <xsl:value-of select="$Service"/>
                </xsl:if>
              </div>
              <div class="descriptionsections">
                <xsl:if test="string-length($EnabledFlag) != 0">
                  <b>
                    <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleEnabledFlag', 'KBLocFile')"/>
                  </b>&#160;
                  <xsl:value-of select="$EnabledFlag"/>
                </xsl:if>
              </div>
              <div class="descriptionsections">
                <xsl:if test="string-length($Action) != 0">
                  <b>
                    <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleAction', 'KBLocFile')"/>
                  </b>&#160;
                  <xsl:value-of select="$Action"/>
                </xsl:if>
              </div>
              <div class="descriptionsections">
                <xsl:if test="string-length($Profiles) != 0">
                  <b>
                    <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleProfiles', 'KBLocFile')"/>
                  </b>&#160;
                  <xsl:value-of select="$Profiles"/>
                </xsl:if>
              </div>
              <div class="descriptionsections">
                <xsl:if test="string-length($LocalPorts) != 0">
                  <b>
                    <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleLocalPorts', 'KBLocFile')"/>
                  </b>&#160;
                  <xsl:value-of select="$LocalPorts"/>
                </xsl:if>
              </div>
              <div class="descriptionsections">
                <xsl:if test="string-length($RemotePorts) != 0">
                  <b>
                    <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleRemotePorts', 'KBLocFile')"/>
                  </b>&#160;
                  <xsl:value-of select="$RemotePorts"/>
                </xsl:if>
              </div>
              <div class="descriptionsections">
                <xsl:if test="string-length($LocalAddresses) != 0">
                  <b>
                    <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleLocalAddresses', 'KBLocFile')"/>
                  </b>&#160;
                  <xsl:value-of select="$LocalAddresses"/>
                </xsl:if>
              </div>
              <div class="descriptionsections">
                <xsl:if test="string-length($RemoteAddresses) != 0">
                  <b>
                    <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleRemoteAddresses', 'KBLocFile')"/>
                  </b>&#160;
                  <xsl:value-of select="$RemoteAddresses"/>
                </xsl:if>
              </div>
              <div class="descriptionsections">
                <xsl:if test="string-length($Interfaces) != 0">
                  <b>
                    <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleInterfaces', 'KBLocFile')"/>
                  </b>&#160;
                  <xsl:value-of select="$Interfaces"/>
                </xsl:if>
              </div>
              <div class="descriptionsections">
                <xsl:if test="string-length($ICMPs) != 0">
                  <b>
                    <xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleICMPs', 'KBLocFile')"/>
                  </b>&#160;
                  <xsl:value-of select="$ICMPs"/>
                </xsl:if>
              </div>
            </td>
          </tr>
        </table>
      </div>
    </body>
  </html>
</xsl:template>
  
<xsl:template match="*">
</xsl:template>

<msxsl:script language="JScript" implements-prefix="msftscw">
  <![CDATA[

function getDetails(nodeList)
{
    strReturn = "";
    
    if (nodeList != null ) {
        xmlNode = nodeList.nextNode();
        
        if ( xmlNode != null ) {
            xmlNodeDetails		= xmlNode.selectSingleNode("./Details");
            xmlNodeSCWDetails	= xmlNode.selectSingleNode("./SCWDetails");
            
            if ( xmlNodeDetails != null ) {
                strReturn = xmlNodeDetails.text;
                strReturn += " ";
            }
            
            if ( xmlNodeSCWDetails != null ) {
                strReturn += xmlNodeSCWDetails.text;
            }			
        }
    }
    
    return strReturn;
}

function getStartupMode(strStartupModeText) {

    strxPath = "SCWPolicy/SCWKBLocSection/";
    
    switch ( strStartupModeText ) {
        case "Automatic":
        case "Manual":
        case "Disabled":
            strStartupModeText = "" + strStartupModeText;
            break;		
        default:
            strStartupModeText = "Unknown";
            break;
    }
    
    strxPath +=	strStartupModeText;
                                 
    strReturn = getString(strxPath, "KBLocFile");
    
    return strReturn;
}

function getServiceDisplayName(strServiceDisplayName, strName) {
    if  ( (strServiceDisplayName == null) || ( strServiceDisplayName.length <= 0 ) ) {
        strServiceDisplayName = strName;
    }
    
    return strServiceDisplayName;
}

/////////////////////////
//                     //
// Firewall Section... //
//                     //
/////////////////////////

function getNodeAttr(node, attrName)
{
    var strReturn = "";
    
    if (node == null)
    {
        return strReturn;
    }
    
    var attributes = node.attributes;
    var attribute = attributes.getNamedItem(attrName); 

    if (attribute != null)
    {
        strReturn = attribute.text;
    }
    
    return strReturn;
}

function Merge2Lists(list1, list2)
{
    var strReturn = "";
    
    if (list1 != null && list1 != "")
    {
        strReturn += list1;
    }
    
    if (list2 != null && list2 != "")
    {
        if (strReturn != "")
        {
            strReturn += ", ";
        }
        strReturn += list2;
    }
    
    return strReturn;
}

function MergeLists(list1, list2, list3, list4, list5, list6, list7, list8, list9, list10)
{
    var strReturn = "";
    
    strReturn = Merge2Lists(list1, list2);
    strReturn = Merge2Lists(strReturn, list3);
    strReturn = Merge2Lists(strReturn, list4);
    strReturn = Merge2Lists(strReturn, list5);
    strReturn = Merge2Lists(strReturn, list6);
    strReturn = Merge2Lists(strReturn, list7);
    strReturn = Merge2Lists(strReturn, list8);
    strReturn = Merge2Lists(strReturn, list9);
    strReturn = Merge2Lists(strReturn, list10);
    
    return strReturn;
}

function getFirewallRules(requiredRules, allRules)
{
    var strReturn = "";
    
    if (requiredRules == null)
    {
        return strReturn;
    }
    
    for (var iRequiredRule = 0; 
         iRequiredRule < requiredRules.length; 
         ++iRequiredRule)
    {
        var requiredRule = requiredRules.item(iRequiredRule);
        var requiredRuleId = getNodeAttr(requiredRule, "Id");

        for (var iRule = 0; 
             iRule < allRules.length; 
             ++iRule)
        {
            var rule = allRules.item(iRule);
            var ruleId = getNodeAttr(rule, "Id");
            
            if (ruleId == requiredRuleId)
            {
                if (strReturn != "")
                {
                    strReturn += ", ";
                }
            
                strReturn += getNodeAttr(rule, "Name");
            }
        }
    }
    
    return strReturn;
}

function getProfiles(nodeList)
{
    var strReturn = "";
    
    if (nodeList == null)
    {
        strReturn = "Domain, Public, Private";
        return strReturn;
    }
    
    for (var i = 0; i < nodeList.length; ++i)
    {
        var node = nodeList.item(i);
        
        if (strReturn != "")
        {
            strReturn += ", ";
        }
        
        strReturn += getNodeAttr(node, "Type");
    }
        
    return strReturn;
}

function getSpecialPorts(nodeList)
{
    var strReturn = "";
    
    if (nodeList == null)
    {
        return strReturn;
    }
    
    var node = nodeList.item(0);
        
    if (node == null)
    {
        return strReturn;
    }

    strReturn = getNodeAttr(node, "SpecialPorts");

    return strReturn;
}

function getSpecificPorts(nodeList)
{
    var strReturn = "";
    
    if (nodeList == null)
    {
        return strReturn;
    }
    
    for (var i = 0; i < nodeList.length; ++i)
    {
        var node = nodeList.item(i);
        
        if (strReturn != "")
        {
            strReturn += ", ";
        }
        
        strReturn += getNodeAttr(node, "Value");
    }
    
    return strReturn;
}

function getCustomPorts(nodeList)
{
    var strReturn = "";
    
    if (nodeList == null)
    {
        return strReturn;
    }
    
    for (var i = 0; i < nodeList.length; ++i)
    {
        var node = nodeList.item(i);
        
        if (strReturn != "")
        {
            strReturn += ", ";
        }
        
        strReturn += getNodeAttr(node, "ResultValue");
    }
    
    return strReturn;
}

function getSpecialAddresses(nodeList, keyword)
{
    var strReturn = "";
    
    if (nodeList == null)
    {
        return strReturn;
    }
    
    var node = nodeList.item(0);
        
    if (node == null)
    {
        return strReturn;
    }

    if (getNodeAttr(node, keyword) == "True")
    {
        strReturn = keyword;
    }

    return strReturn;
}

function getAddresses(nodeList)
{
    var strReturn = "";
    
    if (nodeList == null)
    {
        return strReturn;
    }
    
    for (var i = 0; i < nodeList.length; ++i)
    {
        var node = nodeList.item(i);
        
        if (strReturn != "")
        {
            strReturn += ", ";
        }
        
        strReturn += getNodeAttr(node, "Value");
    }
    
    return strReturn;
}

function getRanges(nodeList)
{
    var strReturn = "";
    
    if (nodeList == null)
    {
        return strReturn;
    }
    
    for (var i = 0; i < nodeList.length; ++i)
    {
        var node = nodeList.item(i);
        
        if (strReturn != "")
        {
            strReturn += ", ";
        }
        
        strReturn += getNodeAttr(node, "Begin");
        strReturn += " - ";
        strReturn += getNodeAttr(node, "End");
    }
    
    return strReturn;
}

function getSubnets(nodeList)
{
    var strReturn = "";
    
    if (nodeList == null)
    {
        return strReturn;
    }
    
    for (var i = 0; i < nodeList.length; ++i)
    {
        var node = nodeList.item(i);
        
        if (strReturn != "")
        {
            strReturn += ", ";
        }
        
        strReturn += getNodeAttr(node, "Address");
        strReturn += "/";
        strReturn += getNodeAttr(node, "PrefixLength");
    }
        
    return strReturn;
}

function getInterfaces(nodeList)
{
    var strReturn = "";
    
    if (nodeList == null)
    {
        return strReturn;
    }
    
    for (var i = 0; i < nodeList.length; ++i)
    {
        var node = nodeList.item(i);
        
        if (strReturn != "")
        {
            strReturn += ", ";
        }
        
        strReturn += getNodeAttr(node, "Id");
    }
        
    return strReturn;
}

function getICMPs(nodeList)
{
    var strReturn = "";
    
    if (nodeList == null)
    {
        return strReturn;
    }
    
    for (var i = 0; i < nodeList.length; ++i)
    {
        var node = nodeList.item(i);
        
        if (strReturn != "")
        {
            strReturn += ", ";
        }
        
        strReturn += getNodeAttr(node, "Type");
        strReturn += "/";
        strReturn += getNodeAttr(node, "Code");
    }
        
    return strReturn;
}

]]>
</msxsl:script>
    
</xsl:stylesheet>

Anon7 - 2022
AnonSec Team