home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / WindowsServerTrial / server.iso / sources / install.wim / 2 / Windows / System32 / ComplianceExtensions.dll / FILE / 151 < prev    next >
Extensible Markup Language  |  2008-01-19  |  4KB  |  93 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.             
  13.     Function RegTypeAndData(TypeNodeList, DataNodeList)
  14.     
  15.         Set TypeNode = TypeNodeList.nextNode()
  16.         Set DataNode = DataNodeList.nextNode()
  17.                 
  18.         RegType = "4"
  19.         
  20.         DataLen = Len(DataNode.text) 
  21.         
  22.         If (TypeNode.text = "REG_NONE") Then
  23.             RegType = "0"
  24.         ElseIf (TypeNode.text = "REG_SZ") Then
  25.             RegType = "1"
  26.         ElseIf (TypeNode.text = "REG_EXPAND_SZ") Then
  27.             RegType = "2"
  28.         ElseIf (TypeNode.text = "REG_BINARY") Then
  29.             RegType = "3"
  30.         ElseIf (TypeNode.text = "REG_DWORD") Then
  31.             RegType = "4"
  32.         ElseIf (TypeNode.text = "REG_MULTI_SZ") Then
  33.             RegType = "7"
  34.         End If
  35.         
  36.         if  ( DataLen = 0 ) and ( RegType = "0") then
  37.             RegTypeAndData = "-1," + vbCrLf
  38.         else         
  39.             RegTypeAndData = "" + RegType + "," + DataNode.text + vbCrLf
  40.         End if 
  41.         
  42.     End Function
  43.     Function Hive (NodeList)
  44.     
  45.         Set Node = NodeList.nextNode()
  46.         Hive = ""
  47.         
  48.         If (Node.text = "HKEY_LOCAL_MACHINE") Then
  49.             Hive = "MACHINE"
  50.         ElseIf (Node.text = "HKEY_CLASSES_ROOT") Then
  51.             Hive = "CLASSES_ROOT"
  52.         ElseIf (Node.text = "HKEY_USERS") Then
  53.             Hive = "USERS"
  54.         End If
  55.         
  56.     End Function
  57. </msxsl:script>
  58. <xsl:output method="text" indent="no"/>
  59. <xsl:template match="Rule/Parameters/Parameter">
  60. [Unicode]
  61. Unicode=yes
  62. [Version]
  63. signature="$CHICAGO$"
  64. Revision=1
  65. [Registry Values]
  66. <xsl:for-each select="Value">
  67. <xsl:variable name="Type" select="Type"/>
  68. <xsl:variable name="Data" select="Data"/>
  69. <xsl:variable name="Hive" select="Hive"/>
  70. <xsl:value-of select="ssr:Hive($Hive)"/>\<xsl:value-of select="Key"/>\<xsl:value-of select="Name"/>=<xsl:value-of select="ssr:RegTypeAndData($Type,$Data)"/>
  71. </xsl:for-each>
  72. </xsl:template>
  73. </xsl:stylesheet>