home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / WindowsServerTrial / server.iso / sources / install.wim / 2 / Windows / System32 / ScwAuditExt.dll / FILE / 103
Extensible Markup Language  |  2008-01-19  |  5KB  |  91 lines

  1.  ■<?xml version="1.0" encoding="UTF-16"?>
  2. <xsl:stylesheet 
  3.     version="1.0" 
  4.     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  5.     xmlns:msxsl="urn:schemas-microsoft-com:xslt"
  6.     xmlns:ssr="http://microsoft.com/sce/ssr"
  7.     >
  8. <msxsl:script xmlns:msxsl="urn:schemas-microsoft-com:xslt"
  9.             language="VBScript"
  10.             implements-prefix="ssr">
  11.     
  12.     Function TranslateType (Node)
  13.     
  14.             AttribValue = Node.nextNode().attributes.getNamedItem("Type").text
  15.         TranslateType = "Error"
  16.  
  17.          If (AttribValue = "System") Then
  18.             TranslateType = "AuditSystemEvents"
  19.         ElseIf (AttribValue = "Logon") Then
  20.             TranslateType = "AuditLogonEvents"
  21.         ElseIf (AttribValue = "ObjectAccess") Then
  22.             TranslateType = "AuditObjectAccess"
  23.         ElseIf (AttribValue = "PrivilegeUse") Then
  24.             TranslateType = "AuditPrivilegeUse"
  25.         ElseIf (AttribValue = "PolicyChange") Then
  26.             TranslateType = "AuditPolicyChange"
  27.         ElseIf (AttribValue = "AccountManagement") Then
  28.             TranslateType = "AuditAccountManage"
  29.         ElseIf (AttribValue = "DetailedTracking") Then
  30.             TranslateType = "AuditProcessTracking"
  31.         ElseIf (AttribValue = "DirectoryServiceAccess") Then
  32.             TranslateType = "AuditDSAccess"
  33.         ElseIf (AttribValue = "AccountLogon") Then
  34.             TranslateType = "AuditAccountLogon"
  35.         End If
  36.         
  37.     End Function
  38.     Function TranslateValue (Node)
  39.     
  40.         Set NodeReal = Node.nextNode()
  41.             AttribValueSuccess = NodeReal.attributes.getNamedItem("Success").text
  42.             AttribValueFailure = NodeReal.attributes.getNamedItem("Failure").text
  43.             TranslateValue = "0"
  44.         
  45.         If (AttribValueSuccess = "True") And (AttribValueFailure = "True") Then
  46.             TranslateValue = "3"
  47.         ElseIf (AttribValueSuccess = "True") And (AttribValueFailure = "False") Then
  48.             TranslateValue = "1"
  49.         ElseIf (AttribValueSuccess = "False") And (AttribValueFailure = "False") Then
  50.             TranslateValue = "0"
  51.         ElseIf (AttribValueSuccess = "False") And (AttribValueFailure = "True") Then
  52.             TranslateValue = "2"
  53.         End If
  54.         
  55.     End Function
  56. </msxsl:script>
  57. <xsl:output method="text" indent="no"/>
  58. <xsl:template match="Rule/Parameters/Parameter">
  59. [Unicode]
  60. Unicode=yes
  61. [Version]
  62. signature="$CHICAGO$"
  63. Revision=1
  64. [Event Audit]
  65. <xsl:for-each select="Event">
  66. <xsl:variable name="Event" select="."/>
  67. <xsl:value-of select="ssr:TranslateType($Event)"/> = <xsl:value-of select="ssr:TranslateValue($Event)"/>,
  68. </xsl:for-each>
  69. </xsl:template>
  70. </xsl:stylesheet>