[Oval-commits] r343 - in trunk/ovaldi: . docs doxygen project project/Win32 project/Win32/vc8 project/linux project/linux/el3 project/linux/el4 rpm src src/linux src/probes src/probes/independent src/probes/linux src/probes/solaris src/probes/unix src/probes/windows src/solaris src/windows xml

Pavel Vinogradov blaze-guest at alioth.debian.org
Sun Apr 20 11:55:04 UTC 2008


Author: blaze-guest
Date: 2008-04-20 11:55:02 +0000 (Sun, 20 Apr 2008)
New Revision: 343

Added:
   trunk/ovaldi/docs/
   trunk/ovaldi/docs/README.txt
   trunk/ovaldi/docs/build.linux.txt
   trunk/ovaldi/docs/build.win32.txt
   trunk/ovaldi/docs/ovaldi.1
   trunk/ovaldi/docs/terms.txt
   trunk/ovaldi/docs/version.txt
   trunk/ovaldi/doxygen/
   trunk/ovaldi/doxygen/doxygen.linux.config
   trunk/ovaldi/doxygen/doxygen.solaris.config
   trunk/ovaldi/doxygen/doxygen.windows.config
   trunk/ovaldi/project/
   trunk/ovaldi/project/Win32/
   trunk/ovaldi/project/Win32/vc8/
   trunk/ovaldi/project/Win32/vc8/OVALInterpreter.vcproj
   trunk/ovaldi/project/linux/
   trunk/ovaldi/project/linux/Makefile
   trunk/ovaldi/project/linux/el3/
   trunk/ovaldi/project/linux/el3/libxalan-c.so.110.0
   trunk/ovaldi/project/linux/el3/libxalanMsg.so.110.0
   trunk/ovaldi/project/linux/el3/libxerces-c.so.27.0
   trunk/ovaldi/project/linux/el4/
   trunk/ovaldi/project/linux/el4/libxalan-c.so.110.0
   trunk/ovaldi/project/linux/el4/libxalanMsg.so.110.0
   trunk/ovaldi/project/linux/el4/libxerces-c.so.27.0
   trunk/ovaldi/project/linux/ovaldi.sh
   trunk/ovaldi/rpm/
   trunk/ovaldi/rpm/ovaldi.spec
   trunk/ovaldi/src/
   trunk/ovaldi/src/AbsComponent.cpp
   trunk/ovaldi/src/AbsComponent.h
   trunk/ovaldi/src/AbsCriteria.cpp
   trunk/ovaldi/src/AbsCriteria.h
   trunk/ovaldi/src/AbsDataCollector.cpp
   trunk/ovaldi/src/AbsDataCollector.h
   trunk/ovaldi/src/AbsEntity.cpp
   trunk/ovaldi/src/AbsEntity.h
   trunk/ovaldi/src/AbsFileFinder.cpp
   trunk/ovaldi/src/AbsFileFinder.h
   trunk/ovaldi/src/AbsFunctionComponent.cpp
   trunk/ovaldi/src/AbsFunctionComponent.h
   trunk/ovaldi/src/AbsObject.cpp
   trunk/ovaldi/src/AbsObject.h
   trunk/ovaldi/src/AbsObjectCollector.cpp
   trunk/ovaldi/src/AbsObjectCollector.h
   trunk/ovaldi/src/AbsProbe.cpp
   trunk/ovaldi/src/AbsProbe.h
   trunk/ovaldi/src/AbsState.cpp
   trunk/ovaldi/src/AbsState.h
   trunk/ovaldi/src/AbsVariable.cpp
   trunk/ovaldi/src/AbsVariable.h
   trunk/ovaldi/src/Analyzer.cpp
   trunk/ovaldi/src/Analyzer.h
   trunk/ovaldi/src/Behavior.cpp
   trunk/ovaldi/src/Behavior.h
   trunk/ovaldi/src/CollectedObject.cpp
   trunk/ovaldi/src/CollectedObject.h
   trunk/ovaldi/src/CollectedSet.cpp
   trunk/ovaldi/src/CollectedSet.h
   trunk/ovaldi/src/Common.cpp
   trunk/ovaldi/src/Common.h
   trunk/ovaldi/src/ComponentFactory.cpp
   trunk/ovaldi/src/ComponentFactory.h
   trunk/ovaldi/src/ComponentValue.cpp
   trunk/ovaldi/src/ComponentValue.h
   trunk/ovaldi/src/ConcatFunction.cpp
   trunk/ovaldi/src/ConcatFunction.h
   trunk/ovaldi/src/ConstantVariable.cpp
   trunk/ovaldi/src/ConstantVariable.h
   trunk/ovaldi/src/Criteria.cpp
   trunk/ovaldi/src/Criteria.h
   trunk/ovaldi/src/Criterion.cpp
   trunk/ovaldi/src/Criterion.h
   trunk/ovaldi/src/Definition.cpp
   trunk/ovaldi/src/Definition.h
   trunk/ovaldi/src/DocumentManager.cpp
   trunk/ovaldi/src/DocumentManager.h
   trunk/ovaldi/src/EntityComparator.cpp
   trunk/ovaldi/src/EntityComparator.h
   trunk/ovaldi/src/EscapeRegexFunction.cpp
   trunk/ovaldi/src/EscapeRegexFunction.h
   trunk/ovaldi/src/Exception.cpp
   trunk/ovaldi/src/Exception.h
   trunk/ovaldi/src/ExtendedDefinition.cpp
   trunk/ovaldi/src/ExtendedDefinition.h
   trunk/ovaldi/src/ExternalVariable.cpp
   trunk/ovaldi/src/ExternalVariable.h
   trunk/ovaldi/src/Filter.cpp
   trunk/ovaldi/src/Filter.h
   trunk/ovaldi/src/FilterEntity.cpp
   trunk/ovaldi/src/FilterEntity.h
   trunk/ovaldi/src/Item.cpp
   trunk/ovaldi/src/Item.h
   trunk/ovaldi/src/ItemEntity.cpp
   trunk/ovaldi/src/ItemEntity.h
   trunk/ovaldi/src/LiteralComponent.cpp
   trunk/ovaldi/src/LiteralComponent.h
   trunk/ovaldi/src/LocalVariable.cpp
   trunk/ovaldi/src/LocalVariable.h
   trunk/ovaldi/src/Log.cpp
   trunk/ovaldi/src/Log.h
   trunk/ovaldi/src/MD5.cpp
   trunk/ovaldi/src/MD5.h
   trunk/ovaldi/src/Main.cpp
   trunk/ovaldi/src/Main.h
   trunk/ovaldi/src/Object.cpp
   trunk/ovaldi/src/Object.h
   trunk/ovaldi/src/ObjectComponent.cpp
   trunk/ovaldi/src/ObjectComponent.h
   trunk/ovaldi/src/ObjectEntity.cpp
   trunk/ovaldi/src/ObjectEntity.h
   trunk/ovaldi/src/ObjectFactory.cpp
   trunk/ovaldi/src/ObjectFactory.h
   trunk/ovaldi/src/ObjectReader.cpp
   trunk/ovaldi/src/ObjectReader.h
   trunk/ovaldi/src/OvalEnum.cpp
   trunk/ovaldi/src/OvalEnum.h
   trunk/ovaldi/src/OvalMessage.cpp
   trunk/ovaldi/src/OvalMessage.h
   trunk/ovaldi/src/PossibleRestrictionType.cpp
   trunk/ovaldi/src/PossibleRestrictionType.h
   trunk/ovaldi/src/PossibleValueType.cpp
   trunk/ovaldi/src/PossibleValueType.h
   trunk/ovaldi/src/REGEX.cpp
   trunk/ovaldi/src/REGEX.h
   trunk/ovaldi/src/RestrictionType.cpp
   trunk/ovaldi/src/RestrictionType.h
   trunk/ovaldi/src/Set.cpp
   trunk/ovaldi/src/Set.h
   trunk/ovaldi/src/SetObject.cpp
   trunk/ovaldi/src/SetObject.h
   trunk/ovaldi/src/State.cpp
   trunk/ovaldi/src/State.h
   trunk/ovaldi/src/StateEntity.cpp
   trunk/ovaldi/src/StateEntity.h
   trunk/ovaldi/src/SubstringFunction.cpp
   trunk/ovaldi/src/SubstringFunction.h
   trunk/ovaldi/src/Test.cpp
   trunk/ovaldi/src/Test.h
   trunk/ovaldi/src/TestedItem.cpp
   trunk/ovaldi/src/TestedItem.h
   trunk/ovaldi/src/VariableComponent.cpp
   trunk/ovaldi/src/VariableComponent.h
   trunk/ovaldi/src/VariableFactory.cpp
   trunk/ovaldi/src/VariableFactory.h
   trunk/ovaldi/src/VariableValue.cpp
   trunk/ovaldi/src/VariableValue.h
   trunk/ovaldi/src/Version.cpp
   trunk/ovaldi/src/Version.h
   trunk/ovaldi/src/XmlCommon.cpp
   trunk/ovaldi/src/XmlCommon.h
   trunk/ovaldi/src/XmlProcessor.cpp
   trunk/ovaldi/src/XmlProcessor.h
   trunk/ovaldi/src/XslCommon.cpp
   trunk/ovaldi/src/XslCommon.h
   trunk/ovaldi/src/linux/
   trunk/ovaldi/src/linux/DataCollector.cpp
   trunk/ovaldi/src/linux/DataCollector.h
   trunk/ovaldi/src/linux/FileFinder.cpp
   trunk/ovaldi/src/linux/FileFinder.h
   trunk/ovaldi/src/linux/ObjectCollector.cpp
   trunk/ovaldi/src/linux/ObjectCollector.h
   trunk/ovaldi/src/linux/ProbeFactory.cpp
   trunk/ovaldi/src/linux/ProbeFactory.h
   trunk/ovaldi/src/linux/SystemInfo.cpp
   trunk/ovaldi/src/linux/SystemInfo.h
   trunk/ovaldi/src/probes/
   trunk/ovaldi/src/probes/independent/
   trunk/ovaldi/src/probes/independent/EnvironmentVariableProbe.cpp
   trunk/ovaldi/src/probes/independent/EnvironmentVariableProbe.h
   trunk/ovaldi/src/probes/independent/FamilyProbe.cpp
   trunk/ovaldi/src/probes/independent/FamilyProbe.h
   trunk/ovaldi/src/probes/independent/FileHashProbe.cpp
   trunk/ovaldi/src/probes/independent/FileHashProbe.h
   trunk/ovaldi/src/probes/independent/FileMd5Probe.cpp
   trunk/ovaldi/src/probes/independent/FileMd5Probe.h
   trunk/ovaldi/src/probes/independent/TextFileContentProbe.cpp
   trunk/ovaldi/src/probes/independent/TextFileContentProbe.h
   trunk/ovaldi/src/probes/independent/VariableProbe.cpp
   trunk/ovaldi/src/probes/independent/VariableProbe.h
   trunk/ovaldi/src/probes/independent/XmlFileContentProbe.cpp
   trunk/ovaldi/src/probes/independent/XmlFileContentProbe.h
   trunk/ovaldi/src/probes/linux/
   trunk/ovaldi/src/probes/linux/DPKGInfoProbe.cpp
   trunk/ovaldi/src/probes/linux/DPKGInfoProbe.h
   trunk/ovaldi/src/probes/linux/InetListeningServersProbe.cpp
   trunk/ovaldi/src/probes/linux/InetListeningServersProbe.h
   trunk/ovaldi/src/probes/linux/RPMInfoProbe.cpp
   trunk/ovaldi/src/probes/linux/RPMInfoProbe.h
   trunk/ovaldi/src/probes/solaris/
   trunk/ovaldi/src/probes/solaris/readme.txt
   trunk/ovaldi/src/probes/unix/
   trunk/ovaldi/src/probes/unix/FileProbe.cpp
   trunk/ovaldi/src/probes/unix/FileProbe.h
   trunk/ovaldi/src/probes/unix/ProcessProbe.cpp
   trunk/ovaldi/src/probes/unix/ProcessProbe.h
   trunk/ovaldi/src/probes/unix/UnameProbe.cpp
   trunk/ovaldi/src/probes/unix/UnameProbe.h
   trunk/ovaldi/src/probes/windows/
   trunk/ovaldi/src/probes/windows/AccessTokenProbe.cpp
   trunk/ovaldi/src/probes/windows/AccessTokenProbe.h
   trunk/ovaldi/src/probes/windows/AuditEventPolicyProbe.cpp
   trunk/ovaldi/src/probes/windows/AuditEventPolicyProbe.h
   trunk/ovaldi/src/probes/windows/FileEffectiveRightsProbe.cpp
   trunk/ovaldi/src/probes/windows/FileEffectiveRightsProbe.h
   trunk/ovaldi/src/probes/windows/FileProbe.cpp
   trunk/ovaldi/src/probes/windows/FileProbe.h
   trunk/ovaldi/src/probes/windows/GroupProbe.cpp
   trunk/ovaldi/src/probes/windows/GroupProbe.h
   trunk/ovaldi/src/probes/windows/LockoutPolicyProbe.cpp
   trunk/ovaldi/src/probes/windows/LockoutPolicyProbe.h
   trunk/ovaldi/src/probes/windows/PasswordPolicyProbe.cpp
   trunk/ovaldi/src/probes/windows/PasswordPolicyProbe.h
   trunk/ovaldi/src/probes/windows/RegistryProbe.cpp
   trunk/ovaldi/src/probes/windows/RegistryProbe.h
   trunk/ovaldi/src/probes/windows/SidProbe.cpp
   trunk/ovaldi/src/probes/windows/SidProbe.h
   trunk/ovaldi/src/probes/windows/UserProbe.cpp
   trunk/ovaldi/src/probes/windows/UserProbe.h
   trunk/ovaldi/src/probes/windows/WMIProbe.cpp
   trunk/ovaldi/src/probes/windows/WMIProbe.h
   trunk/ovaldi/src/solaris/
   trunk/ovaldi/src/solaris/DataCollector.cpp
   trunk/ovaldi/src/solaris/DataCollector.h
   trunk/ovaldi/src/solaris/FileFinder.cpp
   trunk/ovaldi/src/solaris/FileFinder.h
   trunk/ovaldi/src/solaris/ObjectCollector.cpp
   trunk/ovaldi/src/solaris/ObjectCollector.h
   trunk/ovaldi/src/solaris/ProbeFactory.cpp
   trunk/ovaldi/src/solaris/ProbeFactory.h
   trunk/ovaldi/src/solaris/SystemInfo.cpp
   trunk/ovaldi/src/solaris/SystemInfo.h
   trunk/ovaldi/src/updateversion.pl
   trunk/ovaldi/src/windows/
   trunk/ovaldi/src/windows/DataCollector.cpp
   trunk/ovaldi/src/windows/DataCollector.h
   trunk/ovaldi/src/windows/FileFinder.cpp
   trunk/ovaldi/src/windows/FileFinder.h
   trunk/ovaldi/src/windows/ObjectCollector.cpp
   trunk/ovaldi/src/windows/ObjectCollector.h
   trunk/ovaldi/src/windows/ProbeFactory.cpp
   trunk/ovaldi/src/windows/ProbeFactory.h
   trunk/ovaldi/src/windows/SystemInfo.cpp
   trunk/ovaldi/src/windows/SystemInfo.h
   trunk/ovaldi/src/windows/WindowsCommon.cpp
   trunk/ovaldi/src/windows/WindowsCommon.h
   trunk/ovaldi/xml/
   trunk/ovaldi/xml/aix-definitions-schema.xsd
   trunk/ovaldi/xml/aix-system-characteristics-schema.xsd
   trunk/ovaldi/xml/apache-definitions-schema.xsd
   trunk/ovaldi/xml/apache-system-characteristics-schema.xsd
   trunk/ovaldi/xml/catos-definitions-schema.xsd
   trunk/ovaldi/xml/catos-system-characteristics-schema.xsd
   trunk/ovaldi/xml/esx-definitions-schema.xsd
   trunk/ovaldi/xml/esx-system-characteristics-schema.xsd
   trunk/ovaldi/xml/evaluation-ids.xsd
   trunk/ovaldi/xml/freebsd-definitions-schema.xsd
   trunk/ovaldi/xml/freebsd-system-characteristics-schema.xsd
   trunk/ovaldi/xml/hpux-definitions-schema.xsd
   trunk/ovaldi/xml/hpux-system-characteristics-schema.xsd
   trunk/ovaldi/xml/independent-definitions-schema.xsd
   trunk/ovaldi/xml/independent-system-characteristics-schema.xsd
   trunk/ovaldi/xml/ios-definitions-schema.xsd
   trunk/ovaldi/xml/ios-system-characteristics-schema.xsd
   trunk/ovaldi/xml/linux-definitions-schema.xsd
   trunk/ovaldi/xml/linux-system-characteristics-schema.xsd
   trunk/ovaldi/xml/macos-definitions-schema.xsd
   trunk/ovaldi/xml/macos-system-characteristics-schema.xsd
   trunk/ovaldi/xml/oval-common-schema.xsd
   trunk/ovaldi/xml/oval-definitions-schema.xsd
   trunk/ovaldi/xml/oval-definitions-schematron.xsl
   trunk/ovaldi/xml/oval-results-schema.xsd
   trunk/ovaldi/xml/oval-system-characteristics-schema.xsd
   trunk/ovaldi/xml/oval-variables-schema.xsd
   trunk/ovaldi/xml/results_to_html.xsl
   trunk/ovaldi/xml/solaris-definitions-schema.xsd
   trunk/ovaldi/xml/solaris-system-characteristics-schema.xsd
   trunk/ovaldi/xml/unix-definitions-schema.xsd
   trunk/ovaldi/xml/unix-system-characteristics-schema.xsd
   trunk/ovaldi/xml/windows-definitions-schema.xsd
   trunk/ovaldi/xml/windows-system-characteristics-schema.xsd
   trunk/ovaldi/xml/xmldsig-core-schema.xsd
Log:
Import original ovaldi 5.4.2

Added: trunk/ovaldi/docs/README.txt
===================================================================
--- trunk/ovaldi/docs/README.txt	                        (rev 0)
+++ trunk/ovaldi/docs/README.txt	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,568 @@
+   	
+
+****************************************************
+
+                  OVAL Interpreter
+
+ Copyright (c) 2002 - 2008 - The MITRE Corporation
+
+****************************************************
+
+The MITRE Corporation developed the Open Vulnerability and Assessment
+Language (OVAL) Interpreter to provide the OVAL Community with an open
+source reference implementation of the language and its Definitions.
+The OVAL Interpreter uses OVAL Definitions to gather security relevant
+configuration information on a computer (e.g., rpm parameters, 
+registry keys, file information, etc.), analyze the information for 
+vulnerabilities and configuration issues, and report the results of the 
+analysis for each definition. 
+
+You may download the Interpreter to any computer you wish, and to as
+many computers as you wish.  
+
+BY USING THE OVAL INTERPRETER, YOU SIGNIFY YOUR ACCEPTANCE OF THE
+TERMS AND CONDITIONS OF USE.  IF YOU DO NOT AGREE TO THESE TERMS, DO NOT
+USE THE INTERPRETER.
+
+Please refer to the terms.txt file or 
+http://oval.mitre.org/about/bsd_license.html 
+for more information.
+
+
+-- CONTENTS --
+
+  I    INSTALLATION
+         A. Red Hat Linux 
+         B. Sun Solaris
+         C. Microsoft Windows 
+  II   USING THE INTERPRETER
+         A. Required Privileges
+         B. Data Protection
+         C. Obtaining Updated Data Files
+         D. Quick Usage Guide
+         E. Advanced Usage
+  III  INPUT AND OUTPUT
+         A. Input
+         B. Output
+  IV   PCRE
+  V    XERCES
+  VI   XALAN
+  VII  TROUBLESHOOTING
+  VIII REPORTING PROBLEMS
+  IX   USEFUL LINKS
+
+
+-- I -- INSTALLATION --
+
+  Download an appropriate installation file from the OVAL Web site,
+  (http://oval.mitre.org) by following the 'Download' link to the
+  Interpreters.  Once you have downloaded the Interpreter, follow the
+  corresponding instructions to install the OVAL Interpreter on
+  your system.
+
+  A. Red Hat Linux Installation
+
+       The OVAL Interpreter can be installed and run on Red
+       Hat Enterprise Linux 3 and 4.
+
+       Install the RPM simply by running the following command:
+
+       # rpm -ivh <Definition Interpreter RPM>
+
+       The RPM places the following files on the system.  To learn their
+       exact location after install, run:  rpm -ql ovaldi.
+
+       Executables:
+       ovaldi.sh - Shell Script to simplify execution of the Definition
+	           Interpreter
+       ovaldi - Definition Interpreter binary
+
+       Libraries:
+       libxerces-c.so.27.0 - Xerces XML library
+       libxalan-c.so.110.0 - Xalan XSL library
+       libxalanMsg.so.110.0 - Xalan Message library
+       libpcre.so.0.0.1 - PCRE Regular Expression library
+
+       Documentation:
+       README.txt - This file
+       terms.txt - License and Terms of Use
+       version.txt - OVAL Interpreter change log
+
+       XML Schema:
+       OVAL schema files
+       evaluation-ids.xsd - XML Schema that defines a format for inputing a 
+                            set of definition ids to evaluate.
+       xmldsig-core-schema.xsd - XML digital signature schema
+
+       XSL:
+       oval-definitions-schematron.xsl - OVAL Definition Schematron validation rules
+       results_to_html.xsl - A simple xsl that formats an oval-results document as html
+ 
+       The .so file for the Xerces library must be made accessible to
+       the Definition Interpreter binary.  The ovaldi RPM places a 
+       pre-compiled version in /usr/lib/ovaldi/ and appends this directory
+       to your /etc/ld.so.conf file.
+
+       To run the Definition Interpreter, run:
+
+       # /usr/sbin/ovaldi.sh
+
+       A result summary will be output to the screen, and detailed System
+       Characteristic and Output Results will be output to /var/log/ovaldi.
+	
+  B. Sun Solaris Installation
+
+       Not yet supported.
+
+
+  C. Microsoft Windows Installation
+     
+       The OVAL Interpreter can be installed and run on
+       Microsoft Windows NT 2000/XP/Server 2003.
+
+       Install the Interpreter by running the installer
+       executable - ovaldisetupX.X.exe
+
+       The installer is a self-extracting zip archive that prompts
+       the user for an installation directory 
+       ('C:\Program Files\OVAL\ovaldi\' by default)
+       and installs the Interpreter and its supporting files.
+
+       Executables:
+       ovaldi.exe - OVAL Interpreter binary
+
+       Libraries:
+       xerces-c_2_7_0.dll - Xerces XML library
+       msvcr71.dll - Microsoft C Runtime Library
+       pcre.dll - Perl-compatible regular-expression library
+       Xalan-C_1_10.dll - Xalan XSLT library
+       XalanMessages_1_10.dll - Xalan XSLT library
+
+       Documentation:
+       README.txt - This file
+       terms.txt - License and Terms of Use
+       version.txt - Definition Interpreter change log
+
+       XML Schema:
+       OVAL schema files
+       evaluation-ids.xsd - XML Schema that defines a format for inputing a 
+                            set of definition ids to evaluate.
+       xmldsig-core-schema.xsd - XML digital signature schema
+
+       XSL:
+       oval-definitions-schematron.xsl - OVAL Definition Schematron validation rules
+       results_to_html.xsl - A simple xsl that formats an oval-results document as html
+
+-- II -- USING THE INTERPRETER --
+
+  A. Required Privileges -- IMPORTANT NOTE:
+
+     In order to collect all of the system configuration data required
+     to correctly evaluate OVAL Definitions, the OVAL Interpreter
+     MUST BE RUN WITH ADMINISTRATOR/ROOT PRIVILEGES.
+
+     Certain system data referenced by OVAL Definitions is only
+     available to privileged accounts.  This includes information
+     about running processes, and potentially registry key and file
+     information (depending on local security settings).  While it is 
+     possible to run the OVAL Interpreter as a non-privileged user, 
+     the results of the analysis may not convey the true state of the
+     system.
+
+
+  B. Data Protection -- IMPORTANT NOTE:
+
+     The OVAL Interpreter collects system configuration data only
+     available to a user with Administrator/root access.  That data
+     may be stored locally in a XML file.  In addition, the 
+     vulnerability status of the system is written to a file.  
+     SINCE THIS IS SENSITIVE INFORMATION, IT IS STRONGLY RECOMMENDED
+     THAT THE OVAL INTERPRETER DIRECTORY BE RESTRICTED TO 
+     ADMINISTRATOR ACCESS ONLY.
+
+
+  C. Obtaining the Latest OVAL Definition Data Files:
+
+     OVAL Definitions are created and modified on a regular basis,
+     therefore it is advised that you check the Data Files page on
+     the OVAL Web Site before running the Interpreter to ensure
+     that you are using the most up-to-date Definitions.  Make sure
+     to note the MD5 signature of the data file, as it will be
+     needed to execute the Interpreter.
+
+     Data files page:
+     http://oval.mitre.org/repository/download/index.html
+
+     Additionally it is recommended that you join the 
+     "OVAL-DATA-UPDATE" email list.  This list provides subscribers with
+     reports of new OVAL definitions, updates, and other detailed
+     technical information regarding OVAL.  This list is intended for
+     heavy technical users of OVAL, such as tool and service developers,
+     vulnerability database maintainers, or those who require timely
+     notification of new definitions.  Messages are sent when new OVAL
+     data is available, which is approximately once per week.  To
+     subscribe to the list, go to the Free Newsletters page on the
+     OVAL Web Site.
+
+     http://oval.mitre.org/community/registration.html
+
+
+  D. Quick Usage Guide:
+
+  1) As the Interpreter is only a reference implementation, it has
+     purposefully been designed as solely a command-line utility.
+     Therefore, to execute the Interpreter, you will first have to
+     open a command window, and change to the Interpreter installation
+     directory.
+
+  2) Download a new data file and move it into the Interpreter
+     installation directory. Rename the file to 'definitions.xml'.
+
+  3) Run the Interpreter, supplying the MD5 checksum of the data file as
+     a command line option.
+
+     > ovaldi MD5Hash
+
+     After verifying the integrity of the data file using the MD5
+     checksum, the OVAL Interpreter will read the 'definitions.xml' 
+     file to determine what data to collect from the system, will
+     analyze the collected data against the 'definitions.xml' file,
+     and will report its findings.
+
+
+  E. Advanced Usage:
+
+     The OVAL Interpreter accepts a number of command-line options:
+
+     Command Line: ovaldi [options] MD5Hash
+
+     Options:
+      -h           = show options available from the command line.
+
+     Definition Evaluation Options:
+      -o filename  = path to the oval-definitions xml file. 
+                     DEFAULT="definitions.xml"
+      -v filename  = path to external variable values file.
+                     DEFAULT="external-variables.xml"
+      -e <string>  = evaluate the specified list of definitions. Supply
+                     definition ids as a comma seperated list like: 
+                     oval:com.example:def:123,oval:com.example:def:234
+      -f filename  = path to a file containing a list of definitions to be 
+                     evaluated. The file must comply with the evaluation-id schema.
+
+     Input Validation Options:
+      -m           = do not verify the oval-definitions file with an MD5 hash
+      -n           = perform Schematron validation of the oval-definitions file.
+      -c filename  = path to xsl for oval-definitions Schematron validation. 
+                     DEFAULT="oval-definitions-schematron.xsl"    
+
+     Data Collection Options:
+      -i filename  = path to input System Characteristics file. Evaluation will
+                     be based on the contents of the file.
+
+     Result Output Options:
+      -d filename  = save system-characteristics data to the specified XML file.
+                     DEFAULT="system-characteristics.xml"
+      -r filename  = save oval-results to the specified XML file.
+                     DEFAULT="oval-results.xml"
+      -s           = do not apply a stylesheet to the results xml.
+      -t filename  = apply the specified xsl to the results xml.
+                     DEFAULT="results_to_html.xsl"
+      -x filename  = output xsl transform results to the specified file.
+                     DEFAULT="results.html"
+
+     Other Options:
+      -p           = print all information and error messages.
+      -z           = return md5 of current oval-definitions file.
+
+
+     In more detail: 
+     -h -- Displays command line options.
+
+     -o -- Specifies the pathname of the OVAL Definition file to use.
+           If none is specified than the Interpreter will default to
+           "definitions.xml" in the Interpreter directory.
+
+     -v -- Specifies the pathname of the external variable file to use.
+           If none is specified then the Interpreter will default to
+           "external-variables.xml" in the Interpreter directory.           
+
+     -e -- Specifies a set of OVAL Definition ids to evaluate in the input
+           OVAL Definitions Document. Definition Ids should be comma 
+           separated without spaces. All OVAL Definitions in the list
+           are evaluated in the input OVAL Definitions Document if they
+           exist in the input document. Any Definition Ids not found will
+           be assigned an error status. Any Definitions in the input 
+           document that are not in the list will be marked as 'Not 
+           Evaluated'.            
+
+     -f -- Specifies a the path to an xml file containing the set of
+           OVAL Definition ids to evaluate in the input OVAL Definitions
+           Document. The input xml file must comply with the evaluation-ids.xsd.
+           All OVAL Definitions in the input evaluation-ids document are 
+           evaluated if they exist in the input OVAL Definitions Document. Any
+           Definition Ids not found will be assigned an error result. Any 
+           Definitions in the input document that are not in the list will be 
+           assigned a 'Not Evaluated' evaluated.  
+
+     -m -- Run without requiring an MD5 checksum.  Running the
+           Interpreter with this option DISABLES an important security
+           feature.  In normal usage, a trusted checksum provided on the
+           command line is used to verify the integrity of the OVAL
+           Definitions file.
+
+           Use of this option is recommended only when testing your own
+           draft definitions before submitting them to the OVAL Community 
+           Forum for public review.
+
+     -n -- If set run Schematron validation on the input OVAL Definitions
+           Document. Schematron validation is currently optional. In the 
+           future the OVAL Compatibility program will likely require 
+           Schematron validation. When Schematron validation is required by the
+           OVAL Language this reference implementation will also require 
+           Schematron validation.  
+                     
+     -c -- Specifies the pathname of the oval-definitions-schematron.xsl
+           to be used for Schematron validation. If none is specified 
+           then the Interpreter will default to 
+           "oval-definitions-schematron.xsl" in the Interpreter directory.
+
+     -i -- Specifies the pathname of a System Characteristics file that
+           is to be used as the basis of the analysis.  In this mode,
+           the Interpreter does not perform data collection on the
+           local system, but relies upon the input file, which may
+           have been generated on another system.
+          
+     -d -- Specifies the pathname of the file to which collected
+           configuration data is to be saved. This data is stored in the
+           format defined by the Systems Characteristics Schema. 
+
+     -r -- Specifies the pathname of the file to which analysis results
+           are to be saved.  This data is stored according to the format
+           defined by the OVAL Results Schema.  If none is specified 
+           than the Interpreter will default to "results.xml" in the 
+           Interpreter directory.
+
+     -s -- If set do not apply the xsl to the OVAL Results xml.
+
+     -t -- Specifies the pathname of the xsl file which should be used to
+           transform the oval results. If none is specified then the Interpreter 
+           will default to "results_to_html.xsl" in the Interpreter directory.
+
+     -x -- Specifies the pathname of the file which xsl transform results
+           are to be saved.  If none is specified then the Interpreter 
+           will default to "results.html" in the Interpreter directory.
+
+     -p -- Verbose output.  Print all information and error message to the 
+           console.
+
+     -z -- Calculates and prints to the screen the MD5 checksum of the
+           current data file (definitions.xml by default, or as specified
+           by the -o option).  This can be used to manually compare the
+           current file with the trusted checksum available from the 
+           OVAL Web site.
+
+     MD5Hash -- The MD5 checksum expected for the current data file
+           (definitions.xml by default, or as specified by the -o option).
+           The Interpreter calculates the actual checksum of the
+           Data file, and compares it to this value provided on the
+           command line, to verify the data file's integrity.  Checksums
+           are available from the OVAL Web site.
+
+           The checksum verification ensures that the data file has not
+           been modified: that the OVAL definitions have not been 
+           tampered with, or potentially malicious content added.
+           Unless the -m option is specified, the MD5Hash is REQUIRED to
+           run the Interpreter.
+
+
+-- III -- INPUT AND OUTPUT --
+
+The input and the output formats used by the OVAL Interpreter are
+defined by individual XML Schemas. The data collected about a system is
+considered input and its format is defined by System Characteristics
+Schema. The detailed results generated by a system analysis are considered
+output and their format is defined by the OVAL Results Schema.  These XML
+Schemas have been provided to allow other applications to more easily
+implement their own system information collection utilities and manipulate
+the results of an analysis for inclusion in other applications.
+
+  A. Input
+
+     The OVAL Interpreter analysis engine accepts an XML data
+     model in the format defined by the System Characteristics Schema
+     (system-characteristics-schema.xsd). This data model can be
+     generated locally by the Interpreter's data collection engine, or
+     can be provided at runtime using the -i command line option.
+
+     If the data model is provided at runtime, the only requirement is
+     that it be formatted according to the System Characteristics
+     Schema.  The data can be gathered using a tool other than
+     the OVAL Interpreter, on another system, running a different
+     operating system, but as long as the data is in the correct format,
+     analysis can be performed.  What this means is, not only can one 
+     system be used to run the analysis for a number of systems, but 
+     data models can be altered/fabricated to conduct 'what-if' scenarios.
+
+  B. Output
+
+     The OVAL Interpreter provides detailed output from an analysis
+     according to the OVAL Results Schema.  This output includes the
+     outcome of individual tests, as well as each Definition as a
+     whole.
+
+     The OVAL Results Schema is provided to allow the results of an
+     analysis to be utilized by other applications.  For example, an
+     application could convert the detailed results to HTML for
+     display on a Web site, or use the detailed results to determine
+     what if any patches should be applied to a system.  As mentioned
+     above, the -r command line option may be used to redirect the
+     output to a location other than the default.     
+
+
+-- IV -- PCRE --
+
+The OVAL Interpreter uses the open source PCRE library.  The
+binary was compiled with version 6.3 of the pcre library.  
+From the PCRE Web site:
+
+  "Regular expression support is provided by the PCRE library 
+   package, which is open source software, written by Philip Hazel,
+   and copyright by the University of Cambridge, England."
+
+For more information about PCRE visit:
+    http://www.pcre.org
+
+To download the source code for PCRE, please use the following ftp
+site:
+    ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
+
+
+-- V -- XERCES --
+
+The OVAL Interpreter uses the open source Xerces library.  The
+binary was compiled with version 2.7 of the xerces-c library.  From
+the Xerces Web site:
+
+  "This product includes software developed by the Apache Software
+  Foundation (http://www.apache.org/)."
+
+For more information about Xerces visit:
+    http://xerces.apache.org/
+
+The source code is also available at the above Web site.
+
+
+-- VI -- XALAN --
+
+The OVAL Interpreter uses the open source Xalan library.  The
+binary was compiled with version 1.10 of the xalan-c library.  From
+the Xalan Web site:
+
+  "This product includes software developed by the Apache Software
+  Foundation (http://www.apache.org/)."
+
+For more information about Xalan visit:
+    http://xalan.apache.org/
+
+The source code is also available at the above Web site.
+
+
+-- VII -- TROUBLESHOOTING --
+
+*********************************** 
+
+Q:
+
+I am trying to run the OVAL Interpreter but all I get is a
+message saying "You must supply the MD5 hash for the data file or use
+the -m command to skip the MD5 check."
+
+A:
+
+The OVAL Interpreter is set up to validate that the
+Data file has not been tampered with by checking the MD5 hash (or 
+checksum) generated from the data file on your computer with an MD5
+hash provided by MITRE on the OVAL Web site.  In order to start the
+OVAL Interpreter you must provide this MD5 hash.  From the command
+line, type the program name 'ovaldi.exe' then add a space and type
+the MD5 hash value from the OVAL Web site.  For example:
+
+    ovaldi.exe 897237212305b2d7a4dd5fa6b4e226fc
+
+If you want to use some of the advanced option flags, place them
+between the program name and the MD5 hash.  For example:
+
+    ovaldi.exe -i myData.xml 897237212305b2d7a4dd5fa6b4e226fc
+
+If you do not want to supply the MD5 hash and are confident that the
+Data file on your computer has not been tampered with, you can supply
+the -m flag to skip the MD5 check.  For example:
+
+    ovaldi.exe -m
+
+Be careful when using the -m option.  A data file that has been
+tampered with can cause misleading results to be generated.  MITRE
+recommends that you always supply a valid MD5 hash from the OVAL Web
+site when using the OVAL Interpreter.
+
+*********************************** 
+Q:
+
+I ran the OVAL Interpreter with the -p flag and I got a bunch of 
+errors.  Should I worry about them?  The program seemed to run 
+fine.
+
+A:
+
+Most of the messages produced when the -p flag is set are the result
+of registry keys and files not existing on your system.  This kind of
+message is informational, rather than an error.  In more detail:
+
+An OVAL Definition may have tests to retrieve information about
+specified objects (files, registry keys, etc).  On some systems, 
+these objects simply do not exist, perhaps because a particular
+application or software component is not installed.
+
+For example, installed patches are determined by the existence of
+certain registry keys.  If a patch is not installed, then the 
+registry key will not exist.  When the Interpreter evaluates an OVAL 
+definition, it attempts to collect information about this registry
+key on the system.  If the key is not found, the patch is not
+installed.  Since these missing objects are not really errors, they
+are not normally reported to the user, but appear when the -v option
+is specified.
+
+Scan through the list of messages produced by the -p flag and look 
+for errors that are not common.  These could signify something that
+is working incorrectly.
+
+
+-- VIII -- REPORTING PROBLEMS --
+
+To report a problem with the OVAL Interpreter, please send an email
+to oval at mitre.org with a brief description of the problem, the version
+of the OVAL Interpreter, and the platform upon which the problem was
+detected.  The version of the OVAL Interpreter can be found in a banner
+at the top of any output.
+
+-- IX ­ USEFUL LINKS --
+
+OVAL Web site -- http://oval.mitre.org
+
+OVAL Interpreters -- http://oval.mitre.org/language/download/interpreter/index.html
+
+Data Files -- http://oval.mitre.org/repository/download/index.html
+
+Terms of Use -- http://oval.mitre.org/about/bsd_license.html
+
+CVE List -- http://cve.mitre.org
+
+OVAL-Data-Updates e-Newsletter -- http://oval.mitre.org/news/newsletters.html
+
+
+
+----------------------------------------------------------
+OVAL is sponsored by US-CERT at the U.S. Department of Homeland
+Security. OVAL and the OVAL logo are trademarks of The MITRE
+Corporation. Copyright 2006, The MITRE Corporation (www.mitre.org).


Property changes on: trunk/ovaldi/docs/README.txt
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/docs/build.linux.txt
===================================================================
--- trunk/ovaldi/docs/build.linux.txt	                        (rev 0)
+++ trunk/ovaldi/docs/build.linux.txt	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,216 @@
+****************************************************
+
+             OVAL Interpreter
+
+           Build Instructions - Linux
+
+****************************************************
+
+               OVAL Interpreter
+
+              Build Instructions
+
+  Copyright (c) 2002-2008, The MITRE Corporation
+
+****************************************************
+
+The MITRE Corporation developed the OVAL Interpreter to 
+demonstrate the usability of the OVAL Language. The source for
+the Interpreter is freely available for reference use. This
+document describes the steps you need to build the OVAL 
+Interpreter.
+
+For information about using the Interpreter refer to the ReadMe.txt
+file included with the Interpreter, or the OVAL Web site.
+
+      OVAL Interpreter:
+      http://oval.mitre.org/language/download/interpreter/index.html
+
+BY USING THE OVAL INTERPRETER, YOU SIGNIFY YOUR ACCEPTANCE OF THE
+TERMS AND CONDITIONS OF USE.  IF YOU DO NOT AGREE TO THESE TERMS,
+DO NOT USE THE OVAL INTERPRETER.  SEE THE TERMS.TXT FILE INCLUDED
+WITH THE INTERPRETER, OR http://oval.mitre.org/about/bsd_license.html.
+
+
+-- CONTENTS --
+
+  I    OVERVIEW
+        A. Source Distribution
+        B. Source Distribution Contents
+        C. Supporting Libraries
+  II  BUILD INSTRUCTIONS
+        A. PCRE Library
+        B. Xerces Library
+        C. Xalan Library
+        D. Building the OVAL Interpreter
+  III  PCRE
+  IV   XERCES
+  V    XALAN
+  VI   REPORTING PROBLEMS
+  VII  USEFUL LINKS
+
+-- I -- OVERVIEW --
+
+Download the appropriate installation files from the OVAL Web site.
+
+  A. Source Distributions
+
+       The source for the Interpreter is freely available on the OVAL
+       Web site.  There is currently a bzipped tarball for linux users 
+       that contains all the source code as well as a Makefile for 
+       the interpreter.  To download the source go to:
+
+            http://oval.mitre.org/language/download/interpreter/index.html
+
+  B. Source Distribution Contents
+
+       The source code distribution contains the source for
+       the OVAL Interpreter. The source distribution does not include
+       the source for the libraries needed to compile the Interpreter.
+
+
+  C. Supporting Libraries
+
+       The Interpreter relies on three c/c++ libraries that can be found
+       on the web. See sections III - V for more information about the
+       specific libraries used and where to download their source from.
+     
+-- II -- BUILD INSTRUCTIONS --
+
+The following instructions describe how to build the OVAL Interpreter on a
+Linux system.  The OVAL Interpreter has been built and tested on Red Hat 
+32 bit versions of Enterprise Linux 3 and 4. The source distribution includes
+a Makefile that has can be used to build the Interpreter on Linux systems.
+Before the Interpreter can be built the supporting libraries must be installed.
+Follow the instruction below to setup and install the supporting libraries.
+
+  A. PCRE (Perl-compatible regular-expression) Library
+ 
+       Red Hat Enterprise 3 and Red Hat 9 generally include the PCRE 
+       library.  If it has not been installed your system, it is easiest
+       to simply install the pcre-devel RPM, available from Red Hat via
+       your install media or Internet download method.
+
+  B. Xerces Library
+
+       The Definition Interpreter uses the open source Xerces library.  The
+       binary was compiled with version 2.7.0 of the xerces-c library.  From
+       the Xerces Web site:
+
+         "This product includes software developed by the Apache Software
+	 Foundation (http://www.apache.org/)."
+
+       For more information about Xerces visit:
+
+         http://xml.apache.org
+
+       The source code is also available at the above Web site.
+
+       Note: Our ovaldi RPM places a pre-compiled copy of this library into
+             /usr/lib/ovaldi to reduce the dependencies that an unsophisticated
+             user would need to resolve.
+
+  C. Xalan Library
+
+       The Definition Interpreter uses the open source Xalan library.  The
+       binary was compiled with version 1.10.0 of the xalan-c library.  From
+       the Xalan Web site:
+
+         "This product includes software developed by the Apache Software
+	 Foundation (http://www.apache.org/)."
+
+       For more information about Xerces visit:
+
+         http://xml.apache.org
+
+       The source code is also available at the above Web site.
+
+       Note: Our ovaldi RPM places a pre-compiled copy of this library into
+             /usr/lib/ovaldi to reduce the dependencies that an unsophisticated
+             user would need to resolve.
+
+  D. Building the OVAL Interpreter
+
+      After installing the PCRE, Xerces, and Xalan libraries, change into the 
+      directory:
+
+        <installed path>\Interpreter\project\linux
+
+      From that directory, simply run "make" to build the XML Definition
+      Interpreter.
+ 
+-- III -- PCRE --
+
+The Interpreter uses the open source PCRE library.  The Interpreter
+currently uses version 6.3 of the PCRE library.  From the PCRE Web site:
+
+  "Regular expression support is provided by the PCRE library 
+   package, which is open source software, written by Philip Hazel,
+   and copyright by the University of Cambridge, England."
+
+For more information about PCRE visit:
+
+    http://www.pcre.org
+
+To download the source code for PCRE, please use the following ftp
+site:
+
+    ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
+
+-- IV -- XERCES --
+
+The Definition Interpreter uses the open source Xerces library.  The
+binary was compiled with version 2.7.0 of the xerces-c library.  From
+the Xerces Web site:
+
+  "This product includes software developed by the Apache Software
+  Foundation (http://www.apache.org/)."
+
+For more information about Xerces visit:
+
+    http://xml.apache.org
+
+The source code is also available at the above Web site.
+
+
+    Note: Our ovaldi RPM places a pre-compiled copy of this library into
+          /usr/lib/ovaldi to reduce the dependencies that an unsophisticated
+          user would need to resolve.
+
+
+-- V -- XALAN --
+
+The Definition Interpreter uses the open source Xalan library.  The
+binary was compiled with version 1.10.0 of the xalan-c library.  From
+the Xalan Web site:
+
+  "This product includes software developed by the Apache Software
+  Foundation (http://www.apache.org/)."
+
+For more information about Xalan visit:
+
+    http://xml.apache.org
+
+The source code is also available at the above Web site.
+
+-- VI -- REPORTING PROBLEMS --
+
+To report a problem with OVAL Interpreter, please
+send an email with a brief description of the problem to 
+oval at mitre.org. Include the platform the Interpreter was run on, and
+the version of the Interpreter and definitions file.
+
+-- VII -- USEFUL LINKS --
+
+OVAL Web site -- http://oval.mitre.org
+
+OVAL Interpreter Source Code -- http://oval.mitre.org/language/download/interpreter/index.html
+
+Terms of Use -- http://oval.mitre.org/about/bsd_license.html
+
+----------------------------------------------------------
+OVAL is sponsored by US-CERT at the U.S. Department of Homeland
+Security. OVAL and the OVAL logo are trademarks of The MITRE
+Corporation. Copyright 2002-2008, The MITRE Corporation (www.mitre.org).
+
+


Property changes on: trunk/ovaldi/docs/build.linux.txt
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/docs/build.win32.txt
===================================================================
--- trunk/ovaldi/docs/build.win32.txt	                        (rev 0)
+++ trunk/ovaldi/docs/build.win32.txt	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,242 @@
+****************************************************
+
+               OVAL Interpreter
+
+              Build Instructions
+
+  Copyright (c) 2002-2008, The MITRE Corporation
+
+****************************************************
+
+The MITRE Corporation developed the OVAL Interpreter to 
+demonstrate the usability of the OVAL Language. The source for
+the Interpreter is freely available for reference use. This
+document describes the steps you need to build the OVAL 
+Interpreter.
+
+For information about using the Interpreter refer to the ReadMe.txt
+file included with the Interpreter, or the OVAL Web site.
+
+      OVAL Interpreter:
+      http://oval.mitre.org/language/download/interpreter/index.html
+
+BY USING THE OVAL INTERPRETER, YOU SIGNIFY YOUR ACCEPTANCE OF THE
+TERMS AND CONDITIONS OF USE.  IF YOU DO NOT AGREE TO THESE TERMS,
+DO NOT USE THE OVAL INTERPRETER.  SEE THE TERMS.TXT FILE INCLUDED
+WITH THE INTERPRETER, OR http://oval.mitre.org/about/bsd_license.html.
+
+
+-- CONTENTS --
+
+  I    OVERVIEW
+        A. Source Distribution
+        B. Source Distribution Contents
+        C. Supporting Libraries
+  II   BUILD INSTRUCTIONS
+        A. PCRE Library
+        B. Xerces Library
+        C. Xalan Library
+        D. Building the OVAL Interpreter
+  III  PCRE
+  IV   XERCES
+  V    XALAN
+  VI   REPORTING PROBLEMS
+  VII   USEFUL LINKS
+
+-- I -- OVERVIEW --
+
+Download the appropriate installation files from the OVAL Web site.
+
+  A. Source Distributions
+
+       The source for the Interpreter is freely available on the OVAL
+       Web site.  There is currently a .zip file for windows users that
+       contains all the source code as well as a VC7.1 project 
+       interpreter.  To download the source go to:
+
+            http://oval.mitre.org/language/download/interpreter/index.html
+
+  B. Source Distribution Contents
+
+       The source code distribution contains the source for
+       the OVAL Interpreter and a Visual C++ 7.1 project. The source 
+       distribution does not include the source for the libraries
+       needed to compile the Interpreter. 
+
+  C. Supporting Libraries
+
+       The Interpreter relies on three c/c++ libraries that can be found
+       on the web. See sections III - V for more information about the
+       specific libraries used and where to download their source from.
+
+
+-- II -- BUILD INSTRUCTIONS --
+
+The following instructions describe how to build the OVAL Interpreter 
+on a Windows system.  The OVAL Interpreter has been built on windows 
+and tested on Windows 2000 and Windows XP Pro using VC8. The source 
+distribution includes a project file that has can be used to build the
+Interpreter.  Before the Interpreter can be built the supporting libraries
+must be installed. Follow the instruction below to setup and install the
+supporting libraries.
+
+  A. PCRE (Perl-compatible regular-expression) Library
+ 
+       The simplest way to setup the PCRE library on a Windows system is to
+       download the "Complete package, except sources" (note: download 'Setup'
+       not 'Zip') from:
+       
+          http://gnuwin32.sourceforge.net/packages/pcre.htm
+
+       The download should be an executable that will install the binaries,
+       developer files, and documentation on your machine.  Run this setup
+       program and follow the instructions provided. 
+
+       After the installation is complete you must add the PCRE lib and
+       include directories to Visual C++. Add the following directory to 
+       the include files search path:
+       
+          <installed path>\include
+       
+       Then add the following directory to the library files search path:
+
+          <installed path>\lib
+
+       In Visual C++ 7 the UI for setting up directories can be found by clicking the
+       "Tools" menu then selecting "Options..." next selecting the "Project" folder
+       and then choosing the "VC++ Directories" item.     
+
+
+  B. Xerces Library
+
+       Download install a binary distribution of version 2.7.0 of the xerces-c 
+       library. The download file can be found at:
+
+          http://archive.apache.org/dist/xml/xerces-c/binaries/
+
+       Unzip the binaries and add the location of the xerces-c.dll onto your 
+       path environment variable.
+
+       Add the following directory to the include files search path:
+       
+          <installed path>\include
+
+       Add the following directory to the library files search path:
+
+          <installed path>\lib
+
+       In Visual C++ 7 the UI for setting up directories can be found by clicking the
+       "Tools" menu then selecting "Options..." next selecting the "Project" folder
+       and then choosing the "VC++ Directories" item. 
+
+  C. Xalan Library
+       Download install a binary distribution of version 1.10.0 of the xalan-c 
+       library. The download file can be found at:
+
+          http://archive.apache.org/dist/xml/xalan-c/binaries/
+
+       Unzip the binaries and add the locations of the Xalan-C_1_10.dll and 
+       XalanMessages_1_10.dll to your path environment variable.
+
+       Add the following directory to the include files search path:
+       
+          <installed path>\include
+
+       Add the following directory to the library files search path:
+
+          <installed path>\lib
+
+       In Visual C++ 7 the UI for setting up directories can be found by clicking the
+       "Tools" menu then selecting "Options..." next selecting the "Project" folder
+       and then choosing the "VC++ Directories" item. 
+
+  D. Building the OVAL Interpreter
+
+      After setting up the PCRE, Xerces, and Xalan libraries open the provided project
+      for the OVAL Interpreter. The project is in:
+
+         Visual C++ 8:
+         <installed path>\Interpreters\project\Win32\VC8\OVALInterpreter.vcproj
+
+      From the build menu simply select "build" to build the OVAL Interpreter.
+      Note that a "Debug" and a "Release" build configuration is provided.
+
+      NOTE: There is currently an unresolved bug in the OVAL Interpreter that 
+      results in an error when compiling on Windows. There is a conflict between 
+      the Xerces declaration of a DOMDocument and the msxml.h declaration of the
+      same type. At this time our suggested work around is to comment out the 
+      declaration of DOMDocument in msxml.h on line 9594. This workaround may
+      cause unknown issues with other applications that use msxml.h. So once
+      work on the OVAL Interpreter is completed it is recommended that the 
+      change is undone.
+
+ 
+-- III -- PCRE --
+
+The OVAL Interpreter uses the open source PCRE library.  The Interpreter
+currently uses version 6.3 of the PCRE library.  From the PCRE Web site:
+
+  "Regular expression support is provided by the PCRE library 
+   package, which is open source software, written by Philip Hazel,
+   and copyright by the University of Cambridge, England."
+
+For more information about PCRE visit:
+
+    http://www.pcre.org
+
+To download the source code for PCRE, please use the following ftp
+site:
+
+    ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
+
+
+-- IV -- XERCES --
+
+The OVAL Interpreter uses the open source Xerces library.  The
+binary was compiled with version 2.7 of the xerces-c library.  From
+the Xerces Web site:
+
+  "This product includes software developed by the Apache Software
+  Foundation (http://www.apache.org/)."
+
+For more information about Xerces visit:
+
+    http://xml.apache.org
+
+The source code is also available at the above Web site.
+
+-- V -- XALAN --
+
+The OVAL Interpreter uses the open source Xalan library.  The
+binary was compiled with version 1.10 of the xalan-c library.  From
+the Xalan Web site:
+
+  "This product includes software developed by the Apache Software
+  Foundation (http://www.apache.org/)."
+
+For more information about Xalan visit:
+
+    http://xml.apache.org
+
+The source code is also available at the above Web site.
+
+-- VI -- REPORTING PROBLEMS --
+
+To report a problem with either OVAL Definition Interpreter, please
+send an email with a brief description of the problem to 
+oval at mitre.org. Include the platform the Interpreter was run on, and
+the version of the Interpreter and definitions file.
+
+-- VII -- USEFUL LINKS -- 
+
+OVAL Web site -- http://oval.mitre.org
+
+OVAL Interpreter Source Code -- 
+http://oval.mitre.org/language/download/interpreter/index.html
+
+Terms of Use -- http://oval.mitre.org/about/bsd_license.html
+
+----------------------------------------------------------
+OVAL is sponsored by US-CERT at the U.S. Department of Homeland
+Security. OVAL and the OVAL logo are trademarks of The MITRE
+Corporation. Copyright 2002-2008, The MITRE Corporation (www.mitre.org).


Property changes on: trunk/ovaldi/docs/build.win32.txt
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/docs/ovaldi.1
===================================================================
--- trunk/ovaldi/docs/ovaldi.1	                        (rev 0)
+++ trunk/ovaldi/docs/ovaldi.1	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,108 @@
+.TH ovaldi 1 "January 15, 2008" "Version 5.3" "USER COMMANDS"
+.SH NAME
+ovaldi \- a reference interpreter for the Open Vulnerability and Asessment Language
+.SH SYNOPSIS
+.B ovaldi
+[\-d filename] [\-i filename] [\-o filename] [\-r filename] [\-t filename] [\-v filename] [\-x filename] [\-hmpzs] [MD5Hash]
+.SH DESCRIPTION
+The MITRE Corporation developed the Open Vulnerability and Assessment
+Language (OVAL) Interpreter to provide the OVAL Community with an open
+source reference implementation of the language and its Definitions.
+The OVAL Interpreter uses OVAL Definitions to gather security relevant
+configuration information on a computer (e.g., rpm parameters,
+registry keys, file information, etc.), analyze the information for
+vulnerabilities and configuration issues, and report the results of the
+analysis for each definition.
+.SH OPTIONS
+.TP
+.B \-h
+Displays command line options.
+.TP
+.B \-o filename
+Specifies the pathname of the OVAL Definition file to use.  If none is
+specified than the Interpreter will default to "definitions.xml" in the
+Interpreter directory.
+.TP
+.B \-v filename
+Specifies the pathname of the external variable file to use.  If none is
+specified than the Interpreter will default to "external-variables.xml" in
+the Interpreter directory.
+.TP
+.B \-e definition id list
+Specifies a list of definition ids to evaluate in the input oval-definitions
+document. Supply definition ids as a comma seperated list like: 
+oval:com.example:def:123,oval:com.example:def:234
+.TP
+.B \-f filename
+Path to a file containing a list of definitions to be evaluated. The 
+file must comply with the evaluation-id schema.
+.TP
+.B \-m
+Run without requiring an MD5 checksum.  Running the Interpreter with this
+option DISABLES an important security feature.  In normal usage, a trusted
+checksum provided on the command line is used to verify the integrity of
+the OVAL Definitions file.
+
+Use of this option is recommended only when testing your own draft
+definitions before submitting them to the OVAL Community Forum for public
+review.
+.TP
+.B \-n
+Perform Schematron validation of the oval-defiitions file.
+.TP
+.B \-c filename
+Specifies the pathname of the oval-definitions-schematron.xsl
+to be used for Schematron validation. If none is specified 
+then the Interpreter will default to "oval-definitions-schematron.xsl"
+in the Interpreter directory.
+.TP
+.B \-i filename
+Specifies the pathname of a System Characteristics file that is to be used
+as the basis of the analysis.  In this mode, the Interpreter does not
+perform data collection on the local system, but relies upon the input
+file, which may have been generated on another system.
+.TP
+.B \-d filename
+Specifies the pathname of the file to which collected configuration data is
+to be saved. This data is stored in the format defined by the Systems
+Characteristics Schema.
+.TP
+.B \-r filename
+Specifies the pathname of the file to which analysis results are to be
+saved.  This data is stored according to the format defined by the OVAL
+Results Schema.  If none is specified than the Interpreter will default to
+"results.xml" in the Interpreter directory.
+.TP
+.B \-s
+If set do not apply the xsl to the OVAL Results xml.
+.TP
+.B \-t filename
+Specifies the pathname of the xsl file which should be used to
+transform the oval results. If none is specified then the Interpreter
+will default to "results_to_html.xsl" in the Interpreter directory.
+.TP
+.B \-x filename
+Specifies the pathname of the file which xsl transform results
+are to be saved.  If none is specified then the Interpreter
+will default to "results.html" in the Interpreter directory.
+.TP
+.B \-p
+Verbose output. Print all information and error message to the console.
+.TP
+.B \-z
+Calculates and prints to the screen the MD5 checksum of the current data
+file (definitions.xml by default, or as specified by the -o option).  This
+can be used to manually compare the current file with the trusted checksum
+available from the OVAL Web site.
+.SH EXAMPLES
+.TP
+Run the interpreter against the Linux definitions file, without verifying MD5 checksum:
+.B ovaldi
+\-o linux.definitions.xml
+\-m
+.SH FILES
+.TP
+/usr/share/ovaldi/*.xsd
+The schema files for the OVAL language.
+.SH AUTHOR
+Man page written by Jonathan Baker (bakerj at mitre.org)


Property changes on: trunk/ovaldi/docs/ovaldi.1
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/docs/terms.txt
===================================================================
--- trunk/ovaldi/docs/terms.txt	                        (rev 0)
+++ trunk/ovaldi/docs/terms.txt	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,24 @@
+Copyright (c) 2002-2008, The MITRE Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are
+permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this list
+      of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice, this 
+      list of conditions and the following disclaimer in the documentation and/or other
+      materials provided with the distribution.
+    * Neither the name of The MITRE Corporation nor the names of its contributors may be
+      used to endorse or promote products derived from this software without specific 
+      prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Property changes on: trunk/ovaldi/docs/terms.txt
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/docs/version.txt
===================================================================
--- trunk/ovaldi/docs/version.txt	                        (rev 0)
+++ trunk/ovaldi/docs/version.txt	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,229 @@
+****************************************************
+
+                OVAL Interpreter
+
+  Copyright (c) 2002-2008 - The MITRE Corporation
+
+****************************************************
+
+---------------------------------------
+---        Version 5.4 build 2     ---
+---------------------------------------
+* Updated unix ProcessProbe to match time format changes made for version 5.4
+* Converted to support version 5.4 of OVAL
+
+---------------------------------------
+---        Version 5.3 build 68     ---
+---------------------------------------
+* Corrected bug in REGEX.cpp. Expanded the vector of integers for substrings to allow for more matching. Thanks to Tony Worwood (tony.worwood at lumension.com) for tracking down the bug and fixing it. 
+* Corrected bug in AbsObjectCollector::ProcessSet and AbsObjectCollector::Intersection wich caused set intersections to be improperly evaluated. Thanks to Tony Worwood (tony.worwood at lumension.com) for tracking down the bug and fixing it. 
+* Improved source documentation.
+* Implemented resolve_group and include_group behaviors for win-def:fileeffectiverights_object.
+* Implemented escape_regex function defined in the oval-definitions-schema.
+* Corrected bug in REGEX::EscapeRegexChars() function. When the first char in the input string needed to be escaped the function failed.
+* Corrected bug in SubstringFunction::ComputeValue() function that caused the flag to be set incorrectly.
+* Corrected bug in ProcessProbe. File handles were not properly being closed when reading the /proc dir. Thanks to Sudhakar Govindavajhala (sudhakarg79 at gmail.com) for the tracking down and fixing this issue.
+* Added vendor name to generator elements. Makes use of the xsd:any tag in the generator element definition.
+* Corrected bug in REGEX::GetMatchingSubstrings() function. Matches were not being properly returned.
+* Corrected bug in windows FileFinder that was reporting errors in non error conditions.
+
+---------------------------------------
+---        Version 5.3 build 59     ---
+---------------------------------------
+* Corrected bug in FileEffectiveRightsProbe. The probe was improperly reading the access rights for a file.
+* Improved debug logging in the AuditEventPolicyProbe.
+* Added #include <cstring> to REGEX.h and Common.h to file compiler errors when building with GCC 4.3. Thanks to Lubomir Kundrak (lkundrak at redhat.com) for the fix.
+* Corrected bug in EntityComparator::CompareEvrString. Thanks to Mark Cox (mjc at redhat.com) for the fix.
+* Source code comments were cleaned up.
+* Updated Windows FileProbe to use GetFileTime API for a, m, and c times. Code was previously using stat. The schema documentation said to use GetFileTime.
+* Corrected bug in Windows RegistryProbe that was incorrectly appending a trailing space to binary registry values.
+* Corrected bug in windows/FileEffectiveRightsProbe::GetEffectiveRights. Access right were being read incorrectly. 
+* Corrected bug in caching of Items during evaluation. The cache of items was effectively not being used because the call to cache a new item was made before the item was parsed from the xml. The cache is based on an item's id. The id is not set until the item is parsed.
+* Improved caching code used in Definition, Test, and State evaluate.
+* Corrected bug in RegistryProbe::RetrieveInfo method. When processing a REG_MULTI_SZ value the last value was not being collected. Thanks to Ken Lassesen (ken.lassesen at lumension.com) for reporting the issue.
+* Corrected bug in EntityComparator::CompareInteger. not equals operation was not properly being evaluated.
+* Corrected bug in RegistryProbe::RetrieveInfo method. When processing a REG_SZ value for a registry value set to an empty string a '?' was occasionally being recorded as the value. Thanks to Thayne Harmon (thayne.harmon at lumension.com) for the fix.
+* Corrected bug in XmlFileContentProbe::EvaluateXpath method. The code to transcode a text node's value to a string was not always succeeding.
+* Added support for xpath selection of attribute nodes to existing XmlFileContentProbe::EvaluateXpath method.
+* Corrected bug that was creating a tests and definitions element in the result document even if they were not needed. This only occurs if an input oval-definitions document has no definitions or no tests.
+* Corrected bug in EntityComparator::CompareFloat. not equals operation was not properly being evaluated.
+* Corrected bug in EntityComparator::CompareBoolean. not equals and equals operations were not properly being evaluated. Thanks to Ken Lassesen (ken.lassesen at lumension.com) for reporting the issue.
+* Corrected bug in PasswordPolicyProbe. Code was converting max an min password age to days. Should have been in seconds. Thanks to Ken Lassesen (ken.lassesen at lumension.com) for reporting the issue.
+* Improved error messages in AuditEventPolicyProbe::CollectItems().
+* Improved error messages in FileProbe.
+* Corrected bug in Item::Equals function that returned false when items do not have any object entities. If there are no object entities the two item should be considered equal.
+* Modified AuditEventPolicyProbe::ReadAuditOptions() to treat POLICY_AUDIT_EVENT_UNCHANGED as AUDIT_NONE.
+
+---------------------------------------
+---        Version 5.3 build 40     ---
+---------------------------------------
+* Implemented TextFileContentProbe and documented weaknesses in the oval-definitions-schema. The code for this probe is based on contributions from Pavel Vinogradov (Pavel.Vinogradov at NIXDEV.NET)
+* Added REGEX::GetMatchingSubstrings function to allow matched substrings to be pulled from an input string.
+* Corrected Test::EvaluateCheckExistence method's combining of items based on the check_extistence attribute. The schema documentation was changed causing a code change to the interpreter source.  
+* Corrected bug in processing of AccessToken behaviors. 
+* Corrected bug in EntityCompartator that was causing the parse version string method to fail on 64 bit Linux systems. Thanks to Ken Sorensen (sorensk at losrios.edu) and Mark Cox (mjc at redhat.com) for tracking this down and fixing it. Applied similar fixes to problematic areas of the code.
+* Corrected bug in processing of variable components. Needed to make a copy of the messages associated with a ComponentValue when computing a value for a Component.
+* Corrected bug in AbsObjectCollector::ProcessObject function. The code was not correctly computing the flag value on collected objects. The flag value should be based on the combination of the status value of each referenced item.
+* Updated Linux makefile to support rpm and dpkg package managers on Linux systems.
+* Corrected bug in processing of unix file_object behaviors. This required an update to AbsFileFinder and both the Linux and Windows FileFinder implementations. The bug allowed unsupported unix file_object behaviors to go reported on unix systems. 2 of 4 unix file_object behaviors are supported at this time. Now if an unsupported unix file_object behavior is found an error message is reported.
+* Corrected bug in processing of command line arguments which caused the -p flag to not be considered until after some code had already been executed.
+* Source code comments were cleaned up.
+
+---------------------------------------
+---        Version 5.3 build 20     ---
+---------------------------------------
+* Corrected bug in EntityComparator::ParseVersionStr(). Added error checking to the function to ensure that the input version strings are in a valid format.
+* Added command line option to limit definition evaluation to a set of definition ids provided on the command line. 
+* Added function to list error messages associated with a variable. This gives better error reporting on variables.
+* Added support for previous minor versions of the OVAL Language. The code now allows for any version greater than or equal to version 5.0 and less than or equal to the version of the Oval Interpreter itself.
+* Added support for new account privileges defined in Vista to the AccessTokenProbe.
+* Corrected bug in code that determines the namespace of an element. Reported by Thomas Jones.
+* Added support for behaviors on the win:accesstoken_object.
+* Added support for the ONE operator on criteria.
+* Added support for the new check_existence attribute and modified check attribute on tests.
+* Added doxygen generated source documentation to source distributions.
+* Added support for optional Schematron validation of oval-defintitions documents.
+
+---------------------------------------
+---        Version 5.2 build 9      ---
+---------------------------------------
+* Corrected bug in windows implementation of SystemInfoCollector::GetOSInfo. On some systems the interpreter would not collected system data because of an error thrown when getting the primary host name of the system.
+
+---------------------------------------
+---        Version 5.2 build 8      ---
+---------------------------------------
+* Updated to support OVAL version 5.2
+* Converted windows source distributions to include a VC8 project
+* Windows binaries are now built with Visual Studio 2005(VC8).
+* Added support for recurse_direction and max_depth behaviors on files. 
+* Added support for collection of additional fields in win-sc:file_items.
+* Removed unneeded oval-def xmlns from generated system-characteristics files.
+* Added support for filehash_tests.
+* Corrected bug in results_to_html.xsl that was not creating valid urls to definitions in the results section of the output.
+* Corrected bug in RegistryProbe. Added an additional result value to the list of values that equate to a registry key does not exist on the system. Previously was reporting an error when the key was not found. Fix applied to registry names too.
+* Corrected bug in RegistryProbe. When collected data for a REG_MULTI_SZ if the value was an empty string it was not reported properly which lead to incorrect unknown results.
+* Corrected bug in AbsEntity::Analyze method. This bug caused the interpreter to not be able to properly use variable values in some complex objects. The interpreter then would incorrectly report items as not found on a host.
+
+---------------------------------------
+---        Version 5.1 build 14     ---
+---------------------------------------
+* Added newlines to end of RestrictionType.cpp and ExternalVariable.cpp to prevent compile warnings
+* Added build info to System Characteristics and OVAL Results file generator information.
+* Added /xml/results_to_html.xsl to convert oval results xml files to html for viewing.
+* Added new command line options and supporting code to run a specified xsl on the results xml and output to a specified file.
+* Added comments to collected objects in the System Characteristics output if the object in the OVAL Definition file has a comment.
+* Removed 127.0.0.1 from the list of interfaces in the <system_info/> element.
+* Corrected bug in EntityComparator.h declaration of members functions GetEpochFromEVR, GetVersionFromEVR, and GetReleaseFromEVR. Thanks to Thomas R. Jones [thomas.jones at MAITREYASECURITY.COM]
+* Corrected bug in the data collection process seen when an OVAL Definition file is used that does not contain an <objects/> element. Thanks to Max Vozeler [max.vozeler at LSEXPERTS.DE]
+* Corrected bug in the analysis process seen when an OVAL Definition file is used that does not contain a <definitions/> element.
+* Corrected command line output of results to include extended definitions. 
+* Cleaned up Red Hat rpm's. Created a separate rpm for EL3 and EL4
+* Added man page.
+* Cleaned up Linux src distribution.
+
+---------------------------------------
+---        Version 5.0 build 77     ---
+---------------------------------------
+* Corrected bug determining if a object is applicable when collecting data. 
+
+---------------------------------------
+---        Version 5.0 build 74     ---
+---------------------------------------
+* Corrected bug display of object and definition ids as they are being processed. Bug caused objects that were actually not applicable to be flagged as not collected.
+
+---------------------------------------
+---        Version 5.0 build 71     ---
+---------------------------------------
+* Added support for data collection of win-def:passwordpolicy_object. Need to figure out how to get password_complexity and reversible_encryption fields. 
+* Added support for data collection of win-def:lockoutpolicy_object. 
+* Added support for data collection of win-def:auditeventpolicy_object.
+* Added support for data collection of win-def:sid_test. 
+* Added support for data collection of win-def:fileeffectiverights_test. 
+* Added support for data collection of win-def:accesstoken_test.
+* Added support for data collection of win-def:group_test.
+* Added support for data collection of win-def:user_test.
+* Corrected bug in Object::Parse method. There was a typo in the name of the behaviors element that would cause behaviors to be ignored.
+* Corrected bug in AbsObjectCollector::ProcessSet method. CollectedSets were no always being initialized causing a NULL ptr error.
+* Corrected bug in error reporting on windows FileProbe. Error messages were being appended one after the other resulting in many repeated messages.
+* Corrected bug in Item::Write() method. Only one message element is allowed on a given item.
+
+---------------------------------------
+---        Version 5.0 build 67     ---
+---------------------------------------
+* Added support for external variables. 
+* Cleaned up command line processing. Added better messages when invalid command line options are provided.
+* Corrected typo in parse function that would have caused the datatype on constant variables to be ignored when parsing and always treated as the a string
+* Corrected bug in reporting of result on a tested_item element. In some cases the result was left as it default error value. This did not effect the overall result computation for a test.
+* Corrected bug in Variable probe causing it to always fail to collect variable information.
+* Added support to the WMIProbe for addition datatypes. Previously only supported strings.
+* Corrected bug in AbsObjectCollector that lead to error details not being reported in the system-characteristics file.
+
+---------------------------------------
+---        Version 5.0 build 55     ---
+---------------------------------------
+* Corrected a bug in analysis of extended definitions. Definition result values were not properly cached after initial analysis. Caused incorrect result when a extended definition is used more than once.
+* Corrected a bug in analysis of tests. Tests result values were not properly cached after initial analysis. May have caused in accurate results when a test is reused.
+* Corrected a bug in xmlfilecontent probe and file md5 probe. Both probes were using a windows path separator character regardless of the platform they were run on. This prevented proper data collection on UNIX platforms.
+* Corrected a bug related to locating elements in an oval definition document when all elements are prefixed by an xmlns alias. The search method used was not properly matching prefixed elements. 
+* Corrected bug in Test::Analyze function - When a CollectedObject has a flag value of NOT_COLLECTED_FLAG the result value should be UNKNOWN_RESULT not NOT_EVALUATED_RESULT.
+* Corrected bug in OvalEnum::CombineResultsByCheck method when check was ONLY_ONE_CHECK results were not always correct.
+* Corrected bug in Test::Analyze method. When a CollectedObject has a flag of NOT_COLLECTED_FLAG the result should be UNKNOWN_RESULT. When a check of NONE_EXIST_CHECK is specified the results were not always correct.
+* Corrected bug in xpath code. removed extra ItemEntity created when creating a xmlfilecontent_item.
+* Corrected bug in Definition::Analyze method. Added line to set the flag indicating that the definition has been analyzed.
+* Corrected bug in processing of flag attribute on collected objects when the definition object is a set object. Added new CollectedSet class to support changes.
+
+---------------------------------------
+---       Version 5.0 build 2       ---
+---------------------------------------
+* Included final version of oval v5 schemas
+
+---------------------------------------
+---           Version 5.0 beta 3    ---
+---------------------------------------
+* Updated to support version 5 rc 3 of the OVAL Schema
+* Corrected collection of inetlisteningservers_object
+* Corrected EntityComparator class to follow the oval schema based on conversation on the oval-developer's list
+* TODO: implement AbsProbeFactory class and then refactor the Windows, Solaris, and Linux ProbeFactory classes. This change will simplify the creating of new ProbeFactory classes and provide the set of independent schema probes for all other concrete ProbeFactory classes to utilize.
+* TODO: implement activedirectory_object probe 
+* TODO: create a generic Linux Makefile using autoconf. Currently the Makefile has dependencies on various rpm libraries as does the source code. Using autoconf rpm code and dependencies should be excluded if rpm is not installed.
+
+---------------------------------------
+---           Version 5.0 beta 2    ---
+---------------------------------------
+* Updated to support version 5 rc 2 of the OVAL Schema
+* Added support for Linux data collection for the following objects:
+      - rpminfo_object
+      - inetlisteningservers_object
+* Added support for Unix data collection for the following objects:
+      - file_object
+      - process_object
+      - uname_object
+* Added support for Windows data collection for the following objects:
+      - wmi_object
+* Restructured source tree to better mirror OVAL Schema
+* Added in stubs for future Solaris implementation. (Needs to be implemented) 
+* TODO: implement AbsProbeFactory class and then refactor the Windows, Solaris, and Linux ProbeFactory classes. This change will simplify the creating of new ProbeFactory classes and provide the set of independent schema probes for all other concrete ProbeFactory classes to utilize.
+* TODO: implement activedirectory_object probe 
+* TODO: create a generic Linux Makefile using autoconf. Currently the Makefile has dependencies on various rpm libraries as does the source code. Using autoconf rpm code and dependencies should be excluded if rpm is not installed.
+
+---------------------------------------
+---           Version 5.0 beta 1    ---
+---------------------------------------
+* Initial support for version 5 of the OVAL Schema
+* Does not support external variables
+* Supports only windows data collection for the following objects:
+	- registry_object
+	- unknown_object
+	- xml file content_object
+	- file_object
+	- filemd5_object
+	- variable_object
+	- environemntvariable_object
+	- family_object
+* Supports definition analysis for all types of definitions.
+
+----------------------------------------------------------
+OVAL is sponsored by US-CERT at the U.S. Department of Homeland Security.
+OVAL and the OVAL logo are trademarks of The MITRE Corporation. Copyright 2002-2008, The MITRE Corporation (www.mitre.org).
+
+


Property changes on: trunk/ovaldi/docs/version.txt
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/doxygen/doxygen.linux.config
===================================================================
--- trunk/ovaldi/doxygen/doxygen.linux.config	                        (rev 0)
+++ trunk/ovaldi/doxygen/doxygen.linux.config	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,1260 @@
+# Doxyfile 1.5.2
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file that 
+# follow. The default is UTF-8 which is also the encoding used for all text before 
+# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into 
+# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of 
+# possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = "OVAL Interpreter"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = "5.3"
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = ./doc
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
+# 4096 sub-directories (in 2 levels) under the output directory of each output 
+# format and will distribute the generated files over these directories. 
+# Enabling this option can be useful when feeding doxygen a huge amount of 
+# source files, where putting all generated files in the same directory would 
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = YES
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
+# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, 
+# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, 
+# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, 
+# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is 
+# used as the annotated text. Otherwise, the brief description is used as-is. 
+# If left blank, the following values are used ("$name" is automatically 
+# replaced with the name of the entity): "The $name class" "The $name widget" 
+# "The $name file" "is" "provides" "specifies" "contains" 
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = 
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
+# inherited members of a class in the documentation of that class as if those 
+# members were ordinary class members. Constructors, destructors and assignment 
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user-defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. The tag can be used to show relative paths in the file list. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
+STRIP_FROM_PATH        = c:\dev\OVALDev\tools\Interpreters\v5\
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
+# the path mentioned in the documentation of a class, which tells 
+# the reader which header file to include in order to use a class. 
+# If left blank only the name of the header file containing the class 
+# definition is used. Otherwise one should specify the include paths that 
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    = 
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments will behave just like the Qt-style comments (thus requiring an 
+# explicit @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF      = YES
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member 
+# documentation.
+
+DETAILS_AT_TOP         = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
+# a new page for each member. If set to NO, the documentation of a member will 
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 8
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user-defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
+# sources only. Doxygen will then generate output that is more tailored for C. 
+# For instance, some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
+# sources only. Doxygen will then generate output that is more tailored for Java. 
+# For instance, namespaces will be presented as packages, qualified scopes 
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to 
+# include (a tag file for) the STL sources as input, then you should 
+# set this tag to YES in order to let doxygen match functions declarations and 
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
+# func(std::string) {}). This also make the inheritance and collaboration 
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = YES
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = YES
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local 
+# methods, which are defined in the implementation section but not in 
+# the interface are included in the documentation. 
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these classes will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower-case letters. If set to YES upper-case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consists of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+# If the sources in your project are distributed over multiple directories 
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES       = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
+# doxygen should invoke to get the current version for each file (typically from the 
+# version control system). Doxygen will invoke the program by executing (via 
+# popen()) the command <command> <input-file>, where <command> is the value of 
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
+# provided by doxygen. Whatever the program writes to standard output 
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  = ../src \
+                         ../src/probes/independent \
+                         ../src/probes/linux \
+                         ../src/linux
+
+# This tag can be used to specify the character encoding of the source files that 
+# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default 
+# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. 
+# See http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
+
+FILE_PATTERNS          = *.cpp *.h
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
+# directories that are symbolic links (a Unix filesystem feature) are excluded 
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories. Note that the wildcards are matched 
+# against the file with absolute path, so to exclude all test directories 
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = */svn/*
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
+# (namespaces, classes, functions, etc.) that should be excluded from the output. 
+# The symbol name can be a fully qualified name, a word, or if the wildcard * is used, 
+# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS        = 
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = 
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# ignored.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
+# basis.  Doxygen will compare the file name with each pattern and apply the 
+# filter if there is a match.  The filters are a list of the form: 
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
+# is applied to all files.
+
+FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default) 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code.  Otherwise they will link to the documentstion.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = YES
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = 
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        = 
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output directory.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimized for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = YES
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assignments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
+PREDEFINED             = 
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse 
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
+# or super classes. Setting the tag to NO turns the diagrams off. Note that 
+# this option is superseded by the HAVE_DOT option below. This is only a 
+# fallback. It is recommended to install and use dot, since it yields more 
+# powerful graphs.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc 
+# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to 
+# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to 
+# specify the directory where the mscgen tool resides. If left empty the tool is assumed to 
+# be found in the default search path.
+
+MSCGEN_PATH            = 
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = NO
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = YES
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
+# generate a call dependency graph for every global function or class method. 
+# Note that enabling this option will significantly increase the time of a run. 
+# So in most cases it will be better to enable call graphs for selected 
+# functions only using the \callgraph command.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
+# generate a caller dependency graph for every global function or class method. 
+# Note that enabling this option will significantly increase the time of a run. 
+# So in most cases it will be better to enable caller graphs for selected 
+# functions only using the \callergraph command.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
+# nodes that will be shown in the graph. If the number of nodes in a graph 
+# becomes larger than this value, doxygen will truncate the graph, which is 
+# visualized by representing a node as a red box. Note that doxygen will always 
+# show the root nodes and its direct children regardless of this setting.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, which results in a white background. 
+# Warning: Depending on the platform used, enabling this option may lead to 
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to 
+# read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine   
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be 
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE           = NO


Property changes on: trunk/ovaldi/doxygen/doxygen.linux.config
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/doxygen/doxygen.solaris.config
===================================================================
--- trunk/ovaldi/doxygen/doxygen.solaris.config	                        (rev 0)
+++ trunk/ovaldi/doxygen/doxygen.solaris.config	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,1260 @@
+# Doxyfile 1.5.2
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file that 
+# follow. The default is UTF-8 which is also the encoding used for all text before 
+# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into 
+# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of 
+# possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = "OVAL Interpreter"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = "5.3"
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = ./doc
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
+# 4096 sub-directories (in 2 levels) under the output directory of each output 
+# format and will distribute the generated files over these directories. 
+# Enabling this option can be useful when feeding doxygen a huge amount of 
+# source files, where putting all generated files in the same directory would 
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = YES
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
+# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, 
+# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, 
+# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, 
+# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is 
+# used as the annotated text. Otherwise, the brief description is used as-is. 
+# If left blank, the following values are used ("$name" is automatically 
+# replaced with the name of the entity): "The $name class" "The $name widget" 
+# "The $name file" "is" "provides" "specifies" "contains" 
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = 
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
+# inherited members of a class in the documentation of that class as if those 
+# members were ordinary class members. Constructors, destructors and assignment 
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user-defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. The tag can be used to show relative paths in the file list. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
+STRIP_FROM_PATH        = c:\dev\OVALDev\tools\Interpreters\v5\
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
+# the path mentioned in the documentation of a class, which tells 
+# the reader which header file to include in order to use a class. 
+# If left blank only the name of the header file containing the class 
+# definition is used. Otherwise one should specify the include paths that 
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    = 
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments will behave just like the Qt-style comments (thus requiring an 
+# explicit @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF      = YES
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member 
+# documentation.
+
+DETAILS_AT_TOP         = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
+# a new page for each member. If set to NO, the documentation of a member will 
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 8
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user-defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
+# sources only. Doxygen will then generate output that is more tailored for C. 
+# For instance, some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
+# sources only. Doxygen will then generate output that is more tailored for Java. 
+# For instance, namespaces will be presented as packages, qualified scopes 
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to 
+# include (a tag file for) the STL sources as input, then you should 
+# set this tag to YES in order to let doxygen match functions declarations and 
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
+# func(std::string) {}). This also make the inheritance and collaboration 
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = YES
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = YES
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local 
+# methods, which are defined in the implementation section but not in 
+# the interface are included in the documentation. 
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these classes will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower-case letters. If set to YES upper-case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consists of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+# If the sources in your project are distributed over multiple directories 
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES       = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
+# doxygen should invoke to get the current version for each file (typically from the 
+# version control system). Doxygen will invoke the program by executing (via 
+# popen()) the command <command> <input-file>, where <command> is the value of 
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
+# provided by doxygen. Whatever the program writes to standard output 
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  = ../src \
+                         ../src/probes/independent \
+                         ../src/probes/solaris \
+                         ../src/solaris
+
+# This tag can be used to specify the character encoding of the source files that 
+# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default 
+# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. 
+# See http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
+
+FILE_PATTERNS          = *.cpp *.h
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
+# directories that are symbolic links (a Unix filesystem feature) are excluded 
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories. Note that the wildcards are matched 
+# against the file with absolute path, so to exclude all test directories 
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = */svn/*
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
+# (namespaces, classes, functions, etc.) that should be excluded from the output. 
+# The symbol name can be a fully qualified name, a word, or if the wildcard * is used, 
+# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS        = 
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = 
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# ignored.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
+# basis.  Doxygen will compare the file name with each pattern and apply the 
+# filter if there is a match.  The filters are a list of the form: 
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
+# is applied to all files.
+
+FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default) 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code.  Otherwise they will link to the documentstion.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = YES
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = 
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        = 
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output directory.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimized for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = YES
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assignments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
+PREDEFINED             = 
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse 
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
+# or super classes. Setting the tag to NO turns the diagrams off. Note that 
+# this option is superseded by the HAVE_DOT option below. This is only a 
+# fallback. It is recommended to install and use dot, since it yields more 
+# powerful graphs.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc 
+# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to 
+# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to 
+# specify the directory where the mscgen tool resides. If left empty the tool is assumed to 
+# be found in the default search path.
+
+MSCGEN_PATH            = 
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = NO
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = YES
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
+# generate a call dependency graph for every global function or class method. 
+# Note that enabling this option will significantly increase the time of a run. 
+# So in most cases it will be better to enable call graphs for selected 
+# functions only using the \callgraph command.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
+# generate a caller dependency graph for every global function or class method. 
+# Note that enabling this option will significantly increase the time of a run. 
+# So in most cases it will be better to enable caller graphs for selected 
+# functions only using the \callergraph command.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
+# nodes that will be shown in the graph. If the number of nodes in a graph 
+# becomes larger than this value, doxygen will truncate the graph, which is 
+# visualized by representing a node as a red box. Note that doxygen will always 
+# show the root nodes and its direct children regardless of this setting.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, which results in a white background. 
+# Warning: Depending on the platform used, enabling this option may lead to 
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to 
+# read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine   
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be 
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE           = NO


Property changes on: trunk/ovaldi/doxygen/doxygen.solaris.config
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/doxygen/doxygen.windows.config
===================================================================
--- trunk/ovaldi/doxygen/doxygen.windows.config	                        (rev 0)
+++ trunk/ovaldi/doxygen/doxygen.windows.config	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,1260 @@
+# Doxyfile 1.5.2
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file that 
+# follow. The default is UTF-8 which is also the encoding used for all text before 
+# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into 
+# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of 
+# possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = "OVAL Interpreter Source"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = 5.3
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = ./doc
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
+# 4096 sub-directories (in 2 levels) under the output directory of each output 
+# format and will distribute the generated files over these directories. 
+# Enabling this option can be useful when feeding doxygen a huge amount of 
+# source files, where putting all generated files in the same directory would 
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = YES
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
+# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, 
+# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, 
+# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, 
+# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is 
+# used as the annotated text. Otherwise, the brief description is used as-is. 
+# If left blank, the following values are used ("$name" is automatically 
+# replaced with the name of the entity): "The $name class" "The $name widget" 
+# "The $name file" "is" "provides" "specifies" "contains" 
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = 
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
+# inherited members of a class in the documentation of that class as if those 
+# members were ordinary class members. Constructors, destructors and assignment 
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user-defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. The tag can be used to show relative paths in the file list. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
+STRIP_FROM_PATH        = c:\dev\oval\tools\Interpreters\v5\
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
+# the path mentioned in the documentation of a class, which tells 
+# the reader which header file to include in order to use a class. 
+# If left blank only the name of the header file containing the class 
+# definition is used. Otherwise one should specify the include paths that 
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    = 
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments will behave just like the Qt-style comments (thus requiring an 
+# explicit @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF      = YES
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member 
+# documentation.
+
+DETAILS_AT_TOP         = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
+# a new page for each member. If set to NO, the documentation of a member will 
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 8
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user-defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
+# sources only. Doxygen will then generate output that is more tailored for C. 
+# For instance, some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
+# sources only. Doxygen will then generate output that is more tailored for Java. 
+# For instance, namespaces will be presented as packages, qualified scopes 
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to 
+# include (a tag file for) the STL sources as input, then you should 
+# set this tag to YES in order to let doxygen match functions declarations and 
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
+# func(std::string) {}). This also make the inheritance and collaboration 
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = YES
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = YES
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local 
+# methods, which are defined in the implementation section but not in 
+# the interface are included in the documentation. 
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these classes will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower-case letters. If set to YES upper-case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consists of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+# If the sources in your project are distributed over multiple directories 
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES       = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
+# doxygen should invoke to get the current version for each file (typically from the 
+# version control system). Doxygen will invoke the program by executing (via 
+# popen()) the command <command> <input-file>, where <command> is the value of 
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
+# provided by doxygen. Whatever the program writes to standard output 
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  = ..\src \
+                         ..\src\probes\independent \
+                         ..\src\probes\windows \
+                         ..\src\windows
+
+# This tag can be used to specify the character encoding of the source files that 
+# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default 
+# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. 
+# See http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
+
+FILE_PATTERNS          = *.cpp *.h
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
+# directories that are symbolic links (a Unix filesystem feature) are excluded 
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories. Note that the wildcards are matched 
+# against the file with absolute path, so to exclude all test directories 
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = */svn/*
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
+# (namespaces, classes, functions, etc.) that should be excluded from the output. 
+# The symbol name can be a fully qualified name, a word, or if the wildcard * is used, 
+# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS        = 
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = 
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# ignored.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
+# basis.  Doxygen will compare the file name with each pattern and apply the 
+# filter if there is a match.  The filters are a list of the form: 
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
+# is applied to all files.
+
+FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default) 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code.  Otherwise they will link to the documentstion.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = 
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        = 
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output directory.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimized for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assignments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
+PREDEFINED             = 
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse 
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
+# or super classes. Setting the tag to NO turns the diagrams off. Note that 
+# this option is superseded by the HAVE_DOT option below. This is only a 
+# fallback. It is recommended to install and use dot, since it yields more 
+# powerful graphs.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc 
+# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to 
+# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to 
+# specify the directory where the mscgen tool resides. If left empty the tool is assumed to 
+# be found in the default search path.
+
+MSCGEN_PATH            = 
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = NO
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
+# generate a call dependency graph for every global function or class method. 
+# Note that enabling this option will significantly increase the time of a run. 
+# So in most cases it will be better to enable call graphs for selected 
+# functions only using the \callgraph command.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
+# generate a caller dependency graph for every global function or class method. 
+# Note that enabling this option will significantly increase the time of a run. 
+# So in most cases it will be better to enable caller graphs for selected 
+# functions only using the \callergraph command.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
+# nodes that will be shown in the graph. If the number of nodes in a graph 
+# becomes larger than this value, doxygen will truncate the graph, which is 
+# visualized by representing a node as a red box. Note that doxygen will always 
+# show the root nodes and its direct children regardless of this setting.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, which results in a white background. 
+# Warning: Depending on the platform used, enabling this option may lead to 
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to 
+# read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine   
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be 
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE           = NO


Property changes on: trunk/ovaldi/doxygen/doxygen.windows.config
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/project/Win32/vc8/OVALInterpreter.vcproj
===================================================================
--- trunk/ovaldi/project/Win32/vc8/OVALInterpreter.vcproj	                        (rev 0)
+++ trunk/ovaldi/project/Win32/vc8/OVALInterpreter.vcproj	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,1177 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="OVALInterpreter"
+	ProjectGUID="{07DF4833-B0AB-4276-807F-5758BF0ED7A9}"
+	RootNamespace="OVALInterpreter"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="0"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Debug/DefinitionInterpreter.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE /D _SCL_SECURE_NO_DEPRECATE"
+				Optimization="0"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories="../../../src;../../../src/windows;../../../src/probes/independent;../../../src/probes/windows"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WIN32_DCOM"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				TreatWChar_tAsBuiltInType="false"
+				RuntimeTypeInfo="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile=".\Debug\obj/DefinitionInterpreter.pch"
+				AssemblerListingLocation=".\Debug\obj/"
+				ObjectFile=".\Debug\obj/"
+				ProgramDataBaseFileName=".\Debug\obj/"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				CompileAs="0"
+				ShowIncludes="false"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="Wbemuuid.lib pcre.lib xerces-c_2.lib Xalan-C_1.lib version.lib imagehlp.lib IPHlpAPI.lib Wldap32.lib Netapi32.lib WS2_32.lib User32.lib"
+				OutputFile="Debug/ovaldiD.exe"
+				Version="2.0"
+				LinkIncremental="2"
+				AdditionalLibraryDirectories="..\..\..\build\Win32\Debug"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Debug/ovaldiD.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Release"
+			IntermediateDirectory=".\Release\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Release/DefinitionInterpreter.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE /D _SCL_SECURE_NO_DEPRECATE"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories="../../../src;../../../src/windows;../../../src/probes/windows;../../../src/probes/independent"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WIN32_DCOM"
+				StringPooling="true"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				TreatWChar_tAsBuiltInType="false"
+				RuntimeTypeInfo="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile=".\Release\obj/DefinitionInterpreter.pch"
+				AssemblerListingLocation=".\Release\obj/"
+				ObjectFile=".\Release\obj/"
+				ProgramDataBaseFileName=".\Release\obj/"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				CompileAs="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="Wbemuuid.lib pcre.lib xerces-c_2.lib Xalan-C_1.lib version.lib imagehlp.lib IPHlpAPI.lib Wldap32.lib Netapi32.lib WS2_32.lib"
+				OutputFile="Release/ovaldi.exe"
+				Version="5.0"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				ProgramDatabaseFile=".\Release/ovaldi.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\..\..\src\AbsCriteria.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\AbsDataCollector.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\AbsEntity.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\AbsObject.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\AbsObjectCollector.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\AbsState.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\Analyzer.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\Behavior.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\CollectedObject.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\CollectedSet.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\Criteria.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\Criterion.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\Definition.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\EntityComparator.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\ExtendedDefinition.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\Filter.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\FilterEntity.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\Item.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\ItemEntity.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\Main.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\..\src\Object.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\ObjectEntity.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\ObjectFactory.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\ObjectReader.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\OvalEnum.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\OvalMessage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\Set.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\SetObject.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\State.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ShowIncludes="true"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\..\src\StateEntity.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\Test.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\TestedItem.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\Version.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<Filter
+				Name="probes"
+				>
+				<File
+					RelativePath="..\..\..\src\AbsFileFinder.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\AbsProbe.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\windows\AccessTokenProbe.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\windows\AuditEventPolicyProbe.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\independent\EnvironmentVariableProbe.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\independent\FamilyProbe.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\windows\FileEffectiveRightsProbe.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\windows\FileFinder.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\independent\FileHashProbe.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\independent\FileMd5Probe.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\windows\FileProbe.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\windows\GroupProbe.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\windows\LockoutPolicyProbe.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\windows\PasswordPolicyProbe.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\windows\RegistryProbe.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\windows\SidProbe.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\independent\TextFileContentProbe.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\windows\UserProbe.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\independent\VariableProbe.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\windows\WMIProbe.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\independent\XmlFileContentProbe.cpp"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="util"
+				>
+				<File
+					RelativePath="..\..\..\src\Common.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							Optimization="0"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							BasicRuntimeChecks="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							Optimization="2"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\..\src\DocumentManager.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\Exception.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							Optimization="0"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							BasicRuntimeChecks="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							Optimization="2"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\..\src\Log.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							Optimization="0"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							BasicRuntimeChecks="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							Optimization="2"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\..\src\MD5.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							Optimization="0"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							BasicRuntimeChecks="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							Optimization="2"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\..\src\REGEX.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							Optimization="0"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							BasicRuntimeChecks="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							Optimization="2"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\..\src\XmlCommon.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							Optimization="0"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							BasicRuntimeChecks="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							Optimization="2"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\..\src\XmlProcessor.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							Optimization="0"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							BasicRuntimeChecks="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							Optimization="2"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\..\src\XslCommon.cpp"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="variables"
+				>
+				<File
+					RelativePath="..\..\..\src\AbsComponent.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\AbsFunctionComponent.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\AbsVariable.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\ComponentFactory.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\ComponentValue.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\ConcatFunction.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\ConstantVariable.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\EscapeRegexFunction.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\ExternalVariable.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\LiteralComponent.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\LocalVariable.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\ObjectComponent.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\PossibleRestrictionType.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\PossibleValueType.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\RestrictionType.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\SubstringFunction.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\VariableComponent.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\VariableFactory.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\VariableValue.cpp"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="windows"
+				>
+				<File
+					RelativePath="..\..\..\src\windows\DataCollector.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\windows\ObjectCollector.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\windows\ProbeFactory.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\windows\SystemInfo.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\windows\WindowsCommon.cpp"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\..\..\src\AbsCriteria.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\AbsDataCollector.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\AbsEntity.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\AbsObject.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\AbsObjectCollector.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\AbsState.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\Analyzer.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\Behavior.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\CollectedObject.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\CollectedSet.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\Criteria.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\Criterion.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\Definition.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\EntityComparator.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\ExtendedDefinition.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\Filter.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\FilterEntity.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\Item.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\ItemEntity.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\Main.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\Object.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\ObjectEntity.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\ObjectFactory.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\ObjectReader.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\OvalEnum.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\OvalMessage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\Set.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\SetObject.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\State.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\StateEntity.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\Test.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\TestedItem.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\Version.h"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						Description=""
+						CommandLine=""
+						Outputs=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Performing Custom Build Step - incrementing build"
+						CommandLine="echo on&#x0D;&#x0A;cd ..\..\..\src&#x0D;&#x0A;perl updateversion.pl&#x0D;&#x0A;cd ..\project\Win32\VC8&#x0D;&#x0A;echo off&#x0D;&#x0A;"
+						Outputs="MITRE"
+					/>
+				</FileConfiguration>
+			</File>
+			<Filter
+				Name="probes"
+				>
+				<File
+					RelativePath="..\..\..\src\AbsFileFinder.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\AbsProbe.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\windows\AccessTokenProbe.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\windows\AuditEventPolicyProbe.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\independent\EnvironmentVariableProbe.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\independent\FamilyProbe.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\windows\FileEffectiveRightsProbe.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\windows\FileFinder.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\independent\FileHashProbe.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\independent\FileMd5Probe.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\windows\FileProbe.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\windows\GroupProbe.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\windows\LockoutPolicyProbe.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\windows\PasswordPolicyProbe.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\windows\RegistryProbe.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\windows\SidProbe.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\independent\TextFileContentProbe.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\windows\UserProbe.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\independent\VariableProbe.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\windows\WMIProbe.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\probes\independent\XmlFileContentProbe.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="util"
+				>
+				<File
+					RelativePath="..\..\..\src\Common.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\DocumentManager.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\Exception.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\Log.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\MD5.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\REGEX.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\XmlCommon.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\XmlProcessor.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\XslCommon.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="variables"
+				>
+				<File
+					RelativePath="..\..\..\src\AbsComponent.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\AbsFunctionComponent.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\AbsVariable.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\ComponentFactory.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\ComponentValue.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\ConcatFunction.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\ConstantVariable.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\EscapeRegexFunction.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\ExternalVariable.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\LiteralComponent.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\LocalVariable.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\ObjectComponent.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\PossibleRestrictionType.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\PossibleValueType.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\RestrictionType.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\SubstringFunction.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\VariableComponent.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\VariableFactory.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\VariableValue.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="windows"
+				>
+				<File
+					RelativePath="..\..\..\src\windows\DataCollector.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\windows\ObjectCollector.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\windows\ProbeFactory.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\windows\SystemInfo.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\src\windows\WindowsCommon.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>


Property changes on: trunk/ovaldi/project/Win32/vc8/OVALInterpreter.vcproj
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/project/linux/Makefile
===================================================================
--- trunk/ovaldi/project/linux/Makefile	                        (rev 0)
+++ trunk/ovaldi/project/linux/Makefile	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,327 @@
+#
+# $Id: Makefile 4579 2008-01-02 17:39:07Z bakerj $
+#
+#****************************************************************************************//
+# Copyright (c) 2002-2008, The MITRE Corporation
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification, are
+# permitted provided that the following conditions are met:
+#
+#     * Redistributions of source code must retain the above copyright notice, this list
+#       of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright notice, this
+#       list of conditions and the following disclaimer in the documentation and/or other
+#       materials provided with the distribution.
+#     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+#       used to endorse or promote products derived from this software without specific
+#       prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+# SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#****************************************************************************************//
+
+# output directories
+OUTDIR = ./Release
+BUILDDIR = ${OUTDIR}/obj
+
+# source directories
+SRCDIR = ../../src
+LINUXDIR = ${SRCDIR}/linux
+UNIXPROBEDIR = ${SRCDIR}/probes/unix
+LINUXPROBEDIR = ${SRCDIR}/probes/linux
+INDEPENDENTPROBEDIR = ${SRCDIR}/probes/independent
+CURRENTDIR = ../project/linux
+
+INCDIRS = -I/usr/include -I$(LINUXDIR) -I${SRCDIR} -I${UNIXPROBEDIR} -I${LINUXPROBEDIR} -I${INDEPENDENTPROBEDIR} -I/usr/include/pcre
+
+EXECUTABLE = $(OUTDIR)/ovaldi
+
+# The location of the c++ compiler.
+CXX = /usr/bin/g++
+
+# General options that should be used by g++.
+CPPFLAGS = -Wall -O
+
+LIBDIR = -L/usr/lib
+
+# What libraries do we need?
+LIBS = -lxerces-c -lxalan-c -lpcre -lpopt
+
+# Determine what platform the source is being build on
+PLATFORM = $(shell uname | tr '[a-z]' '[A-Z]')
+
+# Determine what package management system is being used 
+PACKAGE_RPM  = $(shell /usr/bin/env rpm  --version 2>/dev/null)
+PACKAGE_DPKG = $(shell /usr/bin/env dpkg --version 2>/dev/null)
+PACKAGE_MANAGERS = 
+
+ifneq (${PACKAGE_RPM}, )
+	LIBS += -lrpm -lrpmdb -lrpmio
+	PACKAGE_MANAGERS += -DPACKAGE_RPM
+endif
+ifneq (${PACKAGE_DPKG}, )
+	LIBS += -lapt-pkg
+	PACKAGE_MANAGERS += -DPACKAGE_DPKG
+endif
+
+# What object code are we expecting?
+OBJS = \
+  Main.obj \
+	AbsFileFinder.obj \
+	AbsComponent.obj \
+	AbsCriteria.obj \
+	AbsDataCollector.obj \
+	AbsEntity.obj \
+	AbsFunctionComponent.obj \
+	AbsObject.obj \
+	AbsObjectCollector.obj \
+	AbsProbe.obj \
+	AbsState.obj \
+	AbsVariable.obj \
+	Analyzer.obj \
+	Behavior.obj \
+	CollectedObject.obj \
+	CollectedSet.obj \
+	Common.obj \
+	ComponentFactory.obj \
+	ComponentValue.obj \
+	ConcatFunction.obj \
+	ConstantVariable.obj \
+	Criteria.obj \
+	Criterion.obj \
+	Definition.obj \
+	DocumentManager.obj \
+	EntityComparator.obj \
+	EscapeRegexFunction.obj \
+	Exception.obj \
+	ExtendedDefinition.obj \
+	ExternalVariable.obj \
+	FileFinder.obj \
+	Filter.obj \
+	FilterEntity.obj \
+	Item.obj \
+	ItemEntity.obj \
+	LiteralComponent.obj \
+	LocalVariable.obj \
+	Log.obj \
+	MD5.obj \
+	Object.obj \
+	ObjectComponent.obj \
+	ObjectEntity.obj \
+	ObjectFactory.obj \
+	ObjectReader.obj \
+	OvalEnum.obj \
+	OvalMessage.obj \
+	PossibleRestrictionType.obj \
+	PossibleValueType.obj \
+	REGEX.obj \
+	RestrictionType.obj \
+	Set.obj \
+	SetObject.obj \
+	State.obj \
+	StateEntity.obj \
+	SubstringFunction.obj \
+	Test.obj \
+	TestedItem.obj \
+	VariableComponent.obj \
+	VariableFactory.obj \
+	VariableValue.obj \
+	Version.obj \
+	XmlCommon.obj \
+	XmlProcessor.obj \
+	XslCommon.obj \
+	DataCollector.obj \
+	ObjectCollector.obj \
+	ProbeFactory.obj \
+	SystemInfo.obj \
+	FileProbe.obj \
+	InetListeningServersProbe.obj \
+	ProcessProbe.obj \
+	UnameProbe.obj \
+	TextFileContentProbe.obj \
+	XmlFileContentProbe.obj \
+	EnvironmentVariableProbe.obj \
+	FamilyProbe.obj \
+	FileMd5Probe.obj \
+	FileHashProbe.obj \
+	VariableProbe.obj \
+
+ifneq (${PACKAGE_RPM}, )
+	OBJS += RPMInfoProbe.obj
+endif
+ifneq (${PACKAGE_DPKG}, )
+	OBJS += DPKGInfoProbe.obj
+endif
+
+REL_OBJS = \
+	$(BUILDDIR)/Main.obj \
+	$(BUILDDIR)/AbsComponent.obj \
+	$(BUILDDIR)/AbsCriteria.obj \
+	$(BUILDDIR)/AbsDataCollector.obj \
+	$(BUILDDIR)/AbsEntity.obj \
+	$(BUILDDIR)/AbsFileFinder.obj \
+	$(BUILDDIR)/AbsFunctionComponent.obj \
+	$(BUILDDIR)/AbsObject.obj \
+	$(BUILDDIR)/AbsObjectCollector.obj \
+	$(BUILDDIR)/AbsProbe.obj \
+	$(BUILDDIR)/AbsState.obj \
+	$(BUILDDIR)/AbsVariable.obj \
+	$(BUILDDIR)/Analyzer.obj \
+	$(BUILDDIR)/Behavior.obj \
+	$(BUILDDIR)/CollectedObject.obj \
+	$(BUILDDIR)/CollectedSet.obj \
+	$(BUILDDIR)/Common.obj \
+	$(BUILDDIR)/ComponentFactory.obj \
+	$(BUILDDIR)/ComponentValue.obj \
+	$(BUILDDIR)/ConcatFunction.obj \
+	$(BUILDDIR)/ConstantVariable.obj \
+	$(BUILDDIR)/Criteria.obj \
+	$(BUILDDIR)/Criterion.obj \
+	$(BUILDDIR)/Definition.obj \
+	$(BUILDDIR)/DocumentManager.obj \
+	$(BUILDDIR)/EntityComparator.obj \
+	$(BUILDDIR)/EscapeRegexFunction.obj \
+	$(BUILDDIR)/Exception.obj \
+	$(BUILDDIR)/ExtendedDefinition.obj \
+	$(BUILDDIR)/ExternalVariable.obj \
+	$(BUILDDIR)/FileFinder.obj \
+	$(BUILDDIR)/Filter.obj \
+	$(BUILDDIR)/FilterEntity.obj \
+	$(BUILDDIR)/Item.obj \
+	$(BUILDDIR)/ItemEntity.obj \
+	$(BUILDDIR)/LiteralComponent.obj \
+	$(BUILDDIR)/LocalVariable.obj \
+	$(BUILDDIR)/Log.obj \
+	$(BUILDDIR)/MD5.obj \
+	$(BUILDDIR)/Object.obj \
+	$(BUILDDIR)/ObjectComponent.obj \
+	$(BUILDDIR)/ObjectEntity.obj \
+	$(BUILDDIR)/ObjectFactory.obj \
+	$(BUILDDIR)/ObjectReader.obj \
+	$(BUILDDIR)/OvalEnum.obj \
+	$(BUILDDIR)/OvalMessage.obj \
+	$(BUILDDIR)/PossibleRestrictionType.obj \
+	$(BUILDDIR)/PossibleValueType.obj \
+	$(BUILDDIR)/REGEX.obj \
+	$(BUILDDIR)/RestrictionType.obj \
+	$(BUILDDIR)/Set.obj \
+	$(BUILDDIR)/SetObject.obj \
+	$(BUILDDIR)/State.obj \
+	$(BUILDDIR)/StateEntity.obj \
+	$(BUILDDIR)/SubstringFunction.obj \
+	$(BUILDDIR)/Test.obj \
+	$(BUILDDIR)/TestedItem.obj \
+	$(BUILDDIR)/VariableComponent.obj \
+	$(BUILDDIR)/VariableFactory.obj \
+	$(BUILDDIR)/VariableValue.obj \
+	$(BUILDDIR)/Version.obj \
+	$(BUILDDIR)/XmlCommon.obj \
+	$(BUILDDIR)/XmlProcessor.obj \
+	$(BUILDDIR)/XslCommon.obj \
+	$(BUILDDIR)/DataCollector.obj \
+	$(BUILDDIR)/ObjectCollector.obj \
+	$(BUILDDIR)/ProbeFactory.obj \
+	$(BUILDDIR)/SystemInfo.obj \
+	$(BUILDDIR)/FileProbe.obj \
+	$(BUILDDIR)/InetListeningServersProbe.obj \
+	$(BUILDDIR)/ProcessProbe.obj \
+	$(BUILDDIR)/UnameProbe.obj \
+	$(BUILDDIR)/TextFileContentProbe.obj \
+	$(BUILDDIR)/XmlFileContentProbe.obj \
+	$(BUILDDIR)/EnvironmentVariableProbe.obj \
+	$(BUILDDIR)/FamilyProbe.obj \
+	$(BUILDDIR)/FileMd5Probe.obj \
+	$(BUILDDIR)/FileHashProbe.obj \
+	$(BUILDDIR)/VariableProbe.obj \
+
+ifneq (${PACKAGE_RPM}, )
+	REL_OBJS += $(BUILDDIR)/RPMInfoProbe.obj
+endif
+ifneq (${PACKAGE_DPKG}, )
+	REL_OBJS += $(BUILDDIR)/DPKGInfoProbe.obj
+endif
+
+# Search the output directory for object files
+vpath %.obj $(BUILDDIR)
+vpath %.cpp $(SRCDIR)
+vpath %.cpp $(LINUXDIR)
+vpath %.cpp $(UNIXPROBEDIR)
+vpath %.cpp $(LINUXPROBEDIR)
+vpath %.cpp $(INDEPENDENTPROBEDIR)
+
+
+# *******************************************************************
+#                      Suffix Translations
+# *******************************************************************
+
+.SUFFIXES:
+.SUFFIXES: .cpp .obj
+
+.cpp.obj:
+	$(CXX) -c $(CPPFLAGS) -D$(PLATFORM) $(PACKAGE_MANAGERS) $(INCDIRS) -o $(BUILDDIR)/$@ $^
+
+# *******************************************************************
+#                            Rules
+# *******************************************************************
+
+all: create-dir update set-platform
+
+
+create-dir:
+	@install -d ${BUILDDIR};
+
+
+# OS-specific builds 
+# -- these may be used later on but aren't really needed now
+
+set-platform:
+	@if [ ${PLATFORM} = SUNOS ]; then \
+		make sunos; \
+	fi; \
+	if  [ ${PLATFORM} = LINUX ]; then \
+		make linux; \
+	fi;
+
+linux: build
+
+sunos: build
+
+
+update:
+#	-rm $(BUILDDIR)/Version.obj
+#	cd ${SRCDIR}; ls; ./updateversion.pl; cd ${CURRENTDIR}
+
+build : $(OBJS)
+	$(CXX) $(CPPFLAGS) -D$(PLATFORM) $(REL_OBJS) $(LIBDIR) $(LIBS) -o $(EXECUTABLE)
+
+
+# OS-specific cleaning
+# -- These may be used later on but aren't needed right now
+
+clean :
+	@if [ $(PLATFORM) = LINUX ]; then \
+		make clean-linux; \
+	fi; \
+	if  [ $(PLATFORM) = SUNOS ]; then \
+		make clean-sunos; \
+	fi;
+
+clean-linux:
+	-rm -rf $(OUTDIR)
+
+clean-sunos:
+	-rm -rf $(OUTDIR)
+
+
+debug: CPPFLAGS = -Wall -O -static-libgcc -ggdb
+debug: all
+


Property changes on: trunk/ovaldi/project/linux/Makefile
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/project/linux/el3/libxalan-c.so.110.0
===================================================================
(Binary files differ)


Property changes on: trunk/ovaldi/project/linux/el3/libxalan-c.so.110.0
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/ovaldi/project/linux/el3/libxalanMsg.so.110.0
===================================================================
(Binary files differ)


Property changes on: trunk/ovaldi/project/linux/el3/libxalanMsg.so.110.0
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/ovaldi/project/linux/el3/libxerces-c.so.27.0
===================================================================
(Binary files differ)


Property changes on: trunk/ovaldi/project/linux/el3/libxerces-c.so.27.0
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/ovaldi/project/linux/el4/libxalan-c.so.110.0
===================================================================
(Binary files differ)


Property changes on: trunk/ovaldi/project/linux/el4/libxalan-c.so.110.0
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/ovaldi/project/linux/el4/libxalanMsg.so.110.0
===================================================================
(Binary files differ)


Property changes on: trunk/ovaldi/project/linux/el4/libxalanMsg.so.110.0
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/ovaldi/project/linux/el4/libxerces-c.so.27.0
===================================================================
(Binary files differ)


Property changes on: trunk/ovaldi/project/linux/el4/libxerces-c.so.27.0
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/ovaldi/project/linux/ovaldi.sh
===================================================================
--- trunk/ovaldi/project/linux/ovaldi.sh	                        (rev 0)
+++ trunk/ovaldi/project/linux/ovaldi.sh	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,82 @@
+#!/bin/bash
+#
+# $Id: ovaldi.sh 4579 2008-01-02 17:39:07Z bakerj $
+#
+#****************************************************************************************#
+# Copyright (c) 2002-2008, The MITRE Corporation
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification, are
+# permitted provided that the following conditions are met:
+#
+#     * Redistributions of source code must retain the above copyright notice, this list
+#       of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright notice, this 
+#       list of conditions and the following disclaimer in the documentation and/or other
+#       materials provided with the distribution.
+#     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+#       used to endorse or promote products derived from this software without specific 
+#       prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+# SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#****************************************************************************************#
+
+#
+# This wrapper script runs the OVAL Interpreter with good arguments.
+#
+
+#
+# Test to make sure the user has either supplied their own defs or
+# that they exist in the default location.
+#
+if [ $# == 1 ]; then
+  DEFS="$1"
+  # Check to make sure schema files are in the same directory
+  SCHEMADIR=`dirname "$DEFS"`
+  if [ ! -f ${SCHEMADIR}/oval-common-schema.xsd ]; then
+    echo "Error: Schema files must be located in the same directory as the"
+    echo "definition file."
+    exit 1
+  fi
+elif [ -f /usr/share/ovaldi/linux.definitions.xml ]; then
+  DEFS=/usr/share/ovaldi/linux.definitions.xml
+else
+  echo "Error: no definitions file specified and default definitions"
+  echo "(/usr/share/ovaldi/linux.definitions.xml) do not exist."
+  echo "usage: $0 [definitions.xml]"
+  exit 1
+fi
+	
+
+#
+# Get a date of the start of the run, so we can date-stamp the results
+# files.
+#
+
+DATE=`/bin/date +%F--%T`
+
+#
+# Next, run the definition interpreter pointing it to the locations of the
+# files it uses.
+#
+
+cd /var/log/ovaldi
+/usr/sbin/ovaldi -d /var/log/ovaldi/data-$DATE.xml \
+		 -r /var/log/ovaldi/results-$DATE.xml \
+		 -t /usr/share/ovaldi/results_to_html.xsl \
+		 -x /var/log/ovaldi/results-$DATE.html \
+		 -o $DEFS \
+		 -m \
+
+echo ...
+echo Results-related files are stored in /var/log/ovaldi.
+echo ...


Property changes on: trunk/ovaldi/project/linux/ovaldi.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/rpm/ovaldi.spec
===================================================================
--- trunk/ovaldi/rpm/ovaldi.spec	                        (rev 0)
+++ trunk/ovaldi/rpm/ovaldi.spec	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,208 @@
+%define name	ovaldi
+%define version	5.3.59
+%define release	1
+
+Summary:	The reference interpreter for the Open Vulnerability and Assessment Language
+Name:		%{name}
+Version:	%{version}
+Release:	%{release}
+Source0:	http://oval.mitre.org/DontDownload/oval/download/ovaldi-%{version}-src.tar.bz2
+Copyright:	BSD
+Group:		System/Configuration/Other
+BuildRoot:	%{_tmppath}/%{name}-buildroot
+Prefix:		%{_prefix}
+BuildArchitectures: i386
+
+%description
+The OVAL Interpreter is a freely available reference 
+implementation created to show how information can be
+collected from a computer for testing, to evaluate and
+carry out the OVAL definitions for that platform, and to
+report the results of the tests.
+
+MITRE developed the OVAL Interpreter to demonstrate the 
+usability of OVAL definitions, and for definition writers
+to use to ensure correct syntax and adherence to the OVAL
+Language during the development of draft definitions. It is
+not a fully functional scanning tool and has a simplistic user
+interface, but running the Interpreter will provide you with
+a list of true/false results and their references (e.g., CVE names)
+for all input OVAL definitions.
+
+MITRE offers the Interpreters, source code, schemas, and data files
+at no cost to further the OVAL effort and in hopes that individuals
+and organizations will build and expand upon them. If you are 
+interested in contributing to the OVAL Interpreter please send an
+email to oval at mitre.org.
+
+To run:
+
+/usr/sbin/ovaldi.sh
+
+%package libs
+Summary: Libraries required to run the OVAL Interpreter.
+Group: System/Configuration/Other
+%description libs
+This package contains the Xerces and Xalan XML libraries needed to run
+the OVAL Interpreter. These libraries are available from the Apache
+Foundation, but are not yet packaged for Redhat.
+
+%prep
+[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
+%setup -n ovaldi-%{version}-src
+#%patch -p0
+
+%build
+cd project/linux
+mkdir -p Release/obj
+make
+
+%install
+/bin/mkdir -p $RPM_BUILD_ROOT/usr/sbin
+/bin/mkdir -m 700 -p $RPM_BUILD_ROOT/usr/lib/ovaldi
+/bin/mkdir -m 700 -p $RPM_BUILD_ROOT/usr/share/ovaldi
+/bin/mkdir -m 700 -p $RPM_BUILD_ROOT/var/log/ovaldi
+/bin/mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
+
+/bin/cp project/linux/Release/ovaldi $RPM_BUILD_ROOT/usr/sbin
+/bin/cp project/linux/ovaldi.sh $RPM_BUILD_ROOT/usr/sbin
+
+/usr/bin/gzip docs/ovaldi.1
+/bin/cp docs/ovaldi.1.gz $RPM_BUILD_ROOT%{_mandir}/man1
+
+/bin/cp xml/results_to_html.xsl $RPM_BUILD_ROOT/usr/share/ovaldi
+/bin/cp xml/oval-definitions-schematron.xsl $RPM_BUILD_ROOT/usr/share/ovaldi
+/bin/cp xml/*.xsd $RPM_BUILD_ROOT/usr/share/ovaldi
+
+if grep "release 3" /etc/redhat-release &> /dev/null ; then
+  /bin/cp project/linux/EL3/libxerces-c.so.27.0 $RPM_BUILD_ROOT/usr/lib/ovaldi
+  /bin/cp project/linux/EL3/libxalan-c.so.110.0 $RPM_BUILD_ROOT/usr/lib/ovaldi
+  /bin/cp project/linux/EL3/libxalanMsg.so.110.0 $RPM_BUILD_ROOT/usr/lib/ovaldi
+elif grep "release 4" /etc/redhat-release &> /dev/null ; then
+  /bin/cp project/linux/EL4/libxerces-c.so.27.0 $RPM_BUILD_ROOT/usr/lib/ovaldi
+  /bin/cp project/linux/EL4/libxalan-c.so.110.0 $RPM_BUILD_ROOT/usr/lib/ovaldi
+  /bin/cp project/linux/EL4/libxalanMsg.so.110.0 $RPM_BUILD_ROOT/usr/lib/ovaldi
+else
+  echo "Unsupported Redhat version. Exiting."
+  exit 1
+fi
+
+%clean
+[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
+/bin/rm -fr $RPM_BUILD_ROOT/%{name}
+
+%post libs
+# Add /usr/lib/ovaldi to the end of /etc/ld.so.conf if it's not yet present.
+if [ `/bin/egrep -c '^/usr/lib/ovaldi' /etc/ld.so.conf ` -lt 1 ] ; then
+        /bin/echo "/usr/lib/ovaldi" >>/etc/ld.so.conf
+#	/sbin/ldconfig
+fi
+/sbin/ldconfig
+
+%preun libs
+if [ $1 = 0 ]; then
+    #// Do stuff specific to uninstalls
+    if [ -e /usr/lib/ovaldi/libxerces-c.so.27 ] ; then
+        /bin/rm /usr/lib/ovaldi/libxerces-c.so.27
+    fi
+    if [ -e /usr/lib/ovaldi/libxerces-c.so ] ; then
+        /bin/rm /usr/lib/ovaldi/libxerces-c.so
+    fi
+    if [ -e /usr/lib/ovaldi/libxalan-c.so.110 ] ; then
+        /bin/rm /usr/lib/ovaldi/libxalan-c.so.110
+    fi
+    if [ -e /usr/lib/ovaldi/libxalan-c.so ] ; then
+        /bin/rm /usr/lib/ovaldi/libxalan-c.so
+    fi
+    if [ -e /usr/lib/ovaldi/libxalanRMsg.so.110 ] ; then
+        /bin/rm /usr/lib/ovaldi/libxalanMsg.so.110
+    fi
+    if [ -e /usr/lib/ovaldi/libxalanMsg.so ] ; then
+        /bin/rm /usr/lib/ovaldi/libxalanMsg.so
+    fi
+fi
+
+%postun libs
+if [ $1 = 0 ]; then
+   # // Do stuff specific to uninstalls
+if  [ `/bin/egrep -c '^/usr/lib/ovaldi' /etc/ld.so.conf ` -gt 0 ] ; then
+        /bin/egrep -v '^/usr/lib/ovaldi$' /etc/ld.so.conf >/usr/lib/etc.ld.so.conf.uninstalling-oval
+        /bin/chown root:root /usr/lib/etc.ld.so.conf.uninstalling-oval
+        /bin/chmod 644 /usr/lib/etc.ld.so.conf.uninstalling-oval
+        /bin/mv /usr/lib/etc.ld.so.conf.uninstalling-oval /etc/ld.so.conf
+fi
+/sbin/ldconfig
+fi
+if [ $1 = 1 ]; then
+	/sbin/ldconfig
+   # // Do stuff specific to upgrades
+fi
+
+%files 
+%defattr(-,root,root,0700)
+%doc docs/terms.txt docs/README.txt docs/version.txt
+%doc %{_mandir}/man1/ovaldi.1.gz
+%defattr(-,root,root,0600)
+%attr(0700,root,root)  /usr/sbin/ovaldi
+%attr(0700,root,root)  /usr/sbin/ovaldi.sh
+%attr(0700,root,root)  /var/log/ovaldi
+/usr/share/ovaldi/oval-definitions-schematron.xsl
+/usr/share/ovaldi/results_to_html.xsl
+/usr/share/ovaldi/*.xsd
+
+%files libs
+/usr/lib/ovaldi/libxerces-c.so.27.0
+/usr/lib/ovaldi/libxalan-c.so.110.0
+/usr/lib/ovaldi/libxalanMsg.so.110.0
+
+%changelog
+* Thu Jun 28 2007 Jonathen Baker <bakerj at mitre.org> 5.3.0-1.0
+* Updated to 5.3 source.
+
+* Mon Jan 23 2007 Brendan Dolan-Gavitt <brendandg at mitre.org> 5.2.0-1.0
+* Updated to 5.2 source.
+
+* Mon Oct 30 2006 Brendan Dolan-Gavitt <brendandg at mitre.org> 5.1.0-1.0
+* Created subpackage for libs, updated to 5.1 source. Some .spec cleanup performed.
+
+* Tue May 02 2006 Matt Burton <mburton at mitre.org> 5.0.0-1.0
+* New RPM using version 5 source & new SPEC file
+
+* Tue Oct 11 2005 Matt Burton <mburton at mitre.org> 4.3.0-1.3
+* Rebuild RPM with new source
+
+* Thu Aug 11 2005 Matt Burton <mburton at mitre.org> 4.2.0-1.3
+* Added new schema files (independant, unix and xmldsig), new source
+
+* Tue Apr 12 2005 Matt Burton <mburton at mitre.org> 4.1.0-1.2
+* Added libxalan libraries and new source to RPM
+
+* Tue Feb 22 2005 Matt Burton <mburton at mitre.org> 4.0.0-1.1
+* Changed SPEC file to use the 2.6 xerces library
+
+* Thu Jan 20 2005 Jay Beale <jay at bastille-linux.org> 4.0.0-1.0
+* Modified RPM for ovaldi 4.0.0's new structure
+
+* Mon Oct 18 2004 Jay Beale <jay at bastille-linux.org> 3.4.0-1.0
+* Rebuilt RPM with new source
+
+* Wed Sep 1 2004 Jay Beale <jay at bastille-linux.org> 3.3.0-1.0
+* Rebuilt RPM with new source
+
+* Wed Jul 14 2004 Jay Beale <jay at bastille-linux.org> 3.2.0-1.0
+* Rebuilt RPM with new source
+
+* Sun Jun 6 2004 Jay Beale <jay at bastille-linux.org> 3.1.0-1.0
+- Rebuilt with new locations and such
+
+* Thu May 6 2004 Jay Beale <jay at bastille-linux.org> 1.0.0-1.3
+- Removed xerces libraries symlinking
+
+* Wed Apr 28 2004 Jay Beale <jay at bastille-linux.org> 1.0.0-1.2
+- Updated to new version
+
+* Wed Apr 21 2004 Jay Beale <jay at bastille-linux.org> 1.0.0-1.1
+- Changed oval.xml to definitions.xml
+
+* Mon Apr 19 2004 Jay Beale <jay at bastille-linux.org> 1.0.0-1.0
+- Initial package creation - enjoy


Property changes on: trunk/ovaldi/rpm/ovaldi.spec
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/AbsComponent.cpp
===================================================================
--- trunk/ovaldi/src/AbsComponent.cpp	                        (rev 0)
+++ trunk/ovaldi/src/AbsComponent.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,44 @@
+//
+// $Id: AbsComponent.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "AbsComponent.h"
+
+//****************************************************************************************//
+//								AbsComponent Class										  //	
+//****************************************************************************************//
+AbsComponent::AbsComponent() {
+
+}
+
+AbsComponent::~AbsComponent() {
+
+}
+


Property changes on: trunk/ovaldi/src/AbsComponent.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/AbsComponent.h
===================================================================
--- trunk/ovaldi/src/AbsComponent.h	                        (rev 0)
+++ trunk/ovaldi/src/AbsComponent.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,86 @@
+//
+// $Id: AbsComponent.h 4656 2008-01-17 22:25:00Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef ABSCOMPONENT_H
+#define ABSCOMPONENT_H
+
+//	required xerces includes
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/DOMAttr.hpp>
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xercesc/dom/DOMNodeList.hpp>
+#include <xercesc/util/XMLString.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/parsers/AbstractDOMParser.hpp>
+
+#include "XmlCommon.h"
+#include "Common.h"
+#include "VariableValue.h"
+#include "ComponentValue.h"
+
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	This calss is the base class for all types of variable components.
+	The oval definition schema defines several types of components that ay be grouped 
+	together to form complex local_varaibles. The commonalities among all components
+	are encapsulated in this class.
+*/
+class AbsComponent {
+public:
+	/** Create complete AbsComponent. */
+	AbsComponent();
+
+	virtual ~AbsComponent();
+
+	/** Parse a compnent element.
+		Each concrete component has a slightly different corresponding element to parse.
+	*/
+	virtual void Parse(DOMElement* componentElm) = 0;
+	/** Compute the value for the AbsComponent.
+		Each concrete component computes its value differently.
+	*/
+	virtual ComponentValue* ComputeValue() = 0;
+	/** Return the variable values used to compute the concrete component's value.
+		Each concrete component uses variables differently and will return this set differently.
+	*/
+	virtual VariableValueVector* GetVariableValues() = 0;
+};
+
+/**
+	A vector for storing AbsComponent objects. 
+	Stores only pointers to the objects. 
+*/
+typedef vector < AbsComponent*, allocator<AbsComponent*> > AbsComponentVector;
+
+#endif


Property changes on: trunk/ovaldi/src/AbsComponent.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/AbsCriteria.cpp
===================================================================
--- trunk/ovaldi/src/AbsCriteria.cpp	                        (rev 0)
+++ trunk/ovaldi/src/AbsCriteria.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,69 @@
+//
+// $Id: AbsCriteria.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "AbsCriteria.h"
+
+//****************************************************************************************//
+//								AbsCriteria Class										  //	
+//****************************************************************************************//
+AbsCriteria::AbsCriteria(bool negate, OvalEnum::ResultEnumeration result) {
+
+	this->SetNegate(negate);
+	this->SetResult(result);
+}
+
+AbsCriteria::~AbsCriteria() {
+
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+
+bool AbsCriteria::GetNegate() {
+
+	return this->negate;
+}
+
+void AbsCriteria::SetNegate(bool negate) {
+
+	this->negate = negate;
+}
+
+OvalEnum::ResultEnumeration AbsCriteria::GetResult() {
+
+	return this->result;
+}
+
+void AbsCriteria::SetResult(OvalEnum::ResultEnumeration result) {
+
+	this->result = result;
+}


Property changes on: trunk/ovaldi/src/AbsCriteria.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/AbsCriteria.h
===================================================================
--- trunk/ovaldi/src/AbsCriteria.h	                        (rev 0)
+++ trunk/ovaldi/src/AbsCriteria.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,112 @@
+//
+// $Id: AbsCriteria.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef ABSCRITERIA_H
+#define ABSCRITERIA_H
+
+//	required xerces includes
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/DOMAttr.hpp>
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xercesc/dom/DOMNodeList.hpp>
+#include <xercesc/util/XMLString.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/parsers/AbstractDOMParser.hpp>
+
+#include <string>
+#include <iostream>
+#include <stdlib.h>
+
+#include "Log.h"
+#include "OvalEnum.h"
+#include "XmlCommon.h"
+#include "Exception.h"
+
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+class AbsCriteria;
+
+/**
+	This class represents the the commonalities among all types of criteria in the oval definitions schema.
+	The oval definitions schema defines several different types of criteria. Each criteria shares a 
+	common set of attributes and the need for a common set of operations. This class encapsulates
+	all the common functionality.
+*/
+class AbsCriteria {
+
+public :
+	/** Create a complete AbsCriteria object. 
+		All paremters are initialized with default values. 
+		Default values are: negate = false; result = error
+	*/
+	AbsCriteria(bool negate = false, OvalEnum::ResultEnumeration result = OvalEnum::RESULT_ERROR);
+
+	/** Empty destructor. */
+	virtual ~AbsCriteria();
+
+	/** Abstract method to write a concrete criteria to an oval results document. */
+	virtual void Write(DOMElement* parent) = 0;
+	/** Abstract method to parse a concrete criteria from an oval definitions document. */
+	virtual void Parse(DOMElement* criteriaElm) = 0;
+	/** Abstract method that evaluates a concrete criteria and returns the result. */
+	virtual OvalEnum::ResultEnumeration Analyze() = 0;
+
+	/** Abstract method that evaluates a concrete criteria to not evaluated returns the result. */
+	virtual OvalEnum::ResultEnumeration NotEvaluated() = 0;
+
+
+
+	/** Get the result of the criteria. */
+	OvalEnum::ResultEnumeration GetResult();
+	/** Set the result of the criteria. */
+	void SetResult(OvalEnum::ResultEnumeration result);
+
+	/** Get the negate attribute for the criteria. */
+	bool GetNegate();
+	/** Set the negate attribute for the criteria. */
+	void SetNegate(bool negate);
+
+private:
+	/** A flag used to indicate wheter or not that result of this criteria should be negated. */
+	bool negate;
+	/** The result of this criteria after it has been analyzed. */
+	OvalEnum::ResultEnumeration result;
+};
+
+/**	
+	A vector for storing AbsCriteria objects. 
+	Stores only pointers to the objects. 
+*/
+typedef vector < AbsCriteria*, allocator<AbsCriteria*> > AbsCriteriaVector;
+
+#endif


Property changes on: trunk/ovaldi/src/AbsCriteria.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/AbsDataCollector.cpp
===================================================================
--- trunk/ovaldi/src/AbsDataCollector.cpp	                        (rev 0)
+++ trunk/ovaldi/src/AbsDataCollector.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,222 @@
+//
+// $Id: AbsDataCollector.cpp 4647 2008-01-15 14:35:33Z bworrell $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "AbsDataCollector.h"
+
+//****************************************************************************************//
+//								AbsDataCollector Class									  //	
+//****************************************************************************************//
+AbsDataCollector* AbsDataCollector::instance = NULL;
+bool AbsDataCollector::isRunning = false;
+
+AbsDataCollector::AbsDataCollector() {
+	this->collectedObjectsElm = NULL;
+	this->systemDataElm = NULL;	
+}
+
+AbsDataCollector::~AbsDataCollector() {
+
+	delete(this->objectCollector);
+}
+
+// ***************************************************************************************	//
+//									Public members											//
+// ***************************************************************************************	//
+AbsDataCollector* AbsDataCollector::Instance() {
+
+	return AbsDataCollector::instance;
+}
+
+DOMElement* AbsDataCollector::GetSCCollectedObjectsElm() {
+
+	if(this->collectedObjectsElm == NULL) {
+		//	Create the collected_objects element and add it as a child of the sc element
+		DOMElement* scNode = XmlCommon::FindElement(DocumentManager::GetSystemCharacterisitcsDocument(), "oval_system_characteristics");
+		DOMElement *elm = XmlCommon::AddChildElement(DocumentManager::GetSystemCharacterisitcsDocument(), scNode, "collected_objects"); 
+		this->collectedObjectsElm = elm;
+	}
+	return this->collectedObjectsElm;
+}
+
+DOMElement* AbsDataCollector::GetSCSystemDataElm() {
+
+	if(this->systemDataElm == NULL) {
+		//	Create the system_data element and add it as a child of the sc element
+		DOMElement* scNode = XmlCommon::FindElement(DocumentManager::GetSystemCharacterisitcsDocument(), "oval_system_characteristics");
+		DOMElement *elm = XmlCommon::AddChildElement(DocumentManager::GetSystemCharacterisitcsDocument(), scNode, "system_data"); 
+		this->systemDataElm = elm;
+	}
+	return this->systemDataElm;
+}
+
+void AbsDataCollector::InitBase(AbsObjectCollector* objectCollector) {
+
+	string errMsg;
+
+	if(objectCollector != NULL) 
+		this->objectCollector = objectCollector;
+	else
+		throw AbsDataCollectorException("Error: The specified objectCollector is NULL. Unable to initialize the data collector.");
+
+	//	Get the system_characteristics node
+	DOMElement* scNode = XmlCommon::FindElement(DocumentManager::GetSystemCharacterisitcsDocument(), "oval_system_characteristics");
+
+	//	Add the namespace info to the oval_system_characteristics node
+	XmlCommon::AddXmlns(DocumentManager::GetSystemCharacterisitcsDocument(), "http://oval.mitre.org/XMLSchema/oval-common-5", "oval");
+	XmlCommon::AddXmlns(DocumentManager::GetSystemCharacterisitcsDocument(), "http://oval.mitre.org/XMLSchema/oval-system-characteristics-5", "oval-sc");
+	XmlCommon::AddXmlns(DocumentManager::GetSystemCharacterisitcsDocument(), "http://www.w3.org/2001/XMLSchema-instance", "xsi");
+	XmlCommon::AddSchemaLocation(DocumentManager::GetSystemCharacterisitcsDocument(), "http://oval.mitre.org/XMLSchema/oval-system-characteristics-5 oval-system-characteristics-schema.xsd");
+	XmlCommon::AddSchemaLocation(DocumentManager::GetSystemCharacterisitcsDocument(), "http://oval.mitre.org/XMLSchema/oval-common-5 oval-common-schema.xsd");
+
+	// Add Generator Info
+	this->WriteGenerator();
+
+	//	Create the system_info element and add it as a child of the sc element
+	DOMElement *sysInfoElm = XmlCommon::CreateElement(DocumentManager::GetSystemCharacterisitcsDocument(), "system_info"); 
+	scNode->appendChild(sysInfoElm);
+
+	// Write system info
+	this->WriteSystemInfo();
+}
+
+void AbsDataCollector::AddXmlns(string newXmlnsAlias, string newXmlnsUri) {
+
+	XmlCommon::AddXmlns(DocumentManager::GetSystemCharacterisitcsDocument(), newXmlnsUri, newXmlnsAlias);
+}
+
+void AbsDataCollector::AddSchemaLocation(string newSchemaLocation) {
+
+	XmlCommon::AddSchemaLocation(DocumentManager::GetSystemCharacterisitcsDocument(), newSchemaLocation);
+}
+
+void AbsDataCollector::Run() {
+
+	AbsDataCollector::isRunning = true;
+	//////////////////////////////////////////////////////
+	////////////////  Process OVAL objects  //////////////
+	//////////////////////////////////////////////////////
+	//	get a ptr to the objects node in the oval document.
+	DOMElement* objectsNode = XmlCommon::FindElementNS(DocumentManager::GetDefinitionDocument(), "objects");
+	if(objectsNode != NULL) {
+		//	get a list of the child nodes
+		DOMNodeList* ovalObjectsChildren = objectsNode->getChildNodes();
+
+		if(!Log::WriteToScreen())
+			cout << "      Collecting object:  "; 
+
+		//	Loop through all the nodes in objects children
+		int prevIdLength = 1;
+		int curIdLength = 1;
+		unsigned int index = 0;
+		while(index < ovalObjectsChildren->getLength()) {
+			DOMNode *tmpNode = ovalObjectsChildren->item(index);
+
+			//	only concerned with ELEMENT_NODEs
+			if (tmpNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+				DOMElement *object = (DOMElement*)tmpNode;
+
+				string objectId = XmlCommon::GetAttributeByName(object, "id");
+				
+				Log::Debug("Collecting object id: " + objectId);
+
+				if(!Log::WriteToScreen()) {
+					curIdLength = objectId.length();
+					string blankSpaces = "";
+					if(prevIdLength > curIdLength)
+						blankSpaces = Common::PadStringWithChar(blankSpaces, ' ', prevIdLength-curIdLength);
+
+					string backSpaces = "";
+					backSpaces = Common::PadStringWithChar(backSpaces, '\b', prevIdLength);
+					string endBackSpaces = "";
+					endBackSpaces = Common::PadStringWithChar(endBackSpaces, '\b', blankSpaces.length());
+					cout << backSpaces << objectId << blankSpaces << endBackSpaces;
+				}
+
+				this->objectCollector->Run(objectId);
+
+				prevIdLength = curIdLength;
+			}
+
+			index ++;
+		}
+
+		if(!Log::WriteToScreen()) {
+			string fin = " FINISHED ";
+			int curLen = fin.length();
+			string blankSpaces = "";
+			if(prevIdLength > curLen)
+				blankSpaces = Common::PadStringWithChar(blankSpaces, ' ', prevIdLength-curLen);
+			string backSpaces = "";
+			backSpaces = Common::PadStringWithChar(backSpaces, '\b', prevIdLength);
+			
+			cout << backSpaces << fin << blankSpaces << endl;
+		}
+
+		// Once finished running call write method on all collected objects
+		CollectedObject::WriteCollectedObjects();
+
+		// clean up after the run completes
+		Filter::ClearCache();
+		AbsVariable::ClearCache();
+		AbsProbe::ClearGlobalCache();
+		VariableValue::ClearCache();
+	} 
+
+	AbsDataCollector::isRunning = false;
+}
+
+bool AbsDataCollector::GetIsRunning(){
+
+	return AbsDataCollector::isRunning;
+}
+
+void AbsDataCollector::WriteGenerator() {
+
+	DOMElement *scNode = XmlCommon::FindElement(DocumentManager::GetSystemCharacterisitcsDocument(), "oval_system_characteristics");
+	DOMElement *generatorElm = XmlCommon::AddChildElement(DocumentManager::GetSystemCharacterisitcsDocument(), scNode, "generator");
+	XmlCommon::AddChildElement(DocumentManager::GetSystemCharacterisitcsDocument(), generatorElm, "oval:product_name", "OVAL Definition Interpreter");
+	XmlCommon::AddChildElement(DocumentManager::GetSystemCharacterisitcsDocument(), generatorElm, "oval:product_version", Version::GetVersion() + " Build: " + Version::GetBuild());
+	XmlCommon::AddChildElement(DocumentManager::GetSystemCharacterisitcsDocument(), generatorElm, "oval:schema_version", "5.4");
+	XmlCommon::AddChildElement(DocumentManager::GetSystemCharacterisitcsDocument(), generatorElm, "oval:timestamp", Common::GetTimeStamp());
+	XmlCommon::AddChildElement(DocumentManager::GetSystemCharacterisitcsDocument(), generatorElm, "vendor", Version::GetVendor());
+}
+
+//****************************************************************************************//
+//						AbsDataCollectorException Class									  //	
+//****************************************************************************************//
+AbsDataCollectorException::AbsDataCollectorException(string errMsgIn, int severity, Exception* ex) : Exception(errMsgIn, severity, ex) {
+
+}
+
+AbsDataCollectorException::~AbsDataCollectorException() {
+
+}
+


Property changes on: trunk/ovaldi/src/AbsDataCollector.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/AbsDataCollector.h
===================================================================
--- trunk/ovaldi/src/AbsDataCollector.h	                        (rev 0)
+++ trunk/ovaldi/src/AbsDataCollector.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,143 @@
+//
+// $Id: AbsDataCollector.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef OVALDATACOLLECTOR_H
+#define OVALDATACOLLECTOR_H
+
+//	required xerces includes
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/DOMAttr.hpp>
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xercesc/dom/DOMNodeList.hpp>
+#include <xercesc/util/XMLString.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/parsers/AbstractDOMParser.hpp>
+
+//	other includes
+#include <string>
+#include <vector>
+#include <iostream>
+#include <stdlib.h>
+
+//	include common classes
+#include "DocumentManager.h"
+#include "Common.h"
+#include "Exception.h"
+#include "Log.h"
+#include "Version.h"
+#include "XmlCommon.h"
+#include "AbsObjectCollector.h"
+#include "CollectedObject.h"
+#include "AbsVariable.h"
+
+//	namespaces
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+class AbsObjectCollector; // forward declaration needed to allow successful compilation
+
+/**
+	This class acts as a base class for all data collectors. Doing so provides some common
+	functionality to all child classes and simplifies the creation of a new data collector. 
+	Collectors are family specific. That is each time a new family is added to the OVAL
+	schema a new collector class should be created to support it. Each family specific
+	collector is responsible for making calls to the probes used to gather data for that
+	families tests. Look at the Run() method in the DataCollector class for guidance.
+*/
+class AbsDataCollector {
+
+public:
+	AbsDataCollector();
+	virtual ~AbsDataCollector();
+
+	/** Return a reference to the singleton datacollector instance. */
+	static AbsDataCollector* Instance();
+	/** Add the specified schmema location to the document root. 
+		Ensure that the specified schema location is not already added.
+	*/
+	void AddSchemaLocation(string newSchemaLocation);
+	/**	Add the specified xmlns to the document root. 
+		Ensure that the specified xmlns is not already added.	
+	*/
+	void AddXmlns(string newXmlnsAlias, string newXmlnsUri);
+	/** Loop through all objects in the provided oval definitions document.
+		Get the object reference from the test and call the object collector.
+	*/
+	void Run();
+
+	/** Return a reference to the collected_objects element in the sc document. */
+	DOMElement* GetSCCollectedObjectsElm();
+	/** Return a reference to the system data element in the sc document. */
+	DOMElement* GetSCSystemDataElm();
+
+	/** Initilaize the base AbsDataCollector.
+		This function intialized the oval system characteristics document that is generated by the data collector.
+	*/
+	void InitBase(AbsObjectCollector*);
+
+	/** Return true if the data collector is running. */
+	static bool GetIsRunning();
+
+protected:
+
+	/** Write the generator element to the oval system characteristics document. 
+		Note that the values are all hard coded except for the time stamp value.
+	*/
+	void WriteGenerator();
+	/** Write the system info element to the oval system characteristics document.
+		Each concrete data collector implements this method since different api calls are utilized to fetchthe data.
+	*/
+	virtual void WriteSystemInfo() = 0;
+
+	DOMElement* collectedObjectsElm;
+	
+	DOMElement* systemDataElm;
+
+	AbsObjectCollector *objectCollector;
+
+	/** The singleton instance of a concrete DataCollector in the application. */
+	static AbsDataCollector* instance;
+	/** A flag used to indicate that the concrete DataCollector is running. 
+		The flag is used by the ObjectComponent class so that it can determine whether to a concrete data collector is running or not. 
+	*/
+	static bool isRunning;
+};
+
+/** 
+	This class represents an Exception that occured while running the Data collector.
+*/
+class AbsDataCollectorException : public Exception {
+public:
+	AbsDataCollectorException(string errMsgIn = "", int severity = ERROR_FATAL, Exception *ex = NULL);
+	~AbsDataCollectorException();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/AbsDataCollector.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/AbsEntity.cpp
===================================================================
--- trunk/ovaldi/src/AbsEntity.cpp	                        (rev 0)
+++ trunk/ovaldi/src/AbsEntity.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,352 @@
+//
+// $Id: AbsEntity.cpp 4611 2008-01-08 13:52:45Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "AbsEntity.h"
+
+//****************************************************************************************//
+//								AbsEntity Class											  //	
+//****************************************************************************************//
+AbsEntity::AbsEntity(string name, string value, OvalEnum::Datatype datatype, bool isObjectEntity, OvalEnum::Operation operation, AbsVariable* varRef, OvalEnum::Check varCheck, bool nil) {
+
+	this->SetName(name);
+	this->SetValue(value);
+	this->SetDatatype(datatype);
+	this->SetIsObjectEntity(isObjectEntity);
+	this->SetOperation(operation);
+	this->SetVarCheck(varCheck);
+	this->SetVarRef(NULL);
+	this->SetNil(nil);
+}
+
+AbsEntity::~AbsEntity() {
+
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+
+string AbsEntity::GetName() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the name field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->name;
+}
+
+void AbsEntity::SetName(string name) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the name field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->name = name;
+}
+
+string AbsEntity::GetValue() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the value field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->value;
+}
+
+void AbsEntity::SetValue(string value) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the value field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->value = value;
+}
+
+OvalEnum::Datatype AbsEntity::GetDatatype() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the datatype field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->datatype;
+}
+
+void AbsEntity::SetDatatype(OvalEnum::Datatype datatype) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the datatype field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->datatype = datatype;
+}
+
+bool AbsEntity::GetIsObjectEntity() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the isObjectEntity field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->isObjectEntity;
+}
+
+void AbsEntity::SetIsObjectEntity(bool isObjectEntity) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the isObjectEntity field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->isObjectEntity = isObjectEntity;
+}
+
+
+OvalEnum::Check AbsEntity::GetVarCheck() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the varCheck field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->varCheck;
+}
+
+void AbsEntity::SetVarCheck(OvalEnum::Check varCheck) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the varCheck field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->varCheck = varCheck;
+}
+
+bool AbsEntity::GetNil() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the nil field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->nil;
+}
+
+void AbsEntity::SetNil(bool nil) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the nil field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->nil = nil;
+}
+
+OvalEnum::Operation AbsEntity::GetOperation() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the operation field's value
+	// -----------------------------------------------------------------------
+
+	return this->operation;
+}
+
+void AbsEntity::SetOperation(OvalEnum::Operation operation) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the operation field's value
+	// -----------------------------------------------------------------------
+
+	this->operation = operation;
+}
+
+AbsVariable* AbsEntity::GetVarRef() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the varRef field's value
+	// -----------------------------------------------------------------------
+
+	return this->varRef;
+}
+
+void AbsEntity::SetVarRef(AbsVariable* varRef) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the varRef field's value
+	// -----------------------------------------------------------------------
+
+	this->varRef = varRef;
+}
+
+VariableValueVector* AbsEntity::GetVariableValues() {
+
+	VariableValueVector* varValues = new VariableValueVector();
+
+	if(this->GetVarRef() != NULL) {
+		AbsVariable* varRef = this->GetVarRef();
+
+		// get the values of the variable
+		VariableValueVector* values = varRef->GetValues();
+		VariableValueVector::iterator varValueIt;
+		for(varValueIt = values->begin(); varValueIt != values->end(); varValueIt ++) {
+			varValues->push_back((*varValueIt));
+		}
+
+		// get any variable values that were used for determinihng the value of this variable
+		values = varRef->GetVariableValues();
+		for(varValueIt = values->begin(); varValueIt != values->end(); varValueIt ++) {
+			varValues->push_back((*varValueIt));
+		}
+		// BUG - These can not currently be deleted. 
+		// The code is not consistant here. In places a new vector is returned
+		// in others a reference to a vector that is managed by other code is returned.
+		//delete values;
+		//values = NULL;
+	}
+
+	return varValues;
+}
+
+OvalEnum::ResultEnumeration AbsEntity::Analyze(ItemEntity* scElement) {
+
+	OvalEnum::ResultEnumeration result = OvalEnum::RESULT_ERROR;
+	try {
+
+		// check the status on the sc element
+		if(scElement->GetStatus() == OvalEnum::STATUS_ERROR) {
+			return OvalEnum::RESULT_ERROR;
+		} else if(scElement->GetStatus() == OvalEnum::STATUS_NOT_COLLECTED) {
+			return OvalEnum::RESULT_ERROR;
+		} else if(scElement->GetStatus() == OvalEnum::STATUS_DOES_NOT_EXIST) {
+			return OvalEnum::RESULT_FALSE;
+		}
+
+		// based on data type call the appropriate comparison method
+		if(this->GetVarRef() == NULL) {
+
+			if(this->GetDatatype() == OvalEnum::DATATYPE_BINARY) {
+				result = EntityComparator::CompareBinary(this->GetOperation(), this->GetValue(), scElement->GetValue());
+			} else if(this->GetDatatype() == OvalEnum::DATATYPE_BOOLEAN) {
+				result = EntityComparator::CompareBoolean(this->GetOperation(), this->GetValue(), scElement->GetValue());
+			} else if(this->GetDatatype() == OvalEnum::DATATYPE_EVR_STRING) {
+				result = EntityComparator::CompareEvrString(this->GetOperation(), this->GetValue(), scElement->GetValue());
+			} else if(this->GetDatatype() == OvalEnum::DATATYPE_FLOAT) {
+				result = EntityComparator::CompareFloat(this->GetOperation(), this->GetValue(), scElement->GetValue());
+			} else if(this->GetDatatype() == OvalEnum::DATATYPE_INTEGER) {
+				result = EntityComparator::CompareInteger(this->GetOperation(), this->GetValue(), scElement->GetValue());
+			} else if(this->GetDatatype() == OvalEnum::DATATYPE_IOS_VERSION) {
+				result = EntityComparator::CompareIosVersion(this->GetOperation(), this->GetValue(), scElement->GetValue());
+			} else if(this->GetDatatype() == OvalEnum::DATATYPE_STRING) {
+				result = EntityComparator::CompareString(this->GetOperation(), this->GetValue(), scElement->GetValue());
+			} else if(this->GetDatatype() == OvalEnum::DATATYPE_VERSION) {
+				result = EntityComparator::CompareVersion(this->GetOperation(), this->GetValue(), scElement->GetValue());
+			}
+
+		} else {
+
+			// loop over each variable value
+			IntVector results;
+			// check the flag on the variable
+			if(this->GetVarRef()->GetFlag() == OvalEnum::FLAG_COMPLETE) { 
+				VariableValueVector* values = this->GetVarRef()->GetValues();
+				VariableValueVector::iterator iterator;
+				for(iterator = values->begin(); iterator != values->end(); iterator++) {
+					OvalEnum::ResultEnumeration tmp = OvalEnum::RESULT_ERROR;
+					if(this->GetDatatype() == OvalEnum::DATATYPE_BINARY) {
+						tmp = EntityComparator::CompareBinary(this->GetOperation(), (*iterator)->GetValue(), scElement->GetValue());
+					} else if(this->GetDatatype() == OvalEnum::DATATYPE_BOOLEAN) {
+						tmp = EntityComparator::CompareBoolean(this->GetOperation(), (*iterator)->GetValue(), scElement->GetValue());
+					} else if(this->GetDatatype() == OvalEnum::DATATYPE_EVR_STRING) {
+						tmp = EntityComparator::CompareEvrString(this->GetOperation(), (*iterator)->GetValue(), scElement->GetValue());
+					} else if(this->GetDatatype() == OvalEnum::DATATYPE_FLOAT) {
+						tmp = EntityComparator::CompareFloat(this->GetOperation(), (*iterator)->GetValue(), scElement->GetValue());
+					} else if(this->GetDatatype() == OvalEnum::DATATYPE_INTEGER) {
+						tmp = EntityComparator::CompareInteger(this->GetOperation(), (*iterator)->GetValue(), scElement->GetValue());
+					} else if(this->GetDatatype() == OvalEnum::DATATYPE_IOS_VERSION) {
+						tmp = EntityComparator::CompareIosVersion(this->GetOperation(), (*iterator)->GetValue(), scElement->GetValue());
+					} else if(this->GetDatatype() == OvalEnum::DATATYPE_STRING) {
+						tmp = EntityComparator::CompareString(this->GetOperation(), (*iterator)->GetValue(), scElement->GetValue());
+					} else if(this->GetDatatype() == OvalEnum::DATATYPE_VERSION) {
+						tmp = EntityComparator::CompareVersion(this->GetOperation(), (*iterator)->GetValue(), scElement->GetValue());
+					}
+
+					results.push_back(tmp);
+				}
+				result = OvalEnum::CombineResultsByCheck(&results, this->GetVarCheck());
+			} else {
+				
+				result = OvalEnum::RESULT_ERROR;
+			}
+		}
+
+	} catch (Exception ex) {
+		result = OvalEnum::RESULT_ERROR;
+		Log::Debug("An error occured while Analyzing an entity. " + ex.GetErrorMessage());
+	} catch (...) {
+		result = OvalEnum::RESULT_ERROR;
+		Log::Debug("An unexpected error occured while Analyzing an entity.");
+	}
+
+	return result;
+}
+
+//****************************************************************************************//
+//							AbsEntityException Class									  //	
+//****************************************************************************************//
+AbsEntityException::AbsEntityException(string errMsgIn, int severity, Exception* ex) : Exception(errMsgIn, severity, ex) {
+
+}
+
+AbsEntityException::~AbsEntityException() {
+
+}
+


Property changes on: trunk/ovaldi/src/AbsEntity.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/AbsEntity.h
===================================================================
--- trunk/ovaldi/src/AbsEntity.h	                        (rev 0)
+++ trunk/ovaldi/src/AbsEntity.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,169 @@
+//
+// $Id: AbsEntity.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef ABSENTITY_H
+#define ABSENTITY_H
+
+//	required xerces includes
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/DOMAttr.hpp>
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xercesc/dom/DOMNodeList.hpp>
+#include <xercesc/util/XMLString.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/parsers/AbstractDOMParser.hpp>
+
+#include <string>
+#include <iostream>
+#include <stdlib.h>
+
+#include "Log.h"
+#include "OvalEnum.h"
+#include "XmlCommon.h"
+#include "Exception.h"
+#include "VariableValue.h"
+#include "AbsVariable.h"
+#include "EntityComparator.h"
+#include "ItemEntity.h"
+
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/** 
+	This class represents an AbsEntity in the oval definition and system characterisitcs schemas.
+	Since AbsEntities differ slightly between the definition and system characteristics schemas this class only
+	encapsulates the commonalities. 
+*/
+class AbsEntity {
+public:
+	/**
+		This constructor has default values specified for all parameters. Default values are based on 
+		the default values found in the oval schemas or reasonable defaults for this application.
+		@param name a string representing the name of the entity.
+		@param value a string representing the value of the entity.
+		@param datatype an OvalEnum::Datatype representing the datatype attribute for the entity. 
+		@param isObjectEntity a bool used to indicate whether or not the entity is part of an object specifier.
+		@param operation an OvalEnum::Operation representing the operation attribute for the entity.
+		@param varRef an AbsVariable* that represents the var_ref attribute for the entity. 
+		@param varCheck an OvalEnum::Check that represents the var_check attribute for the entity.
+		@param nil a bool that represents the xsi:nil attribute for the entity.
+	*/
+	AbsEntity(string name = "", string value = "", OvalEnum::Datatype datatype = OvalEnum::DATATYPE_STRING, bool isObjectEntity = false, OvalEnum::Operation operation = OvalEnum::OPERATION_EQUALS, 
+		AbsVariable* varRef = NULL, OvalEnum::Check varCheck = OvalEnum::CHECK_ALL, bool nil = false);
+
+	/**
+		This destructor takes no special action. All dynamically allocated memory is freed by other classes.
+	*/
+	virtual ~AbsEntity();
+
+	/**
+		Return true if the specified entity is equal to the current entity. Otherwise return false.
+		@param entity an AbsEntity* to compare against.
+		@return The result of the comparison.
+	*/
+	virtual bool Equals(AbsEntity* entity) = 0;
+
+	/**
+		Parse the specified DOMElement* into an AbsEntity.
+		@param entitiyElm a DOMElement* that represents the xml version of an entity.
+	*/
+	virtual void Parse(DOMElement* entitiyElm) = 0;
+
+	/**
+		Analyze the specified item entity based on the current AbsEntity's attributes and value.
+		Ensures that any errors thrown durring entity analysis are caught and that an erro result is returned.
+		NOTE: Does not account for a mis match in data type the data type from the OVAL Definition is 
+		used. The datatype in the OVAL System Characteristics xml is ignored.
+	
+		@param scElement a ItemEntity* that represents an entity in an Item in the system characteristics file.
+		@return The analysis result.
+	*/
+	OvalEnum::ResultEnumeration Analyze(ItemEntity* scElement);
+
+	/** 
+		Return a vector of variable values that were used for this entity.
+	*/
+	VariableValueVector* GetVariableValues(); 
+
+	string GetName();
+	void SetName(string name);
+
+	string GetValue();
+	void SetValue(string value);
+
+	OvalEnum::Datatype GetDatatype();
+	void SetDatatype(OvalEnum::Datatype datatype);
+
+	bool GetIsObjectEntity();
+	void SetIsObjectEntity(bool isObjectAbsEntity);
+
+	/** Return true if the xsi:nil is set to true. */
+	bool GetNil();
+	void SetNil(bool nil);
+
+	OvalEnum::Operation GetOperation();
+	void SetOperation(OvalEnum::Operation operation);
+
+	OvalEnum::Check GetVarCheck();
+	void SetVarCheck(OvalEnum::Check check);
+
+	AbsVariable* GetVarRef();
+	void SetVarRef(AbsVariable* varRef);
+
+private:
+	string name;
+	string value;
+	OvalEnum::Datatype datatype;
+	bool isObjectEntity;
+	OvalEnum::Check varCheck;
+	OvalEnum::Operation operation;
+	AbsVariable* varRef;
+	bool nil;
+
+};
+
+/**	
+	A vector for storing AbsEntity objects. 
+	Stores only pointers to the objects. 
+*/
+typedef vector < AbsEntity*, allocator<AbsEntity*> > AbsEntityVector;
+
+/** 
+	This class represents an Exception that occured while processing an entity.
+*/
+class AbsEntityException : public Exception {
+	public:
+		AbsEntityException(string errMsgIn = "", int severity = ERROR_FATAL, Exception *ex = NULL);
+		~AbsEntityException();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/AbsEntity.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/AbsFileFinder.cpp
===================================================================
--- trunk/ovaldi/src/AbsFileFinder.cpp	                        (rev 0)
+++ trunk/ovaldi/src/AbsFileFinder.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,405 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "AbsFileFinder.h"
+
+AbsFileFinder::AbsFileFinder() {
+
+	fileMatcher = new REGEX();
+}
+
+AbsFileFinder::~AbsFileFinder() {
+
+	delete fileMatcher;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+StringPairVector* AbsFileFinder::SearchFiles(ObjectEntity* path, ObjectEntity* fileName, BehaviorVector* behaviors) {
+
+	StringPairVector* filePaths = new StringPairVector();
+
+	// get all the paths
+	StringVector* paths = this->GetPaths(path, behaviors);
+	StringVector::iterator pathIt;
+	for(pathIt = paths->begin(); pathIt != paths->end(); pathIt++) {
+		
+		// get all files if the file is not nil
+		if(fileName->GetNil()) {
+
+			StringPair* filePath = new StringPair((*pathIt), "");
+            filePaths->push_back(filePath);
+
+		} else {
+
+			StringVector* fileNames = this->GetFileNames((*pathIt), fileName);
+			StringVector::iterator fileNameIt;
+			for(fileNameIt = fileNames->begin(); fileNameIt != fileNames->end(); fileNameIt++) {
+
+				StringPair* filePath = new StringPair((*pathIt), (*fileNameIt));
+				filePaths->push_back(filePath);
+
+			}
+			delete fileNames;
+		}
+	}
+	delete paths;
+
+	return filePaths;
+}
+
+StringVector* AbsFileFinder::GetPaths(ObjectEntity* path, BehaviorVector* behaviors) {
+
+	StringVector* paths = new StringVector();
+
+	// does this path use variables?
+	if(path->GetVarRef() == NULL) {
+		
+		// proceed based on operation
+		if(path->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			if(this->PathExists(path->GetValue())) {
+				paths->push_back(path->GetValue());
+			}
+		} else if(path->GetOperation() == OvalEnum::OPERATION_NOT_EQUAL) {
+			// turn the provided path value into a negative pattern match
+			// then get all that match the pattern
+			this->FindPaths(path->GetValue(), paths, false);
+
+		} else if(path->GetOperation() == OvalEnum::OPERATION_PATTERN_MATCH) {
+			this->FindPaths(path->GetValue(), paths);
+		}		
+
+	} else {
+
+		StringVector* allPaths = new StringVector();
+
+		if(path->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			// in the case of equals simply loop through all the 
+			// variable values and add them to the set of all paths
+			// if they exist on the system
+			VariableValueVector::iterator iterator;
+			for(iterator = path->GetVarRef()->GetValues()->begin(); iterator != path->GetVarRef()->GetValues()->end(); iterator++) {				
+				if(this->PathExists((*iterator)->GetValue())) {
+					paths->push_back((*iterator)->GetValue());
+				}
+			}
+
+		} else {
+			// for not equals and pattern match fetch all paths that match
+			// any of the variable values. Then analyze each path found on 
+			// the system against the variable values 			
+
+			// loop through all variable values and call findFiles
+			VariableValueVector* values = path->GetVariableValues();
+			VariableValueVector::iterator iterator;
+			for(iterator = values->begin(); iterator != values->end(); iterator++) {
+				if(path->GetOperation() == OvalEnum::OPERATION_NOT_EQUAL) {
+					this->FindPaths((*iterator)->GetValue(), allPaths, false);
+				} else {
+					this->FindPaths((*iterator)->GetValue(), allPaths, true);
+				}
+			}
+		}
+
+		// only keep paths that match operation and value and var check
+		ItemEntity* tmp = new ItemEntity("path","", OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS);
+		StringVector::iterator it;
+		for(it = allPaths->begin(); it != allPaths->end(); it++) {
+			tmp->SetValue((*it));
+			if(path->Analyze(tmp) == OvalEnum::RESULT_TRUE) {
+				paths->push_back((*it));
+			}
+		}
+		delete tmp;
+		delete allPaths;
+	}
+
+	// apply any behaviors and consolidate the results
+	StringVector* behaviorPaths = this->ProcessPathBehaviors(paths, behaviors);
+
+	// combine all the paths into a unique string vector
+	StringVector* uniquePaths = new StringVector();
+	UniqueStringVector* usv = new UniqueStringVector(uniquePaths);
+	StringVector::iterator it;
+	for(it = paths->begin(); it != paths->end(); it++) {
+		usv->Append((*it));
+	}
+	delete paths;
+	for(it = behaviorPaths->begin(); it != behaviorPaths->end(); it++) {
+		usv->Append((*it));
+	}
+	delete behaviorPaths;
+	delete usv;
+
+	return uniquePaths;
+}
+
+void AbsFileFinder::DownwardPathRecursion(StringVector* paths, string path, int maxDepth) {
+
+	if(maxDepth == 0) {
+		return;
+	} 
+	if(maxDepth < -1) {
+		throw FileFinderException("Error invalid max_depth. max depth must be -1 or more. Found: " + maxDepth);
+	}
+
+	// get child directories
+	StringVector* childDirectories = this->GetChildDirectories(path);
+	StringVector::iterator childDirectory;
+	for(childDirectory = childDirectories->begin(); childDirectory != childDirectories->end(); childDirectory++) {
+
+		// store child directory
+		(*childDirectory)+=Common::fileSeperator;
+		paths->push_back((*childDirectory));
+		if(maxDepth == -1) {
+
+			// make recursive call 
+			this->DownwardPathRecursion(paths, (*childDirectory), maxDepth);
+
+		} else if(maxDepth > 0) {
+
+			// make recursive call
+			this->DownwardPathRecursion(paths, (*childDirectory), --maxDepth);
+		}
+	}
+	delete childDirectories;
+}
+
+void AbsFileFinder::UpwardPathRecursion(StringVector* paths, string path, int maxDepth) {
+	
+	if(maxDepth == 0) {
+		return;
+	} 
+	if(maxDepth < -1) {
+		throw FileFinderException("Error invalid max_depth. max depth must be -1 or more. Found: " + maxDepth);
+	}
+
+	// get parent directory by parsing the string to find the last file seperator
+
+	// check if path is currently / or c:/ and stop 
+	string fileSeperatorStr = "";
+	fileSeperatorStr+=Common::fileSeperator;
+	string regex = "^[A-Za-z]:\\\\$";
+	if(path.compare(fileSeperatorStr) == 0 || this->fileMatcher->IsMatch(regex.c_str(), path.c_str())) {
+		return;
+	}
+	
+	// remove the trailing char if it is a file seperator
+	if (path[path.length()-1] == Common::fileSeperator) {
+		path = path.substr(0, (path.length()-1));
+	} 
+
+	// find the last file seperator
+	basic_string <char>::size_type index = path.find_last_of(Common::fileSeperator);
+
+	// if no path seperator is found stop recursing up.
+	if(index == string::npos) {
+		return;
+	} 
+	string parentDirectory = path.substr(0, index+1);
+
+	// store parent directory
+	paths->push_back(parentDirectory);
+	if(maxDepth == -1) {
+
+		// make recursive call 
+		this->UpwardPathRecursion(paths, parentDirectory, maxDepth);
+
+	} else if(maxDepth > 0) {
+
+		// make recursive call
+		this->UpwardPathRecursion(paths, parentDirectory, --maxDepth);
+	}
+}
+
+StringVector* AbsFileFinder::GetFileNames(string path, ObjectEntity* fileName, BehaviorVector* behaviors) {
+
+	StringVector* fileNames = new StringVector();
+
+	// does this fileName use variables?
+	if(fileName->GetVarRef() == NULL) {
+		
+		// proceed based on operation
+		if(fileName->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			if(this->FileNameExists(path, fileName->GetValue())) {
+				fileNames->push_back(fileName->GetValue());
+			}
+
+		} else if(fileName->GetOperation() == OvalEnum::OPERATION_NOT_EQUAL) {
+			// turn the provided fileName value into a negative pattern match
+			// then get all that match the pattern
+			this->GetFilesForPattern(path, fileName->GetValue(), fileNames, false);
+
+		} else if(fileName->GetOperation() == OvalEnum::OPERATION_PATTERN_MATCH) {
+			this->GetFilesForPattern(path, fileName->GetValue(), fileNames);
+		}		
+
+	} else {
+
+		StringVector* allFileNames = new StringVector();
+
+		if(fileName->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			// in the case of equals simply loop through all the 
+			// variable values and add them to the set of all file names
+			// if they exist on the system
+			VariableValueVector::iterator iterator;
+			for(iterator = fileName->GetVarRef()->GetValues()->begin(); iterator != fileName->GetVarRef()->GetValues()->end(); iterator++) {
+				
+				if(this->FileNameExists(path, (*iterator)->GetValue())) {
+					fileNames->push_back((*iterator)->GetValue());
+				}
+			}
+
+		} else {
+	
+			// for not equals and pattern match fetch all files that
+			// match any of the variable values.		
+
+			// loop through all variable values and call GetFilesForPattern
+			VariableValueVector* values = fileName->GetVariableValues();
+			VariableValueVector::iterator iterator;
+			for(iterator = values->begin(); iterator != values->end(); iterator++) {
+				if(fileName->GetOperation() == OvalEnum::OPERATION_NOT_EQUAL) {
+					this->GetFilesForPattern(path, (*iterator)->GetValue(), allFileNames, false);
+				} else {
+					this->GetFilesForPattern(path, (*iterator)->GetValue(), allFileNames, true);
+				}
+			}
+		}
+
+		// only keep files that match operation and value and var check
+		ItemEntity* tmp = new ItemEntity("filename","", OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS);
+		StringVector::iterator it;
+		for(it = allFileNames->begin(); it != allFileNames->end(); it++) {
+			tmp->SetValue((*it));
+			if(fileName->Analyze(tmp) == OvalEnum::RESULT_TRUE) {
+				fileNames->push_back((*it));
+			}
+		}
+		delete tmp;
+		delete allFileNames;
+	}
+
+	return fileNames;
+}
+
+bool AbsFileFinder::ReportPathDoesNotExist(ObjectEntity *path, StringVector* paths) {
+
+	bool result = false;
+	
+	if(path->GetOperation() == OvalEnum::OPERATION_EQUALS) {		
+		
+		if(path->GetVarRef() == NULL) {
+			if(!this->PathExists(path->GetValue())) {
+				paths = new StringVector();
+				paths->push_back(path->GetValue());
+				result = true;
+			}
+		} else {
+
+			VariableValueVector::iterator iterator;
+			for(iterator = path->GetVarRef()->GetValues()->begin(); iterator != path->GetVarRef()->GetValues()->end(); iterator++) {
+				if(!this->PathExists((*iterator)->GetValue())) {
+					if(paths == NULL) {
+						paths = new StringVector();
+					}
+					paths->push_back((*iterator)->GetValue());
+					result = true;
+				}
+			}
+		}
+	}
+
+	return  result;
+}
+
+bool AbsFileFinder::ReportFileNameDoesNotExist(string path, ObjectEntity *fileName, StringVector *fileNames) {
+
+	bool result = false;
+	
+	if(fileName->GetOperation() == OvalEnum::OPERATION_EQUALS && !fileName->GetNil()) {		
+		
+		if(fileName->GetVarRef() == NULL) {
+			if(!this->FileNameExists(path, fileName->GetValue())) {
+				fileNames = new StringVector();
+				fileNames->push_back(fileName->GetValue());
+				result = true;
+			}
+		} else {
+
+			
+			VariableValueVector::iterator iterator;
+			for(iterator = fileName->GetVarRef()->GetValues()->begin(); iterator != fileName->GetVarRef()->GetValues()->end(); iterator++) {
+				if(!this->FileNameExists(path, (*iterator)->GetValue())) {
+					if(fileNames == NULL) {
+						fileNames = new StringVector();
+					}
+					fileNames->push_back((*iterator)->GetValue());
+					result = true;
+				}
+			}
+		}
+	}
+
+	return  result;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+
+bool AbsFileFinder::IsMatch(string pattern, string value, bool isRegex) {
+
+	bool match = false;
+
+	if(isRegex) {
+		if(this->fileMatcher->IsMatch(pattern.c_str(), value.c_str())) {
+			match = true;
+		}
+	} else {	
+		if(value.compare(pattern) != 0) {
+			match = true;
+		}
+	}
+
+	return match;
+}
+
+//****************************************************************************************//
+//								FileFinderException Class								  //	
+//****************************************************************************************//
+FileFinderException::FileFinderException(string errMsgIn, int severity, Exception* ex) : Exception(errMsgIn, severity, ex) {
+
+}
+
+FileFinderException::~FileFinderException() {
+
+}


Property changes on: trunk/ovaldi/src/AbsFileFinder.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/AbsFileFinder.h
===================================================================
--- trunk/ovaldi/src/AbsFileFinder.h	                        (rev 0)
+++ trunk/ovaldi/src/AbsFileFinder.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,163 @@
+//
+// $Id: AbsFileFinder.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef ABSFILEFINDER_H
+#define ABSFILEFINDER_H
+
+#ifdef WIN32
+	#pragma warning(disable:4786)
+#endif
+
+#include "Log.h"
+#include "Common.h"
+#include "Exception.h"
+#include "REGEX.h"
+#include "ObjectEntity.h"
+#include "ItemEntity.h"
+
+#include <string>
+#include <vector>
+
+using namespace std;
+
+/**
+	This class provides a common mechanism for searching for files.
+	Searches are based on a provided path and file name where each may contain
+	operations like equal, not equal, and pattern match.
+*/
+class AbsFileFinder {
+public:
+	AbsFileFinder();
+	virtual ~AbsFileFinder();
+
+	/** Return the set of filepaths as a vector of StringPairs that match the specified criteria. 
+		If a path exists and matches the path criteria it will be added to the result vector. If no 
+		file exist under that path the second item in the pair will be set to NULL. The caller can then 
+		determine if the filename is NULL because it was set to nil in the xml or there were no matching
+		filenames at the path. The caller should check use ObjetEntity::GetNil() to determine if the 
+		filename is set to nill. If not set to nill then it is safe to assume that the return value was 
+		set to NULL because no matching filenames were found at the path.
+
+		See also AbsFileFinder::ReportFileNameDoesNotExist(string path, ObjectEntity* fileName) to 
+		determine if the fact the the filename was nopt found should be reported by the calling probe.
+	*/
+	StringPairVector* SearchFiles(ObjectEntity* path, ObjectEntity* fileName, BehaviorVector* behaviors);
+
+	/** Return a vector of paths that match the specified criteria. */
+	StringVector* GetPaths(ObjectEntity* path, BehaviorVector* behaviors);
+
+	/** Return a vector of file names that match the specified criteria. 
+		Search the file system for files under the specified path that match the 
+	  	provided ObjectEntity.
+	*/
+	StringVector* GetFileNames(string path, ObjectEntity* fileName, BehaviorVector* behaviors = NULL);
+
+	/** Return true if the calling probe should report that the path does not exist.
+		If a path's operator is set to OPERATOR_EQUALS and the path does not exist
+		the caller should report that the path was not found. When getting the value 
+		of the path to check existence need to look for either a simple element value
+		or a variable with one or more values. If the return value is true the paths
+		StringVector* paremeter contains the set of paths to report as not existing. 
+		Otherwise the the paths paramter is NULL. The caller is responsible for making sure
+		that any memory allocated for the paths parameter is cleaned up. The paths paramter
+		should be input as NULL when the function is called.
+	*/
+	bool ReportPathDoesNotExist(ObjectEntity* path, StringVector* paths);
+
+	/** Return true if the calling probe should report that the filename does not exist.
+		If a filename's operator is set to OPERATOR_EQUALS and the file name does not exist
+		at the specified path the caller should report that the path was not found. When 
+		getting the value  of the filename to check existence need to look for either a simple 
+		element value or a variable with one or more values. If the return value is true the fileNames
+		StringVector* paremeter contains the set of fileNames to report as not existing. 
+		Otherwise the the fileNames paramter is NULL. The caller is responsible for making sure
+		that any memory allocated for the fileNames parameter is cleaned up. The fileNames paramter
+		should be input as NULL when the function is called.
+	*/
+	bool ReportFileNameDoesNotExist(string path, ObjectEntity* fileName, StringVector* fileNames);
+
+protected:
+	
+	/** Return the set of matching paths after applying behaviors */
+	virtual StringVector* ProcessPathBehaviors(StringVector* paths, BehaviorVector* behaviors) = 0;
+
+	/** Return true if the specified directory exists. */
+	virtual bool PathExists(string path) = 0;
+	
+	/** Return true if the specified filename is found in the specified directory. */
+	virtual bool FileNameExists(string path, string fileName) = 0;
+	
+	/** Get the set of all paths that match the specified pattern. */
+	virtual void FindPaths(string regex, StringVector* paths, bool isRegex = true) = 0;
+	
+	/** Get the set of files in the specified directory that match the specified pattern. */
+	virtual void GetFilesForPattern(string path, string pattern, StringVector* fileNames, bool isRegex = true) = 0;
+	
+	/** Get the full path of the parent directory as a string. */
+	//virtual string GetParentDirectory(string path) = 0;
+	
+	/** Get the full path of all child directories as a StringVector. */
+	virtual StringVector* GetChildDirectories(string path) = 0;
+
+	/** Return true if the specified value matches the specified pattern. 
+	    If the isRegex flag is true the match is treated as a regex, otherwise
+		a string comparison is preformed to check that the value is not equal to 
+		the pattern. 
+	*/
+	bool IsMatch(string pattern, string value, bool isRegex = true);
+
+	REGEX *fileMatcher;
+
+	/** Do a recusive search down the file system until the specified maxDepth is hit. 
+	    Each directory traversed is added to the set of paths. If maxDepth is a positive
+		number it is decremented with each recursive call and recursion stops when the 
+		maxDepth is 0. If maxDepth is -1 recursion continues until no child directories 
+		are found and a recursive call can not be made. */
+	void DownwardPathRecursion(StringVector* paths, string path, int maxDepth);
+	
+	/** Do a recusive search up the file system until the specified maxDepth is hit.
+	    Each directory traversed is added to the set of paths. f maxDepth is a positive
+		number it is decremented with each recursive call and recursion stops when the 
+		maxDepth is 0. If maxDepth is -1 recursion continues until no parent directory 
+		is found and a recursive call can not be made. */
+	void UpwardPathRecursion(StringVector* paths, string path, int maxDepth);
+};
+
+/** 
+	This class represents an Exception that occured while useing a FileFinder.
+*/
+class FileFinderException : public Exception {
+	public:
+		FileFinderException(string errMsgIn = "", int severity = ERROR_FATAL, Exception* ex = NULL);
+		~FileFinderException();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/AbsFileFinder.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/AbsFunctionComponent.cpp
===================================================================
--- trunk/ovaldi/src/AbsFunctionComponent.cpp	                        (rev 0)
+++ trunk/ovaldi/src/AbsFunctionComponent.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,90 @@
+//
+// $Id: AbsFunctionComponent.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "AbsFunctionComponent.h"
+
+//****************************************************************************************//
+//								AbsFunctionComponent Class								  //	
+//****************************************************************************************//
+AbsFunctionComponent::AbsFunctionComponent() : AbsComponent() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a complete AbsFunctionComponent object
+	//
+	// -----------------------------------------------------------------------
+
+}
+
+AbsFunctionComponent::~AbsFunctionComponent() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Do nothing for now
+	//
+	// -----------------------------------------------------------------------
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+AbsComponentVector* AbsFunctionComponent::GetComponents() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the components field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return &this->components;
+}
+
+void AbsFunctionComponent::SetComponents(AbsComponentVector* components) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the components field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->components = (*components);
+}
+
+void AbsFunctionComponent::AppendComponent(AbsComponent* component) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the components field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->GetComponents()->push_back(component);
+}


Property changes on: trunk/ovaldi/src/AbsFunctionComponent.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/AbsFunctionComponent.h
===================================================================
--- trunk/ovaldi/src/AbsFunctionComponent.h	                        (rev 0)
+++ trunk/ovaldi/src/AbsFunctionComponent.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,59 @@
+//
+// $Id: AbsFunctionComponent.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef ABSFUNCTIONCOMPONENT_H
+#define ABSFUNCTIONCOMPONENT_H
+
+#include "AbsComponent.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	This class represents abstract function component in a local_varaible in the oval definition schema.
+	The oval definition schema defines a set of funtions for use in local_variables. All functions have 
+	some common aspects. This calls encaplusates those commonalities.
+*/
+class AbsFunctionComponent : public AbsComponent {
+public:
+	AbsFunctionComponent();
+	virtual ~AbsFunctionComponent();
+
+	AbsComponentVector* GetComponents();
+	void SetComponents(AbsComponentVector* components);
+
+	void AppendComponent(AbsComponent* component);
+
+private:
+	AbsComponentVector components;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/AbsFunctionComponent.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/AbsObject.cpp
===================================================================
--- trunk/ovaldi/src/AbsObject.cpp	                        (rev 0)
+++ trunk/ovaldi/src/AbsObject.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,210 @@
+//
+// $Id: AbsObject.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "AbsObject.h"
+
+//****************************************************************************************//
+//									AbsObject Class										  //	
+//****************************************************************************************//
+
+AbsObject::AbsObject(string id, string comment, string xmlns, string name, int version) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a complete Entity object
+	//
+	// -----------------------------------------------------------------------
+
+	this->SetId(id);
+	this->SetComment(comment);
+	this->SetXmlns(xmlns);
+	this->SetName(name);
+	this->SetVersion(version);
+}
+
+AbsObject::~AbsObject() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	clean up all the elements
+	//
+	// -----------------------------------------------------------------------
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+
+string AbsObject::GetId() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the id field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->id;
+}
+
+void AbsObject::SetId(string id) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the id field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->id = id;
+}
+
+string AbsObject::GetComment() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the comment field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->comment;
+}
+
+void AbsObject::SetComment(string comment) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the comment field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->comment = comment;
+}
+
+string AbsObject::GetName() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the name field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->name;
+}
+
+void AbsObject::SetName(string name) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the name field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->name = name;
+}
+
+int AbsObject::GetVersion() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the version field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->version;
+}
+
+void AbsObject::SetVersion(int version) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the version field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->version = version;
+}
+
+string AbsObject::GetXmlns() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the xmlns field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->xmlns;
+}
+
+string AbsObject::GetType() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the type field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->type;
+}
+
+void AbsObject::SetXmlns(string xmlns) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the xmlns field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->xmlns = xmlns;
+}
+
+//****************************************************************************************//
+//								AbsObjectException Class								  //	
+//****************************************************************************************//
+AbsObjectException::AbsObjectException(string errMsgIn, int severity, Exception* ex) : Exception(errMsgIn, severity, ex) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the error message and then set the severity to ERROR_FATAL. This is 
+	//	done with the explicit call to the Exception class constructor that 
+	//	takes a single string param.
+	//
+	// -----------------------------------------------------------------------
+
+}
+
+AbsObjectException::~AbsObjectException() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Do nothing for now
+	//
+	// -----------------------------------------------------------------------
+
+}


Property changes on: trunk/ovaldi/src/AbsObject.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/AbsObject.h
===================================================================
--- trunk/ovaldi/src/AbsObject.h	                        (rev 0)
+++ trunk/ovaldi/src/AbsObject.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,113 @@
+//
+// $Id: AbsObject.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef ABSOBJECT_H
+#define ABSOBJECT_H
+
+//	required xerces includes
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/DOMAttr.hpp>
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xercesc/dom/DOMNodeList.hpp>
+#include <xercesc/util/XMLString.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/parsers/AbstractDOMParser.hpp>
+
+//	other includes
+#include <string>
+#include <vector>
+#include <iostream>
+#include <stdlib.h>
+
+#include "Exception.h"
+#include "VariableValue.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	This class represents an AbsObject in an oval definition file.
+	The oval definition schema defined two types of objects, a set object and an object.
+*/
+class AbsObject {
+public:
+	virtual ~AbsObject();
+
+	virtual void Parse(DOMElement*) = 0;
+	virtual VariableValueVector* GetVariableValues() = 0;
+	
+	string GetId();
+	void SetId(string id);
+
+	string GetComment();
+	void SetComment(string comment);
+
+	string GetName();
+	void SetName(string name);
+
+	string GetXmlns();
+	void SetXmlns(string xmlns);
+
+	int GetVersion();
+	void SetVersion(int version);
+
+	string GetType();
+
+protected:
+	AbsObject(string id = "", string comment = "", string xmlns = "", string name = "", int version = 1);
+	string type;
+
+private:
+
+	string id;
+	string comment;
+	string name;
+	int version;
+	string xmlns;
+
+};
+
+/**
+	A vector for storing AbsObject objects.
+	All objects are stored by reference.
+*/
+typedef vector < AbsObject*, allocator<AbsObject*> > AbsObjectVector;
+
+/** 
+	This class represents an Exception that occured while processing an AbsObject.
+*/
+class AbsObjectException : public Exception {
+	public:
+		AbsObjectException(string errMsgIn = "", int severity = ERROR_FATAL, Exception *ex = NULL);
+		~AbsObjectException();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/AbsObject.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/AbsObjectCollector.cpp
===================================================================
--- trunk/ovaldi/src/AbsObjectCollector.cpp	                        (rev 0)
+++ trunk/ovaldi/src/AbsObjectCollector.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,580 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "AbsObjectCollector.h"
+
+//****************************************************************************************//
+//							AbsObjectCollector Class									  //	
+//****************************************************************************************//
+AbsObjectCollector* AbsObjectCollector::instance = NULL;
+
+AbsObjectCollector::AbsObjectCollector() {
+	
+}
+
+AbsObjectCollector::~AbsObjectCollector() {
+
+}
+
+AbsObjectCollector* AbsObjectCollector::Instance() { 
+
+	return AbsObjectCollector::instance;
+}
+// ***************************************************************************************	//
+//								Public members												//
+// ***************************************************************************************	//
+CollectedObject* AbsObjectCollector::Run(string objectId) {
+	
+	// check the cache
+	CollectedObject* collectedObject = CollectedObject::GetCollectedObject(objectId);
+
+	// Check to make sure this object has not already been collected.
+	if(collectedObject == NULL) {
+
+		//Log::Debug("AbsObjectCollector::Run processing object id: " + objectId);				
+
+		// Parse this object
+		AbsObject* absObject = NULL;
+		try {
+			absObject = ObjectFactory::GetObjectById(objectId);
+		} catch (VariableFactoryException ex) {
+			collectedObject = CollectedObject::CreateError(objectId);
+			collectedObject->SetFlag(ex.GetVariable()->GetFlag());
+			
+			// add all the messages reported with the AbsVariable
+			StringVector::iterator iterator;
+			for(iterator = ex.GetVariable()->GetMessages()->begin(); iterator != ex.GetVariable()->GetMessages()->end(); iterator++) {
+				collectedObject->AppendOvalMessage(new OvalMessage((*iterator)));
+			}
+			
+		} catch(Exception ex) {
+			Log::Info("AbsObjectCollector::Run() - Error while parsing object: " + objectId + " " + ex.GetErrorMessage());
+			collectedObject = CollectedObject::CreateError(objectId);
+			collectedObject->AppendOvalMessage(new OvalMessage("AbsObjectCollector::Run() - Error while parsing object: " + objectId + " " + ex.GetErrorMessage()));
+		} catch(...) {
+			Log::Info("AbsObjectCollector::Run() - Error while parsing object: " + objectId + " Unkown error.");
+			collectedObject = CollectedObject::CreateError(objectId);
+			collectedObject->AppendOvalMessage(new OvalMessage("AbsObjectCollector::Run() - Error while parsing object: " + objectId + " Unkown error."));
+		}
+
+
+		//
+		// This second check to see if collectedObject is NULL is here
+		// to allow the code to catch errors in loading the object and report 
+		// those errors as a collected object in the sc file
+		//
+		if(collectedObject == NULL) {
+	
+			try {
+
+				// Process the object
+				collectedObject = this->Process(absObject);
+
+			} catch(Exception ex) {
+				if(collectedObject == NULL) 
+					collectedObject = CollectedObject::CreateError(objectId);
+
+				collectedObject->AppendOvalMessage(new OvalMessage(ex.GetErrorMessage(), OvalEnum::LEVEL_FATAL));
+				collectedObject->SetFlag(OvalEnum::FLAG_ERROR);
+				if(absObject != NULL) {
+					delete absObject;
+					absObject = NULL;
+				}
+				Log::Debug("Error while collecting data for object: " + collectedObject->GetId() + " " + ex.GetErrorMessage());
+			} catch(...) {
+				if(collectedObject == NULL) 
+					collectedObject = CollectedObject::CreateError(objectId);
+
+				collectedObject->AppendOvalMessage(new OvalMessage("An unknown error occured while collecting data." , OvalEnum::LEVEL_FATAL));
+				if(absObject != NULL) {
+					delete absObject;
+					absObject = NULL;
+				}
+				Log::Debug("An unknown error occured while collecting data for object: " + collectedObject->GetId());
+			} 				
+		}
+	}
+
+	return collectedObject;
+}
+
+// ***************************************************************************************	//
+//								Private members												//
+// ***************************************************************************************	//
+ItemVector* AbsObjectCollector::ApplyFilters(ItemVector* items, AbsStateVector* filters) {
+
+	ItemVector* tmpItems = new ItemVector();
+	this->CopyItems(tmpItems, items);
+
+	// loop through all filters
+	AbsStateVector::iterator filterIterator;
+	for(filterIterator = filters->begin(); filterIterator != filters->end(); filterIterator++) {
+		Filter* filter = (Filter*)(*filterIterator);
+		ItemVector* results = new ItemVector();
+
+		// Now loop through all the Items. Add Matching Items to result Vector
+		ItemVector::iterator itemIterator;
+		for(itemIterator = tmpItems->begin(); itemIterator != tmpItems->end(); itemIterator++) {
+			Item* item = (*itemIterator);
+			if(!filter->Analyze(item)) {
+				results->push_back(item);
+			}
+		}
+		// reset the tmpItems vector
+		delete tmpItems;
+		tmpItems = NULL;
+		tmpItems = results;
+	}
+
+	return tmpItems;
+}
+
+void AbsObjectCollector::CopyItems(ItemVector* dest, ItemVector* src) {
+	
+	ItemVector::iterator iterator;
+	for(iterator = src->begin(); iterator != src->end(); iterator++) {
+		dest->push_back((*iterator));
+	}
+}	
+
+bool AbsObjectCollector::ExistsInSet(ItemVector* itemSet, Item* item) {
+
+	bool exists = false;
+	
+	ItemVector::iterator iterator;
+	for(iterator = itemSet->begin(); iterator != itemSet->end(); iterator++) {
+		if(item->GetId() == (*iterator)->GetId()) {
+			exists = true;
+			break;
+		}
+	}	
+
+	return exists;
+}
+CollectedSet* AbsObjectCollector::Union(CollectedSet* collectedSet1, CollectedSet* collectedSet2) {
+	
+	ItemVector* resultItems = new ItemVector();
+
+	ItemVector* itemSet1 = collectedSet1->GetItems();
+	ItemVector* itemSet2 = collectedSet2->GetItems();
+
+	ItemVector::iterator iterator;
+	for(iterator = itemSet1->begin(); iterator != itemSet1->end(); iterator++) {
+		if(!this->ExistsInSet(resultItems, (*iterator))) {
+			resultItems->push_back((*iterator));
+		}
+	}
+
+	for(iterator = itemSet2->begin(); iterator != itemSet2->end(); iterator++) {
+		if(!this->ExistsInSet(resultItems, (*iterator))) {
+			resultItems->push_back((*iterator));
+		}
+	}
+	
+	CollectedSet* result = new CollectedSet();
+	result->SetItems(resultItems);
+
+	return result;
+}
+
+CollectedSet* AbsObjectCollector::Intersection(CollectedSet* collectedSet1, CollectedSet* collectedSet2) {
+
+	ItemVector* resultItems = new ItemVector();
+
+	ItemVector* itemSet1 = collectedSet1->GetItems();
+	ItemVector* itemSet2 = collectedSet2->GetItems();
+
+	// Add the items from set 1 that exist in set 2
+	ItemVector::iterator iterator;
+	for(iterator = itemSet1->begin(); iterator != itemSet1->end(); iterator++) {
+		if(this->ExistsInSet(itemSet2, (*iterator))) {
+			resultItems->push_back((*iterator));
+		}
+	}
+
+	// Add the items from set 2 that exist in set 1
+	for(iterator = itemSet2->begin(); iterator != itemSet2->end(); iterator++) {
+		if(this->ExistsInSet(itemSet1, (*iterator))) {
+			resultItems->push_back((*iterator));
+		}
+	}
+
+	CollectedSet* result = new CollectedSet();
+	result->SetItems(resultItems);
+
+	return result;
+}
+
+CollectedSet* AbsObjectCollector::Compelement(CollectedSet* collectedSet1, CollectedSet* collectedSet2) {
+
+	ItemVector* resultItems = new ItemVector();
+
+	ItemVector* itemSet1 = collectedSet1->GetItems();
+	ItemVector* itemSet2 = collectedSet2->GetItems();
+
+	ItemVector::iterator iterator;
+	for(iterator = itemSet1->begin(); iterator != itemSet1->end(); iterator++) {
+		if(!this->ExistsInSet(itemSet2, (*iterator))) {
+			resultItems->push_back((*iterator));
+		}
+	}
+
+	CollectedSet* result = new CollectedSet();
+	result->SetItems(resultItems);
+
+	return result;
+}
+
+CollectedObject* AbsObjectCollector::Process(AbsObject* absObject) {
+
+	// Based on the type of object call the appropriate process method.
+	CollectedObject* collectedObject = NULL;
+	if(typeid(*absObject) == typeid(Object)) {
+		collectedObject = this->ProcessObject((Object*)absObject);
+	} else {
+		collectedObject = this->ProcessSetObject((SetObject*)absObject);
+	}
+
+	return collectedObject;
+}
+
+CollectedObject* AbsObjectCollector::ProcessSetObject(SetObject* setObject) {
+
+	CollectedSet* collectedSet = this->ProcessSet(setObject->GetSet());
+	CollectedObject* collectedObject = CollectedObject::Create(setObject);	
+	collectedObject->SetReferences(collectedSet->GetItems());
+	collectedObject->SetFlag(collectedSet->GetFlag());
+	collectedObject->AppendVariableValues(collectedSet->GetVariableValues());
+
+	return collectedObject;
+}
+
+CollectedSet* AbsObjectCollector::ProcessSet(Set* set) {
+
+	CollectedSet* collectedSet1 = NULL;
+	CollectedSet* collectedSet2 = NULL;
+
+	if(!set->GetIsSimpleSet()) {		
+
+		// make recursive call for each child set.
+		if(set->GetSetOne() != NULL) {
+			collectedSet1 = this->ProcessSet(set->GetSetOne());
+		}
+
+		if(set->GetSetTwo() != NULL) {
+			collectedSet2 = this->ProcessSet(set->GetSetTwo());
+		}
+
+	} else {
+
+		// Collect each referenced object using any supplied filters
+		if(set->GetReferenceOne() != NULL) {
+			collectedSet1 = new CollectedSet();
+			CollectedObject* refOneCollectedObj = this->Run(set->GetReferenceOne()->GetId());
+			ItemVector* itemSet1 = refOneCollectedObj->GetReferences();
+			itemSet1 = this->ApplyFilters(itemSet1, set->GetFilters());
+			VariableValueVector* set1Vars = refOneCollectedObj->GetVariableValues();
+			collectedSet1->AppendVariableValues(set1Vars);
+			collectedSet1->SetFlag(refOneCollectedObj->GetFlag());
+			collectedSet1->SetItems(itemSet1);
+		}
+
+		if(set->GetReferenceTwo() != NULL) {
+			collectedSet2 = new CollectedSet();
+			CollectedObject* refTwoCollectedObj = this->Run(set->GetReferenceTwo()->GetId());
+			ItemVector* itemSet2 = refTwoCollectedObj->GetReferences();
+			itemSet2 = this->ApplyFilters(itemSet2, set->GetFilters());
+			VariableValueVector* set2Vars = refTwoCollectedObj->GetVariableValues();
+			collectedSet2->AppendVariableValues(set2Vars);
+			collectedSet2->SetFlag(refTwoCollectedObj->GetFlag());
+			collectedSet2->SetItems(itemSet2);
+		}
+	}
+
+	// combine all sets by operator
+	CollectedSet* combinedCollectedSet = NULL;
+	if(collectedSet2 != NULL) {
+		if(set->GetSetOperator() == OvalEnum::SET_OPERATOR_UNION) {
+			combinedCollectedSet = this->Union(collectedSet1, collectedSet2);
+		} else if(set->GetSetOperator() == OvalEnum::SET_OPERATOR_COMPLEMENT) {
+			combinedCollectedSet = this->Compelement(collectedSet1, collectedSet2);
+		} else if(set->GetSetOperator() == OvalEnum::SET_OPERATOR_INTERSECTION) {
+			combinedCollectedSet = this->Intersection(collectedSet1, collectedSet2);
+		}
+
+		// determine flag value
+		OvalEnum::Flag resultFlag = this->CombineFlagBySetOperator(set->GetSetOperator(), collectedSet1->GetFlag(), collectedSet2->GetFlag());
+		combinedCollectedSet->SetFlag(resultFlag);
+
+		// maintain variable values used.
+		combinedCollectedSet->AppendVariableValues(collectedSet1->GetVariableValues());
+		combinedCollectedSet->AppendVariableValues(collectedSet2->GetVariableValues());
+
+	} else {
+		combinedCollectedSet = collectedSet1;
+	}
+
+	return combinedCollectedSet;
+}
+
+CollectedObject* AbsObjectCollector::ProcessObject(Object* object) {
+
+	CollectedObject* collectedObject = NULL;
+
+	// Handle objects that are not applicable 
+	if(this->IsApplicable(object) == false) {
+		collectedObject = CollectedObject::CreateNotApplicable(object);
+		collectedObject->SetVariableValues(object->GetVariableValues());
+	} else {
+
+		// handle objects that are not supported
+		if(this->IsSupported(object) == false) {
+			collectedObject = CollectedObject::CreateNotSupported(object);
+			collectedObject->SetVariableValues(object->GetVariableValues());
+		} else {
+
+			ItemVector* items = NULL;
+			AbsProbe* probe = this->GetProbe(object);
+			if(probe != NULL) {
+				items = probe->Run(object);
+
+				// only create collected object if the pribe succeeds
+				collectedObject = CollectedObject::Create(object);
+				collectedObject->AppendVariableValues(object->GetVariableValues());
+				collectedObject->AppendReferencesAndComputeFlag(items);
+			} else {
+				
+				// because we first check if the object is supported the code should never get here.
+				throw AbsObjectCollectorException("Error: Unable to locate a probe for the specified object.", ERROR_FATAL);
+			}
+		}
+	}
+
+	return collectedObject;
+}
+
+OvalEnum::Flag AbsObjectCollector::CombineFlagBySetOperator(OvalEnum::SetOperator setOp, OvalEnum::Flag set1Flag, OvalEnum::Flag set2Flag) {
+
+	OvalEnum::Flag result = OvalEnum::FLAG_ERROR;
+
+	if(setOp == OvalEnum::SET_OPERATOR_COMPLEMENT) {
+
+		if(set1Flag == OvalEnum::FLAG_ERROR) {
+			
+			result = OvalEnum::FLAG_ERROR;
+
+		} else if(set1Flag == OvalEnum::FLAG_COMPLETE) {
+
+			if(set2Flag == OvalEnum::FLAG_NOT_APPLICABLE || set2Flag == OvalEnum::FLAG_ERROR) {
+				result = OvalEnum::FLAG_ERROR;
+			} else if(set2Flag == OvalEnum::FLAG_COMPLETE || set2Flag == OvalEnum::FLAG_DOES_NOT_EXIST) {
+				result = OvalEnum::FLAG_COMPLETE;
+			} else if(set2Flag == OvalEnum::FLAG_INCOMPLETE) {
+				// i differ here i think this is error drew thinks this is incomplete
+				result = OvalEnum::FLAG_ERROR;
+			} else if(set2Flag == OvalEnum::FLAG_NOT_COLLECTED) {
+				// i differ here i think this is error drew thinks this is not collected
+				result = OvalEnum::FLAG_ERROR;
+			}
+
+		} else if(set1Flag == OvalEnum::FLAG_INCOMPLETE) {
+
+			if(set2Flag == OvalEnum::FLAG_NOT_APPLICABLE || set2Flag == OvalEnum::FLAG_ERROR) {
+				result = OvalEnum::FLAG_ERROR;
+			} else if(set2Flag == OvalEnum::FLAG_DOES_NOT_EXIST) {
+				result = OvalEnum::FLAG_INCOMPLETE;
+			} else if(set2Flag == OvalEnum::FLAG_NOT_COLLECTED) {
+				// i differ here i think this is error drew thinks this is not collected
+				result = OvalEnum::FLAG_ERROR;
+			} else if(set2Flag == OvalEnum::FLAG_INCOMPLETE) {
+				// i differ here i think this is error drew thinks this is incomplete
+				result = OvalEnum::FLAG_ERROR;
+			} else if(set2Flag == OvalEnum::FLAG_COMPLETE) {
+				result = OvalEnum::FLAG_INCOMPLETE;
+			}
+
+		} else if(set1Flag == OvalEnum::FLAG_DOES_NOT_EXIST) {
+
+			if(set2Flag != OvalEnum::FLAG_NOT_APPLICABLE) {
+				result = OvalEnum::FLAG_DOES_NOT_EXIST;	
+			} else {
+				result = OvalEnum::FLAG_ERROR;
+			}
+
+		} else if(set1Flag == OvalEnum::FLAG_NOT_COLLECTED) {
+			
+			if(set2Flag != OvalEnum::FLAG_NOT_APPLICABLE && set2Flag != OvalEnum::FLAG_ERROR) {
+				result = OvalEnum::FLAG_NOT_COLLECTED;	
+			} else {
+				result = OvalEnum::FLAG_ERROR;
+			}
+
+		} else if(set1Flag == OvalEnum::FLAG_NOT_APPLICABLE) {
+			result = OvalEnum::FLAG_ERROR;
+		}
+
+	} else if(setOp == OvalEnum::SET_OPERATOR_INTERSECTION) {
+
+		if(set1Flag == OvalEnum::FLAG_ERROR) {
+			result = OvalEnum::FLAG_ERROR;
+		} else if(set1Flag == OvalEnum::FLAG_COMPLETE) {
+
+			if(set2Flag == OvalEnum::FLAG_ERROR) {
+				result = OvalEnum::FLAG_ERROR;
+			} else if(set2Flag == OvalEnum::FLAG_DOES_NOT_EXIST) {
+				result = OvalEnum::FLAG_DOES_NOT_EXIST;
+			} else if(set2Flag == OvalEnum::FLAG_COMPLETE || set2Flag == OvalEnum::FLAG_NOT_APPLICABLE) {
+				result = OvalEnum::FLAG_COMPLETE;
+			} else if(set2Flag == OvalEnum::FLAG_INCOMPLETE) {
+				result = OvalEnum::FLAG_INCOMPLETE;
+			} else if(set2Flag == OvalEnum::FLAG_NOT_COLLECTED) {
+				result = OvalEnum::FLAG_NOT_COLLECTED;
+			}
+
+		} else if(set1Flag == OvalEnum::FLAG_INCOMPLETE) {
+			
+			if(set2Flag == OvalEnum::FLAG_ERROR) {
+				result = OvalEnum::FLAG_ERROR;
+			} else if(set2Flag == OvalEnum::FLAG_DOES_NOT_EXIST) {
+				result = OvalEnum::FLAG_DOES_NOT_EXIST;
+			} else if(set2Flag == OvalEnum::FLAG_NOT_APPLICABLE) {
+				result = OvalEnum::FLAG_NOT_APPLICABLE;
+			} else if(set2Flag == OvalEnum::FLAG_NOT_COLLECTED || set2Flag == OvalEnum::FLAG_COMPLETE || set2Flag == OvalEnum::FLAG_INCOMPLETE) {
+				result = OvalEnum::FLAG_INCOMPLETE;
+			}
+
+		} else if(set1Flag == OvalEnum::FLAG_DOES_NOT_EXIST) {
+			result = OvalEnum::FLAG_DOES_NOT_EXIST;
+		} else if(set1Flag == OvalEnum::FLAG_NOT_COLLECTED) {
+			
+			if(set2Flag == OvalEnum::FLAG_ERROR) {
+				result = OvalEnum::FLAG_ERROR;
+			} else if(set2Flag == OvalEnum::FLAG_DOES_NOT_EXIST) {
+				result = OvalEnum::FLAG_DOES_NOT_EXIST;
+			} else if(set2Flag == OvalEnum::FLAG_COMPLETE || set2Flag == OvalEnum::FLAG_INCOMPLETE || set2Flag == OvalEnum::FLAG_NOT_APPLICABLE || set2Flag == OvalEnum::FLAG_NOT_COLLECTED) {
+				result = OvalEnum::FLAG_NOT_COLLECTED;
+			}
+
+		} else if(set1Flag == OvalEnum::FLAG_NOT_APPLICABLE) {
+
+			if(set2Flag == OvalEnum::FLAG_ERROR) {
+				result = OvalEnum::FLAG_ERROR;
+			} else if(set2Flag == OvalEnum::FLAG_DOES_NOT_EXIST) {
+				result = OvalEnum::FLAG_DOES_NOT_EXIST;
+			} else if(set2Flag == OvalEnum::FLAG_COMPLETE) {
+				result = OvalEnum::FLAG_COMPLETE;
+			} else if(set2Flag == OvalEnum::FLAG_INCOMPLETE) {
+				result = OvalEnum::FLAG_INCOMPLETE;
+			} else if(set2Flag == OvalEnum::FLAG_NOT_APPLICABLE) {
+				result = OvalEnum::FLAG_NOT_APPLICABLE;
+			} else if(set2Flag == OvalEnum::FLAG_NOT_COLLECTED) {
+				result = OvalEnum::FLAG_NOT_COLLECTED;
+			}
+		}
+
+	} else if(setOp == OvalEnum::SET_OPERATOR_UNION) {
+		
+		if(set1Flag == OvalEnum::FLAG_ERROR) {
+
+			result = OvalEnum::FLAG_ERROR;
+
+		} else if(set1Flag == OvalEnum::FLAG_COMPLETE) {
+
+			if(set2Flag == OvalEnum::FLAG_ERROR) {
+				result = OvalEnum::FLAG_ERROR;	
+			} else if(set2Flag == OvalEnum::FLAG_COMPLETE || set2Flag == OvalEnum::FLAG_DOES_NOT_EXIST || set2Flag == OvalEnum::FLAG_NOT_APPLICABLE) {
+				result = OvalEnum::FLAG_COMPLETE;
+			} else if(set2Flag == OvalEnum::FLAG_INCOMPLETE || set2Flag == OvalEnum::FLAG_NOT_COLLECTED) {
+				result = OvalEnum::FLAG_INCOMPLETE;
+			}
+
+		} else if(set1Flag == OvalEnum::FLAG_INCOMPLETE) {
+			
+			if(set2Flag != OvalEnum::FLAG_ERROR) {
+				result = OvalEnum::FLAG_INCOMPLETE;	
+			} else {
+				result = OvalEnum::FLAG_ERROR;
+			}
+
+		} else if(set1Flag == OvalEnum::FLAG_DOES_NOT_EXIST) {
+			
+			if(set2Flag == OvalEnum::FLAG_ERROR) {
+				result = OvalEnum::FLAG_ERROR;	
+			} else if(set2Flag == OvalEnum::FLAG_COMPLETE) {
+				result = OvalEnum::FLAG_COMPLETE;
+			} else if(set2Flag == OvalEnum::FLAG_INCOMPLETE || set2Flag == OvalEnum::FLAG_NOT_COLLECTED) {
+				result = OvalEnum::FLAG_INCOMPLETE;
+			} else if(set2Flag == OvalEnum::FLAG_NOT_APPLICABLE || set2Flag == OvalEnum::FLAG_DOES_NOT_EXIST) {
+				result = OvalEnum::FLAG_DOES_NOT_EXIST;
+			}
+
+		} else if(set1Flag == OvalEnum::FLAG_NOT_COLLECTED) {
+			
+			if(set2Flag == OvalEnum::FLAG_ERROR) {
+				result = OvalEnum::FLAG_ERROR;	
+			} else if(set2Flag == OvalEnum::FLAG_COMPLETE || set2Flag == OvalEnum::FLAG_INCOMPLETE || set2Flag == OvalEnum::FLAG_DOES_NOT_EXIST) {
+				result = OvalEnum::FLAG_INCOMPLETE;
+			} else if(set2Flag == OvalEnum::FLAG_NOT_APPLICABLE || set2Flag == OvalEnum::FLAG_NOT_COLLECTED) {
+				result = OvalEnum::FLAG_NOT_COLLECTED;
+			}
+
+		} else if(set1Flag == OvalEnum::FLAG_NOT_APPLICABLE) {
+
+			if(set2Flag == OvalEnum::FLAG_ERROR) {
+				result = OvalEnum::FLAG_ERROR;	
+			} else if(set2Flag == OvalEnum::FLAG_COMPLETE) {
+				result = OvalEnum::FLAG_COMPLETE;
+			} else if(set2Flag == OvalEnum::FLAG_INCOMPLETE) {
+				result = OvalEnum::FLAG_INCOMPLETE;
+			} else if(set2Flag == OvalEnum::FLAG_NOT_APPLICABLE) {
+				result = OvalEnum::FLAG_NOT_APPLICABLE;
+			} else if(set2Flag == OvalEnum::FLAG_DOES_NOT_EXIST) {
+				result = OvalEnum::FLAG_DOES_NOT_EXIST;
+			} else if(set2Flag == OvalEnum::FLAG_NOT_COLLECTED) {
+				result = OvalEnum::FLAG_NOT_COLLECTED;
+			}
+
+		}
+
+	}
+
+	return result;
+}
+
+//****************************************************************************************//
+//						AbsObjectCollectorException Class								  //	
+//****************************************************************************************//
+AbsObjectCollectorException::AbsObjectCollectorException(string errMsgIn, int severity, Exception* ex) : Exception(errMsgIn, severity, ex) {
+
+}
+
+AbsObjectCollectorException::~AbsObjectCollectorException() {
+
+}


Property changes on: trunk/ovaldi/src/AbsObjectCollector.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/AbsObjectCollector.h
===================================================================
--- trunk/ovaldi/src/AbsObjectCollector.h	                        (rev 0)
+++ trunk/ovaldi/src/AbsObjectCollector.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,195 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef ABSOBJECTCOLLECTOR_H
+#define ABSOBJECTCOLLECTOR_H
+
+//	required xerces includes
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/DOMAttr.hpp>
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xercesc/dom/DOMNodeList.hpp>
+#include <xercesc/util/XMLString.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/parsers/AbstractDOMParser.hpp>
+
+//	other includes
+#include <string>
+#include <vector>
+#include <iostream>
+#include <stdlib.h>
+#include <typeinfo>
+
+#include "OvalEnum.h"
+#include "Filter.h"
+#include "Object.h"
+#include "SetObject.h"
+#include "Item.h"
+#include "CollectedObject.h"
+#include "CollectedSet.h"
+#include "AbsProbe.h"
+
+//	namespaces
+using namespace std;
+
+// forward declarations
+class AbsProbe;
+class SetObject;
+class Object;
+class Set;
+class CollectedObject;
+class CollectedSet;
+class Filter;
+class AbsState;
+typedef vector < AbsState*, allocator<AbsState*> > AbsStateVector;
+
+
+/**
+	This class acts a base class for all platform specific object collectors.
+*/
+class AbsObjectCollector {
+public:
+	virtual ~AbsObjectCollector();
+
+	/** Return the protected static instance variable. This calss is a singleton. */
+	static AbsObjectCollector* Instance();
+
+	/** 
+	    Collect the object with the specified id.
+	    Return a collected object for the specified object id.
+	    Check the cache of all collected objects to make sure the specified
+	    object has not already been processed. 
+	    TODO: Clarify this comment...
+	    This interpreter will never create a collected object based on an
+	    object other than a set object that is flagged as incomplete.
+	*/
+	CollectedObject* Run(string objectId);
+
+protected:
+	AbsObjectCollector();
+	static AbsObjectCollector* instance;
+
+	/** 
+		Return true if the input object is applicable on the host being evaluated.
+		Return true if the specified object is applicable to this object 
+		collector. All objects defined in the windows and independent schemas 
+		are applicable
+	*/
+	virtual bool IsApplicable(AbsObject* object) = 0;
+
+	/** Return true if the specified object is supported by this object collector. */
+	virtual bool IsSupported(AbsObject* object) = 0;
+
+	/** Call the ProbeFactory and get a probe capable of collecting the input object.
+		If an appropriate probe is not found NULL is returned.
+	*/
+	virtual AbsProbe* GetProbe(Object* object) = 0;
+	
+	/** Based on the type of object call the appropriate process method. */
+	CollectedObject* Process(AbsObject* absObject);
+
+	/**
+		Process the input set object and return the resulting CollectedObject.
+		The following actions are taken:
+		 - Copy the variable values from the specified object.
+		 - Make call to process set to start the recursive processing of the set.
+		 - Set the references based on the results of processing the set 
+		 - Set the flag based on the results of processing the set
+		 - Copy the variable values used to create the collected set
+
+	*/
+	CollectedObject* ProcessSetObject(SetObject* setObject);
+
+	/** 
+		Process the input object and return the resulting CollectedObject.
+		The following actions are taken:
+		 - make sure the object is supported and applicable
+		 - copy any variable values from the object
+		 - Get the probe for the object
+		 - Run the probe with the object
+		 - Set the matching collected items for the collected object
+		 - Set the flag value for the collected object.
+	*/
+	CollectedObject* ProcessObject(Object* object);
+
+	/** 
+		Process the input set and return the resulting CollectedSet.
+		Either recursivley process each child set or Process each object reference. 
+	*/
+	CollectedSet* ProcessSet(Set* set);	
+	
+	/** Based the input set operator combine the 2 input flag values and return the resulting flag value. */
+	OvalEnum::Flag CombineFlagBySetOperator(OvalEnum::SetOperator setOp, OvalEnum::Flag set1Flag, OvalEnum::Flag set2Flag);
+
+	/**
+	    Return a true if the specified item exists in the specified set
+	    Comparing items based on their ids assumes that Item ids are only
+	    assigned to unique items. This is ensured when probes return Items.
+	*/
+	bool ExistsInSet(ItemVector* itemSet, Item* item);
+
+	/** Return a single set that contains all unique items in both sets. */
+	CollectedSet* Union(CollectedSet* collectedSet1, CollectedSet* collectedSet2);
+
+	/** 
+		Create a set of items that exist only in one of the specified sets. 
+		From the schema documentation....
+		The intersection of two sets in OVAL results in a set that contains 
+		everything that belongs to both sets in the collection, but nothing else. 
+		If A and B are sets, then the intersection of A and B contains all 
+		the elements of A that also belong to B, but no other elements.
+	*/
+	CollectedSet* Intersection(CollectedSet* collectedSet1, CollectedSet* collectedSet2);
+
+	/** Create a set of unique items in set 1 but not in set 2, a relative complement. */
+	CollectedSet* Compelement(CollectedSet* collectedSet1, CollectedSet* collectedSet2);
+
+	/** 
+	    Apply the input Filters to the vector of items.
+	    For Each Filter provided Loop through all the Items in the current set
+	    of items. Only add items to the result set of items if they do NOT 
+	    match all filters
+	*/
+	ItemVector* ApplyFilters(ItemVector* items, AbsStateVector* filters);
+	
+	/** Copy all items in the src vector to the dest vector.	*/
+	void CopyItems(ItemVector* dest, ItemVector* src);
+};
+
+/** 
+	This class represents an Exception that occured while runing the object collector.
+*/
+class AbsObjectCollectorException : public Exception {
+	public:
+		AbsObjectCollectorException(string errMsgIn = "", int severity = ERROR_FATAL, Exception *ex = NULL);
+		~AbsObjectCollectorException();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/AbsObjectCollector.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/AbsProbe.cpp
===================================================================
--- trunk/ovaldi/src/AbsProbe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/AbsProbe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,169 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "AbsProbe.h"
+
+ItemVector AbsProbe::globalItemCache;
+//****************************************************************************************//
+//								AbsProbe Class											  //	
+//****************************************************************************************//
+
+AbsProbe::AbsProbe() {
+
+	myMatcher = new REGEX();
+}
+
+AbsProbe::~AbsProbe() {
+
+	delete myMatcher;
+
+	this->itemCache.clear();
+}
+
+//****************************************************************************************//
+//								Protected Memebers										  //	
+//****************************************************************************************//
+Item* AbsProbe::CacheItem(Item* newItem) {
+
+	Item* tmp = NULL;
+	// Loop through cache
+	ItemVector::iterator itemIterator;
+	for(itemIterator = this->itemCache.begin(); itemIterator != this->itemCache.end(); itemIterator++) {
+		
+		// Compare the new item to the cached item if they are the same
+		// break and return the cached item.
+		if(newItem->Equals((*itemIterator))) {
+			tmp = newItem;
+			newItem = (*itemIterator);
+			break;
+		} 
+	}
+
+	if(tmp != NULL) {
+		delete tmp;
+		tmp = NULL;
+	} else {
+		// to get here the newItem did not match the cached item
+		// so cache it
+		if(newItem->GetId() == 0) {
+			newItem->SetId(Item::AssignId());
+		}
+		this->itemCache.push_back(newItem);
+		AbsProbe::globalItemCache.push_back(newItem);
+	}
+	return newItem;
+}   
+
+ItemVector* AbsProbe::Run(Object* object) {
+
+	// create a vector of items that match the specified object
+	ItemVector* items = this->CollectItems(object);	
+	this->DeleteItemEntities();
+	items = this->CacheAllItems(items);
+
+	return items;
+}
+
+ItemVector* AbsProbe::CacheAllItems(ItemVector* items) {
+
+	ItemVector* cachedItems = new ItemVector();
+	while(items->size() > 0) {
+		Item* item = (*items)[items->size()-1];
+	  	items->pop_back();
+
+		Item* cachedItem = this->CacheItem(item);
+		cachedItems->push_back(cachedItem);
+	}
+	delete items;
+	items = NULL;
+	return cachedItems;
+}
+
+void AbsProbe::ClearGlobalCache() {
+
+	Item* item = NULL;
+	while(AbsProbe::globalItemCache.size() != 0) {
+	  	item = AbsProbe::globalItemCache[AbsProbe::globalItemCache.size()-1];
+	  	AbsProbe::globalItemCache.pop_back();
+	  	delete item;
+	  	item = NULL;
+	}
+}
+
+ItemEntity* AbsProbe::CreateItemEntity(ObjectEntity* obj) {
+
+	ItemEntity* itemEntity = new ItemEntity();
+	if(obj != NULL) {
+		itemEntity->SetName(obj->GetName());
+		itemEntity->SetStatus(OvalEnum::STATUS_EXISTS);
+		itemEntity->SetDatatype(obj->GetDatatype());
+	} 
+	this->createdItemEntities.push_back(itemEntity);
+	return itemEntity;
+}
+
+void AbsProbe::DeleteItemEntities() {
+
+	ItemEntity* tmp = NULL;
+	while(this->createdItemEntities.size() != 0) {
+	  	tmp = this->createdItemEntities[this->createdItemEntities.size()-1];
+	  	this->createdItemEntities.pop_back();
+	  	delete tmp;
+	  	tmp = NULL;
+	}
+}
+
+bool AbsProbe::IsMatch(string pattern, string value, bool isRegex) {
+
+	bool match = false;
+
+	if(isRegex) {
+		if(this->myMatcher->IsMatch(pattern.c_str(), value.c_str())) {
+			match = true;
+		}
+	} else {	
+		if(value.compare(pattern) != 0) {
+			match = true;
+		}
+	}
+
+	return match;
+}
+
+//****************************************************************************************//
+//								ProbeException Class									  //	
+//****************************************************************************************//
+ProbeException::ProbeException(string errMsgIn, int severity, Exception* ex) : Exception(errMsgIn, severity, ex) {
+
+}
+
+ProbeException::~ProbeException() {
+
+}


Property changes on: trunk/ovaldi/src/AbsProbe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/AbsProbe.h
===================================================================
--- trunk/ovaldi/src/AbsProbe.h	                        (rev 0)
+++ trunk/ovaldi/src/AbsProbe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,177 @@
+//
+// $Id: AbsProbe.h 4658 2008-01-17 22:25:59Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef ABSPROBE_H
+#define ABSPROBE_H
+
+#include <iostream>
+#include <string>
+#include <vector>
+
+#include "Log.h"
+#include "Common.h"
+#include "Exception.h"
+#include "REGEX.h"
+#include "Item.h"
+#include "ItemEntity.h"
+#include "Object.h"
+#include "ObjectEntity.h"
+
+using namespace std;
+
+class Object;
+class ObjectEntity;
+class Item;
+typedef vector < Item*, allocator<Item*> > ItemVector;
+
+/**
+	This class in the base for all probes. 
+	The AbsProbe class has provides several methods used by all probes including a
+	caching mechanism for storing the results of a data collection run and ensuring 
+	that an item on a system is only ever represented once in a data collection 
+	results.
+*/
+class AbsProbe {
+public:
+
+	/** create a new probe
+	    instatiate a new REGEX object
+	*/
+	AbsProbe();
+
+	/** distroy the probe.
+	    Delete the regex object.
+		clear the item cache
+	*/
+	virtual ~AbsProbe();	
+
+	/**
+		Run the probe and collect all items on the system that match the specified object.
+		This method is the starting point for all probes. the Run method probides a set of common
+		functionality to all probes and then calls the AbsProbe::CollectItems(Object* object) virtual 
+		method for actually collecting system items.
+		@param object the Object* that is used to guide data colelction.
+		@return A vector of items found on the system.
+	*/
+	ItemVector* Run(Object* object);
+	
+	/**
+		Create an Item for storing the type of data that the probe collects.
+		Each probe has its own implementation of this function. Probes set the 
+		name, xmlns alias, schema location, and xmlns for the new item.
+		@return A new Item.
+	*/
+	virtual Item* CreateItem() = 0;
+
+	/**
+		Clear the cache of all itmes collected by all probes.
+	*/
+	static void ClearGlobalCache();
+
+protected:	
+	/**
+		Collects all Items on the systemt hat match the specifeid Object
+		@param object A Object* that specifies what information to collecto on the system.
+		@return A vector of Items found on the system.
+	*/
+	virtual ItemVector* CollectItems(Object* object) = 0;
+
+	/**
+		Create a new ItemEntity based on the specifeid ObjectEntity.
+		All ItemEntities created by this function are deleted after a single run of the probe is completed.
+		@param obj an ObjectEntity* that is used as a guide for creating the new ItemEntity.
+		@return The resulting cached ItemEntity*
+	*/
+	ItemEntity* CreateItemEntity(ObjectEntity* obj = NULL);
+
+	/**
+		Deletes all ItemEntities that were created by the AbsProbe::CreateItemEntity(ObjectEntity* obj) method.
+	*/
+	void DeleteItemEntities();
+
+	/**
+		Return true if the specified value matches the specified pattern.
+		This function uses the isRegex parameter to determine how to apply the pattern.
+		@param pattern a string that specifies the pattern to compare against.
+		@param value a string that specifed that value to compare against.
+		@param isRegex a bool that dictates how to apply the pattern. If true apply the pattern as a regular expression otherwise use a string compare for not equals. 
+		@return The result of the comparison betweent eh two string values.
+	*/
+	bool IsMatch(string pattern, string value, bool isRegex = true);
+
+
+	/** All probes make use of the regular expression processor for pattern matching. */
+	REGEX *myMatcher;
+	
+private:
+	/** 
+		Cache all items in the vector of items.
+		Called by the AbsProbe::Run(Object* object) to ensure taht all Items return be a probe
+		are cached and unique. Duplicate Items are deleted and the existing item is returned.
+		@param items the set of Items to cache.
+		@return A set of unique items that have all been cached.
+	*/
+	ItemVector* CacheAllItems(ItemVector* items);
+
+	/**
+		Cache a single Item.
+		Check the cache of items for an existing duplicate item. If a duplicate is found return
+		it and delete the new Item otherwise cache the new item and return it.
+		@param item The new Item to be cached.
+		@return The ruesulting cahced Item.
+	*/
+	Item* CacheItem(Item* item);
+    
+	/** 
+		The list of all ItemEntities created by the probe. 
+		These are deleted after each run of the probe.
+	*/
+	ItemEntityVector createdItemEntities;
+
+	/** The cache of all Items created by a probe. */
+	ItemVector itemCache;
+
+	/** The cache of all Items created by all probes. */
+	static ItemVector globalItemCache;
+};
+
+
+/** 
+	This class represents an Exception that occured while processing a probe.
+*/
+class ProbeException : public Exception {
+	public:
+
+		ProbeException(string errMsgIn = "", int severity = ERROR_FATAL, Exception* ex = NULL);
+		~ProbeException();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/AbsProbe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/AbsState.cpp
===================================================================
--- trunk/ovaldi/src/AbsState.cpp	                        (rev 0)
+++ trunk/ovaldi/src/AbsState.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,279 @@
+//
+// $Id: AbsState.cpp 4583 2008-01-03 16:25:18Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "AbsState.h"
+
+//****************************************************************************************//
+//									AbsState Class										  //	
+//****************************************************************************************//
+AbsState::AbsState(OvalEnum::Operator myOperator, int version) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a complete State object
+	//
+	// -----------------------------------------------------------------------
+
+	this->SetId("");
+	this->SetName("");
+	this->SetXmlns("");
+	this->SetVersion(version);
+	this->SetOperator(myOperator);
+}
+
+AbsState::AbsState(string id, string name, string xmlns, OvalEnum::Operator myOperator, int version) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a complete State object
+	//
+	// -----------------------------------------------------------------------
+
+	this->SetId(id);
+	this->SetName(name);
+	this->SetXmlns(xmlns);
+	this->SetVersion(version);
+	this->SetOperator(myOperator);
+}
+
+AbsState::~AbsState() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	clean up all the elements
+	//
+	// -----------------------------------------------------------------------
+	
+	AbsEntity* currentElement = NULL;
+	while(elements.size() != 0) {
+	  	currentElement = elements[elements.size()-1];
+	  	elements.pop_back();
+	  	delete currentElement;
+	  	currentElement = NULL;
+	}
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+AbsEntityVector* AbsState::GetElements() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the elements field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return &this->elements;
+}
+
+void AbsState::SetElements(AbsEntityVector* elements) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the elements field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->elements = (*elements);
+}
+
+string AbsState::GetId() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the id field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->id;
+}
+
+void AbsState::SetId(string id) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the id field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->id = id;
+}
+
+string AbsState::GetName() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the name field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->name;
+}
+
+void AbsState::SetName(string name) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the name field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->name = name;
+}
+
+OvalEnum::Operator AbsState::GetOperator() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Get the myOperator field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->myOperator;
+}
+
+void AbsState::SetOperator(OvalEnum::Operator ovalOperator) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the myOperator field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->myOperator = ovalOperator;
+}
+string AbsState::GetXmlns() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the xmlns field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->xmlns;
+}
+
+int AbsState::GetVersion() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the version field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->version;
+}
+
+void AbsState::SetVersion(int version) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the version field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->version = version;
+}
+
+void AbsState::SetXmlns(string xmlns) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the xmlns field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->xmlns = xmlns;
+}
+
+void AbsState::AppendElement(AbsEntity* absEntity) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Add an element to the end of the elements vector
+	//
+	// -----------------------------------------------------------------------
+
+	this->elements.push_back(absEntity);
+}
+
+VariableValueVector* AbsState::GetVariableValues() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return a vector of variable values that were used for this state
+	//
+	// -----------------------------------------------------------------------
+
+	VariableValueVector* varValues = new VariableValueVector();
+
+	AbsEntityVector::iterator iterator;
+	for(iterator = this->GetElements()->begin(); iterator != this->GetElements()->end(); iterator++) {
+		AbsEntity* entity = (AbsEntity*)(*iterator);
+		if(entity->GetVarRef() != NULL) {
+			VariableValueVector* values = entity->GetVariableValues();
+			VariableValueVector::iterator varValueIt;
+			for(varValueIt = values->begin(); varValueIt != values->end(); varValueIt ++) {
+				varValues->push_back((*varValueIt));
+			}
+
+			delete values;
+			values = NULL;
+		}
+	}
+	return varValues;
+}
+
+//****************************************************************************************//
+//								StateException Class									  //	
+//****************************************************************************************//
+AbsStateException::AbsStateException(string errMsgIn, int severity, Exception* ex) : Exception(errMsgIn, severity, ex) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the error message and then set the severity to ERROR_FATAL. This is 
+	//	done with the explicit call to the Exception class constructor that 
+	//	takes a single string param.
+	//
+	// -----------------------------------------------------------------------
+
+}
+
+AbsStateException::~AbsStateException() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Do nothing for now
+	//
+	// -----------------------------------------------------------------------
+
+}


Property changes on: trunk/ovaldi/src/AbsState.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/AbsState.h
===================================================================
--- trunk/ovaldi/src/AbsState.h	                        (rev 0)
+++ trunk/ovaldi/src/AbsState.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,118 @@
+//
+// $Id: AbsState.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef ABSSTATE_H
+#define ABSSTATE_H
+
+#include <string>
+#include <vector>
+#include <iostream>
+#include <stdlib.h>
+#include <map>
+#include <utility>
+
+#include "DocumentManager.h"
+#include "OvalMessage.h"
+#include "OvalEnum.h"
+#include "VariableValue.h"
+#include "Item.h"
+#include "AbsEntity.h"
+#include "VariableValue.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	This class represents an State in an oval definition file.
+	A state can be used as a filter in data collection or as a state in analysis.
+*/
+class AbsState {
+
+public:
+	AbsState(OvalEnum::Operator myOperator = OvalEnum::OPERATOR_AND, int version = 1);
+	AbsState(string id, string name, string xmlns, OvalEnum::Operator myOperator = OvalEnum::OPERATOR_AND, int version = 1);
+	virtual ~AbsState();
+
+	virtual void Parse(DOMElement* stateElm) = 0;
+
+	VariableValueVector* GetVariableValues();
+
+	AbsEntityVector* GetElements();
+	void SetElements(AbsEntityVector* elements);
+
+	string GetId();
+	void SetId(string id);
+
+	string GetName();
+	void SetName(string name);
+
+	OvalEnum::Operator GetOperator();
+	void SetOperator(OvalEnum::Operator ovalOperator);
+
+	string GetXmlns();
+	void SetXmlns(string xmlns);
+
+	int GetVersion();
+	void SetVersion(int version);
+
+	void AppendElement(AbsEntity* absEntity);
+    
+private:
+	AbsEntityVector elements;
+	string id;
+	string name;
+	OvalEnum::Operator myOperator;
+	int version;
+	string xmlns;
+};
+
+/**	
+	A pair for storing  state ids and AbsState objects together. 
+	Stores only pointers to the objects. 
+*/
+typedef pair <string, AbsState* > AbsStatePair;
+
+/**	
+	A map for storing AbsState. 
+	Stores only pointers to the objects. 
+*/
+typedef map <string, AbsState* > AbsStateMap;
+
+/** 
+	This class represents an Exception that occured while processing an AbsState.
+*/
+class AbsStateException : public Exception {
+	public:
+		AbsStateException(string errMsgIn = "", int severity = ERROR_FATAL, Exception *ex = NULL);
+		~AbsStateException();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/AbsState.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/AbsVariable.cpp
===================================================================
--- trunk/ovaldi/src/AbsVariable.cpp	                        (rev 0)
+++ trunk/ovaldi/src/AbsVariable.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,201 @@
+//
+// $Id: AbsVariable.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "AbsVariable.h"
+
+AbsVariableMap AbsVariable::processedVariableCache;
+
+//****************************************************************************************//
+//									AbsVariable Class									  //	
+//****************************************************************************************//
+AbsVariable::AbsVariable(string id, string name, int version, OvalEnum::Datatype datatype, StringVector* msgs) {
+
+	this->SetId(id);
+	this->SetDatatype(datatype);
+	this->SetName(name);
+	this->SetVersion(version);
+	this->SetFlag(OvalEnum::FLAG_ERROR);
+	this->SetMessages(msgs);
+}
+
+AbsVariable::~AbsVariable() {
+
+	delete msgs;
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+
+OvalEnum::Datatype AbsVariable::GetDatatype() {
+
+	return this->datatype;
+}
+
+void AbsVariable::SetDatatype(OvalEnum::Datatype datatype) {
+
+	this->datatype = datatype;
+}
+
+OvalEnum::Flag AbsVariable::GetFlag() {
+
+	return this->flag;
+}
+
+void AbsVariable::SetFlag(OvalEnum::Flag flag) {
+
+	this->flag = flag;
+}
+
+string AbsVariable::GetId() {
+
+	return this->id;
+}
+
+void AbsVariable::SetId(string id) {
+
+	this->id = id;
+}
+
+StringVector* AbsVariable::GetMessages() {
+
+	return this->msgs;
+}
+
+void AbsVariable::SetMessages(StringVector* msgs) {
+
+	this->msgs = msgs;
+}
+
+void AbsVariable::AppendMessage(string msg) {
+
+	this->msgs->push_back(msg);
+}
+
+void AbsVariable::AppendMessages(StringVector* newMsgs) {
+
+	StringVector::iterator iterator;
+	for(iterator = newMsgs->begin(); iterator != newMsgs->end(); iterator++) {
+		string str = "";
+		str.append((*iterator));
+		this->AppendMessage(str);
+	}
+}
+
+string AbsVariable::ListMessages() {
+	string messages = "";
+
+	if(this->msgs->size() > 0) {
+		StringVector::iterator iterator;
+		for(iterator = this->msgs->begin(); iterator != this->msgs->end(); iterator++) {
+			messages.append("\t- ");
+			messages.append((*iterator));
+			if(iterator != this->msgs->end()) {
+				messages.append("\n");
+			}
+		}
+	} else {
+		messages.append("\t- No Messages found");
+	}
+	return messages;
+}
+
+string AbsVariable::GetName() {
+
+	return this->name;
+}
+
+void AbsVariable::SetName(string name) {
+
+	this->name = name;
+}
+
+VariableValueVector* AbsVariable::GetValues() {
+
+	return &this->values;
+}
+
+void AbsVariable::SetValues(VariableValueVector* value) {
+
+	this->values = values;
+}
+
+void AbsVariable::AppendVariableValue(VariableValue* value) {
+
+	this->values.push_back(value);
+}
+
+int AbsVariable::GetVersion() {
+
+	return this->version;
+}
+
+void AbsVariable::SetVersion(int version) {
+
+	this->version = version;
+}
+
+AbsVariable* AbsVariable::SearchCache(string id) {
+
+	AbsVariable* cachedAbsVariable = NULL;
+
+	AbsVariableMap::iterator iterator = AbsVariable::processedVariableCache.find(id);
+	if(iterator != AbsVariable::processedVariableCache.end()) {
+		AbsVariablePair pair = (*iterator);
+		cachedAbsVariable = pair.second;
+	}
+
+	return cachedAbsVariable;
+}
+
+void AbsVariable::ClearCache() {
+
+	AbsVariable* var = NULL;
+	
+	if(!AbsVariable::processedVariableCache.empty()) {
+
+		while(AbsVariable::processedVariableCache.size() != 0) {
+			AbsVariableMap::iterator iterator = AbsVariable::processedVariableCache.begin();
+			AbsVariablePair pair = (*iterator);
+			var = pair.second;
+			AbsVariable::processedVariableCache.erase(iterator);
+	  		delete var;
+	  		var = NULL;
+		}
+
+	}
+}
+
+void AbsVariable::Cache(AbsVariable* var) {
+
+	string id = var->GetId();
+	AbsVariable::processedVariableCache.insert(AbsVariablePair(id, var));
+}


Property changes on: trunk/ovaldi/src/AbsVariable.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/AbsVariable.h
===================================================================
--- trunk/ovaldi/src/AbsVariable.h	                        (rev 0)
+++ trunk/ovaldi/src/AbsVariable.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,157 @@
+//
+// $Id: AbsVariable.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef ABSVARIABLE_H
+#define ABSVARIABLE_H
+
+//	required xerces includes
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/DOMAttr.hpp>
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xercesc/dom/DOMNodeList.hpp>
+#include <xercesc/util/XMLString.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/parsers/AbstractDOMParser.hpp>
+
+//	other includes
+#include <string>
+#include <vector>
+#include <iostream>
+#include <stdlib.h>
+#include <map>
+#include <utility>
+
+#include "Common.h"
+#include "Exception.h"
+#include "OvalEnum.h"
+#include "VariableValue.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+class AbsVariable;
+
+/**	
+	A pair for storing variable ids and AbsVariable together. 
+	Stores only pointers to the AbsVariable. 
+*/
+typedef pair <string, AbsVariable* > AbsVariablePair;
+
+/**	
+	A map for storing AbsVariable. 
+	Stores only pointers to the objects. 
+*/
+typedef map <string, AbsVariable* > AbsVariableMap;
+
+/**
+	This class represents an AbsVariable in an oval definition schema.
+*/
+class AbsVariable {
+public:
+	/** delete the messages */
+	virtual ~AbsVariable();
+
+	virtual void Parse(DOMElement*) = 0;
+
+	virtual VariableValueVector* GetVariableValues() = 0;
+	
+	/** Return the id field's value. */
+	string GetId();
+	/** Set the id field's value. */
+	void SetId(string id);
+	
+	/** Return the datatype field's value. */
+	OvalEnum::Datatype GetDatatype();
+	/** Set the datatype field's value. */
+	void SetDatatype(OvalEnum::Datatype datatype);
+
+	/** Return the flag field's value. */
+	OvalEnum::Flag GetFlag();
+	/** Set the flag field's value. */
+	void SetFlag(OvalEnum::Flag flag);
+
+	/** Return the name field's value. */
+	string GetName();
+	/** Set the name field's value. */
+	void SetName(string name);
+
+	/** Return the values field's value. */
+	VariableValueVector* GetValues();
+	/** Set the values field's value. */
+	void SetValues(VariableValueVector* value);
+	/** Add a value to the set of values associated with this variable. */
+	void AppendVariableValue(VariableValue* value);
+
+	/** Return the version field's value. */
+	int GetVersion();
+	/** Set the version field's value. */
+	void SetVersion(int version);
+
+	/** Return the msgs field's value. */
+	StringVector* GetMessages();
+	/** Set the msgs field's value. */
+	void SetMessages(StringVector* msgs);
+	/** Add a msg to the end of the msgs vector. */
+	void AppendMessage(string msg);
+	/** Add a newMsgs to the end of the msgs vector. */
+	void AppendMessages(StringVector* newMsgs);
+	/** Create a string listing of all messages. */
+	string ListMessages();
+
+	/** Search the cache of variables for the specifed variable. 
+		return NULL if not found.
+	*/
+	static AbsVariable* SearchCache(string id);
+	/** delete all items in the cache. */
+	static void ClearCache();
+	/** cache the specified var
+		TODO - do i need to add protection to this cache
+	*/
+	static void Cache(AbsVariable* var);
+
+protected:
+	AbsVariable(string id = "", string name = "", int version = 1, OvalEnum::Datatype datatype = OvalEnum::DATATYPE_STRING, StringVector* msgs = new StringVector());
+
+private:
+
+	string id;
+	OvalEnum::Flag flag;
+	string name;
+	int version;
+	OvalEnum::Datatype datatype;
+	VariableValueVector values; 
+	//bool error;  // i don't think this is used anywhere
+	StringVector* msgs;
+
+	static AbsVariableMap processedVariableCache;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/AbsVariable.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Analyzer.cpp
===================================================================
--- trunk/ovaldi/src/Analyzer.cpp	                        (rev 0)
+++ trunk/ovaldi/src/Analyzer.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,466 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "Analyzer.h"
+
+DOMElement* Analyzer::definitionsElm = NULL;
+DOMElement* Analyzer::testsElm = NULL;
+DOMElement* Analyzer::resultsSystemElm = NULL;
+DOMElement* Analyzer::resultsElm = NULL;
+
+StringPairVector Analyzer::trueResults;
+StringPairVector Analyzer::falseResults;
+StringPairVector Analyzer::unknownResults;
+StringPairVector Analyzer::errorResults;
+StringPairVector Analyzer::notEvaluatedResults;
+StringPairVector Analyzer::notApplicableResults;
+
+//****************************************************************************************//
+//								Analyzer Class											  //	
+//****************************************************************************************//
+
+Analyzer::Analyzer() {
+
+}
+
+Analyzer::~Analyzer() {
+}
+
+// ***************************************************************************************	//
+//								Public members												//
+// ***************************************************************************************	//
+DOMElement* Analyzer::GetResultsElm() {	
+	return Analyzer::resultsElm;
+}
+
+DOMElement* Analyzer::GetResultsSystemElm() {	
+
+	if(Analyzer::resultsSystemElm == NULL) {
+		DOMElement *elm = XmlCommon::AddChildElement(DocumentManager::GetResultDocument(), Analyzer::GetResultsElm(), "system");
+		Analyzer::resultsSystemElm = elm;
+	}
+	return Analyzer::resultsSystemElm;
+}
+
+DOMElement* Analyzer::GetResultsSystemDefinitionsElm() {	
+
+	if(Analyzer::definitionsElm == NULL) {
+		DOMElement *elm = XmlCommon::AddChildElement(DocumentManager::GetResultDocument(), Analyzer::GetResultsSystemElm(), "definitions");
+		Analyzer::definitionsElm = elm;
+	}
+	return Analyzer::definitionsElm;
+}
+
+DOMElement* Analyzer::GetResultsSystemTestsElm() {
+	
+	if(Analyzer::testsElm == NULL) {
+		DOMElement *elm = XmlCommon::AddChildElement(DocumentManager::GetResultDocument(), Analyzer::GetResultsSystemElm(), "tests");
+		Analyzer::testsElm = elm;
+	}
+	return Analyzer::testsElm;
+}
+
+
+
+void Analyzer::AppendTrueResult(StringPair* pair) {
+	return Analyzer::trueResults.push_back(pair);
+}
+
+void Analyzer::AppendFalseResult(StringPair* pair) {
+	return Analyzer::falseResults.push_back(pair);
+}
+
+void Analyzer::AppendErrorResult(StringPair* pair) {
+	return Analyzer::errorResults.push_back(pair);
+}
+
+void Analyzer::AppendUnknownResult(StringPair* pair) {
+	return Analyzer::unknownResults.push_back(pair);
+}
+
+void Analyzer::AppendNotApplicableResult(StringPair* pair) {
+	return Analyzer::notApplicableResults.push_back(pair);
+}
+
+void Analyzer::AppendNotEvaluatedResult(StringPair* pair) {
+	return Analyzer::notEvaluatedResults.push_back(pair);
+}
+
+void Analyzer::Run() {
+
+	this->InitResultsDocument();
+
+	// get the definitions element in the definitions file
+	int prevIdLength = 1;
+	int curIdLength = 1;
+	DOMElement* definitionsElm = XmlCommon::FindElementNS(DocumentManager::GetDefinitionDocument(), "definitions");
+	if(definitionsElm != NULL) {
+
+		if(!Log::WriteToScreen())
+			cout << "      Analyzing definition:  "; 
+
+		DOMNodeList* definitionElms = definitionsElm->getChildNodes();
+		unsigned int i = 0;
+		while(i < definitionElms->getLength()) {
+			DOMNode* tmpNode = definitionElms->item(i);
+			if (tmpNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+				DOMElement *definitionElm = (DOMElement*)tmpNode;
+				
+				// get the dedfinition id and check the cache
+				string definitionId = XmlCommon::GetAttributeByName(definitionElm, "id");
+				if(Definition::SearchCache(definitionId) == NULL) {
+
+					Log::Debug("Analyzing definition: " + definitionId);
+					
+					if(!Log::WriteToScreen()) {
+						curIdLength = definitionId.length();
+						string blankSpaces = "";
+						if(prevIdLength > curIdLength)
+							blankSpaces = Common::PadStringWithChar(blankSpaces, ' ', prevIdLength-curIdLength);
+
+						string backSpaces = "";
+						backSpaces = Common::PadStringWithChar(backSpaces, '\b', prevIdLength);
+						string endBackSpaces = "";
+						endBackSpaces = Common::PadStringWithChar(endBackSpaces, '\b', blankSpaces.length());
+						cout << backSpaces << definitionId << blankSpaces << endBackSpaces;
+					}
+
+					Definition* def = Definition::GetDefinitionById(definitionId);
+					def->Analyze();
+					def->Write(Analyzer::GetResultsSystemDefinitionsElm());					
+					prevIdLength = definitionId.length();
+				}
+   			}
+			i++;
+		}
+
+		if(!Log::WriteToScreen()) {
+			string fin = " FINISHED ";
+			int curLen = fin.length();
+			string blankSpaces = "";
+			if(prevIdLength > curLen)
+				blankSpaces = Common::PadStringWithChar(blankSpaces, ' ', prevIdLength-curLen);
+			string backSpaces = "";
+			backSpaces = Common::PadStringWithChar(backSpaces, '\b', prevIdLength);
+			cout << backSpaces << fin << blankSpaces << endl;
+		}
+
+		Definition::ClearCache();
+		Test::ClearCache();
+		Item::ClearCache();
+		State::ClearCache();
+		VariableValue::ClearCache();
+
+		this->FinializeResultsDocument();
+
+	} else {
+		string logMessage = "\n    No definitions found in the input oval-definitions document! \n";
+		cout << logMessage;
+		Log::UnalteredMessage(logMessage);
+	}
+}
+
+void Analyzer::Run(StringVector* definitionIds) {
+
+	this->InitResultsDocument();
+
+	// Get the definitions element
+	DOMElement* definitionsElm = XmlCommon::FindElementNS(DocumentManager::GetDefinitionDocument(), "definitions");
+	if(definitionsElm != NULL) {
+		if(!Log::WriteToScreen())
+			cout << "      Analyzing definition:  "; 
+
+		int prevIdLength = 1;
+		int curIdLength = 1;
+
+		// evaluate each sppecified definition id
+		StringVector::iterator iterator;
+		for(iterator = definitionIds->begin(); iterator != definitionIds->end(); iterator++) {
+
+			string definitionId = (*iterator);
+			if(Definition::SearchCache(definitionId) == NULL) {
+				// get the definition element by its id
+				DOMElement *definitionElm = XmlCommon::FindElementByAttribute(definitionsElm, "id", definitionId);
+
+				if(definitionElm != NULL) {
+
+					Log::Debug("Analyzing definition: " + definitionId);
+							
+					if(!Log::WriteToScreen()) {
+						curIdLength = definitionId.length();
+						string blankSpaces = "";
+						if(prevIdLength > curIdLength)
+							blankSpaces = Common::PadStringWithChar(blankSpaces, ' ', prevIdLength-curIdLength);
+
+						string backSpaces = "";
+						backSpaces = Common::PadStringWithChar(backSpaces, '\b', prevIdLength);
+						string endBackSpaces = "";
+						endBackSpaces = Common::PadStringWithChar(endBackSpaces, '\b', blankSpaces.length());
+						cout << backSpaces << definitionId << blankSpaces << endBackSpaces;
+					}
+
+					Definition* def = Definition::GetDefinitionById(definitionId);
+					def->Analyze();
+					def->Write(Analyzer::GetResultsSystemDefinitionsElm());					
+					prevIdLength = definitionId.length();
+
+				} else {
+
+					// did not find the definition that was specified...
+					Log::Info("Notice: " + definitionId + " was not found in " + Common::GetXMLfile());
+				}
+			}
+		}
+
+		DOMNodeList* definitionElms = definitionsElm->getChildNodes();
+		unsigned int i = 0;
+		while(i < definitionElms->getLength()) {
+			DOMNode* tmpNode = definitionElms->item(i);
+			if (tmpNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+				DOMElement *definitionElm = (DOMElement*)tmpNode;
+				
+				// get the dedfinition id and check the cache
+				string definitionId = XmlCommon::GetAttributeByName(definitionElm, "id");
+				if(Definition::SearchCache(definitionId) == NULL) {
+
+					Log::Debug("Analyzing definition: " + definitionId);
+						
+					if(!Log::WriteToScreen()) {
+						curIdLength = definitionId.length();
+						string blankSpaces = "";
+						if(prevIdLength > curIdLength)
+							blankSpaces = Common::PadStringWithChar(blankSpaces, ' ', prevIdLength-curIdLength);
+
+						string backSpaces = "";
+						backSpaces = Common::PadStringWithChar(backSpaces, '\b', prevIdLength);
+						string endBackSpaces = "";
+						endBackSpaces = Common::PadStringWithChar(endBackSpaces, '\b', blankSpaces.length());
+						cout << backSpaces << definitionId << blankSpaces << endBackSpaces;
+					}
+
+					Definition* def = Definition::GetDefinitionById(definitionId);
+					def->NotEvaluated();
+					def->Write(Analyzer::GetResultsSystemDefinitionsElm());
+					prevIdLength = definitionId.length();					
+				}
+   			}
+			i++;
+		}
+
+		if(!Log::WriteToScreen()) {
+			string fin = " FINISHED ";
+			int curLen = fin.length();
+			string blankSpaces = "";
+			if(prevIdLength > curLen)
+				blankSpaces = Common::PadStringWithChar(blankSpaces, ' ', prevIdLength-curLen);
+			string backSpaces = "";
+			backSpaces = Common::PadStringWithChar(backSpaces, '\b', prevIdLength);
+			cout << backSpaces << fin << blankSpaces << endl;
+		}
+
+		Definition::ClearCache();
+		Test::ClearCache();
+		Item::ClearCache();
+		State::ClearCache();
+		VariableValue::ClearCache();
+
+		this->FinializeResultsDocument();
+
+	} else {
+		string logMessage = "\n    No definitions found in the input oval-definitions document! \n";
+		cout << logMessage;
+		Log::UnalteredMessage(logMessage);
+	}
+}
+
+void Analyzer::PrintResults() {
+
+	///////////////////////////////////////////////////////////////////////////
+	//	Display a header indicating that the definitions are being processed
+	///////////////////////////////////////////////////////////////////////////
+	cout << " ** OVAL definition results.\n" << endl;
+	Log::UnalteredMessage(" ** OVAL definition results.\n\n");
+
+	///////////////////////////////////////////////////////////////////////////
+	//	Print the vulnerable results
+	///////////////////////////////////////////////////////////////////////////
+	cout << "    OVAL Id                                 Result" << endl;
+	cout << "    -------------------------------------------------------" << endl;
+	Log::UnalteredMessage("    OVAL Id                                 Result\n");
+	Log::UnalteredMessage("    -------------------------------------------------------\n");
+
+	// print each result value 
+	StringPairVector::iterator it;
+	for (it = this->trueResults.begin(); it != this->trueResults.end(); it++) {
+		string resultStr = this->ResultPairToStr((*it));
+		cout << resultStr << endl;
+		Log::UnalteredMessage(resultStr + "\n");
+	}
+	for (it = this->falseResults.begin(); it != this->falseResults.end(); it++) {
+		string resultStr = this->ResultPairToStr((*it));
+		cout << resultStr << endl;
+		Log::UnalteredMessage(resultStr + "\n");
+	}
+
+	for (it = this->unknownResults.begin(); it != this->unknownResults.end(); it++) {
+		string resultStr = this->ResultPairToStr((*it));
+		cout << resultStr << endl;
+		Log::UnalteredMessage(resultStr + "\n");
+	}
+
+	for (it = this->errorResults.begin(); it != this->errorResults.end(); it++) {
+		string resultStr = this->ResultPairToStr((*it));
+		cout << resultStr << endl;
+		Log::UnalteredMessage(resultStr + "\n");
+	}
+
+	for (it = this->notEvaluatedResults.begin(); it != this->notEvaluatedResults.end(); it++) {
+		string resultStr = this->ResultPairToStr((*it));
+		cout << resultStr << endl;
+		Log::UnalteredMessage(resultStr + "\n");
+	}
+
+	for (it = this->notApplicableResults.begin(); it != this->notApplicableResults.end(); it++) {
+		string resultStr = this->ResultPairToStr((*it));
+		cout << resultStr << endl;
+		Log::UnalteredMessage(resultStr + "\n");
+	}
+
+	cout << "    -------------------------------------------------------\n" << endl;
+	cout << "\n ** finished evaluating OVAL definitions.\n" << endl;	
+	Log::UnalteredMessage("    -------------------------------------------------------\n\n");
+	Log::UnalteredMessage("\n ** finished evaluating OVAL definitions.\n\n");
+
+}
+
+string Analyzer::ResultPairToStr(StringPair* pair) {
+
+	string resultStr = "    ";
+	resultStr.append(Common::PadString(pair->first, 40));
+	resultStr.append(Common::PadString(pair->second, 15));
+
+	return resultStr;
+}
+
+void Analyzer::InitResultsDocument() {
+
+	// Add all the namespace information
+	XmlCommon::AddXmlns(DocumentManager::GetResultDocument(), "http://oval.mitre.org/XMLSchema/oval-common-5", "oval");
+	XmlCommon::AddXmlns(DocumentManager::GetResultDocument(), "http://oval.mitre.org/XMLSchema/oval-definitions-5", "oval-def");
+	XmlCommon::AddXmlns(DocumentManager::GetResultDocument(), "http://oval.mitre.org/XMLSchema/oval-system-characteristics-5", "oval-sc");
+	XmlCommon::AddXmlns(DocumentManager::GetResultDocument(), "http://oval.mitre.org/XMLSchema/oval-results-5", "oval-res");
+	XmlCommon::AddXmlns(DocumentManager::GetResultDocument(), "http://www.w3.org/2001/XMLSchema-instance", "xsi");
+
+	// Add all the schema locations to start out with
+	// others will be added as they appear
+	XmlCommon::AddSchemaLocation(DocumentManager::GetResultDocument(), "http://oval.mitre.org/XMLSchema/oval-common-5 oval-common-schema.xsd");
+	XmlCommon::AddSchemaLocation(DocumentManager::GetResultDocument(), "http://oval.mitre.org/XMLSchema/oval-system-characteristics-5 oval-system-characteristics-schema.xsd");
+	XmlCommon::AddSchemaLocation(DocumentManager::GetResultDocument(), "http://oval.mitre.org/XMLSchema/oval-definitions-5 oval-definitions-schema.xsd");
+	XmlCommon::AddSchemaLocation(DocumentManager::GetResultDocument(), "http://oval.mitre.org/XMLSchema/oval-results-5 oval-results-schema.xsd");
+
+	// add the generator element
+	DOMElement *ovalResultsElm = DocumentManager::GetResultDocument()->getDocumentElement();
+	DOMElement *generatorElm = XmlCommon::AddChildElement(DocumentManager::GetResultDocument(), ovalResultsElm, "generator");
+	XmlCommon::AddChildElement(DocumentManager::GetResultDocument(), generatorElm, "oval:product_name", "OVAL Definition Interpreter");
+	XmlCommon::AddChildElement(DocumentManager::GetResultDocument(), generatorElm, "oval:product_version", Version::GetVersion() + " Build: " + Version::GetBuild());
+	XmlCommon::AddChildElement(DocumentManager::GetResultDocument(), generatorElm, "oval:schema_version", "5.4");
+	XmlCommon::AddChildElement(DocumentManager::GetResultDocument(), generatorElm, "oval:timestamp", Common::GetTimeStamp());
+	XmlCommon::AddChildElement(DocumentManager::GetResultDocument(), generatorElm, "vendor", Version::GetVendor());
+
+	// add the directives
+	DOMElement *directivesElm = XmlCommon::AddChildElement(DocumentManager::GetResultDocument(), ovalResultsElm, "directives");
+	
+	DOMElement* defTrueElm = XmlCommon::AddChildElement(DocumentManager::GetResultDocument(), directivesElm, "definition_true");
+	XmlCommon::AddAttribute(defTrueElm, "reported", "true");
+	XmlCommon::AddAttribute(defTrueElm, "content", "full");
+	
+	DOMElement* defFalseElm = XmlCommon::AddChildElement(DocumentManager::GetResultDocument(), directivesElm, "definition_false");
+	XmlCommon::AddAttribute(defFalseElm, "reported", "true");
+	XmlCommon::AddAttribute(defFalseElm, "content", "full");
+
+	DOMElement* defUnknownElm = XmlCommon::AddChildElement(DocumentManager::GetResultDocument(), directivesElm, "definition_unknown");
+	XmlCommon::AddAttribute(defUnknownElm, "reported", "true");
+	XmlCommon::AddAttribute(defUnknownElm, "content", "full");
+
+	DOMElement* defErrorElm = XmlCommon::AddChildElement(DocumentManager::GetResultDocument(), directivesElm, "definition_error");
+	XmlCommon::AddAttribute(defErrorElm, "reported", "true");
+	XmlCommon::AddAttribute(defErrorElm, "content", "full");
+
+	DOMElement* defNotEvalElm = XmlCommon::AddChildElement(DocumentManager::GetResultDocument(), directivesElm, "definition_not_evaluated");
+	XmlCommon::AddAttribute(defNotEvalElm, "reported", "true");
+	XmlCommon::AddAttribute(defNotEvalElm, "content", "full");
+
+	DOMElement* defNotAppElm = XmlCommon::AddChildElement(DocumentManager::GetResultDocument(), directivesElm, "definition_not_applicable");
+	XmlCommon::AddAttribute(defNotAppElm, "reported", "true");
+	XmlCommon::AddAttribute(defNotAppElm, "content", "full");
+
+	// add the results element
+	DOMElement *resultsElm = XmlCommon::AddChildElement(DocumentManager::GetResultDocument(), ovalResultsElm, "results");
+	Analyzer::resultsElm = resultsElm;
+}
+
+void Analyzer::FinializeResultsDocument() {
+
+	// add the oval_definitions element
+	DOMElement *ovalResultsElm = DocumentManager::GetResultDocument()->getDocumentElement();
+	DOMElement* definitionNode = (DOMElement*)DocumentManager::GetResultDocument()->importNode(DocumentManager::GetDefinitionDocument()->getDocumentElement(), true);
+	ovalResultsElm->insertBefore(definitionNode, this->resultsElm);
+	// need to clean up the attributes on the oval_definitiosn element.
+	// copy all namespaces the document root
+	// add all schema locations to the document root.
+	// leave only the xmlns attribute on the element to set the default ns for all child elements.
+	XmlCommon::CopyNamespaces(DocumentManager::GetDefinitionDocument(), DocumentManager::GetResultDocument());
+	XmlCommon::CopySchemaLocation(DocumentManager::GetDefinitionDocument(), DocumentManager::GetResultDocument());
+	XmlCommon::RemoveAttributes(definitionNode);
+
+
+	// add the oval_system characteristics element
+	DOMElement* scNode = (DOMElement*)DocumentManager::GetResultDocument()->importNode(DocumentManager::GetSystemCharacterisitcsDocument()->getDocumentElement(), true);
+	this->resultsSystemElm->appendChild(scNode);
+	// need to clean up the attributes on the oval_definitions element.
+	// copy all namespaces the document root
+	// add all schema locations to the document root.
+	// leave only the xmlns attribute on the element to seet the default ns for all child elements.
+	XmlCommon::CopyNamespaces(DocumentManager::GetSystemCharacterisitcsDocument(), DocumentManager::GetResultDocument());
+	XmlCommon::CopySchemaLocation(DocumentManager::GetSystemCharacterisitcsDocument(), DocumentManager::GetResultDocument());
+	XmlCommon::RemoveAttributes(scNode);
+
+}
+
+//****************************************************************************************//
+//								AnalyzerException Class									  //	
+//****************************************************************************************//
+AnalyzerException::AnalyzerException(string errMsgIn, int severity, Exception* ex) : Exception(errMsgIn, severity, ex) {
+
+}
+
+AnalyzerException::~AnalyzerException() {
+
+}


Property changes on: trunk/ovaldi/src/Analyzer.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Analyzer.h
===================================================================
--- trunk/ovaldi/src/Analyzer.h	                        (rev 0)
+++ trunk/ovaldi/src/Analyzer.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,137 @@
+//
+// $Id: Analyzer.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef ANALYZER_H
+#define ANALYZER_H
+
+//	required xerces includes
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/DOMAttr.hpp>
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xercesc/dom/DOMNodeList.hpp>
+#include <xercesc/util/XMLString.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/parsers/AbstractDOMParser.hpp>
+
+// other includes
+#include "Definition.h"
+#include "DocumentManager.h"
+#include "Exception.h"
+#include "Common.h"
+#include "XmlCommon.h"
+#include "Version.h"
+#include "Item.h"
+
+using namespace std;
+
+/**
+	The Analyzer class is the starting point for the oval analysis.
+*/
+class Analyzer {
+public:
+	Analyzer();
+
+	~Analyzer();
+
+	/** Evaluate all OVAL Definitions.
+		This Run method runs through all the OVAL Definitions in the specified
+	    OVAL Definitions file and evaluates them.
+	*/
+	void Run();
+	/** Evaluate the set of OVAL Definitions.
+		This Run method runs through set of definitionIds provided. The method evaluates
+		wach specified definition. All other definitions are reported as not evaluated in the
+		oval-results.xml
+		If a sepcified definition id is not found in the OVAL Definitions document an error is
+		reported, but evaluation will continue until the all definitions have been processed.
+	*/
+	void Run(StringVector* definitionIds);
+
+	/** Return a ptr to the tests element in the results doc. **/
+	static DOMElement* GetResultsSystemTestsElm();
+	/** Return a ptr to the definitions element in the results document. **/
+	static DOMElement* GetResultsSystemDefinitionsElm();
+	/** Return a ptr to the system element in the results document. **/
+	static DOMElement* GetResultsSystemElm();
+	/** Return a ptr to the results element in the results document. **/
+	static DOMElement* GetResultsElm();
+
+	/** Print the results of the analysis. */
+	void PrintResults();
+
+	/** Append a true result. **/
+	static void AppendTrueResult(StringPair* pair);
+	/** Append a false result. **/
+	static void AppendFalseResult(StringPair* pair);
+	/** Append an error result. **/
+	static void AppendErrorResult(StringPair* pair);
+	/** Append an unknown result. **/
+	static void AppendUnknownResult(StringPair* pair);
+	/** Append a not applicable result. **/
+	static void AppendNotApplicableResult(StringPair* pair);
+	/** Append a not evaluated result. **/
+	static void AppendNotEvaluatedResult(StringPair* pair);
+
+private:
+
+	/** Format a pair of definition id and result value as a string for display. */
+	string ResultPairToStr(StringPair* pair);
+
+	/** Initialize the results document adding the basic structure to it. */
+	void InitResultsDocument();
+
+	/** Finialize the results document copying the sc and definitions files into their appropriate locations. */
+	void FinializeResultsDocument();
+
+	static DOMElement* definitionsElm;
+	static DOMElement* testsElm;
+	static DOMElement* resultsSystemElm;
+	static DOMElement* resultsElm;
+
+	static StringPairVector trueResults;
+	static StringPairVector falseResults;
+	static StringPairVector unknownResults;
+	static StringPairVector errorResults;
+	static StringPairVector notEvaluatedResults;
+	static StringPairVector notApplicableResults;
+
+};
+
+/** 
+	This class represents an Exception that occured while running the analyzer.
+*/
+class AnalyzerException : public Exception {
+	public:
+		AnalyzerException(string errMsgIn = "", int severity = ERROR_FATAL, Exception* ex = NULL);
+		~AnalyzerException();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/Analyzer.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Behavior.cpp
===================================================================
--- trunk/ovaldi/src/Behavior.cpp	                        (rev 0)
+++ trunk/ovaldi/src/Behavior.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,112 @@
+//
+// $Id: Behavior.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "Behavior.h"
+
+//****************************************************************************************//
+//								Behavior Class											  //	
+//****************************************************************************************//
+Behavior::Behavior(string name, string value) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	
+	//
+	// -----------------------------------------------------------------------
+
+	this->SetName(name);
+	this->SetValue(value);
+}
+
+Behavior::~Behavior() {
+
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+string Behavior::GetName() {
+
+	return this->name;
+}
+
+void Behavior::SetName(string name) {
+
+	this->name = name;
+}
+
+string Behavior::GetValue() {
+
+	return this->value;
+}
+
+void Behavior::SetValue(string value) {
+
+	this->value = value;
+}
+
+BehaviorVector* Behavior::Parse(DOMElement* behaviorElm) {
+
+	BehaviorVector* behaviors = new BehaviorVector();
+
+	DOMNamedNodeMap* attributes = behaviorElm->getAttributes();
+	int nSize = attributes->getLength();
+
+	//	Loop through the attributes
+	for(int i=0; i<nSize; ++i) {
+		DOMAttr *pAttributeNode = (DOMAttr*) attributes->item(i);
+		// get attribute name
+		string attName = XmlCommon::ToString(pAttributeNode->getName());
+
+		//	Get the attribute value
+		string attVal = XmlCommon::ToString(pAttributeNode->getValue());
+			
+		Behavior* behavior = new Behavior(attName, attVal);
+		behaviors->push_back(behavior);
+	}
+
+	return behaviors;
+}
+
+string Behavior::GetBehaviorValue(BehaviorVector* behaviors, string name) {
+
+	string value = "";
+	BehaviorVector::iterator iterator;
+	for(iterator = behaviors->begin(); iterator != behaviors->end(); iterator++) {
+		
+		if((*iterator)->GetName().compare(name) == 0) {
+			value = (*iterator)->GetValue();
+			break;
+		}		
+	}
+	return value;
+}
+


Property changes on: trunk/ovaldi/src/Behavior.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Behavior.h
===================================================================
--- trunk/ovaldi/src/Behavior.h	                        (rev 0)
+++ trunk/ovaldi/src/Behavior.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,85 @@
+//
+// $Id: Behavior.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef BEHAVIOR_H
+#define BEHAVIOR_H
+
+//	required xerces includes
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/DOMAttr.hpp>
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xercesc/dom/DOMNodeList.hpp>
+#include <xercesc/util/XMLString.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/parsers/AbstractDOMParser.hpp>
+
+#include "XmlCommon.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+
+class Behavior;
+
+/**
+	A vector for storing Behavior objects. 
+	Stores only pointers to the objects. 
+*/
+typedef vector < Behavior*, allocator<Behavior*> > BehaviorVector;
+
+/**
+	This class represents a behavior in the oval definition schema
+	Behaviors are used by objects to refine data collection.
+*/
+class Behavior {
+public:
+	/** Create a complete Behavior object. */
+	Behavior(string name = "", string value = "");
+	~Behavior();
+
+	/** Parses the set of behaviors specified on an object and returns then as a vector. */ 
+	static BehaviorVector* Parse(DOMElement* behaviorsElement);
+
+	/** Get the value of a named behavior in the specified set of behaviors. */
+	static string GetBehaviorValue(BehaviorVector* behaviors, string name);
+
+	string GetName();
+	void SetName(string name);
+
+	string GetValue();
+	void SetValue(string value);
+
+private:
+	string name;
+	string value;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/Behavior.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/CollectedObject.cpp
===================================================================
--- trunk/ovaldi/src/CollectedObject.cpp	                        (rev 0)
+++ trunk/ovaldi/src/CollectedObject.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,627 @@
+//
+// $Id: CollectedObject.cpp 4659 2008-01-17 22:26:26Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "CollectedObject.h"
+
+//****************************************************************************************//
+//								CollectedObject Class									  //	
+//****************************************************************************************//
+CollectedObjectMap CollectedObject::collectedObjectsMap;
+
+
+CollectedObject::CollectedObject(string id, string comment, int version, int variableInstance, OvalEnum::Flag flag) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a complete CollectedObject object
+	//
+	// -----------------------------------------------------------------------
+
+	this->SetId(id);
+	this->SetComment(comment);
+	this->SetVariableInstance(variableInstance);
+	this->SetVersion(version);
+	this->SetFlag(flag);
+}
+
+CollectedObject::~CollectedObject() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	clean up all the elements
+	//
+	// -----------------------------------------------------------------------
+	
+	OvalMessage* msg = NULL;
+	while(this->messages.size() != 0) {
+	  	msg = messages[messages.size()-1];
+	  	messages.pop_back();
+	  	delete msg;
+	  	msg = NULL;
+	}
+
+	// Don't delete variable values they are shared and cached. There is a clear 
+	// cache method in the var value class taht is called at the end of run time
+}
+
+// ***************************************************************************************	//
+//								Static Public members										//
+// ***************************************************************************************	//
+CollectedObject* CollectedObject::Create(AbsObject* absObject) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a new ColelctedObject ans store a reference to it.
+	//
+	// -----------------------------------------------------------------------
+
+	CollectedObject* collectedObject = new CollectedObject(absObject->GetId(), absObject->GetComment(), absObject->GetVersion());
+	CollectedObject::Cache(collectedObject);
+	return collectedObject;
+}
+
+CollectedObject* CollectedObject::CreateError(string objectId) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a new ColelctedObject based on the specified AbsObject
+	//	Set it up as not applicable.
+	//
+	// -----------------------------------------------------------------------
+
+	CollectedObject* collectedObject = new CollectedObject(objectId);
+	collectedObject->SetFlag(OvalEnum::FLAG_ERROR);
+	CollectedObject::Cache(collectedObject);
+	return collectedObject;
+}
+
+CollectedObject* CollectedObject::CreateNotApplicable(AbsObject* absObject) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a new ColelctedObject based on the specified AbsObject
+	//	Set it up as not applicable.
+	//
+	// -----------------------------------------------------------------------
+
+	CollectedObject* collectedObject = CollectedObject::Create(absObject);
+	collectedObject->SetFlag(OvalEnum::FLAG_NOT_APPLICABLE);
+
+	OvalMessage* message = new OvalMessage("This object was determined to be not applicable by this OVAL Definition Interpreter data collector.");
+	collectedObject->AppendOvalMessage(message);
+	
+	return collectedObject;
+}
+
+CollectedObject* CollectedObject::CreateNotSupported(AbsObject* absObject) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a new CollectedObject based on the specified AbsObject
+	//	Set it up as not supported.
+	//
+	// -----------------------------------------------------------------------
+
+	CollectedObject* collectedObject = CollectedObject::Create(absObject);
+	collectedObject->SetFlag(OvalEnum::FLAG_NOT_COLLECTED);
+
+	OvalMessage* message = new OvalMessage("This type of object (" + absObject->GetName() + ") is not currently supported by this OVAL Definition Interpreter data collector.");
+	collectedObject->AppendOvalMessage(message);
+	return collectedObject;
+}
+
+void CollectedObject::WriteCollectedObjects() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Write all collected objects in the vector of collected objects.
+	//	After writing delete the object to free memory.
+	//
+	// -----------------------------------------------------------------------
+
+	CollectedObjectMap::iterator iterator;
+	for(iterator = CollectedObject::collectedObjectsMap.begin(); iterator != CollectedObject::collectedObjectsMap.end(); iterator++) {
+		
+		CollectedObject* obj = iterator->second;
+		obj->Write(DocumentManager::GetSystemCharacterisitcsDocument(), AbsDataCollector::Instance()->GetSCCollectedObjectsElm());
+		delete obj;
+		obj = NULL;
+	}
+	
+	CollectedObject::collectedObjectsMap.clear();
+}
+
+CollectedObject* CollectedObject::GetCollectedObject(string objectId) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	return the collected object that corresponds to the object id 
+	//	specified. Return NULL if the object id is not found.
+	// -----------------------------------------------------------------------
+
+	CollectedObject* colelctedObject = NULL;
+
+	CollectedObjectMap::iterator iterator;
+	iterator = CollectedObject::collectedObjectsMap.find(objectId);
+	if(iterator != CollectedObject::collectedObjectsMap.end()) {
+		colelctedObject = iterator->second;
+	} 
+
+	return colelctedObject;
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+OvalEnum::Flag CollectedObject::GetFlag() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the flag field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->flag;
+}
+
+void CollectedObject::SetFlag(OvalEnum::Flag flag) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the flag field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->flag = flag;
+}
+
+string CollectedObject::GetId() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the id field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->id;
+}
+
+void CollectedObject::SetId(string id) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the id field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->id = id;
+}
+
+string CollectedObject::GetComment() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the comment field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->comment;
+}
+
+void CollectedObject::SetComment(string comment) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the comment field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->comment = comment;
+}
+
+OvalMessageVector* CollectedObject::GetMessages() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the messages field's value
+	//
+	// -----------------------------------------------------------------------
+	return &this->messages;
+}
+void CollectedObject::SetMessages(OvalMessageVector* messages) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the messages field's value
+	//
+	// -----------------------------------------------------------------------
+	
+	this->messages = (*messages);
+}
+
+ItemVector* CollectedObject::GetReferences() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the references field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return &this->references;
+}
+
+void CollectedObject::SetReferences(ItemVector* references) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the references field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->references = (*references);
+}
+
+int CollectedObject::GetVariableInstance() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the variableInstance field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->variableInstance;
+}
+
+void CollectedObject::SetVariableInstance(int variableInstance) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the variableInstance field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->variableInstance = variableInstance;
+}
+
+VariableValueVector* CollectedObject::GetVariableValues() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the variableValues field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return &this->variableValues;
+}
+
+void CollectedObject::SetVariableValues(VariableValueVector* variableValues) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the variableValues field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->variableValues = (*variableValues);
+}
+
+int CollectedObject::GetVersion() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the version field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->version;
+}
+
+void CollectedObject::SetVersion(int version) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the version field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->version = version;
+}
+
+void CollectedObject::AppendOvalMessage(OvalMessage* message) {
+
+	this->messages.push_back(message);
+}
+
+void CollectedObject::AppendReferencesAndComputeFlag(ItemVector* references) {
+
+	this->AppendReferences(references);
+
+	// compute the flag value for the collected obj beased on the set of items
+
+	// get counts of each status value set on the items in the list
+	unsigned int errorCnt = 0;
+	unsigned int existsCnt = 0;
+	unsigned int doesNotExistCnt = 0;
+	unsigned int notCollectedCnt = 0;
+
+	// now loop through the items and examine their status values.
+	ItemVector::iterator iterator;
+	for(iterator = references->begin(); iterator != references->end(); iterator++) {
+		Item* tmp = (*iterator);
+
+		if(tmp->GetStatus() == OvalEnum::STATUS_ERROR) {
+			errorCnt++;
+		} else if(tmp->GetStatus() == OvalEnum::STATUS_EXISTS) {
+			existsCnt++;
+		} else if(tmp->GetStatus() == OvalEnum::STATUS_DOES_NOT_EXIST) {
+			doesNotExistCnt++;
+		} else if(tmp->GetStatus() == OvalEnum::STATUS_NOT_COLLECTED) {
+			notCollectedCnt++;
+		}
+	}
+
+	// status values -  error, exists, does not exist, not collected
+
+	// Flag == error
+	// if the set contains any item marked as error
+	if(errorCnt > 0) {
+		this->SetFlag(OvalEnum::FLAG_ERROR);
+
+	// Flag == complete
+	// if the set contains
+	//   at least one item with a status of exists and
+	//   no items with a status of not collected and
+	//   no items with a status of error
+	} else if(errorCnt == 0 && notCollectedCnt == 0 && existsCnt > 0) {
+		this->SetFlag(OvalEnum::FLAG_COMPLETE);
+
+	// Flag == incomplete
+	// if the set contains
+	//  one ore more items with a status of not collected
+	//  no items with a status of error
+	} else if(errorCnt == 0 && notCollectedCnt > 0) {
+		this->SetFlag(OvalEnum::FLAG_INCOMPLETE);
+
+	// Flag == does not exist
+	// if the set is empty, or the set contains
+	//   no items with a status of exists
+	//   no items with a status of error
+	//   no items with a status of not collected
+	//   all items have a status of does not exist
+	} else if((errorCnt == 0 && notCollectedCnt == 0 && existsCnt == 0) || references->size() == 0) {
+		this->SetFlag(OvalEnum::FLAG_DOES_NOT_EXIST);
+
+	// Flag == not collected
+	// if all items in the set have a status of not collected and
+	// the set has atleast one item
+	//
+	// NOTE: This condition is currently handled elsewhere in 
+	// the code see: CollectedObject* AbsObjectCollector::ProcessObject(Object* object)
+	//
+	} else if(references->size() == notCollectedCnt && notCollectedCnt > 0) {
+		this->SetFlag(OvalEnum::FLAG_DOES_NOT_EXIST);
+	}
+
+	// Flag == not applicable
+	// 
+	// handled elsewhere in the code see: CollectedObject* AbsObjectCollector::ProcessObject(Object* object)
+
+}
+
+void CollectedObject::AppendReferences(ItemVector* references) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Add the items to the end of the references vector
+	//
+	// -----------------------------------------------------------------------
+
+	ItemVector::iterator iterator;
+	for(iterator = references->begin(); iterator != references->end(); iterator++) {
+		Item* item = (*iterator);
+		this->references.push_back(item);
+	}
+}
+
+void CollectedObject::AppendVariableValue(VariableValue* variableValue) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Add a varaible value to the end of the variable values vector
+	//
+	// -----------------------------------------------------------------------
+
+	this->variableValues.push_back(variableValue);
+}
+
+void CollectedObject::AppendVariableValues(VariableValueVector* vars) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Add a variable value to the end of the variable values vector
+	//
+	// -----------------------------------------------------------------------
+
+	VariableValueVector::iterator iterator;
+	for(iterator = vars->begin(); iterator != vars->end(); iterator++) {
+		VariableValue* var = (*iterator);
+		this->variableValues.push_back(var);
+	}
+}
+
+void CollectedObject::Write(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* scFile, DOMElement* collectedObjectsElm) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Write this item to a sc file. Make sure the item has not already been 
+	//	written to the sc file
+	//
+	// -----------------------------------------------------------------------
+
+	// Create a new object element
+	DOMElement *newCollectedObjectElem = XmlCommon::AddChildElement(scFile, collectedObjectsElm, "object");
+
+	// Add the attributes
+	// handling defaults in the schema
+	XmlCommon::AddAttribute(newCollectedObjectElem, "id", this->GetId());	
+
+	string strFlag = OvalEnum::FlagToString(this->GetFlag());
+	XmlCommon::AddAttribute(newCollectedObjectElem, "flag", strFlag);
+
+	if(this->GetComment().compare("") != 0) {
+		XmlCommon::AddAttribute(newCollectedObjectElem, "comment", this->GetComment());	
+	}
+
+	string version = Common::ToString(this->GetVersion());
+	XmlCommon::AddAttribute(newCollectedObjectElem, "version", version);
+
+	// Add any messges
+	if(this->GetMessages()->size() > 0) {
+		OvalMessageVector::iterator messageIterator;
+		for(messageIterator = this->GetMessages()->begin(); messageIterator != this->GetMessages()->end(); messageIterator++) {
+			OvalMessage* message = (*messageIterator);
+			message->Write(scFile, newCollectedObjectElem, "oval-sc");
+		}
+	}
+
+	// Call the write method for each variable_value - ensure that each var value is only written once
+	if(this->GetVariableValues()->size() > 0) {
+		StringPairVector varIdValuePairs;
+		VariableValueVector::iterator variableValueIterator;
+		for(variableValueIterator = this->GetVariableValues()->begin(); variableValueIterator != this->GetVariableValues()->end(); variableValueIterator++) {
+			VariableValue* variableValue = (*variableValueIterator);
+			if(!this->IsWritten(&varIdValuePairs, variableValue->GetId(), variableValue->GetValue())) {
+				StringPair* pair = new StringPair();
+				pair->first = variableValue->GetId();
+				pair->second = variableValue->GetValue();
+				varIdValuePairs.push_back(pair);
+				variableValue->Write(newCollectedObjectElem);
+			}
+		}
+	}
+
+	// Add each reference - ensure taht each refernec is only written once.
+	if(this->GetReferences()->size() > 0) {
+		IntVector referenceIds;
+		ItemVector::iterator referenceIterator;
+		for(referenceIterator = this->GetReferences()->begin(); referenceIterator != this->GetReferences()->end(); referenceIterator++) {
+			Item* reference = (*referenceIterator);
+			
+			if(!this->IsWritten(&referenceIds, reference->GetId())) {
+				referenceIds.push_back(reference->GetId());
+
+				// add the item to the sc file
+				reference->Write(scFile, AbsDataCollector::Instance()->GetSCSystemDataElm());
+
+				// add the reference tot he collected obj element
+				string refElementName = "reference";
+				DOMElement *newReferenceElm = scFile->createElement(XMLString::transcode(refElementName.c_str()));
+				newCollectedObjectElem->appendChild(newReferenceElm);
+				string idStr = Common::ToString(reference->GetId());
+				XmlCommon::AddAttribute(newReferenceElm, "item_ref", idStr);
+			}
+		}
+	}
+}
+
+// ***************************************************************************************	//
+//								 Private members											//
+// ***************************************************************************************	//
+bool CollectedObject::IsWritten(StringPairVector* varIdValuePairs, string varId, string varValue) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	return true if the specified variable value has not already been written
+	//  must check the pair of var id and value.
+	// -----------------------------------------------------------------------
+
+	bool result = false;
+
+	StringPairVector::iterator iterator;
+	for(iterator = varIdValuePairs->begin(); iterator != varIdValuePairs->end(); iterator++) {
+		string id = (*iterator)->first;
+		if(id.compare(varId) == 0) {
+			string value = (*iterator)->second;
+			if(value.compare(varValue) == 0) {
+				result = true;
+                break;
+			}
+		}
+	}
+	return result;
+}
+
+bool CollectedObject::IsWritten(IntVector* itemIds, int itemId) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	return true if the specified item id has already been 
+	//	added as a reference
+	// -----------------------------------------------------------------------
+
+	bool result = false;
+
+	IntVector::iterator iterator;
+	for(iterator = itemIds->begin(); iterator != itemIds->end(); iterator++) {
+		int id = (*iterator);
+		if(id == itemId) {
+			result = true;
+               break;
+		}
+	}
+	return result;
+}
+
+void CollectedObject::Cache(CollectedObject* collectedObject) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Add the provided collected object to the cache of collected objects 
+	//	if it does not already exist
+	// -----------------------------------------------------------------------
+
+	if(CollectedObject::GetCollectedObject(collectedObject->GetId()) == NULL) {
+		// does not already exist so add it
+		CollectedObject::collectedObjectsMap.insert(CollectedObjectPair(collectedObject->GetId(), collectedObject));
+	}
+}
+
+//****************************************************************************************//
+//								CollectedObjectException Class							  //	
+//****************************************************************************************//
+CollectedObjectException::CollectedObjectException(string errMsgIn, int severity, Exception* ex) : Exception(errMsgIn, severity, ex) {
+
+}
+
+CollectedObjectException::~CollectedObjectException() {
+
+}
+


Property changes on: trunk/ovaldi/src/CollectedObject.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/CollectedObject.h
===================================================================
--- trunk/ovaldi/src/CollectedObject.h	                        (rev 0)
+++ trunk/ovaldi/src/CollectedObject.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,180 @@
+//
+// $Id: CollectedObject.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef COLLECTEDOBJECT_H
+#define COLLECTEDOBJECT_H
+
+//	required xerces includes
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/DOMAttr.hpp>
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xercesc/dom/DOMNodeList.hpp>
+#include <xercesc/util/XMLString.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/parsers/AbstractDOMParser.hpp>
+
+#include <string>
+#include <vector>
+#include <iostream>
+#include <stdlib.h>
+#include <map>
+#include <utility>
+
+#include "AbsObject.h"
+#include "OvalMessage.h"
+#include "Item.h"
+#include "VariableValue.h"
+#include "Exception.h"
+#include "AbsDataCollector.h"
+#include "OvalEnum.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+
+class CollectedObject;
+
+/**
+	A vector for storing CollectedObject objects. 
+	Stores only pointers to the objects. 
+*/
+typedef vector < CollectedObject*, allocator<CollectedObject*> > CollectedObjectVector;
+
+/**	
+	A pair for storing object ids and CollectedObjects together. 
+	Stores only pointers to the CollectedObjects. 
+*/
+typedef pair <string, CollectedObject* > CollectedObjectPair;
+
+/**	
+	A map for storing CollectedObjectPairs. 
+	Stores only pointers to the objects. 
+*/
+typedef map <string, CollectedObject* > CollectedObjectMap;
+
+class Item;
+typedef vector < Item*, allocator<Item*> > ItemVector;
+
+/**
+	This class represents an object in a oval sytem characteristics schema.
+	The oval system characteristics schema defiens a collected objects element which
+	contains any number of object elements. These object elements reflects the 
+	objects that an OVAL deifnition specfieid for data collection. Each object that is
+	collected for an OVAL definition has a corresponding object in the oval system charaeristitcs file.
+*/
+class CollectedObject {
+public:
+	~CollectedObject();
+
+	static CollectedObject* CreateNotApplicable(AbsObject* absObject);
+	static CollectedObject* CreateNotSupported(AbsObject* absObject);
+	static CollectedObject* CreateError(string objectId);
+	static CollectedObject* Create(AbsObject* absObject);
+
+	static CollectedObject* GetCollectedObject(string objectId);
+
+	static void WriteCollectedObjects();
+
+	void Write(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* scFile, DOMElement* collectObjectsElm);
+	
+	OvalEnum::Flag GetFlag();
+	void SetFlag(OvalEnum::Flag flag);
+	
+	string GetId();
+	void SetId(string id);
+
+	string GetComment();
+	void SetComment(string comment);
+
+	OvalMessageVector* GetMessages();
+	void SetMessages(OvalMessageVector* messages);
+
+	ItemVector* GetReferences();
+	void SetReferences(ItemVector* references);
+
+	int GetVariableInstance();
+	void SetVariableInstance(int variableInstance);
+	
+	VariableValueVector* GetVariableValues();
+	void SetVariableValues(VariableValueVector* variableValues);
+
+	int GetVersion();
+	void SetVersion(int version);
+
+	/** Add a message to the end of the messages vector. */
+	void AppendOvalMessage(OvalMessage* message);
+
+	/** Creates references to the set of input items and computes the flag value of this object based on the set. */
+	void AppendReferencesAndComputeFlag(ItemVector* references);
+	
+	void AppendVariableValue(VariableValue* variableValue);
+	void AppendVariableValues(VariableValueVector* variableValues);
+    
+private:
+
+	/** Creates references to the set of input items. */
+	void AppendReferences(ItemVector* references);
+
+	CollectedObject(string id = "", string comment = "", int version = 1, int variableInstance = 0, OvalEnum::Flag flag = OvalEnum::FLAG_ERROR);
+	/** Ensure that a given variable value for a variable id is only written once. */
+	bool IsWritten(StringPairVector* varIdValuePairs, string varId, string value);
+	/** Ensure that references are only written once. */
+	bool IsWritten(IntVector* itemIds, int itemId);
+	
+	static void Cache(CollectedObject* collectedObject);
+
+	OvalEnum::Flag flag;
+	string id;
+	string comment;
+	OvalMessageVector messages;
+	ItemVector references;
+	VariableValueVector variableValues;
+	int version;
+	int variableInstance;
+
+	static CollectedObjectMap collectedObjectsMap;
+};
+
+/** 
+	This class represents an Exception that occured while processing a CollectedObject.
+*/
+class CollectedObjectException : public Exception {
+	public:
+		/** 
+			Set the error message and then set the severity to ERROR_FATAL. This is 
+			done with the explicit call to the Exception class constructor that 
+	 		takes a single string param.
+		*/
+		CollectedObjectException(string errMsgIn = "", int severity = ERROR_FATAL, Exception *ex = NULL);
+		~CollectedObjectException();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/CollectedObject.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/CollectedSet.cpp
===================================================================
--- trunk/ovaldi/src/CollectedSet.cpp	                        (rev 0)
+++ trunk/ovaldi/src/CollectedSet.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,92 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "CollectedSet.h"
+
+//****************************************************************************************//
+//									CollectedSet Class									  //	
+//****************************************************************************************//
+
+CollectedSet::CollectedSet() {
+	this->SetFlag(OvalEnum::FLAG_ERROR);
+}
+
+CollectedSet::~CollectedSet() {
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+ItemVector* CollectedSet::GetItems() {
+	return &this->items;
+}
+
+void CollectedSet::SetItems(ItemVector* items) {
+	this->items = (*items);
+}
+
+OvalEnum::Flag CollectedSet::GetFlag() {
+	return this->flag;
+}
+
+void CollectedSet::SetFlag(OvalEnum::Flag flag) {
+	this->flag = flag;
+}
+
+VariableValueVector* CollectedSet::GetVariableValues() {
+	return &this->variableValues;
+}
+
+void CollectedSet::SetVariableValues(VariableValueVector* variableValues) {
+	this->variableValues = (*variableValues);
+}
+
+void CollectedSet::AppendVariableValue(VariableValue* variableValue) {
+	this->variableValues.push_back(variableValue);
+}
+
+void CollectedSet::AppendVariableValues(VariableValueVector* vars) {
+	VariableValueVector::iterator iterator;
+	for(iterator = vars->begin(); iterator != vars->end(); iterator++) {
+		VariableValue* var = (*iterator);
+		this->variableValues.push_back(var);
+	}
+}
+
+//****************************************************************************************//
+//								CollectedSetException Class								  //	
+//****************************************************************************************//
+CollectedSetException::CollectedSetException(string errMsgIn, int severity, Exception* ex) : Exception(errMsgIn, severity, ex) {
+
+}
+
+CollectedSetException::~CollectedSetException() {
+
+}


Property changes on: trunk/ovaldi/src/CollectedSet.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/CollectedSet.h
===================================================================
--- trunk/ovaldi/src/CollectedSet.h	                        (rev 0)
+++ trunk/ovaldi/src/CollectedSet.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,93 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef COLLECTEDSET_H
+#define COLLECTEDSET_H
+
+#include <string>
+#include <vector>
+#include <iostream>
+#include <stdlib.h>
+
+#include "Item.h"
+#include "VariableValue.h"
+#include "Exception.h"
+#include "OvalEnum.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	This class represents an CollectedSet in an oval definition schema.
+	CollectedSets are used by set objects to construct complex sets of items on a sytem for analysis.
+*/
+class CollectedSet {
+
+public:
+	/** Initialize the collected set. */
+	CollectedSet();
+	~CollectedSet();
+
+	/** Return the items field's value. */
+	ItemVector* GetItems();
+	/** Set the items field's value. */
+	void SetItems(ItemVector* items);
+	
+	/** Return the variableValues field's value. */
+	VariableValueVector* GetVariableValues();
+	/** Set the variableValues field's value. */
+	void SetVariableValues(VariableValueVector* variableValues);
+	
+	/** Add a variable value to the end of the variable values vector. */
+	void AppendVariableValue(VariableValue* variableValue);
+	/** Add a vector of variable values to the end of the variable values vector. */
+	void AppendVariableValues(VariableValueVector* variableValues);
+    
+	/** Return the flag field's value. */
+	OvalEnum::Flag GetFlag();
+	/** Set the flag field's value. */
+	void SetFlag(OvalEnum::Flag flag);
+
+private:
+	ItemVector items;
+	VariableValueVector variableValues;
+	OvalEnum::Flag flag;
+};
+
+/** 
+	This class represents an Exception that occured while processing a set.
+*/
+class CollectedSetException : public Exception {
+	public:
+		CollectedSetException(string errMsgIn = "", int severity = ERROR_FATAL, Exception *ex = NULL);
+		~CollectedSetException();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/CollectedSet.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Common.cpp
===================================================================
--- trunk/ovaldi/src/Common.cpp	                        (rev 0)
+++ trunk/ovaldi/src/Common.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,518 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "Common.h"
+
+UniqueStringVector::UniqueStringVector(StringVector* strings) {
+	// caller is responsible for providing a ptr to a StringVector
+	// caller is responsible for cleaning up after the StringVector
+	// is no longer needed.
+	this->uniqueStrings = strings;
+}
+
+UniqueStringVector::~UniqueStringVector() {
+
+}
+
+StringVector* UniqueStringVector::GetUniqueStrings() {
+	return this->uniqueStrings;
+}
+
+void UniqueStringVector::Append(string newString) {
+	if(!this->Exists(newString)) {
+		this->uniqueStrings->push_back(newString);
+	}
+}
+
+bool UniqueStringVector::Exists(string newString) {
+	bool exists = false;
+
+	StringVector::iterator iterator;
+	for(iterator = this->uniqueStrings->begin(); iterator != this->uniqueStrings->end(); iterator++) {
+		if(newString.compare((*iterator)) == 0) {
+			exists = true;
+		}
+	}			
+
+	return exists;
+}
+
+// Initialize static variables.
+string	Common::dataFile			= "system-characteristics.xml";
+string	Common::xmlfile				= "definitions.xml";
+string	Common::outputFilename		= "results.xml";
+string	Common::externalVariablesFile	= "external-variables.xml";
+string	Common::xmlfileMD5			= "";
+string	Common::startTime			= "";
+
+bool Common::noXsl                  = false;
+string Common::xslFile				= "results_to_html.xsl";
+string Common::xslOutputFile		= "results.html";
+
+
+bool Common::doDefinitionSchematron  = false;
+string Common::definitionSchematronPath = "oval-definitions-schematron.xsl";
+
+bool   Common::generateMD5			= false;
+bool   Common::useProvidedData		= false;
+bool   Common::verifyXMLfile		= true;
+
+bool          Common::limitEvaluationToDefinitionIds = false;
+string        Common::definitionIds                  = "";
+string        Common::definitionIdsFile              = "";
+
+
+#ifdef WIN32
+	char Common::fileSeperator = '\\';
+#else
+	char Common::fileSeperator = '/';
+#endif
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Accessors  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+
+string Common::GetDatafile()
+{
+	return dataFile;	
+}
+
+bool Common::GetGenerateMD5()
+{
+	return generateMD5;	
+}
+
+string Common::GetXMLfile()
+{
+	return xmlfile;	
+}
+
+string Common::GetXMLfileMD5()
+{
+	return xmlfileMD5;	
+}
+
+string Common::GetOutputFilename()
+{
+	return outputFilename;	
+}
+
+bool Common::GetUseProvidedData()
+{
+	return useProvidedData;	
+}
+
+string Common::GetExternalVariableFile()
+{
+	return externalVariablesFile;	
+}
+
+bool Common::GetVerifyXMLfile()
+{
+	return verifyXMLfile;
+}
+
+string Common::GetXSLFilename()
+{
+	return Common::xslFile;	
+}
+string Common::GetXSLOutputFilename()
+{
+	return Common::xslOutputFile;	
+}
+bool Common::GetNoXsl() {
+	return Common::noXsl;
+}
+
+string Common::GetDefinitionIdsString() {
+	return Common::definitionIds;
+}
+
+string Common::GetDefinitionIdsFile() {
+	return Common::definitionIdsFile;
+}
+
+bool Common::GetLimitEvaluationToDefinitionIds() {
+	return Common::limitEvaluationToDefinitionIds;
+}
+
+bool Common::GetDoDefinitionSchematron() {
+	return Common::doDefinitionSchematron;
+}
+
+string Common::GetDefinitionSchematronPath() {
+	return Common::definitionSchematronPath;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Mutators  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+
+void Common::SetDataFile(string fileIn)
+{
+	dataFile = fileIn;	
+}
+
+void Common::SetGenerateMD5(bool genMD5In)
+{
+	generateMD5 = genMD5In;
+}
+
+void Common::SetXMLfile(string xmlfileIn)
+{
+	xmlfile = xmlfileIn;
+}
+
+void Common::SetXMLfileMD5(string xmlfileMD5In)
+{
+	xmlfileMD5 = xmlfileMD5In;
+}
+
+void Common::SetOutputFilename(string outputFilenameIn)
+{
+	outputFilename = outputFilenameIn;
+}
+
+void Common::SetUseProvidedData(bool useDataIn)
+{
+	useProvidedData = useDataIn;
+}
+
+void Common::SetExternalVariableFile(string varFilenameIn)
+{
+	externalVariablesFile = varFilenameIn;
+}
+
+void Common::SetVerifyXMLfile(bool verifyXMLfileIn)
+{
+	verifyXMLfile = verifyXMLfileIn;
+}
+
+void Common::SetXSLFilename(string in)
+{
+	Common::xslFile = in;
+}
+
+void Common::SetXSLOutputFilename(string in)
+{
+	Common::xslOutputFile = in;
+}
+void Common::SetNoXsl(bool noXsl) {
+	Common::noXsl = noXsl;
+}
+
+void Common::SetDefinitionIdsString(string definitionIdsString) {
+	Common::definitionIds = definitionIdsString;
+}
+
+void Common::SetDefinitionIdsFile(string definitionIdsFile) {
+	Common::definitionIdsFile = definitionIdsFile;
+}
+
+void Common::SetLimitEvaluationToDefinitionIds(bool set) {
+	Common::limitEvaluationToDefinitionIds = set;
+}
+
+void Common::SetDoDefinitionSchematron(bool set) {
+	Common::doDefinitionSchematron = set;
+}
+
+void Common::SetDefinitionSchematronPath(string definitionSchematronPath) {
+	Common::definitionSchematronPath = definitionSchematronPath;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+
+StringVector* Common::ParseDefinitionIdsFile() {
+		
+	string definitinIdsFile = Common::GetDefinitionIdsFile();
+
+	Log::Debug("Parsing definition id file for limited definition evaluation. \"" + definitinIdsFile + "\"");
+
+	string logMessage = "     - reading input definition ids from " + definitinIdsFile + "\n";
+	cout << logMessage;
+	Log::UnalteredMessage(logMessage);
+
+	StringVector* definitionIds = NULL;
+	if(definitinIdsFile.compare("") == 0) {
+		throw Exception("Error: An empty string was provided as the path to the definition ids file to parse.");
+	} else {
+		
+		// parse the file to get the set of ids
+		DOMElement* definitionsElm = XmlCommon::FindElementNS(DocumentManager::GetEvaluationIdDocument(), "evalutation-definition-ids");
+		if(definitionsElm != NULL) {
+			
+			definitionIds = new StringVector();
+
+			DOMNodeList* definitionElms = definitionsElm->getChildNodes();
+			unsigned int i = 0;
+			while(i < definitionElms->getLength()) {
+				DOMNode* tmpNode = definitionElms->item(i);
+				if (tmpNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+					DOMElement *definitionElm = (DOMElement*)tmpNode;
+					
+					// get the definition id and check the cache
+					string definitionId = XmlCommon::GetDataNodeValue(definitionElm);
+					definitionIds->push_back(definitionId);
+				}
+				i++;
+			}
+		}
+	}
+
+	return definitionIds;
+}
+
+StringVector* Common::ParseDefinitionIdsString() {
+	string definitionIdsString = Common::GetDefinitionIdsString();
+
+	Log::Debug("Parsing definition id string for limited definition evaluation. \"" + definitionIdsString + "\"");
+
+	string logMessage = "     - parsing input definition ids to evaluate\n";
+	cout << logMessage;
+	Log::UnalteredMessage(logMessage);
+
+	// validate the format of the string
+	REGEX* regex = new REGEX();
+	string pattern = "oval:[A-Za-z0-9_\\-\\.]+:def:[1-9][0-9]*(,oval:[A-Za-z0-9_\\-\\.]+:def:[1-9][0-9]*)*";
+	if(!regex->IsMatch(pattern.c_str(), definitionIdsString.c_str())) {
+		throw Exception("Error: Invalid parameter format. Expected a comma seperated list of definition ids. No spaces are allowed.");
+	}
+
+	// break the comma seperated string into definition ids.
+	StringVector* definitionIds = new StringVector();
+	char delm = ',';
+
+	char* theString = (char*)malloc(sizeof(char*)*(definitionIdsString.length()));
+	theString = strcpy(theString, definitionIdsString.c_str());
+	char* token = strtok(theString, &delm);		
+
+	if(token == NULL) {
+		if(theString != NULL) {
+			free(theString);
+		}
+		throw Exception("Error parsing definition id list. A delimiter was found, but no definition ids were found. Input version string: \'" + definitionIdsString + "\'");
+	} else {
+
+		while(token != NULL) {
+			//	Get the first token as a string
+			string tokenStr = token;
+			
+			// make sure it is a valid dafinition id
+
+			REGEX* regex = new REGEX();
+			string pattern = "oval:[A-Za-z0-9_\\-\\.]+:def:[1-9][0-9]*(,oval:[A-Za-z0-9_\\-\\.]+:def:[1-9][0-9]*)*";
+			if(!regex->IsMatch(pattern.c_str(), definitionIdsString.c_str())) {
+				throw Exception("Error: Invalid parameter format. Expected a comma seperated list of definition ids. No spaces are allowed. Found invalid definition id");
+			}
+
+			// add it to the vector
+			definitionIds->push_back(tokenStr);
+
+			//	Get the next token
+			token = strtok(NULL, &delm);
+		}
+	}
+
+	if(theString != NULL) {
+		free(theString);
+	}
+
+	return definitionIds;
+}
+
+string Common::PadString(string strIn, unsigned int desiredLength) {
+	while(strIn.length() < desiredLength) {
+		strIn.append(" ");
+	}
+
+	return strIn;
+}
+
+string Common::PadStringWithChar(string strIn, char pad, unsigned int desiredLength) {
+
+	while(strIn.length() < desiredLength) {
+		strIn = strIn + pad;
+	}
+
+	return strIn;
+}
+
+string Common::SwitchChar(string fixedString, string oldChr, string newChr)
+{
+	//------------------------------------------------------------------------------------//
+	//  ABSTRACT
+	//
+	//  This function takes a string and searches for all oldChrs.  If one is found,
+	//  it is replaced with a newChr.  It is only intended to work with a single char 
+	//	at a time. No multiple char strings allowed
+	//
+	//------------------------------------------------------------------------------------//
+
+	if(oldChr.length() != 1 || newChr.length() != 1)
+		throw CommonException("Error: (SwitchChar) can only switch strings of length = 1.");
+
+	size_t pos = fixedString.find(oldChr, 0);
+	while (pos != string::npos)
+	{
+		fixedString.erase(pos, 1);
+		fixedString.insert(pos, newChr);
+		pos = fixedString.find(oldChr, pos+1);
+	}
+
+	return fixedString;
+}
+
+string Common::GetTimeStamp()
+{
+	//------------------------------------------------------------------------------------//
+	//  ABSTRACT
+	//
+	//  Retrieve the date/time.  The final output will be in the format:
+	//
+	//	  yyyy-mm-ddThh:mm:ss	2006-08-16T14:21:38
+	//
+	//------------------------------------------------------------------------------------//
+
+	char tmpbuf[128];
+	
+	time_t tmpTime;
+	struct tm *todayTime;
+	
+	// Get the time as a long integer, then convert it to local time.
+	time(&tmpTime);
+	todayTime = localtime(&tmpTime);
+	
+	// Build the time string.
+	char *format = "%Y-%m-%dT%H:%M:%S";
+	strftime(tmpbuf, 128-1, format, todayTime);
+
+	// Make sure the buffer is null terminated.
+	tmpbuf[sizeof(tmpbuf)-1] = '\0';
+	
+	return (tmpbuf);
+}
+
+string Common::ToString(int num)
+{
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return a the int as a string
+	//
+	// -----------------------------------------------------------------------
+	ostringstream result;
+	result << num;
+
+	return result.str();
+}
+string Common::ToString(long num)
+{
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return a the long as a string
+	//
+	// -----------------------------------------------------------------------
+	ostringstream result;
+	result << num;
+
+	return result.str();
+}
+string Common::ToString(bool b)
+{
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return a the bool as a string
+	//
+	// -----------------------------------------------------------------------
+	
+	if(b) 
+		return "true";
+	else 
+		return "false";
+}
+
+string Common::ToString(char c)
+{
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return a the char as a string
+	//
+	// -----------------------------------------------------------------------
+	
+	string str;
+	str = c;
+	return str;
+}
+
+string Common::ToString(unsigned long num)
+{
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return a the unsigned long as a string
+	//
+	// -----------------------------------------------------------------------
+	ostringstream result;
+	result << num;
+
+	return result.str();
+}
+
+
+//****************************************************************************************//
+//							CommonException Class										  //	
+//****************************************************************************************//
+CommonException::CommonException(string errMsgIn, int severity, Exception* ex) : Exception(errMsgIn, severity, ex) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the error message and then set the severity to ERROR_FATAL. This is 
+	//	done with the explicit call to the Exception class constructor that 
+	//	takes a single string param.
+	//
+	// -----------------------------------------------------------------------
+
+}
+
+CommonException::~CommonException() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Do nothing for now
+	//
+	// -----------------------------------------------------------------------
+
+}


Property changes on: trunk/ovaldi/src/Common.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Common.h
===================================================================
--- trunk/ovaldi/src/Common.h	                        (rev 0)
+++ trunk/ovaldi/src/Common.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,186 @@
+//
+// $Id: Common.h 4660 2008-01-17 22:27:18Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef COMMON_H
+#define COMMON_H
+
+#ifdef WIN32
+	#pragma warning(disable:4786)
+	#include <aclapi.h>
+	#include <windows.h>
+	#include <lmerr.h>
+#endif
+
+#include "Exception.h"
+#include "Log.h"
+#include "REGEX.h"
+#include "XmlCommon.h"
+#include "DocumentManager.h"
+
+#include <iostream>
+#include <string>
+#include <cstring>
+#include <vector>
+#include <set>
+#include <time.h>
+#include <sstream>
+#include <algorithm>
+#include <utility>
+
+using namespace std;
+
+/**
+	A vector for storing strings.
+*/
+typedef vector < string, allocator<string> > StringVector;
+
+typedef set < string > StringSet;
+
+
+class UniqueStringVector {
+
+public:
+	UniqueStringVector(StringVector*);
+	~UniqueStringVector();
+
+	StringVector* GetUniqueStrings();
+	void Append(string newString);
+	bool Exists(string newString);
+
+private:
+	StringVector* uniqueStrings;
+};
+
+
+/**
+	A vector for storing integers.
+*/
+typedef vector < int, allocator<int> > IntVector;
+
+/**	
+	A pair for storing two related strings.
+*/
+typedef pair < string, string > StringPair;
+
+/**	
+	A vector for storing pairs of strings.
+*/
+typedef vector < StringPair*, allocator<StringPair*> > StringPairVector;
+
+/**
+	This class provides a set of common fuctions used through out the application.
+	All functions are static.
+*/
+class Common {
+	public:
+		static string	GetDatafile();
+		static bool		GetGenerateMD5();
+		static string	GetXMLfile();
+		static string	GetXMLfileMD5();
+		static string	GetOutputFilename();
+		static bool		GetUseProvidedData();
+		static bool		GetUseVariableFile();
+		static string	GetExternalVariableFile();
+		static bool		GetVerifyXMLfile();
+		static string	GetXSLFilename();
+		static string	GetXSLOutputFilename();
+		static bool     GetNoXsl();
+		static string   GetDefinitionIdsString();
+		static bool     GetLimitEvaluationToDefinitionIds();
+		static bool     GetDoDefinitionSchematron();
+		static string   GetDefinitionSchematronPath();
+		static string   GetDefinitionIdsFile();
+
+		static void		SetDataFile(string);
+		static void		SetGenerateMD5(bool);
+		static void		SetXMLfile(string);
+		static void		SetXMLfileMD5(string);
+		static void		SetOutputFilename(string);
+		static void		SetUseProvidedData(bool);
+		static void		SetUseVariableFile(bool);
+		static void		SetExternalVariableFile(string);
+		static void		SetVerifyXMLfile(bool);
+		static void 	SetXSLFilename(string);
+		static void		SetXSLOutputFilename(string);
+		static void     SetNoXsl(bool);
+		static void     SetDefinitionIdsString(string definitionIdsString);
+		static void     SetLimitEvaluationToDefinitionIds(bool set);
+		static void     SetDoDefinitionSchematron(bool set);
+		static void     SetDefinitionSchematronPath(string definitionSchematronPath);
+		static void     SetDefinitionIdsFile(string definitionIdsFile);
+
+		static StringVector* ParseDefinitionIdsFile();
+		static StringVector* ParseDefinitionIdsString();
+		/** Pad the provided string with spaces so that it is the desired length. */
+		static string	PadString(string, unsigned int);
+		/** Pad the provided string with the specified char so that it is the desired length. */
+		static string	PadStringWithChar(string, char, unsigned int);
+		static string	SwitchChar(string stringIn, string oldChr, string newChr);
+		static string	ToString(int);
+		static string	ToString(long);
+		static string	ToString(unsigned long);
+		static string	ToString(bool);
+		static string	ToString(char);
+
+		static string	GetTimeStamp();
+
+		static char fileSeperator;
+
+	private:
+		static string dataFile;
+		static string outputFilename;
+		static string startTime;
+		static string externalVariablesFile;
+		static string xmlfile;
+		static bool noXsl;
+		static string xslFile;
+		static string xslOutputFile;
+		static string xmlfileMD5;
+		static bool	generateMD5;
+		static bool useProvidedData;
+		static bool verifyXMLfile;
+		static bool limitEvaluationToDefinitionIds;
+		static string definitionIds;
+		static bool doDefinitionSchematron;
+		static string definitionSchematronPath;
+		static string definitionIdsFile;
+};
+
+/** 
+	This class represents an Exception that occured while running a function in the Common class.
+*/
+class CommonException : public Exception {
+	public:
+		CommonException(string errMsgIn = "", int severity = ERROR_FATAL, Exception* ex = NULL);
+		~CommonException();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/Common.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/ComponentFactory.cpp
===================================================================
--- trunk/ovaldi/src/ComponentFactory.cpp	                        (rev 0)
+++ trunk/ovaldi/src/ComponentFactory.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,68 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "ComponentFactory.h"
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+AbsComponent* ComponentFactory::GetComponent(DOMElement* componentElm) {
+
+	AbsComponent* absComponent = NULL;
+
+	// determine if this is a set object or a simple object
+	string elmName = XmlCommon::GetElementName(componentElm);
+	if(elmName.compare("variable_component")  == 0) {
+		absComponent = new VariableComponent();
+		absComponent->Parse(componentElm);
+	} else if(elmName.compare("literal_component")  == 0) {
+		absComponent = new LiteralComponent();
+		absComponent->Parse(componentElm);
+	} else if(elmName.compare("object_component")  == 0) {
+		absComponent = new ObjectComponent();
+		absComponent->Parse(componentElm);
+	//
+	// functions 
+	//
+	} else if(elmName.compare("substring")  == 0) {
+		absComponent = new SubstringFunction();
+		absComponent->Parse(componentElm);
+	} else if(elmName.compare("concat")  == 0) {
+		absComponent = new ConcatFunction();
+		absComponent->Parse(componentElm);
+	} else if(elmName.compare("escape_regex")  == 0) {
+		absComponent = new EscapeRegexFunction();
+		absComponent->Parse(componentElm);
+	} else {
+		throw Exception("Error: unsupported function: " + elmName);
+	}
+
+	return absComponent;
+}


Property changes on: trunk/ovaldi/src/ComponentFactory.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/ComponentFactory.h
===================================================================
--- trunk/ovaldi/src/ComponentFactory.h	                        (rev 0)
+++ trunk/ovaldi/src/ComponentFactory.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,56 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef COMPONENTFACTORY_H
+#define COMPONENTFACTORY_H
+
+#include "VariableComponent.h"
+#include "LiteralComponent.h"
+#include "ObjectComponent.h"
+#include "SubstringFunction.h"
+#include "ConcatFunction.h"
+#include "EscapeRegexFunction.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	This class is a Factory class for getting parsed components of a local varaible.
+	This class allows for a single interface to all types of components defined 
+	in the oval definitions schema.
+*/
+class ComponentFactory {
+
+public:
+	/** Return the appropriate component based on the specifed component element.*/
+	static AbsComponent* GetComponent(DOMElement* componentElm);
+};
+
+#endif


Property changes on: trunk/ovaldi/src/ComponentFactory.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/ComponentValue.cpp
===================================================================
--- trunk/ovaldi/src/ComponentValue.cpp	                        (rev 0)
+++ trunk/ovaldi/src/ComponentValue.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,158 @@
+//
+// $Id: ComponentValue.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "ComponentValue.h"
+
+//****************************************************************************************//
+//								ComponentValue Class									  //	
+//****************************************************************************************//
+ComponentValue::ComponentValue(OvalEnum::Flag flag, StringVector* values, StringVector* msgs) {
+
+	this->SetFlag(flag);
+	this->SetValues(values);
+	this->SetMessages(msgs);
+}
+
+ComponentValue::~ComponentValue() {
+
+	delete values;
+	values = NULL;
+	delete msgs;
+	msgs = NULL;
+
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+OvalEnum::Flag ComponentValue::GetFlag() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the flag field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->flag;
+}
+
+void ComponentValue::SetFlag(OvalEnum::Flag flag) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the flag field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->flag = flag;
+}
+
+StringVector* ComponentValue::GetValues() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the values field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->values;
+}
+
+void ComponentValue::SetValues(StringVector* values) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the values field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->values = values;
+}
+
+void ComponentValue::AppendValue(string value) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Add a value to the end of the values vector
+	//
+	// -----------------------------------------------------------------------
+
+	this->values->push_back(value);
+}
+
+StringVector* ComponentValue::GetMessages() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the msgs field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->msgs;
+}
+
+void ComponentValue::SetMessages(StringVector* msgs) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the msgs field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->msgs = msgs;
+}
+
+void ComponentValue::AppendMessage(string msg) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Add a msg to the end of the msgs vector
+	//
+	// -----------------------------------------------------------------------
+
+	this->msgs->push_back(msg);
+}
+
+void ComponentValue::AppendMessages(StringVector* newMsgs) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Add a newMsgs to the end of the msgs vector
+	//
+	// -----------------------------------------------------------------------
+
+	StringVector::iterator iterator;
+	for(iterator = newMsgs->begin(); iterator != newMsgs->end(); iterator++) {
+		this->AppendMessage((*iterator));
+	}
+}
+
+


Property changes on: trunk/ovaldi/src/ComponentValue.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/ComponentValue.h
===================================================================
--- trunk/ovaldi/src/ComponentValue.h	                        (rev 0)
+++ trunk/ovaldi/src/ComponentValue.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,76 @@
+//
+// $Id: ComponentValue.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef COMPONENTVALUE_H
+#define COMPONENTVALUE_H
+
+#include "Common.h"
+#include "OvalEnum.h"
+
+using namespace std;
+
+
+/**
+	This class represents a the value of a variable component.
+	Component values are used in when computing the values of Variables.
+	Each Component has a Vector of string values and a flag used to indicate 
+	the status of the component.
+*/
+class ComponentValue {
+public:
+	/** Create a complete ComponentValue object */
+	ComponentValue(OvalEnum::Flag flag = OvalEnum::FLAG_ERROR, StringVector* value = new StringVector(), StringVector* msgs = new StringVector());
+	/** make sure the vectors are deleted. */
+	~ComponentValue();
+
+	StringVector* GetValues();
+	void SetValues(StringVector* values);
+	void AppendValue(string value);
+
+	OvalEnum::Flag GetFlag();
+	void SetFlag(OvalEnum::Flag flag);
+
+	StringVector* GetMessages();
+	void SetMessages(StringVector* msgs);
+	void AppendMessage(string msg);
+	void AppendMessages(StringVector* newMsgs);
+
+
+private:
+	OvalEnum::Flag flag;
+	StringVector* values;
+	StringVector* msgs;
+
+};
+
+typedef vector < ComponentValue*, allocator<ComponentValue*> > ComponentValueVector;
+
+#endif


Property changes on: trunk/ovaldi/src/ComponentValue.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/ConcatFunction.cpp
===================================================================
--- trunk/ovaldi/src/ConcatFunction.cpp	                        (rev 0)
+++ trunk/ovaldi/src/ConcatFunction.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,154 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "ConcatFunction.h"
+
+//****************************************************************************************//
+//								Component Class											  //	
+//****************************************************************************************//
+ConcatFunction::ConcatFunction() : AbsFunctionComponent() {
+}
+
+ConcatFunction::~ConcatFunction() {
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+ComponentValue* ConcatFunction::ComputeValue() {
+
+	ComponentValue* values = new ComponentValue();
+
+	values = this->ProcessComponents(0);
+
+	return values;	
+}
+
+ComponentValue* ConcatFunction::ProcessComponents(unsigned int index) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	recursively process all componets of this function
+	// -----------------------------------------------------------------------
+
+	if(this->GetComponents()->size()-1 == index) {
+		// reached the end of the line just return all this components values in a vector
+		ComponentValue* results = this->GetComponents()->at(index)->ComputeValue();
+		return results;
+	} else {
+		// make recursive call
+		ComponentValue* values = this->ProcessComponents(index+1);
+
+		// get the set of current values
+		ComponentValue* currentValues = this->GetComponents()->at(index)->ComputeValue();
+
+		// Create a object to store the results of the concat
+		ComponentValue* results = new ComponentValue();
+		// combine the flag values and set the new value
+		IntVector* flags = new IntVector();
+		flags->push_back(values->GetFlag());
+		flags->push_back(currentValues->GetFlag());
+		results->SetFlag(OvalEnum::CombineFlags(flags));
+		delete flags;
+		
+		// loop over current values
+		StringVector::iterator currentIterator;
+		for(currentIterator = currentValues->GetValues()->begin(); currentIterator != currentValues->GetValues()->end(); currentIterator++) {
+		
+			// loop over results of recursive call
+			StringVector::iterator iterator;
+			for(iterator = values->GetValues()->begin(); iterator != values->GetValues()->end(); iterator++) {
+				// concat the values
+				string tmpStr = (*currentIterator) + (*iterator);
+				results->AppendValue(tmpStr);
+			}
+		}
+
+		// make sure all the messages are passed along tot he results
+		results->AppendMessages(values->GetMessages());
+		results->AppendMessages(currentValues->GetMessages());
+
+		delete currentValues;
+		delete values;		
+
+		return results;
+	}
+}
+
+void ConcatFunction::Parse(DOMElement* componentElm) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	parse the component element
+	// -----------------------------------------------------------------------
+    
+	// Loop through all child elements
+	DOMNodeList *componentElms = componentElm->getChildNodes();
+	unsigned int index = 0;
+	while(index < componentElms->getLength()) {
+		DOMNode *tmpNode = componentElms->item(index);
+		if (tmpNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+			DOMElement *childElm = (DOMElement*)tmpNode;
+
+			// Call the ComponentFactory
+			AbsComponent* absComponent = ComponentFactory::GetComponent(childElm);
+			// store the returned component
+			this->AppendComponent(absComponent);
+		}
+		index ++;
+	}
+}
+
+VariableValueVector* ConcatFunction::GetVariableValues() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	return the variable values used to compute this function's value
+	// -----------------------------------------------------------------------
+	
+	VariableValueVector* values = new VariableValueVector();
+	AbsComponentVector* components = this->GetComponents();
+	AbsComponentVector::iterator iterator;
+	for(iterator = components->begin(); iterator != components->end(); iterator++) {
+		AbsComponent* component = (AbsComponent*)(*iterator);
+		VariableValueVector* tmp = component->GetVariableValues();
+		VariableValueVector::iterator varIterator;
+		for(varIterator = tmp->begin(); varIterator != tmp->end(); varIterator++) {
+			values->push_back((*varIterator));
+		}
+		// BUG - These can ot currenrtly be deleted. 
+		// The code is no consistant here. In places a new vector is returned
+		// in others a reference to a vector that is managed by other code is returned.
+		//delete tmp;
+		//tmp = NULL;
+	}
+
+	return values;
+}


Property changes on: trunk/ovaldi/src/ConcatFunction.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/ConcatFunction.h
===================================================================
--- trunk/ovaldi/src/ConcatFunction.h	                        (rev 0)
+++ trunk/ovaldi/src/ConcatFunction.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,57 @@
+//
+// $Id: ConcatFunction.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef CONCATFUNCTION_H
+#define CONCATFUNCTION_H
+
+#include "AbsFunctionComponent.h"
+#include "ComponentFactory.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	This class represents a ConcatFunction component in a local_variable in the oval definition schema.
+*/
+class ConcatFunction : public AbsFunctionComponent {
+public:
+	ConcatFunction();
+	~ConcatFunction();
+
+	void Parse(DOMElement* componentElm); 
+	ComponentValue* ComputeValue();
+
+	VariableValueVector* GetVariableValues();
+
+	ComponentValue* ProcessComponents(unsigned int index);
+};
+
+#endif


Property changes on: trunk/ovaldi/src/ConcatFunction.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/ConstantVariable.cpp
===================================================================
--- trunk/ovaldi/src/ConstantVariable.cpp	                        (rev 0)
+++ trunk/ovaldi/src/ConstantVariable.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,122 @@
+//
+// $Id: ConstantVariable.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "ConstantVariable.h"
+
+//****************************************************************************************//
+//									ConstantVariable Class								  //	
+//****************************************************************************************//
+
+ConstantVariable::ConstantVariable(string id, string name, int version, OvalEnum::Datatype datatype, StringVector* msgs) : AbsVariable (id, name, version, datatype, msgs) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a complete ConstantVariable
+	//
+	// -----------------------------------------------------------------------
+
+}
+
+ConstantVariable::~ConstantVariable() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	// -----------------------------------------------------------------------
+
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+void ConstantVariable::Parse(DOMElement* constantVariableElm) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Parse the provided ConstantVariable element into a ConstantVariable
+	//
+	// -----------------------------------------------------------------------
+
+	this->SetId(XmlCommon::GetAttributeByName(constantVariableElm, "id"));
+	this->SetDatatype(OvalEnum::ToDatatype(XmlCommon::GetAttributeByName(constantVariableElm, "datatype")));
+	string versionStr = XmlCommon::GetAttributeByName(constantVariableElm, "version");
+	int version;
+	if(versionStr.compare("") == 0) {
+		version = 1;
+	} else {
+		version = atoi(versionStr.c_str());
+	}
+	this->SetVersion(version);
+
+	// Get all the value elements' values
+	bool foundValue = false;
+	DOMNodeList *constantVariableElmChildren = constantVariableElm->getChildNodes();
+	unsigned int index = 0;
+	while(index < constantVariableElmChildren->getLength()) {
+		DOMNode *tmpNode = constantVariableElmChildren->item(index);
+		if (tmpNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+			DOMElement *childElm = (DOMElement*)tmpNode;
+
+			if(XmlCommon::GetElementName(childElm).compare("value") == 0) {
+				foundValue = true;
+				string elmValue = XmlCommon::GetDataNodeValue(childElm);
+				if(elmValue.compare("") != 0) {
+					// get and save the value.
+					VariableValue* varValue = new VariableValue(this->GetId(), elmValue);
+					this->AppendVariableValue(varValue);
+					this->SetFlag(OvalEnum::FLAG_COMPLETE);
+				} else {
+					this->SetFlag(OvalEnum::FLAG_ERROR);
+					this->AppendMessage("Error a value element with an empty string value was found for the constant variable.");
+					return;
+				}
+			}
+		}
+		index ++;
+	}
+	if(!foundValue) {
+		this->SetFlag(OvalEnum::FLAG_ERROR);
+		this->AppendMessage("Error a value was not found for the constant variable.");
+	}
+
+}
+
+VariableValueVector* ConstantVariable::GetVariableValues() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	return the variable values used to compute this variable's value
+	//	in this case just an empty vector.
+	// -----------------------------------------------------------------------
+	
+	VariableValueVector* values = new VariableValueVector();
+
+	return values;
+}


Property changes on: trunk/ovaldi/src/ConstantVariable.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/ConstantVariable.h
===================================================================
--- trunk/ovaldi/src/ConstantVariable.h	                        (rev 0)
+++ trunk/ovaldi/src/ConstantVariable.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,53 @@
+//
+// $Id: ConstantVariable.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef CONSTANTVARIABLE_H
+#define CONSTANTVARIABLE_H
+
+#include "AbsVariable.h"
+
+using namespace std;
+
+/**
+	This class represents an constant_variable in the oval definition schema.
+*/
+class ConstantVariable : public AbsVariable {
+public:
+
+	ConstantVariable(string id = "", string name = "constant_variable", int version = 1, OvalEnum::Datatype datatype = OvalEnum::DATATYPE_STRING, StringVector* msgs = new StringVector());
+	~ConstantVariable();
+
+	void Parse(DOMElement* constantVariableElm);
+
+	VariableValueVector* GetVariableValues();	
+};
+
+#endif


Property changes on: trunk/ovaldi/src/ConstantVariable.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Criteria.cpp
===================================================================
--- trunk/ovaldi/src/Criteria.cpp	                        (rev 0)
+++ trunk/ovaldi/src/Criteria.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,255 @@
+//
+// $Id: Criteria.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "Criteria.h"
+
+//****************************************************************************************//
+//								AbsCriteria Class										  //	
+//****************************************************************************************//
+Criteria::Criteria(bool negate, OvalEnum::ResultEnumeration result, string comment, OvalEnum::Operator op) 
+					: AbsCriteria(negate, result) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a complete Criteria object
+	//
+	// -----------------------------------------------------------------------
+
+	this->SetOperator(op);
+}
+
+Criteria::~Criteria() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Delete all child criteria
+	//
+	// -----------------------------------------------------------------------
+
+	AbsCriteria* current = NULL;
+	while(this->childCriteria.size() != 0) {
+		current = this->childCriteria[this->childCriteria.size()-1];
+	  	this->childCriteria.pop_back();
+	  	delete current;
+	  	current = NULL;
+	}
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+OvalEnum::Operator Criteria::GetOperator() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the operator field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->op;
+}
+
+void Criteria::SetOperator(OvalEnum::Operator op) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the operator field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->op = op;
+}
+
+AbsCriteriaVector* Criteria::GetChildCriteria() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the childCriteria field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return &this->childCriteria;
+}
+
+void Criteria::SetChildCriteria(AbsCriteriaVector* childCriteria) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the childCriteria field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->childCriteria = (*childCriteria);
+}
+
+void Criteria::AppendChildCriteria(AbsCriteria* childCriteria) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the childCriteria field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->childCriteria.push_back(childCriteria);
+}
+
+void Criteria::Write(DOMElement* parentElm) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	writes valid criteria to result file
+	//	calls AbsCritiera->Write() on all child criteria
+	//
+	// -----------------------------------------------------------------------
+
+	// get the parent document
+	XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* resultDoc = parentElm->getOwnerDocument();
+
+	// create a new criteria element
+	DOMElement* criteriaElm = XmlCommon::AddChildElement(resultDoc, parentElm, "criteria");
+
+	// add the attributes
+	XmlCommon::AddAttribute(criteriaElm, "operator", OvalEnum::OperatorToString(this->GetOperator()));
+	string negateStr = Common::ToString(this->GetNegate());
+	if(negateStr.compare("true") == 0) {
+		XmlCommon::AddAttribute(criteriaElm, "negate", negateStr);
+	}	
+
+	XmlCommon::AddAttribute(criteriaElm, "result", OvalEnum::ResultToString(this->GetResult()));
+	
+
+	// loop through all childCriteria and call write method
+	AbsCriteriaVector::iterator iterator;
+	for(iterator = this->GetChildCriteria()->begin(); iterator != this->GetChildCriteria()->end(); iterator++) {
+		(*iterator)->Write(criteriaElm);
+	}
+}
+
+void Criteria::Parse(DOMElement* criteriaElm) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	parses criteria elm to a criteria obj
+	//	calls AbsCriteria->Parse() on all child elements
+	//
+	// -----------------------------------------------------------------------
+
+	// get the attributes
+	string negateStr = XmlCommon::GetAttributeByName(criteriaElm, "negate");
+	if(negateStr.compare("") == 0 || negateStr.compare("false") == 0) {
+        this->SetNegate(false);
+	} else {
+	    this->SetNegate(true);
+	}
+	
+	this->SetOperator(OvalEnum::ToOperator(XmlCommon::GetAttributeByName(criteriaElm, "operator")));
+
+	// loop over all child elements and call AbsCriteria-.Parse
+	DOMNodeList *criteriaChildren = criteriaElm->getChildNodes();
+	unsigned int index = 0;
+	while(index < criteriaChildren->getLength()) {
+		DOMNode *tmpNode = criteriaChildren->item(index);
+
+		//	only concerned with ELEMENT_NODEs
+		if (tmpNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+			DOMElement *criteriaChildElm = (DOMElement*)tmpNode;
+			
+			AbsCriteria* childCriteria = NULL;
+
+			//	get the name of the child and construct the appropriate criteria type
+			string childName = XmlCommon::GetElementName(criteriaChildElm);
+			if(childName.compare("extend_definition") == 0) {
+				childCriteria = new ExtendedDefinition();
+			} else if(childName.compare("criterion") == 0) {
+				childCriteria = new Criterion();
+			} else if(childName.compare("criteria") == 0) {
+				childCriteria = new Criteria();
+			}
+			childCriteria->Parse(criteriaChildElm);
+			this->AppendChildCriteria(childCriteria);
+		}
+		index ++;
+	}
+}
+
+OvalEnum::ResultEnumeration Criteria::Analyze() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	calls AbsCriteria->Analyze() on all child criteria
+	//	applies operator 
+	//	applies negate attribute
+	//	saves and returns result
+	// -----------------------------------------------------------------------
+
+	IntVector results;
+
+	// loop through all childCriteria and call write method
+	AbsCriteriaVector::iterator iterator;
+	for(iterator = this->GetChildCriteria()->begin(); iterator != this->GetChildCriteria()->end(); iterator++) {
+		results.push_back((*iterator)->Analyze());
+	}
+
+	// apply the operator
+	OvalEnum::ResultEnumeration currentResult = OvalEnum::CombineResultsByOperator(&results, this->GetOperator());
+
+	// apply the negate attribute and save the result
+	if(this->GetNegate()) {
+		this->SetResult(OvalEnum::NegateResult(currentResult));
+	} else {
+		this->SetResult(currentResult);
+	}
+
+	return this->GetResult();
+}
+
+OvalEnum::ResultEnumeration Criteria::NotEvaluated() {
+
+	IntVector results;
+
+	// loop through all childCriteria and call write method
+	AbsCriteriaVector::iterator iterator;
+	for(iterator = this->GetChildCriteria()->begin(); iterator != this->GetChildCriteria()->end(); iterator++) {
+		results.push_back((*iterator)->NotEvaluated());
+	}
+
+	// apply the operator
+	OvalEnum::ResultEnumeration currentResult = OvalEnum::CombineResultsByOperator(&results, this->GetOperator());
+
+	// apply the negate attribute and save the result
+	if(this->GetNegate()) {
+		this->SetResult(OvalEnum::NegateResult(currentResult));
+	} else {
+		this->SetResult(currentResult);
+	}
+
+	return this->GetResult();
+}


Property changes on: trunk/ovaldi/src/Criteria.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Criteria.h
===================================================================
--- trunk/ovaldi/src/Criteria.h	                        (rev 0)
+++ trunk/ovaldi/src/Criteria.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,77 @@
+//
+// $Id: Criteria.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef CRITERIA_H
+#define CRITERIA_H
+
+#include "AbsCriteria.h"
+#include "ExtendedDefinition.h"
+#include "Criterion.h"
+#include "Analyzer.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+class AbsCriteria;
+typedef vector < AbsCriteria*, allocator<AbsCriteria*> > AbsCriteriaVector;
+
+/**
+	This class represent criteria in an oval definition.
+	Criteria objects may have any number of child AbsCriteria abjects.
+*/
+class Criteria : public AbsCriteria {
+
+public:
+	Criteria(bool negate = false, OvalEnum::ResultEnumeration result = OvalEnum::RESULT_ERROR, string comment = "", OvalEnum::Operator op = OvalEnum::OPERATOR_AND);
+	~Criteria();
+
+	void Write(DOMElement* parent);
+	void Parse(DOMElement* criteriaElm);
+	OvalEnum::ResultEnumeration Analyze();
+	OvalEnum::ResultEnumeration NotEvaluated();
+
+	string GetComment();
+	void SetComment(string comment);
+
+	OvalEnum::Operator GetOperator();
+	void SetOperator(OvalEnum::Operator op);
+
+	AbsCriteriaVector* GetChildCriteria();
+	void SetChildCriteria(AbsCriteriaVector* childCriteria);
+	void AppendChildCriteria(AbsCriteria* childCriteria);
+
+private:
+	string comment;
+	AbsCriteriaVector childCriteria;
+	OvalEnum::Operator op;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/Criteria.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Criterion.cpp
===================================================================
--- trunk/ovaldi/src/Criterion.cpp	                        (rev 0)
+++ trunk/ovaldi/src/Criterion.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,132 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "Criterion.h"
+
+//****************************************************************************************//
+//								Criterion Class											  //	
+//****************************************************************************************//
+Criterion::Criterion(bool negate, OvalEnum::ResultEnumeration result, Test* testRef) 
+					: AbsCriteria(negate, result) {
+
+	this->SetTestRef(testRef);
+}
+
+Criterion::~Criterion() {
+
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+
+Test* Criterion::GetTestRef() {
+
+	return this->testRef;
+}
+
+void Criterion::SetTestRef(Test* testRef) {
+
+	this->testRef = testRef;
+}
+
+void Criterion::Write(DOMElement* parentElm) {
+
+	// get the parent document
+	XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* resultDoc = parentElm->getOwnerDocument();
+
+	// create a new criteria element
+	DOMElement* criterionElm = XmlCommon::AddChildElement(resultDoc, parentElm, "criterion");
+
+	// add the attributes
+	XmlCommon::AddAttribute(criterionElm, "test_ref", this->GetTestRef()->GetId());
+
+	XmlCommon::AddAttribute(criterionElm, "version", Common::ToString(this->GetTestRef()->GetVersion()));
+
+	if(this->GetTestRef()->GetVariableInstance() != 1) {
+		XmlCommon::AddAttribute(criterionElm, "variable_instance", Common::ToString(this->GetTestRef()->GetVariableInstance()));
+	}
+
+	string negateStr = Common::ToString(this->GetNegate());
+	if(negateStr.compare("true") == 0) {
+		XmlCommon::AddAttribute(criterionElm, "negate", negateStr);
+	}
+
+	XmlCommon::AddAttribute(criterionElm, "result", OvalEnum::ResultToString(this->GetResult()));
+
+	// write the test ref
+	this->GetTestRef()->Write(Analyzer::GetResultsSystemTestsElm());
+}
+
+void Criterion::Parse(DOMElement* criterionElm) {
+	
+	// get the attributes
+	string negateStr = XmlCommon::GetAttributeByName(criterionElm, "negate");
+	if(negateStr.compare("") == 0 || negateStr.compare("false") == 0) {
+        this->SetNegate(false);
+	} else {
+	    this->SetNegate(true);
+	}
+
+	string testRefStr = XmlCommon::GetAttributeByName(criterionElm, "test_ref");
+	Test* testRef = Test::GetTestById(testRefStr);
+	
+	this->SetTestRef(testRef);
+}
+
+OvalEnum::ResultEnumeration Criterion::Analyze() {
+
+	// analyze the test
+	OvalEnum::ResultEnumeration currentResult = this->GetTestRef()->Analyze();
+
+	// apply the negate attribute and save the result
+	if(this->GetNegate()) {
+		this->SetResult(OvalEnum::NegateResult(currentResult));
+	} else {
+		this->SetResult(currentResult);
+	}
+
+	return this->GetResult();
+}
+
+OvalEnum::ResultEnumeration Criterion::NotEvaluated() {
+
+	// analyze the test
+	OvalEnum::ResultEnumeration currentResult = this->GetTestRef()->NotEvaluated();
+
+	// apply the negate attribute and save the result
+	if(this->GetNegate()) {
+		this->SetResult(OvalEnum::NegateResult(currentResult));
+	} else {
+		this->SetResult(currentResult);
+	}
+
+	return this->GetResult();
+}


Property changes on: trunk/ovaldi/src/Criterion.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Criterion.h
===================================================================
--- trunk/ovaldi/src/Criterion.h	                        (rev 0)
+++ trunk/ovaldi/src/Criterion.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,82 @@
+//
+// $Id: Criterion.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef CRITERION_H
+#define CRITERION_H
+
+#include "Analyzer.h"
+#include "Test.h"
+#include "AbsCriteria.h"
+
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+class AbsCriteria;
+
+/**
+	This class represenets a criterion in an oval definition.
+*/
+class Criterion : public AbsCriteria {
+
+public:
+	/** Create a complete Criterion object. */
+	Criterion(bool negate = false, OvalEnum::ResultEnumeration result = OvalEnum::RESULT_ERROR, Test* testRef = NULL);
+	/** Empty destructor. */
+	~Criterion();
+
+	/** Writes a criterion element
+	    calls test->Write() on the test ref 
+	*/
+	void Write(DOMElement* parent);
+	/** Parses Criterion elm to a Criterion obj
+		calls test->Parse() on the Test Ref
+	*/
+	void Parse(DOMElement* CriterionElm);
+	/** Determine the result for the Criteria.
+		Calls test->Analyze()
+		Applies negate attribute
+	    Saves and return the result
+	*/
+	OvalEnum::ResultEnumeration Analyze();
+	/** Process the test as Not Evaluated. */
+	OvalEnum::ResultEnumeration NotEvaluated();
+
+	/** Return the testRef field's value. */
+	Test* GetTestRef();
+	/** Set the testRef field's value. */
+	void SetTestRef(Test* testRef);
+
+private:
+	Test* testRef;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/Criterion.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Definition.cpp
===================================================================
--- trunk/ovaldi/src/Definition.cpp	                        (rev 0)
+++ trunk/ovaldi/src/Definition.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,286 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "Definition.h"
+
+DefinitionMap Definition::processedDefinitionsMap;
+
+//****************************************************************************************//
+//								Definition Class										  //	
+//****************************************************************************************//
+Definition::Definition() {
+
+	this->SetId("");
+	this->SetCriteria(NULL);
+	this->SetResult(OvalEnum::RESULT_ERROR);
+	this->SetVariableInstance(1);
+	this->SetVersion(1);
+	this->SetWritten(false);
+	this->SetAnalyzed(false);
+}
+
+Definition::~Definition() {
+
+	delete this->GetCriteria();
+}
+
+
+// ***************************************************************************************	//
+//								 Static members												//
+// ***************************************************************************************	//
+
+Definition* Definition::GetDefinitionById(string definitionId) {
+	
+	Definition* definition = NULL;
+	
+	// Search the cache
+	definition = Definition::SearchCache(definitionId);
+
+	// if not found try to parse it.
+	if(definition == NULL) {
+
+		DOMElement* definitionsElm = XmlCommon::FindElementNS(DocumentManager::GetDefinitionDocument(), "definitions");
+		DOMElement* definitionElm = XmlCommon::FindElementByAttribute(definitionsElm, "id", definitionId);
+
+		if(definitionElm == NULL) {
+			throw Exception("Unable to find specified definition in oval-definition document. Definition id: " + definitionId);
+		}
+		definition = new Definition();
+		definition->Parse(definitionElm);
+	}
+	
+	return definition;
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+
+Criteria* Definition::GetCriteria() {
+
+	return this->criteria;
+}
+
+void Definition::SetCriteria(Criteria* criteria) {
+
+	this->criteria = criteria;
+}
+
+string Definition::GetId() {
+
+	return this->id;
+}
+
+void Definition::SetId(string id) {
+
+	this->id = id;
+}
+
+OvalEnum::ResultEnumeration Definition::GetResult() {
+
+	return this->result;
+}
+
+void Definition::SetResult(OvalEnum::ResultEnumeration result) {
+
+	this->result = result;
+}
+
+int Definition::GetVariableInstance() {
+
+	return this->variableInstance;
+}
+
+void Definition::SetVariableInstance(int variableInstance) {
+
+	this->variableInstance = variableInstance;
+}
+
+int Definition::GetVersion() {
+
+	return this->version;
+}
+
+void Definition::SetVersion(int version) {
+
+	this->version = version;
+}
+
+bool Definition::GetWritten() {
+
+	return this->written;
+}
+
+void Definition::SetWritten(bool written) {
+
+	this->written = written;
+}
+
+bool Definition::GetAnalyzed() {
+
+	return this->analyzed;
+}
+
+void Definition::SetAnalyzed(bool analyzed) {
+
+	this->analyzed = analyzed;
+}
+
+Definition* Definition::SearchCache(string id) {
+
+	Definition* cachedDef = NULL;
+
+	DefinitionMap::iterator iterator;
+	iterator = Definition::processedDefinitionsMap.find(id);
+	if(iterator != Definition::processedDefinitionsMap.end()) {
+		cachedDef = iterator->second;
+	} 
+
+	return cachedDef;
+}
+
+void Definition::ClearCache() {
+
+	DefinitionMap::iterator iterator;
+	for(iterator = Definition::processedDefinitionsMap.begin(); iterator != Definition::processedDefinitionsMap.end(); iterator++) {
+		
+		Definition* def = iterator->second;
+		delete def;
+	}
+	
+	Definition::processedDefinitionsMap.clear();
+}
+
+void Definition::Write(DOMElement* parentElm) {
+
+	if(!this->GetWritten()) {
+		this->SetWritten(true);
+
+		// get the parent document
+		XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* resultDoc = parentElm->getOwnerDocument();
+
+		// create a new definition element
+		DOMElement* definitionElm = XmlCommon::AddChildElement(resultDoc, parentElm, "definition");
+
+		// add the attributes
+		XmlCommon::AddAttribute(definitionElm, "definition_id", this->GetId());
+		XmlCommon::AddAttribute(definitionElm, "version", Common::ToString(this->GetVersion()));
+		XmlCommon::AddAttribute(definitionElm, "result", OvalEnum::ResultToString(this->GetResult()));
+
+		if(this->GetVariableInstance() != 1) {
+			XmlCommon::AddAttribute(definitionElm, "variable_instance", Common::ToString(this->GetVariableInstance()));
+		}	
+
+		// write the criteria
+		if(this->GetCriteria() != NULL) {
+			this->GetCriteria()->Write(definitionElm);
+		}
+	}
+}
+
+void Definition::Parse(DOMElement* definitionElm) {
+
+	// get id
+	string id = XmlCommon::GetAttributeByName(definitionElm, "id");
+
+	// get the attributes
+	this->SetId(XmlCommon::GetAttributeByName(definitionElm, "id"));
+	string versionStr = XmlCommon::GetAttributeByName(definitionElm, "version");
+	int versionInt = atoi(versionStr.c_str());
+	this->SetVersion(versionInt);
+	
+	// parse the criteria
+	DOMElement* criteriaElm = XmlCommon::FindElementNS(definitionElm, "criteria");
+	
+	if(criteriaElm != NULL) {
+		this->SetCriteria(new Criteria());	
+		this->GetCriteria()->Parse(criteriaElm);
+	}
+
+	Definition::processedDefinitionsMap.insert(DefinitionPair(this->GetId(), this));
+}
+
+OvalEnum::ResultEnumeration Definition::Analyze() {
+
+	if(!this->GetAnalyzed()) {
+		
+		if(this->GetCriteria() == NULL) {
+
+			this->SetResult(OvalEnum::RESULT_NOT_EVALUATED);
+	
+		} else {
+
+			// analyze the definition and save the result
+			OvalEnum::ResultEnumeration currentResult = this->GetCriteria()->Analyze();
+			this->SetResult(currentResult);
+		}
+		this->SetAnalyzed(true);
+
+		// make sure the results are stored only once
+		StringPair* pair = new StringPair();
+		pair->first = this->GetId();
+		pair->second = OvalEnum::ResultToString(this->GetResult());
+		if(result == OvalEnum::RESULT_TRUE) {
+			Analyzer::AppendTrueResult(pair);
+		} else if(result == OvalEnum::RESULT_FALSE) {
+			Analyzer::AppendFalseResult(pair);
+		} else if(result == OvalEnum::RESULT_UNKNOWN) {
+			Analyzer::AppendUnknownResult(pair);
+		} else if(result == OvalEnum::RESULT_NOT_APPLICABLE) {
+			Analyzer::AppendNotApplicableResult(pair);
+		} else if(result == OvalEnum::RESULT_NOT_EVALUATED) {
+			Analyzer::AppendNotEvaluatedResult(pair);
+		} else if(result == OvalEnum::RESULT_ERROR) {
+			Analyzer::AppendErrorResult(pair);
+		}
+	}
+
+	return this->GetResult();
+}
+
+OvalEnum::ResultEnumeration Definition::NotEvaluated() {
+
+	if(!this->GetAnalyzed()) {
+
+		// analyze the definition and save the result
+		OvalEnum::ResultEnumeration currentResult = this->GetCriteria()->NotEvaluated();
+		this->SetResult(currentResult);
+
+		this->SetAnalyzed(true);
+
+		// make sure the results are stored only once
+		StringPair* pair = new StringPair();
+		pair->first = this->GetId();
+		pair->second = OvalEnum::ResultToString(currentResult);
+		Analyzer::AppendNotEvaluatedResult(pair);
+	}
+
+	return this->GetResult();
+}


Property changes on: trunk/ovaldi/src/Definition.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Definition.h
===================================================================
--- trunk/ovaldi/src/Definition.h	                        (rev 0)
+++ trunk/ovaldi/src/Definition.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,178 @@
+//
+// $Id: Definition.h 4604 2008-01-04 13:47:42Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef DEFINITION_H
+#define DEFINITION_H
+#include <map>
+#include <utility>
+#include "AbsCriteria.h"
+#include "Criteria.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+class Criteria;
+
+class Definition;
+
+/**
+	A vector for storing Definition objects. 
+	Stores only pointers to the objects. 
+*/
+typedef vector < Definition*, allocator<Definition*> > DefinitionVector;
+
+/**	
+	A pair for storing definition ids and Definition objects together. 
+	Stores only pointers to the objects. 
+*/
+typedef pair <string, Definition* > DefinitionPair;
+
+/**	
+	A map for storing DefinitionPairs. 
+	Stores only pointers to the objects. 
+*/
+typedef map <string, Definition* > DefinitionMap;
+
+/**
+	This class represents an oval definition.
+	The Definition class provides methods for parsing a definition in an
+	oval definitions files, analyzing that definitions, and then writing that defition
+	with its analysis result to an oval results file.
+*/
+class Definition {
+
+public:
+
+	/** Create a complete Definition object */
+//	Definition();
+	/** 
+		Destroy the object. 
+		Call delete on the criteria element.
+	*/
+	~Definition();
+
+	/** 
+		Writes a Definition element to the results document.
+		Calls criteria->Write()
+	*/
+	void Write(DOMElement* parent);
+	/**
+		Parses a definition from a oval-definitions document.
+		Parses Definition elm to a Definition obj
+		Calls Criteria->Parse() on the Criteria elm
+		The final parsed Definition object is stored in the
+		cache of processed definitions.
+	*/
+	void Parse(DOMElement* DefinitionElm);
+
+	/** 
+		Analyze the definition and return the result.
+		Make sure not previously analyzed.
+		calls Criteria->Analyze()
+		saves and returns the result.
+	*/
+	OvalEnum::ResultEnumeration Analyze();
+
+	/** Set the result to NOT_EVALUATED. */
+	OvalEnum::ResultEnumeration NotEvaluated();
+
+	/** Return the version field's value. */
+	int GetVersion();
+	/** Set the version field's value. */
+	void SetVersion(int version);
+	
+	/** Return the variableInstance field's value. */
+	int GetVariableInstance();
+	/** Set the variableInstance field's value. */
+	void SetVariableInstance(int variableInstance);
+    
+	/** Return the result field's value. */
+	OvalEnum::ResultEnumeration GetResult();
+	/** Set the result field's value .*/
+	void SetResult(OvalEnum::ResultEnumeration result);
+
+	/** Return the criteria field's value. */
+	Criteria* GetCriteria();
+	/** Set the criteria field's value. */
+	void SetCriteria(Criteria* criteria);
+    
+	/** Return the id field's value. */
+	string GetId();
+	/** Set the id field's value. */
+	void SetId(string id);
+
+	/** Return the written field's value. */
+	bool GetWritten();
+	/** Set the written field's value. */
+	void SetWritten(bool written);
+
+	/** Return the analyzed field's value. */
+	bool GetAnalyzed();
+	/** Set the analyzed field's value. */
+	void SetAnalyzed(bool analyzed);
+
+	/** 
+		Search the cache of definitions for the specifed definition. 
+		@return Returns the cached Definition or NULL if not found.
+	*/
+	static Definition* SearchCache(string id);
+
+	/** Clear the cache of processed definitions. */
+	static void ClearCache();
+
+	/** Return a definition object for the specified definition id.
+		First the cache of Definitions is checked. If the definition is
+		not found in the cache the definition is looked up in the
+		oval-definitions document and parsed. Once parsed the new Definition
+		object is added to the cache.
+
+		If the definition is not found an exception is thrown. 
+	*/
+	static Definition* GetDefinitionById(string definitionId);
+
+private:
+
+	/** Create a complete Definition object */
+	Definition();
+
+	int version;
+	int variableInstance;
+	OvalEnum::ResultEnumeration result;
+	Criteria* criteria;
+	string id;
+	bool written;
+	bool analyzed;
+
+	static DefinitionMap processedDefinitionsMap;
+};
+
+
+#endif


Property changes on: trunk/ovaldi/src/Definition.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/DocumentManager.cpp
===================================================================
--- trunk/ovaldi/src/DocumentManager.cpp	                        (rev 0)
+++ trunk/ovaldi/src/DocumentManager.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,165 @@
+//
+// $Id: DocumentManager.cpp 4600 2008-01-03 16:49:12Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+
+#include "DocumentManager.h"
+
+//****************************************************************************************//
+//								DocumentManager Class									  //
+//****************************************************************************************//
+XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* DocumentManager::definitionDoc = NULL;
+XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* DocumentManager::systemCharacterisitcsDoc = NULL;
+XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* DocumentManager::resultDoc = NULL;
+XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* DocumentManager::externalVariableDoc = NULL;
+XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* DocumentManager::evaluationIdDoc = NULL;
+
+// ***************************************************************************************	//
+//								Public members												//
+// ***************************************************************************************	//
+XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* DocumentManager::GetDefinitionDocument() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	return the definition document
+	//
+	// -----------------------------------------------------------------------
+
+	return DocumentManager::definitionDoc;
+}
+
+XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* DocumentManager::GetResultDocument() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	return the resultDoc document
+	//
+	// -----------------------------------------------------------------------
+
+	return DocumentManager::resultDoc;
+}
+
+XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* DocumentManager::GetSystemCharacterisitcsDocument() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	return the systemCharacterisitcsDoc document
+	//
+	// -----------------------------------------------------------------------
+
+	return DocumentManager::systemCharacterisitcsDoc;
+}
+
+XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* DocumentManager::GetExternalVariableDocument() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	return the externalVariableDoc document
+	//	If the document has not yet been parsed parse it
+	//
+	// -----------------------------------------------------------------------
+
+	if(DocumentManager::externalVariableDoc == NULL) {
+		try {
+			XmlProcessor *processor = XmlProcessor::Instance();
+			DocumentManager::externalVariableDoc = processor->ParseFile(Common::GetExternalVariableFile());
+		} catch (Exception ex) {
+			Log::Debug("Error while parsing external variable file: " + Common::GetExternalVariableFile() + " " + ex.GetErrorMessage());
+			throw ex;
+		} catch (...) {
+			Log::Debug("An unknown error occured while parsing external variable file: " + Common::GetExternalVariableFile());
+			throw Exception("An unknown error occured while parsing external variable file: " + Common::GetExternalVariableFile());
+		}
+	}
+
+	return DocumentManager::externalVariableDoc;
+}
+
+XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* DocumentManager::GetEvaluationIdDocument() {
+
+	if(DocumentManager::evaluationIdDoc == NULL) {
+		try {
+			XmlProcessor *processor = XmlProcessor::Instance();
+			DocumentManager::evaluationIdDoc = processor->ParseFile(Common::GetDefinitionIdsFile());
+		} catch (Exception ex) {
+			Log::Debug("Error while parsing evaluation id file: " + Common::GetDefinitionIdsFile() + " " + ex.GetErrorMessage());
+			throw ex;
+		} catch (...) {
+			Log::Debug("An unknown error occured while parsing evaluation id file: " + Common::GetDefinitionIdsFile());
+			throw Exception("An unknown error occured while parsing evaluation id file: " + Common::GetDefinitionIdsFile());
+		}
+	}
+
+	return DocumentManager::evaluationIdDoc;
+}
+
+void DocumentManager::SetSystemCharacterisitcsDocument(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* sc) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	set the systemCharacterisitcsDoc document
+	//
+	// -----------------------------------------------------------------------
+
+	DocumentManager::systemCharacterisitcsDoc = sc;
+}
+
+void DocumentManager::SetResultDocument(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* r) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	set the resultDoc document
+	//
+	// -----------------------------------------------------------------------
+
+	DocumentManager::resultDoc = r;
+}
+
+void DocumentManager::SetDefinitionDocument(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* d) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	set the definitionDoc document
+	//
+	// -----------------------------------------------------------------------
+
+	DocumentManager::definitionDoc = d;
+}
+
+void DocumentManager::SetExternalVariableDocument(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* d) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	set the externalVariableDoc document
+	//
+	// -----------------------------------------------------------------------
+
+	DocumentManager::externalVariableDoc = d;
+}


Property changes on: trunk/ovaldi/src/DocumentManager.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/DocumentManager.h
===================================================================
--- trunk/ovaldi/src/DocumentManager.h	                        (rev 0)
+++ trunk/ovaldi/src/DocumentManager.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,80 @@
+//
+// $Id: DocumentManager.h 4602 2008-01-03 17:29:35Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+#ifndef DOCUMENTMANAGER_H
+#define DOCUMENTMANAGER_H
+
+//	required xerces includes
+//#include <xercesc/dom/DOM.hpp>
+//#include <xercesc/dom/DOMAttr.hpp>
+//#include <xercesc/dom/DOMDocument.hpp>
+//#include <xercesc/dom/DOMNodeList.hpp>
+//#include <xercesc/util/XMLString.hpp>
+//#include <xercesc/util/PlatformUtils.hpp>
+//#include <xercesc/parsers/AbstractDOMParser.hpp>
+
+#include "XmlProcessor.h"
+#include "Common.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	This class manages all documents in the application.
+	Managing all documents in a single location provides a unform method for 
+	fetching a document.
+*/
+class DocumentManager {
+public:
+	static XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* GetDefinitionDocument();
+	static XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* GetSystemCharacterisitcsDocument();
+	static XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* GetResultDocument();
+	static XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* GetExternalVariableDocument();
+
+	/** Get the evaluation id docuement.
+		If the evaluation id doc has not been parsed parse it.
+		@return Returns a DOMDocument.
+	*/
+	static XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* GetEvaluationIdDocument();
+
+	static void SetDefinitionDocument(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument*);
+	static void SetSystemCharacterisitcsDocument(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument*);
+	static void SetResultDocument(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument*);
+	static void SetExternalVariableDocument(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument*);
+
+private:
+	static XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* systemCharacterisitcsDoc;
+	static XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* definitionDoc;
+	static XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* resultDoc;
+	static XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* externalVariableDoc;
+	static XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* evaluationIdDoc;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/DocumentManager.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/EntityComparator.cpp
===================================================================
--- trunk/ovaldi/src/EntityComparator.cpp	                        (rev 0)
+++ trunk/ovaldi/src/EntityComparator.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,640 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "EntityComparator.h"
+
+//****************************************************************************************//
+//								EntityComparator Class									  //	
+//****************************************************************************************//
+OvalEnum::ResultEnumeration EntityComparator::CompareBinary(OvalEnum::Operation op, string defValue, string scValue) {
+
+	OvalEnum::ResultEnumeration result = OvalEnum::RESULT_ERROR;
+
+	if(op == OvalEnum::OPERATION_EQUALS) {
+		if(defValue.compare(scValue) == 0) {
+			result = OvalEnum::RESULT_TRUE;
+		} else {
+			result = OvalEnum::RESULT_FALSE;
+		}
+	} else if(op == OvalEnum::OPERATION_NOT_EQUAL) {
+		if(defValue.compare(scValue) != 0) {
+			result = OvalEnum::RESULT_TRUE;
+		} else {
+			result = OvalEnum::RESULT_FALSE;			
+		}
+	} else {
+		throw Exception("Error: Invalid operaion. operation: " + OvalEnum::OperationToString(op));
+	} 
+
+	return result;
+}
+
+OvalEnum::ResultEnumeration EntityComparator::CompareBoolean(OvalEnum::Operation op, string defValue, string scValue) {
+
+	OvalEnum::ResultEnumeration result = OvalEnum::RESULT_ERROR;
+
+	bool defBoolValue = false;
+	bool scBoolValue = false;
+
+	if(defValue.compare("true") == 0 || defValue.compare("1") == 0) {
+		defBoolValue = true;
+	} else if(defValue.compare("false") == 0 || defValue.compare("0") == 0) {
+		defBoolValue = false;
+	} else {
+		throw Exception("Error: Invalid boolean value on definition entity. " + defValue);
+	}
+
+	if(scValue.compare("true") == 0 || scValue.compare("1") == 0) {
+		scBoolValue = true;
+	} else if(scValue.compare("false") == 0 || scValue.compare("0") == 0) {
+		scBoolValue = false;
+	} else {
+		throw Exception("Error: Invalid boolean value on system characteristics item entity. " + scValue);
+	}
+
+	if(op == OvalEnum::OPERATION_EQUALS) {
+		if(defBoolValue == scBoolValue) {
+			result = OvalEnum::RESULT_TRUE;
+		} else {
+			result = OvalEnum::RESULT_FALSE;
+		}
+	} else if(op == OvalEnum::OPERATION_NOT_EQUAL) {
+		if(defBoolValue != scBoolValue) {
+			result = OvalEnum::RESULT_FALSE;
+		} else {
+			result = OvalEnum::RESULT_TRUE;
+		}
+	} else {
+		throw Exception("Error: Invalid operaion. operation: " + OvalEnum::OperationToString(op));
+	} 	
+
+	return result;
+}
+
+OvalEnum::ResultEnumeration EntityComparator::CompareEvrString(OvalEnum::Operation op, string defValue, string scValue) {
+	
+	OvalEnum::ResultEnumeration result = OvalEnum::RESULT_ERROR;
+
+	string installedEpochStr = EntityComparator::GetEpochFromEVR(scValue);
+	string installedVersionStr = EntityComparator::GetVersionFromEVR(scValue);
+	string installedReleaseStr = EntityComparator::GetReleaseFromEVR(scValue);
+	string defEpochStr = EntityComparator::GetEpochFromEVR(defValue);
+	string defVersionStr = EntityComparator::GetVersionFromEVR(defValue);
+	string defReleaseStr = EntityComparator::GetReleaseFromEVR(defValue);
+
+	int sense = 1; // default to later
+
+	int defEpochInt = atoi(defEpochStr.c_str());
+	int installedEpochInt = atoi(installedEpochStr.c_str());
+
+	if(defEpochInt == installedEpochInt) {
+
+		sense = rpmvercmp(installedVersionStr.c_str(),defVersionStr.c_str());
+		if (sense == 0) {
+			sense = rpmvercmp(installedReleaseStr.c_str(),defReleaseStr.c_str());
+		}
+	} else {
+		
+		sense = (installedEpochInt > defEpochInt)? 1 : -1;
+
+	}
+
+	// convert sense value to a result based on operator
+	if(op == OvalEnum::OPERATION_EQUALS) {
+		if(sense == 0) {
+			result = OvalEnum::RESULT_TRUE;
+		} else {
+			result = OvalEnum::RESULT_FALSE;
+		}
+	} else if(op == OvalEnum::OPERATION_NOT_EQUAL) {
+		if(sense == 0) {
+			result = OvalEnum::RESULT_FALSE;
+		} else {
+			result = OvalEnum::RESULT_TRUE;
+		}
+	} else if(op == OvalEnum::OPERATION_LESS_THAN) {
+		if(sense == -1) {
+			result = OvalEnum::RESULT_TRUE;
+		} else {
+			result = OvalEnum::RESULT_FALSE;
+		}
+	} else if(op == OvalEnum::OPERATION_LESS_THAN_OR_EQUAL) {		
+		if(sense == -1 || sense == 0) {
+			result = OvalEnum::RESULT_TRUE;
+		} else {
+			result = OvalEnum::RESULT_FALSE;
+		}
+	} else if(op == OvalEnum::OPERATION_GREATER_THAN) {
+		if(sense == 1) {
+			result = OvalEnum::RESULT_TRUE;
+		} else {
+			result = OvalEnum::RESULT_FALSE;
+		}
+	} else if(op == OvalEnum::OPERATION_GREATER_THAN_OR_EQUAL) {
+		if(sense == 1 || sense == 0) {
+			result = OvalEnum::RESULT_TRUE;
+		} else {
+			result = OvalEnum::RESULT_FALSE;
+		}
+	//} else if(op == OvalEnum::OPERATION_PATTERN_MATCH) {
+	//	REGEX myRegex;
+	//	if(myRegex.IsMatch(defValue.c_str(), scValue.c_str())) {
+	//		result = OvalEnum::RESULT_TRUE;
+	//	} else {			
+	//		result = OvalEnum::RESULT_FALSE;
+	//	}
+	} else {
+		throw Exception("Error: Invalid operaion. operation: " + OvalEnum::OperationToString(op));
+	} 
+
+	return result;
+}
+
+/* compare alpha and numeric segments of two versions */
+/* return 1: a is newer than b */
+/*        0: a and b are the same version */
+/*       -1: b is newer than a */
+int EntityComparator::rpmvercmp(const char * a, const char * b) {
+    char oldch1, oldch2;
+    char * str1, * str2;
+    char * one, * two;
+    int rc;
+    int isnum;
+
+    /* easy comparison to see if versions are identical */
+    if (!strcmp(a, b)) return 0;
+
+// converted to malloc to run on windows.
+//    str1 = alloca(strlen(a) + 1);
+//    str2 = alloca(strlen(b) + 1);
+	  str1 = (char*)malloc(strlen(a)+1);
+	  str2 = (char*)malloc(strlen(b)+1);
+
+    strcpy(str1, a);
+    strcpy(str2, b);
+
+    one = str1;
+    two = str2;
+
+    /* loop through each version segment of str1 and str2 and compare them */
+    while (*one && *two) {
+        while (*one && !EntityComparator::xisalnum(*one)) one++;
+        while (*two && !EntityComparator::xisalnum(*two)) two++;
+
+        str1 = one;
+        str2 = two;
+
+        /* grab first completely alpha or completely numeric segment */
+        /* leave one and two pointing to the start of the alpha or numeric */
+        /* segment and walk str1 and str2 to end of segment */
+        if (EntityComparator::xisdigit(*str1)) {
+            while (*str1 && EntityComparator::xisdigit(*str1)) str1++;
+            while (*str2 && EntityComparator::xisdigit(*str2)) str2++;
+            isnum = 1;
+        } else {
+            while (*str1 && EntityComparator::xisalpha(*str1)) str1++;
+            while (*str2 && EntityComparator::xisalpha(*str2)) str2++;
+            isnum = 0;
+        }
+
+        /* save character at the end of the alpha or numeric segment */
+        /* so that they can be restored after the comparison */
+        oldch1 = *str1;
+        *str1 = '\0';
+        oldch2 = *str2;
+        *str2 = '\0';
+
+        /* take care of the case where the two version segments are */
+        /* different types: one numeric, the other alpha (i.e. empty) */
+        if (one == str1) return -1;     /* arbitrary */
+        /* XXX See patch #60884 (and details) from bugzilla #50977. */
+        if (two == str2) return (isnum ? 1 : -1);
+
+        if (isnum) {
+            /* this used to be done by converting the digit segments */
+            /* to ints using atoi() - it's changed because long  */
+            /* digit segments can overflow an int - this should fix that. */
+
+            /* throw away any leading zeros - it's a number, right? */
+            while (*one == '0') one++;
+            while (*two == '0') two++;
+
+            /* whichever number has more digits wins */
+            if (strlen(one) > strlen(two)) return 1;
+            if (strlen(two) > strlen(one)) return -1;
+        }
+
+        /* strcmp will return which one is greater - even if the two */
+        /* segments are alpha or if they are numeric.  don't return  */
+        /* if they are equal because there might be more segments to */
+        /* compare */
+        rc = strcmp(one, two);
+        if (rc) return (rc < 1 ? -1 : 1);
+
+        /* restore character that was replaced by null above */
+        *str1 = oldch1;
+        one = str1;
+        *str2 = oldch2;
+        two = str2;
+    }
+
+    /* this catches the case where all numeric and alpha segments have */
+    /* compared identically but the segment sepparating characters were */
+    /* different */
+    if ((!*one) && (!*two)) return 0;
+
+    /* whichever version still has characters left over wins */
+    if (!*one) return -1; else return 1;
+}
+
+int EntityComparator::xisalnum(int c) {
+    return (EntityComparator::xisalpha(c) || EntityComparator::xisdigit(c));
+}
+int EntityComparator::xisdigit(int c)  {
+    return (c >= '0' && c <= '9');
+}
+int EntityComparator::xisalpha(int c) {
+    return (EntityComparator::xislower(c) || EntityComparator::xisupper(c));
+}
+int EntityComparator::xislower(int c) {
+	return (c >= 'a' && c <= 'z');
+}
+int EntityComparator::xisupper(int c) {
+	return (c >= 'A' && c <= 'Z');
+}
+
+OvalEnum::ResultEnumeration EntityComparator::CompareFloat(OvalEnum::Operation op, string defValue, string scValue) {
+
+	OvalEnum::ResultEnumeration result = OvalEnum::RESULT_ERROR;
+
+	// convert the strings to doubles
+	double defDouble = atof(defValue.c_str());
+	double scDouble = atof(scValue.c_str());
+
+	if(op == OvalEnum::OPERATION_EQUALS) {
+		if(scDouble == defDouble) {
+			result = OvalEnum::RESULT_TRUE;
+		} else {
+			result = OvalEnum::RESULT_FALSE;
+		}
+	} else if(op == OvalEnum::OPERATION_NOT_EQUAL) {
+		if(scDouble != defDouble) {
+			result = OvalEnum::RESULT_TRUE;
+		} else {
+			result = OvalEnum::RESULT_FALSE;
+		}
+	} else if(op == OvalEnum::OPERATION_LESS_THAN) {
+		
+		if(scDouble < defDouble) {
+			result = OvalEnum::RESULT_TRUE;
+		} else {
+			result = OvalEnum::RESULT_FALSE;
+		}
+	} else if(op == OvalEnum::OPERATION_LESS_THAN_OR_EQUAL) {
+		
+		if(scDouble <= defDouble) {
+			result = OvalEnum::RESULT_TRUE;
+		} else {
+			result = OvalEnum::RESULT_FALSE;
+		}
+	} else if(op == OvalEnum::OPERATION_GREATER_THAN) {
+		
+		if(scDouble > defDouble) {
+			result = OvalEnum::RESULT_TRUE;
+		} else {
+			result = OvalEnum::RESULT_FALSE;
+		}
+	} else if(op == OvalEnum::OPERATION_GREATER_THAN_OR_EQUAL) {
+		
+		if(scDouble >= defDouble) {
+			result = OvalEnum::RESULT_TRUE;
+		} else {
+			result = OvalEnum::RESULT_FALSE;
+		}
+	} else {
+		throw Exception("Error: Invalid operaion. operation: " + OvalEnum::OperationToString(op));
+	} 
+
+	return result;
+}
+
+OvalEnum::ResultEnumeration EntityComparator::CompareIosVersion(OvalEnum::Operation op, string defValue, string scValue) {
+	OvalEnum::ResultEnumeration result = OvalEnum::RESULT_ERROR;
+// TODO need to implement
+		throw Exception("Error: not implemented:" + OvalEnum::OperationToString(op));
+	return result;
+}
+OvalEnum::ResultEnumeration EntityComparator::CompareInteger(OvalEnum::Operation op, string defValue, string scValue) {
+
+	OvalEnum::ResultEnumeration result = OvalEnum::RESULT_ERROR;
+
+	// convert the strings to integers
+	int defInt = atoi(defValue.c_str());
+	int scInt = atoi(scValue.c_str());
+
+	if(op == OvalEnum::OPERATION_EQUALS) {
+		if(scInt == defInt) {
+			result = OvalEnum::RESULT_TRUE;
+		} else {
+			result = OvalEnum::RESULT_FALSE;
+		}
+	} else if(op == OvalEnum::OPERATION_NOT_EQUAL) {
+		if(scInt != defInt) {
+			result = OvalEnum::RESULT_TRUE;
+		} else {
+			result = OvalEnum::RESULT_FALSE;
+		}
+	} else if(op == OvalEnum::OPERATION_LESS_THAN) {
+		
+		if(scInt < defInt) {
+			result = OvalEnum::RESULT_TRUE;
+		} else {
+			result = OvalEnum::RESULT_FALSE;
+		}
+	} else if(op == OvalEnum::OPERATION_LESS_THAN_OR_EQUAL) {
+		
+		if(scInt <= defInt) {
+			result = OvalEnum::RESULT_TRUE;
+		} else {
+			result = OvalEnum::RESULT_FALSE;
+		}
+	} else if(op == OvalEnum::OPERATION_GREATER_THAN) {
+		
+		if(scInt > defInt) {
+			result = OvalEnum::RESULT_TRUE;
+		} else {
+			result = OvalEnum::RESULT_FALSE;
+		}
+	} else if(op == OvalEnum::OPERATION_GREATER_THAN_OR_EQUAL) {
+		
+		if(scInt >= defInt) {
+			result = OvalEnum::RESULT_TRUE;
+		} else {
+			result = OvalEnum::RESULT_FALSE;
+		}
+	} else if(op == OvalEnum::OPERATION_BITWISE_AND) {
+		// TODO need to implement
+		throw Exception("Error: not implemented:" + OvalEnum::OperationToString(op));
+	} else if(op == OvalEnum::OPERATION_BITWISE_OR) {		
+		// TODO need to implement
+		throw Exception("Error: not implemented:" + OvalEnum::OperationToString(op));
+	} else {
+		throw Exception("Error: Invalid operaion. operation: " + OvalEnum::OperationToString(op));
+	} 
+
+	return result;
+}
+
+OvalEnum::ResultEnumeration EntityComparator::CompareString(OvalEnum::Operation op, string defValue, string scValue) {
+
+	OvalEnum::ResultEnumeration result = OvalEnum::RESULT_ERROR;
+
+	if(op == OvalEnum::OPERATION_EQUALS) {
+		if(defValue.compare(scValue) == 0) {
+			result = OvalEnum::RESULT_TRUE;
+		} else {
+			result = OvalEnum::RESULT_FALSE;
+		}
+	} else if(op == OvalEnum::OPERATION_NOT_EQUAL) {
+		if(defValue.compare(scValue) != 0) {
+			result = OvalEnum::RESULT_TRUE;
+		} else {
+			result = OvalEnum::RESULT_FALSE;			
+		}
+	} else if(op == OvalEnum::OPERATION_PATTERN_MATCH) {
+		REGEX myRegex;
+		if(myRegex.IsMatch(defValue.c_str(), scValue.c_str())) {
+			result = OvalEnum::RESULT_TRUE;
+		} else {			
+			result = OvalEnum::RESULT_FALSE;
+		}
+	} else {
+		throw Exception("Error: Invalid operaion. operation: " + OvalEnum::OperationToString(op));
+	} 
+
+	return result;
+}
+
+OvalEnum::ResultEnumeration EntityComparator::CompareVersion(OvalEnum::Operation op, string defValue, string scValue) {
+
+	OvalEnum::ResultEnumeration result = OvalEnum::RESULT_ERROR;
+	
+	// Invalid ops first
+	if(op == OvalEnum::OPERATION_PATTERN_MATCH || op == OvalEnum::OPERATION_BITWISE_AND || op == OvalEnum::OPERATION_BITWISE_OR) {
+		throw Exception("Error: Invalid operation. operation: " + OvalEnum::OperationToString(op));	
+	}
+
+	// Create two vectors of the version components. 
+    IntVector* defValues = EntityComparator::ParseVersionStr(defValue);
+	IntVector* scValues = EntityComparator::ParseVersionStr(scValue);
+
+	// pad the vectors such that they are the same length
+	int lengthDiff = defValues->size() - scValues->size();
+	while(lengthDiff != 0) {
+		if(lengthDiff > 0) {
+			scValues->push_back(0);
+		} else if(lengthDiff < 0) {
+			defValues->push_back(0);
+		}
+
+		lengthDiff = defValues->size() - scValues->size();
+	}
+
+	//	Loop through the vector of definition version values.
+	for(unsigned int i = 0; i < defValues->size(); i++) {
+		int def = defValues->at(i);
+		int sc = scValues->at(i); 
+		
+		bool isLastValue = false;
+		if(defValues->size() == (i+1)) {
+			isLastValue = true;
+		}
+
+		if(op == OvalEnum::OPERATION_EQUALS) {
+			if(def == sc) {
+				result = OvalEnum::RESULT_TRUE;
+			} else {
+				result = OvalEnum::RESULT_FALSE;
+				break;
+			}
+		} else if(op == OvalEnum::OPERATION_NOT_EQUAL) {
+			if(def != sc) {
+				result = OvalEnum::RESULT_TRUE;
+				break;
+			} else if(def == sc) {
+				if(!isLastValue) {
+					continue;
+				} else {
+					result = OvalEnum::RESULT_FALSE;
+					break;
+				}
+			}
+		} else if(op == OvalEnum::OPERATION_GREATER_THAN) {
+			if(def > sc) {
+				result = OvalEnum::RESULT_FALSE;
+				break;
+			} else if(def == sc) {
+				if(!isLastValue) {
+                    continue;
+				} else {
+					result = OvalEnum::RESULT_FALSE;
+					break;
+				}
+			} else {
+				result = OvalEnum::RESULT_TRUE;
+				break;
+			}
+		} else if(op == OvalEnum::OPERATION_GREATER_THAN_OR_EQUAL) {
+			if(def > sc) {
+				result = OvalEnum::RESULT_FALSE;
+				break;
+			} else if(def < sc) {
+				result = OvalEnum::RESULT_TRUE;
+				break;
+			} else if(def == sc) {
+				result = OvalEnum::RESULT_TRUE;
+				continue;
+			}
+		} else if(op == OvalEnum::OPERATION_LESS_THAN) {
+			if(def < sc) {
+				result = OvalEnum::RESULT_FALSE;
+				break;
+			} else if(def == sc) {
+				if(!isLastValue) {
+                    continue;
+				} else {
+					result = OvalEnum::RESULT_FALSE;
+					break;
+				}
+			} else {
+				result = OvalEnum::RESULT_TRUE;
+				break;
+			}
+		} else if(op == OvalEnum::OPERATION_LESS_THAN_OR_EQUAL) {
+			if(def < sc) {
+				result = OvalEnum::RESULT_FALSE;
+				break;
+			} else if(def > sc) {
+				result = OvalEnum::RESULT_TRUE;
+				break;
+			} else if(def == sc) {
+				result = OvalEnum::RESULT_TRUE;
+				continue;
+			}			
+		}
+	}
+
+	// delete the vectors of integers
+	delete defValues;
+	delete scValues;
+
+	return result;
+}
+
+IntVector* EntityComparator::ParseVersionStr(string versionStr) {
+
+	if(versionStr.compare("") == 0) {
+		throw Exception("Unable to parse version string. An empty string was provided.");
+	}
+	
+	IntVector* tokens = new IntVector();
+
+	size_t index = versionStr.find_first_not_of("0123456789");
+	if(index == string::npos) {
+		// no delmiter found and not an empty string.
+		// simply try to convert the versionStr to an int and return it as the only token.
+
+		int tokenInt = atoi(versionStr.c_str());
+		tokens->push_back(tokenInt);
+
+	} else {
+		char delm = versionStr.at(index);
+
+		char* theString = (char*)malloc(sizeof(char*)*(versionStr.length()));
+		theString = strcpy(theString, versionStr.c_str());
+		char* token = strtok(theString, &delm);		
+
+		if(token == NULL) {
+			if(theString != NULL) {
+				free(theString);
+			}
+			throw Exception("Error parsing version string. A delimiter was found, but no other components to the version were found. Input version string: \'" + versionStr + "\' delimiter detected: \'" + delm + "\'");
+		} else {
+
+			while(token != NULL) {
+				//	Get the first token as a string
+				string tokenStr = token;
+				
+				// check that the token is an integer
+				size_t nonInt = tokenStr.find_first_not_of("0123456789");
+				if(nonInt != string::npos) {
+					if(theString != NULL) {
+						free(theString);
+					}
+					throw Exception("Error parsing version string. A component of the version string is not an integer. Input version string: \'" + versionStr + "\' delimiter detected: \'" + delm + "\' erroneous component: \'" + tokenStr + "\'");
+				}
+
+				// convert it to an int
+				int tokenInt = atoi(token);
+
+				// add it to the vector
+				tokens->push_back(tokenInt);
+
+				//	Get the next token
+				token = strtok(NULL, &delm);
+			}
+		}
+
+		if(theString != NULL) {
+			free(theString);
+		}
+	}
+
+	return tokens;
+}
+
+string EntityComparator::GetEpochFromEVR(string evrStr) {
+	string epoch = evrStr.substr(0, evrStr.find(":"));
+	return epoch;
+}
+
+string EntityComparator::GetVersionFromEVR(string evrStr) {
+	unsigned int colon = evrStr.find(":");
+	unsigned int hyphen = evrStr.find("-");
+	int count = (hyphen) - (colon+1);
+	string version = evrStr.substr(colon +1, count);
+	return version;
+}
+string EntityComparator::GetReleaseFromEVR(string evrStr) {
+	unsigned int hyphen = evrStr.find("-");
+	int count = evrStr.length() - (hyphen+1);
+	string release = evrStr.substr(hyphen+1, count);
+	return release;
+}


Property changes on: trunk/ovaldi/src/EntityComparator.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/EntityComparator.h
===================================================================
--- trunk/ovaldi/src/EntityComparator.h	                        (rev 0)
+++ trunk/ovaldi/src/EntityComparator.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,107 @@
+//
+// $Id: EntityComparator.h 4663 2008-01-23 13:58:23Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef ENTITYCOMPARATOR_H
+#define ENTITYCOMPARATOR_H
+
+#include "OvalEnum.h"
+#include "REGEX.h"
+#include "Common.h"
+
+using namespace std;
+
+/**
+	This class is a container for all comparison methods between definition entities and item entities.
+*/
+class EntityComparator {
+public:
+
+	/** Compare two binary values based on the specified operation */
+	static OvalEnum::ResultEnumeration CompareBinary(OvalEnum::Operation op, string defValue, string scValue);
+
+	/** Compare two boolean values based on the specified operation.
+	    May have the following input values: {true, false, 1, 0)
+	*/
+	static OvalEnum::ResultEnumeration CompareBoolean(OvalEnum::Operation op, string defValue, string scValue);
+	
+	/** Compare two evr strings based on the specified operation. 
+		This code motivated (strongly) by librpm's rpmdsCompare().
+	*/
+	static OvalEnum::ResultEnumeration CompareEvrString(OvalEnum::Operation, string defValue, string scValue);
+
+	/** Compare to floats based on the specified operation. */
+	static OvalEnum::ResultEnumeration CompareFloat(OvalEnum::Operation op, string defValue, string scValue);
+
+	/** Compare to integers based on the specified operation. 
+		Since these integers come from an xsd:integer the code needs to allow for very large integers.
+		This code allows for strings with up to 20 characters. The range of allowed integers is:
+		-9,999,999,999,999,999,999 to 99,999,999,999,999,999,999
+	*/
+	static OvalEnum::ResultEnumeration CompareInteger(OvalEnum::Operation op, string defValue, string scValue);
+
+	/** Compare two float values based on the specified operation. */
+	static OvalEnum::ResultEnumeration CompareIosVersion(OvalEnum::Operation op, string defValue, string scValue);
+
+	/** Compare two string values based on the specified operation. */
+	static OvalEnum::ResultEnumeration CompareString(OvalEnum::Operation op, string defValue, string scValue);
+
+	/** Compare two version strings based on the input operation. 
+		@return Returns the result of the comparison.
+	*/
+	static OvalEnum::ResultEnumeration CompareVersion(OvalEnum::Operation op, string defValue, string scValue);
+
+private:
+
+	/** 
+		Parse the provided string into a vector of integers using the 
+		specified delmiter to split the stirng.
+		If no delimiter is found convert the version string to an integer and return it as
+		the only component of the version. 
+		If a given component of the version string can not be converted to an integer an error is thrown.
+		If a delimiter is found but no integer components are found an error is thrown.		
+	*/
+	static IntVector* ParseVersionStr(string versionStr);
+
+	// copied from lib/rpmvercmp.c
+	static int rpmvercmp(const char * a, const char * b);
+	// copied from rpmio/rpmio.h
+	static int xisalnum(int c);
+	static int xisdigit(int c);
+	static int xisalpha(int c);
+	static int xislower(int c);
+	static int xisupper(int c);
+
+	static string GetEpochFromEVR(string evrStr);
+	static string GetVersionFromEVR(string evrStr);
+	static string GetReleaseFromEVR(string evrStr);
+};
+
+#endif


Property changes on: trunk/ovaldi/src/EntityComparator.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/EscapeRegexFunction.cpp
===================================================================
--- trunk/ovaldi/src/EscapeRegexFunction.cpp	                        (rev 0)
+++ trunk/ovaldi/src/EscapeRegexFunction.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,117 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "EscapeRegexFunction.h"
+
+//****************************************************************************************//
+//								Component Class											  //	
+//****************************************************************************************//
+EscapeRegexFunction::EscapeRegexFunction() : AbsFunctionComponent() {
+}
+
+EscapeRegexFunction::~EscapeRegexFunction() {
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+
+ComponentValue* EscapeRegexFunction::ComputeValue() {
+
+	StringVector* values = NULL;
+	
+	AbsComponent* component = this->GetComponents()->at(0);
+
+	ComponentValue* componentValue = component->ComputeValue();
+
+	// create and populate a result ComponentValue
+	ComponentValue* result = new ComponentValue();
+	result->SetFlag(componentValue->GetFlag());
+	result->AppendMessages(componentValue->GetMessages());
+
+	if(componentValue->GetFlag() == OvalEnum::FLAG_COMPLETE) {
+		REGEX regex;
+		values = new StringVector();;
+
+		StringVector::iterator iterator;
+		for(iterator = componentValue->GetValues()->begin(); iterator != componentValue->GetValues()->end(); iterator++) {
+			string currentValue = (*iterator);			
+			string newValue = regex.EscapeRegexChars(currentValue);
+			values->push_back(newValue);
+		}
+		result->SetValues(values);
+	}
+
+	delete componentValue;
+
+	return result;	
+}
+
+void EscapeRegexFunction::Parse(DOMElement* componentElm) {
+	
+	// Loop through all child elements
+	// there should only ever be one 
+	DOMNodeList *componentElms = componentElm->getChildNodes();
+	unsigned int index = 0;
+	while(index < componentElms->getLength()) {
+		DOMNode *tmpNode = componentElms->item(index);
+		if (tmpNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+			DOMElement *childElm = (DOMElement*)tmpNode;
+
+			// Call the ComponentFactory
+			AbsComponent* absComponent = ComponentFactory::GetComponent(childElm);
+			// store the returned component
+			this->AppendComponent(absComponent);			
+		}
+		index ++;
+	}
+}
+
+VariableValueVector* EscapeRegexFunction::GetVariableValues() {
+
+	VariableValueVector* values = new VariableValueVector();
+	AbsComponentVector* components = this->GetComponents();
+	AbsComponentVector::iterator iterator;
+	for(iterator = components->begin(); iterator != components->end(); iterator++) {
+		AbsComponent* component = (AbsComponent*)(*iterator);
+		VariableValueVector* tmp = component->GetVariableValues();
+		VariableValueVector::iterator varIterator;
+		for(varIterator = tmp->begin(); varIterator != tmp->end(); varIterator++) {
+			values->push_back((*varIterator));
+		}
+		// BUG - These can not currenrtly be deleted. 
+		// The code is not consistant here. In places a new vector is returned
+		// in others a reference to a vector that is managed by other code is returned.
+		//delete tmp;
+		//tmp = NULL;
+	}
+
+	return values;
+}


Property changes on: trunk/ovaldi/src/EscapeRegexFunction.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/EscapeRegexFunction.h
===================================================================
--- trunk/ovaldi/src/EscapeRegexFunction.h	                        (rev 0)
+++ trunk/ovaldi/src/EscapeRegexFunction.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,70 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef ESCAPEREGEXFUNCTION_H
+#define ESCAPEREGEXFUNCTION_H
+
+#include "AbsFunctionComponent.h"
+#include "ComponentFactory.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	This class represents a EscapeRegexFunction component in a local_variable in the oval definition schema.
+	The schema describes this functions as follows:
+
+	The escape regex function takes a single string component and escapes all the 
+	regular expression characters. The purpose for this is that many times, a component
+	used in pattern match needs to be treated a literal string and not regular expression.
+	For example assume a basic component element that pulls a file path out of the Windows
+	registry. This path is a string that might contain regular expression characters but 
+	these characters are not intended to be such, so they need to be escaped. This function
+	allows a definition	writer to mark which components are in regular expression format and
+	which aren't.
+*/
+class EscapeRegexFunction : public AbsFunctionComponent {
+public:
+
+	/** Create a complete Component object. */
+	EscapeRegexFunction();
+	~EscapeRegexFunction();
+
+	/** parse the component element. */
+	void Parse(DOMElement* componentElm); 
+
+	/** Compute the value by escaping all the values of the associated component. */
+	ComponentValue* ComputeValue();
+
+	/** Return the variable values used to compute this function's value. */
+	VariableValueVector* GetVariableValues();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/EscapeRegexFunction.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Exception.cpp
===================================================================
--- trunk/ovaldi/src/Exception.cpp	                        (rev 0)
+++ trunk/ovaldi/src/Exception.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,127 @@
+//
+// $Id: Exception.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "Exception.h"
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Exception  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+Exception::Exception(string msgIn, int severityIn, Exception* ex) {
+	// -----------------------------------------------------------------------
+	//  ABSTRACT
+	//
+	//  A simple constructor that sets the error message and the severity of
+	//	this exception to the specified values
+	//
+	// -----------------------------------------------------------------------
+
+	this->SetSeverity(severityIn);
+	this->SetErrorMessage(msgIn);
+	this->SetCause(ex);
+
+	// this results in too much logging.
+	// Log::Debug(msgIn);
+}
+
+Exception::~Exception() {
+	// -----------------------------------------------------------------------
+	//  ABSTRACT
+	//
+	//  Do nothing for now
+	//
+	// -----------------------------------------------------------------------
+}
+
+Exception* Exception::GetCause()
+{
+	// -----------------------------------------------------------------------
+	//  ABSTRACT
+	//
+	//  Retrun the cause this exception
+	//
+	// -----------------------------------------------------------------------
+	return this->cause;
+}
+
+string Exception::GetErrorMessage()
+{
+	// -----------------------------------------------------------------------
+	//  ABSTRACT
+	//
+	//  Retrun the error message for this exception
+	//
+	// -----------------------------------------------------------------------
+	return this->errorMessage;
+}
+
+int Exception::GetSeverity()
+{
+	// -----------------------------------------------------------------------
+	//  ABSTRACT
+	//
+	//  Return the severity of this exception
+	//
+	// -----------------------------------------------------------------------
+	return this->severity;
+}
+
+void Exception::SetCause(Exception* ex)
+{
+	// -----------------------------------------------------------------------
+	//  ABSTRACT
+	//
+	//  Set the error message for this exception
+	//
+	// -----------------------------------------------------------------------
+	this->cause = ex;
+}
+
+void Exception::SetErrorMessage(string errorMessageIn)
+{
+	// -----------------------------------------------------------------------
+	//  ABSTRACT
+	//
+	//  Set the error message for this exception
+	//
+	// -----------------------------------------------------------------------
+	this->errorMessage = errorMessageIn;
+}
+
+void Exception::SetSeverity(int severityIn)
+{
+	// -----------------------------------------------------------------------
+	//  ABSTRACT
+	//
+	//  Set the severity of the exception
+	//
+	// -----------------------------------------------------------------------
+	this->severity = severityIn;
+}


Property changes on: trunk/ovaldi/src/Exception.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Exception.h
===================================================================
--- trunk/ovaldi/src/Exception.h	                        (rev 0)
+++ trunk/ovaldi/src/Exception.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,68 @@
+//
+// $Id: Exception.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef EXCEPTION_H
+#define EXCEPTION_H
+
+#include <string>
+//class Log;
+
+using namespace std;
+
+#define ERROR_FATAL 10
+#define ERROR_WARN 5
+#define ERROR_NOTICE 1
+
+/**
+	This class servers as the generic exception class that all others are based on.
+*/
+class Exception {
+	public:
+		Exception(string msg = "", int severity = ERROR_FATAL, Exception *cause = NULL);
+		~Exception();
+
+		string GetErrorMessage();
+		int GetSeverity();
+		Exception* GetCause();
+
+		void SetErrorMessage(string);
+		void SetSeverity(int);
+		void SetCause(Exception* ex);
+
+	private:
+		int severity;
+		string errorMessage;
+		Exception* cause;
+};
+
+//#include "Log.h"
+
+#endif


Property changes on: trunk/ovaldi/src/Exception.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/ExtendedDefinition.cpp
===================================================================
--- trunk/ovaldi/src/ExtendedDefinition.cpp	                        (rev 0)
+++ trunk/ovaldi/src/ExtendedDefinition.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,142 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "ExtendedDefinition.h"
+
+//****************************************************************************************//
+//								ExtendedDefinition Class								  //	
+//****************************************************************************************//
+ExtendedDefinition::ExtendedDefinition(bool negate, OvalEnum::ResultEnumeration result, Definition* definitionRef) 
+					: AbsCriteria(negate, result) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a complete ExtendedDefinition object
+	//
+	// -----------------------------------------------------------------------
+
+	this->SetDefinitionRef(definitionRef);
+}
+
+ExtendedDefinition::~ExtendedDefinition() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Do nothing for now
+	//
+	// -----------------------------------------------------------------------
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+
+Definition* ExtendedDefinition::GetDefinitionRef() {
+
+	return this->definitionRef;
+}
+
+void ExtendedDefinition::SetDefinitionRef(Definition* definitionRef) {
+
+	this->definitionRef = definitionRef;
+}
+
+void ExtendedDefinition::Write(DOMElement* parentElm) {
+
+	// get the parent document
+	XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* resultDoc = parentElm->getOwnerDocument();
+
+	// create a new criteria element
+	DOMElement* extendedDefinitionElm = XmlCommon::AddChildElement(resultDoc, parentElm, "extend_definition");
+
+	// add the attributes
+	XmlCommon::AddAttribute(extendedDefinitionElm, "definition_ref", this->GetDefinitionRef()->GetId());
+
+	XmlCommon::AddAttribute(extendedDefinitionElm, "version", Common::ToString(this->GetDefinitionRef()->GetVersion()));
+
+	if(this->GetDefinitionRef()->GetVariableInstance() != 1) {
+		XmlCommon::AddAttribute(extendedDefinitionElm, "variable_instance", Common::ToString(this->GetDefinitionRef()->GetVariableInstance()));
+	}
+
+	string negateStr = Common::ToString(this->GetNegate());
+	if(negateStr.compare("true") == 0) {
+		XmlCommon::AddAttribute(extendedDefinitionElm, "negate", negateStr);
+	}
+
+	XmlCommon::AddAttribute(extendedDefinitionElm, "result", OvalEnum::ResultToString(this->GetResult()));
+
+	// write the definition ref
+	this->GetDefinitionRef()->Write(Analyzer::GetResultsSystemDefinitionsElm());
+}
+
+void ExtendedDefinition::Parse(DOMElement* extendedDefinitionElm) {
+
+	// get the attributes from the extended definition element
+	string negateStr = XmlCommon::GetAttributeByName(extendedDefinitionElm, "negate");
+	if(negateStr.compare("") == 0 || negateStr.compare("false") == 0) {
+        this->SetNegate(false);
+	} else {
+	    this->SetNegate(true);
+	}
+
+	// get the definition ref
+	string definitionRefStr = XmlCommon::GetAttributeByName(extendedDefinitionElm, "definition_ref");
+	Definition* defRef = Definition::GetDefinitionById(definitionRefStr);
+	this->SetDefinitionRef(defRef);
+}
+
+OvalEnum::ResultEnumeration ExtendedDefinition::Analyze() {
+
+	// analyze the test
+	OvalEnum::ResultEnumeration currentResult = this->GetDefinitionRef()->Analyze();
+
+	// apply the negate attribute and save the result
+	if(this->GetNegate()) {
+		this->SetResult(OvalEnum::NegateResult(currentResult));
+	} else {
+		this->SetResult(currentResult);
+	}
+
+	return this->GetResult();
+}
+
+OvalEnum::ResultEnumeration ExtendedDefinition::NotEvaluated() {
+	OvalEnum::ResultEnumeration currentResult = this->GetDefinitionRef()->NotEvaluated();
+
+	// apply the negate attribute and save the result
+	if(this->GetNegate()) {
+		this->SetResult(OvalEnum::NegateResult(currentResult));
+	} else {
+		this->SetResult(currentResult);
+	}
+
+	return this->GetResult();
+}
+


Property changes on: trunk/ovaldi/src/ExtendedDefinition.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/ExtendedDefinition.h
===================================================================
--- trunk/ovaldi/src/ExtendedDefinition.h	                        (rev 0)
+++ trunk/ovaldi/src/ExtendedDefinition.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,86 @@
+//
+// $Id: ExtendedDefinition.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef EXTENDEDDEFINITION_H
+#define EXTENDEDDEFINITION_H
+
+#include "Definition.h"
+#include "AbsCriteria.h"
+#include "Analyzer.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+class AbsCriteria;
+class Definition;
+
+/**
+	This class represents an extended_definition in the oval defintiion schema.
+	Extended definitions are a type of AbsCriteria.
+*/
+class ExtendedDefinition : public AbsCriteria {
+
+public:
+	ExtendedDefinition(bool negate = false, OvalEnum::ResultEnumeration result = OvalEnum::RESULT_ERROR, Definition* definitionRef = NULL);
+	~ExtendedDefinition();
+
+	/** Writes a ExtendedDefinition element as a child of the parentElm.
+		Calls Definition->Write() on the Definition Ref to ensure that
+		it is also written to the results document.
+	*/
+	void Write(DOMElement* parent);
+	
+	/** Parse ExtendedDefinition element into a ExtendedDefinition object.
+		Search the cach
+		calls definition->Parse() on the definition ref to 
+	*/
+	void Parse(DOMElement* ExtendedDefinitionElm);
+
+	/** Analyze the ExtendedDefinition object.
+		Calls definition->Analyze() to get the result for the definition.
+		Then applies the negate attribute. 
+		Finally saves and returns the result
+	*/
+	OvalEnum::ResultEnumeration Analyze();
+
+	/** Mark this definition as not evaluated. */
+	OvalEnum::ResultEnumeration NotEvaluated();
+
+	/** Return the definitionRef field's value. */
+	Definition* GetDefinitionRef();
+	/** Set the definitionRef field's value. */
+	void SetDefinitionRef(Definition* definitionRef);
+
+private:
+	Definition* definitionRef;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/ExtendedDefinition.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/ExternalVariable.cpp
===================================================================
--- trunk/ovaldi/src/ExternalVariable.cpp	                        (rev 0)
+++ trunk/ovaldi/src/ExternalVariable.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,230 @@
+//
+// $Id: ExternalVariable.cpp 4607 2008-01-04 18:02:14Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "ExternalVariable.h"
+
+//****************************************************************************************//
+//									ExternalVariable Class								  //	
+//****************************************************************************************//
+
+ExternalVariable::ExternalVariable(string id, string name, int version, OvalEnum::Datatype datatype, StringVector* msgs) : AbsVariable (id, name, version, datatype, msgs) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a complete ExternalVariable
+	//
+	// -----------------------------------------------------------------------
+
+}
+
+ExternalVariable::~ExternalVariable() {
+
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+void ExternalVariable::Parse(DOMElement* externalVariableElm) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Parse the provided ExternalVariable element into a ExternalVariable
+	//
+	// -----------------------------------------------------------------------
+
+	this->SetId(XmlCommon::GetAttributeByName(externalVariableElm, "id"));
+	this->SetDatatype(OvalEnum::ToDatatype(XmlCommon::GetAttributeByName(externalVariableElm, "datatype")));
+	string versionStr = XmlCommon::GetAttributeByName(externalVariableElm, "version");
+	int version = atoi(versionStr.c_str());
+	this->SetVersion(version);
+
+	// Get all the possible elements' values
+	DOMNodeList *externalVariableElmChildren = externalVariableElm->getChildNodes();
+	unsigned int index = 0;
+	while(index < externalVariableElmChildren->getLength()) {
+		DOMNode *tmpNode = externalVariableElmChildren->item(index);
+		if (tmpNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+			DOMElement *childElm = (DOMElement*)tmpNode;
+			string elmName = XmlCommon::GetElementName(childElm);
+			
+			// parse each possible element
+			if(elmName.compare("possible_value") == 0) {
+				PossibleValueType *possibleValueType = new PossibleValueType();
+				possibleValueType->Parse(childElm);
+				this->AppendPossibleValueType(possibleValueType);
+			} else if (elmName.compare("possible_restriction") == 0) {
+				PossibleRestrictionType *possibleRestrictionType = new PossibleRestrictionType();
+				possibleRestrictionType->Parse(childElm);
+				this->AppendPossibleRestrictionType(possibleRestrictionType);
+			}
+		}
+		index ++;
+	}
+
+	// Finally call ComputeValue
+	this->ComputeValue();
+}
+
+VariableValueVector* ExternalVariable::GetVariableValues() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	return the variable values used to compute this variable's value
+	//	in this case just an empty vector.
+	// -----------------------------------------------------------------------
+	
+	VariableValueVector* values = new VariableValueVector();
+
+	return values;
+}
+
+PossibleValueTypeVector* ExternalVariable::GetPossibleValueTypes() {
+	return &this->possibleValueTypes;
+}
+
+void ExternalVariable::AppendPossibleValueType(PossibleValueType* pv) {
+	this->possibleValueTypes.push_back(pv);
+}
+
+PossibleRestrictionTypeVector* ExternalVariable::GetPossibleRestrictionTypes() {
+	return &this->possibleRestrictionTypes;
+}
+
+void ExternalVariable::AppendPossibleRestrictionType(PossibleRestrictionType* pr) {
+	this->possibleRestrictionTypes.push_back(pr);
+}
+
+void ExternalVariable::ComputeValue() {
+
+	// get the external variables file
+	XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* externalVariableDoc = NULL;
+	try {
+		externalVariableDoc = DocumentManager::GetExternalVariableDocument();
+	} catch(Exception ex) {
+		this->SetFlag(OvalEnum::FLAG_ERROR);
+		this->AppendMessage("Error parsing external variable file. " + ex.GetErrorMessage());
+		return;
+	} catch(...) {
+		this->SetFlag(OvalEnum::FLAG_ERROR);
+		this->AppendMessage("Unknown error parsing external variable file.");
+        return;
+	}
+
+	// get the variable from the external variables file
+	DOMElement* variableElm = XmlCommon::FindElementNS(externalVariableDoc, "variable", "id", this->GetId());
+	if(variableElm == NULL) {
+		this->SetFlag(OvalEnum::FLAG_ERROR);
+		this->AppendMessage("Error unable to find external variable " + this->GetId() + " in external variable document.");
+	} else {
+
+		// validate the datatype
+		OvalEnum::Datatype externalDatatype = OvalEnum::ToDatatype(XmlCommon::GetAttributeByName(variableElm, "datatype"));
+		if(this->GetDatatype() != externalDatatype) {
+			
+			this->SetFlag(OvalEnum::FLAG_ERROR);
+			this->AppendMessage("Error, the specified external variable (" + this->GetId() + ") in the supplied external variable document has the wrong datatype. The variable in the oval-definition document expected datatype=" + OvalEnum::DatatypeToString(this->GetDatatype()) + ". The external variable in the supplied variable document has datatype=" + OvalEnum::DatatypeToString(externalDatatype) + ".");
+			return;
+
+		} else {
+			// get each value from the variable element in the external variables document.
+			DOMNodeList *variableElmChildren = variableElm->getChildNodes();
+			unsigned int index = 0;
+			while(index < variableElmChildren->getLength()) {
+				DOMNode *tmpNode = variableElmChildren->item(index);
+				if (tmpNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+					DOMElement *childElm = (DOMElement*)tmpNode;
+					string elmName = XmlCommon::GetElementName(childElm);				
+				
+					// parse each value element
+					if(elmName.compare("value") == 0) {
+						string externalValue = XmlCommon::GetDataNodeValue(childElm);
+
+						// validate the value
+						if(this->ValidateValue(this->GetDatatype(), externalValue)) {
+
+							// add the value to the set of values for this exteranl variable.
+							VariableValue* varValue = new VariableValue(this->GetId(), externalValue);
+							this->AppendVariableValue(varValue);
+
+						} else {
+							this->SetFlag(OvalEnum::FLAG_ERROR);
+							this->AppendMessage("Error a value ('" + externalValue + "') of external variable " + this->GetId() + " does not match the possible values for the variable.");
+							return;
+						}
+					}
+				}
+				index ++;
+			}
+			this->SetFlag(OvalEnum::FLAG_COMPLETE);
+		}
+	}
+}
+
+bool ExternalVariable::ValidateValue(OvalEnum::Datatype datatype, string externalValue) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Ensure that the specified value matches the criteria 
+	//	specified by the possible_value and possible_restriction elements
+	//  of this variable
+	//	
+	// ----------------------------------------------------------------------
+
+	bool isValid = false;
+	
+	// loop through all possible_value elements - if any are true return true 
+	PossibleValueTypeVector::iterator value;
+	for(value = this->GetPossibleValueTypes()->begin(); value != this->GetPossibleValueTypes()->end(); value++) {
+		isValid = (*value)->ValidateValue(datatype, externalValue);
+		if(isValid) {
+			break;
+		}
+	}
+
+	if(!isValid) {
+		// loop through all the possible_restriction elements - if any are true return true
+		PossibleRestrictionTypeVector::iterator restriction;
+		for(restriction = this->GetPossibleRestrictionTypes()->begin(); restriction != this->GetPossibleRestrictionTypes()->end(); restriction++) {
+			isValid = (*restriction)->ValidateValue(datatype, externalValue);
+			if(isValid) {
+				break;
+			}
+		}
+	}
+
+	// if no possible_value or possible_restriction elements then the value is valid
+	if(this->GetPossibleValueTypes()->size() == 0 && this->GetPossibleRestrictionTypes()->size() == 0 ) {
+			isValid = true;
+	}
+
+	return isValid;
+}
+


Property changes on: trunk/ovaldi/src/ExternalVariable.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/ExternalVariable.h
===================================================================
--- trunk/ovaldi/src/ExternalVariable.h	                        (rev 0)
+++ trunk/ovaldi/src/ExternalVariable.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,80 @@
+//
+// $Id: ExternalVariable.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef EXTERNALVARIABLE_H
+#define EXTERNALVARIABLE_H
+
+#include "AbsVariable.h"
+#include "PossibleValueType.h"
+#include "PossibleRestrictionType.h"
+#include "DocumentManager.h"
+
+using namespace std;
+
+/**
+	This class represents an external_variable in the oval definition schema.
+*/
+class ExternalVariable : public AbsVariable {
+public:
+
+	ExternalVariable(string id = "", string name = "external_variable", int version = 1, OvalEnum::Datatype datatype = OvalEnum::DATATYPE_STRING, StringVector* msgs = new StringVector());
+	~ExternalVariable();
+
+	void Parse(DOMElement* externalVariableElm);
+
+	/** Fetch the variable from the external-variables.xml file.
+		Then get each value associated with the variable.
+		Then validate each value then create a VariableValue. 
+	*/
+	void ComputeValue();
+
+	/** Validate that a given external variable value matches the possible values and possible restrictions for this ExternalVariable. */
+	bool ValidateValue(OvalEnum::Datatype datatype, string externalValue);
+
+	/** Get the set of PossibleValueType objects for this ExternalVariable. */
+	PossibleValueTypeVector* GetPossibleValueTypes();
+
+	/** Append a PossibleValueType to the set of PossibleValueType objects for this ExternalVariable. */
+	void AppendPossibleValueType(PossibleValueType* pv);
+
+	/** Get the set of PossibleRestrictionType objects for this ExternalVariable. */
+	PossibleRestrictionTypeVector* GetPossibleRestrictionTypes();
+
+	/** Append a PossibleRestrictionType to the set of PossibleRestrictionType objects for this ExternalVariable. */
+	void AppendPossibleRestrictionType(PossibleRestrictionType* pr);
+
+	VariableValueVector* GetVariableValues();
+
+	PossibleValueTypeVector possibleValueTypes;
+	PossibleRestrictionTypeVector possibleRestrictionTypes;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/ExternalVariable.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Filter.cpp
===================================================================
--- trunk/ovaldi/src/Filter.cpp	                        (rev 0)
+++ trunk/ovaldi/src/Filter.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,217 @@
+//
+// $Id: Filter.cpp 4596 2008-01-03 16:44:54Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "Filter.h"
+
+AbsStateMap Filter::processedFiltersMap;
+
+//****************************************************************************************//
+//									Filter Class										  //	
+//****************************************************************************************//
+Filter::Filter(string id) : AbsState() {
+
+	// get the specified state element
+	DOMElement* statesElm = XmlCommon::FindElementNS(DocumentManager::GetDefinitionDocument(), "states");
+	DOMElement* stateElm = XmlCommon::FindElementByAttribute(statesElm, "id", id);
+	this->Parse(stateElm);
+}
+
+Filter::Filter(OvalEnum::Operator myOperator, int version) : AbsState(myOperator, version)  {
+
+}
+
+Filter::Filter(string id, string name, string xmlns, OvalEnum::Operator myOperator, int version) : AbsState(id, name, xmlns, myOperator, version) {
+
+}
+
+Filter::~Filter() {
+
+}
+
+// ***************************************************************************************	//
+//								 Public static members										//
+// ***************************************************************************************	//
+Filter* Filter::GetFilter(string stateId) {
+	
+	Filter* tmpFilter = Filter::SearchCache(stateId);
+	if(tmpFilter == NULL) {
+		tmpFilter = new Filter(stateId);
+		Filter::Cache(tmpFilter);
+	}
+	return tmpFilter;
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+bool Filter::Analyze(Item* item) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Analyze the specified Item return the Result value for the Item.
+	//
+	//	1 - create a vector of Item elements that match each element in the state.
+	//	2 - pass the vector to the AbsEntity analyze method
+	//	3 - build a vector of results for each element in the state.
+	//	4 - combine the results to a single value based on the states operator
+    // -----------------------------------------------------------------------
+
+	OvalEnum::ResultEnumeration overallResult = OvalEnum::RESULT_ERROR;
+
+	// Check the status of the Item
+	if(item->GetStatus() == OvalEnum::STATUS_ERROR) {
+		overallResult = OvalEnum::RESULT_ERROR;
+	} else if(item->GetStatus() == OvalEnum::STATUS_NOT_COLLECTED) {
+		overallResult = OvalEnum::RESULT_ERROR;
+	} else if(item->GetStatus() == OvalEnum::STATUS_DOES_NOT_EXIST) {
+		overallResult = OvalEnum::RESULT_FALSE;
+	} else {
+
+		// check data before analysis
+		if(this->GetElements()->size() == 0) {
+			overallResult = OvalEnum::RESULT_TRUE;
+		} else {
+
+			// vector of result values before the state operator is applied
+			IntVector filterResults;
+
+			// Loop through all elements in the state
+			AbsEntityVector::iterator iterator;
+			for(iterator = this->GetElements()->begin(); iterator != this->GetElements()->end(); iterator++) {
+				FilterEntity* filterElm = (FilterEntity*)(*iterator);
+
+				// locate matching elements in the item
+				string filterElmName = filterElm->GetName(); 
+				ItemEntityVector* scElements = item->GetElementsByName(filterElmName);
+
+				// Analyze each matching element
+				ItemEntityVector::iterator scIterator;
+				IntVector filterElmResults;
+				for(scIterator = scElements->begin(); scIterator != scElements->end(); scIterator++) {
+					ItemEntity* scElm = (ItemEntity*)(*scIterator);
+					// call FilterEntity->analyze method
+					filterElmResults.push_back(filterElm->Analyze(scElm));
+				}
+				scElements->clear();
+				delete scElements;
+
+				// compute the overall filter result
+				OvalEnum::ResultEnumeration filterResult = OvalEnum::RESULT_UNKNOWN; // default to unknown;
+				if(filterElmResults.size() > 0) {
+					filterResult = OvalEnum::CombineResultsByCheck(&filterElmResults, filterElm->GetEntityCheck());
+				}
+				// store the result for the current state element
+				filterResults.push_back(filterResult);
+
+				overallResult = OvalEnum::CombineResultsByOperator(&filterResults, this->GetOperator());
+			}
+		}
+	}
+
+	// for a filter really want to convert the result to a boolean
+	bool isMatch = false;
+	if(overallResult == OvalEnum::RESULT_TRUE) {
+		isMatch = true;
+	} else if(overallResult == OvalEnum::RESULT_FALSE) {
+		isMatch = false;	
+	} else {
+		throw AbsStateException("Filter::ApplyFilter method unable to convert result value to a boolean. Found result: " + OvalEnum::ResultToString(overallResult));
+	}
+	return isMatch;
+}
+
+void Filter::Parse(DOMElement* stateElm) {
+
+	this->SetName(XmlCommon::GetElementName(stateElm));
+	this->SetId(XmlCommon::GetAttributeByName(stateElm, "id"));
+	this->SetXmlns(XmlCommon::GetNamespace(stateElm));
+	string versionStr = XmlCommon::GetAttributeByName(stateElm, "version");
+	int version;
+	if(versionStr.compare("") == 0) {
+		version = 1;
+	} else {
+		version = atoi(versionStr.c_str());
+	}
+	this->SetVersion(version);
+
+	// loop over all elements
+	DOMNodeList *stateChildren = stateElm->getChildNodes();
+	unsigned int index = 0;
+	while(index < stateChildren->getLength()) {
+		DOMNode *tmpNode = stateChildren->item(index++);
+
+		//	only concerned with ELEMENT_NODEs
+		if (tmpNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+			DOMElement *stateChild = (DOMElement*)tmpNode;
+
+			//	get the name of the child
+			string childName = XmlCommon::GetElementName(stateChild);
+			if(childName.compare("notes") == 0) {
+				continue;
+			} else {
+                FilterEntity* filterEntity = new FilterEntity();
+				filterEntity->Parse(stateChild);
+				this->AppendElement(filterEntity);
+			}
+		}
+	}
+}
+
+Filter* Filter::SearchCache(string id) {
+
+	AbsState* cachedFilter = NULL;
+
+	AbsStateMap::iterator iterator;
+	iterator = Filter::processedFiltersMap.find(id);
+	if(iterator != Filter::processedFiltersMap.end()) {
+		cachedFilter = iterator->second;
+	} 
+
+	return (Filter*)cachedFilter;
+}
+
+void Filter::ClearCache() {
+
+	AbsStateMap::iterator iterator;
+	for(iterator = Filter::processedFiltersMap.begin(); iterator != Filter::processedFiltersMap.end(); iterator++) {
+		AbsState* state = iterator->second;
+		delete state;
+	}
+	
+	Filter::processedFiltersMap.clear();
+}
+
+void Filter::Cache(Filter* filter) {
+
+	//	TODO - do i need to add protection to this cache
+
+	Filter::processedFiltersMap.insert(AbsStatePair(filter->GetId(), filter));
+}


Property changes on: trunk/ovaldi/src/Filter.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Filter.h
===================================================================
--- trunk/ovaldi/src/Filter.h	                        (rev 0)
+++ trunk/ovaldi/src/Filter.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,92 @@
+//
+// $Id: Filter.h 4596 2008-01-03 16:44:54Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef FILTER_H
+#define FILTER_H
+
+#include "AbsState.h"
+#include "FilterEntity.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+class FilterEntity;
+class Item;
+/**
+	This class represents a filter in a set object of the oval definition schema.
+	A Filter is a state that is used by a set object to filter out items from a set
+	when creating a set of objects to analyze.
+*/
+class Filter : public AbsState {
+
+public:
+	~Filter();
+
+	/** Get a Filter object for the specified state id.
+		Manages the cache of filters.
+	*/
+	static Filter* GetFilter(string statieId);
+
+	/** Analyze the specified Item return the boolean result for the Item. */
+	bool Analyze(Item* item);	
+
+	/** Parse the provided state from a definition file into an Filter object. */
+	void Parse(DOMElement* stateElm);
+
+	/** Delete all items in the cache. */
+	static void ClearCache();
+
+private:
+
+	/** Create a Filter object setting only the operator and version properties. */
+	Filter(OvalEnum::Operator myOperator = OvalEnum::OPERATOR_AND, int version = 1);
+
+	/**
+		Parse the state element with the specified id into a Filter object.
+		@param id a string that hold the id of a state in an oval definition file to be parsed.
+	*/
+	Filter(string id);
+
+	/** Create a complete Filter object setting all properties. */
+	Filter(string id, string name, string xmlns, OvalEnum::Operator myOperator = OvalEnum::OPERATOR_AND, int version = 1);
+
+	/** Cache the specified filter. */
+	static void Cache(Filter* filter);
+
+	/** Search the cache of Filters for the specifed filter. 
+		@return Returns a filter object with the specified id or NULL if not found
+	*/
+	static Filter* SearchCache(string id);
+
+	static AbsStateMap processedFiltersMap;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/Filter.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/FilterEntity.cpp
===================================================================
--- trunk/ovaldi/src/FilterEntity.cpp	                        (rev 0)
+++ trunk/ovaldi/src/FilterEntity.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,160 @@
+//
+// $Id: FilterEntity.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "FilterEntity.h"
+
+//****************************************************************************************//
+//								FilterEntity Class									  //	
+//****************************************************************************************//
+FilterEntity::FilterEntity(FilterEntity* orig) : AbsEntity() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Copy constructor.
+	//	Create a complete FilterEntity object based on the specified obj.
+	//
+	// -----------------------------------------------------------------------
+
+	this->SetDatatype(orig->GetDatatype());
+	this->SetEntityCheck(orig->GetEntityCheck());
+	this->SetIsObjectEntity(orig->GetIsObjectEntity());
+	this->SetName(orig->GetName());
+	this->SetNil(orig->GetNil());
+	this->SetOperation(orig->GetOperation());
+	this->SetValue(orig->GetValue());
+	this->SetVarCheck(orig->GetVarCheck());
+	this->SetVarRef(orig->GetVarRef());
+}
+
+FilterEntity::FilterEntity(string name, string value, OvalEnum::Datatype datatype, OvalEnum::Operation operation, AbsVariable* varRef, OvalEnum::Check entityCheck, OvalEnum::Check varCheck, bool nil)
+									: AbsEntity(name, value, datatype, false, operation, varRef, varCheck, nil) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a complete FilterEntity object
+	//
+	// -----------------------------------------------------------------------
+
+	this->SetEntityCheck(entityCheck);
+}
+
+FilterEntity::~FilterEntity() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Do nothing for now
+	//
+	// -----------------------------------------------------------------------
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+OvalEnum::Check FilterEntity::GetEntityCheck() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the entityCheck field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->entityCheck;
+}
+
+void FilterEntity::SetEntityCheck(OvalEnum::Check entityCheck) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the entityCheck field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->entityCheck = entityCheck;
+}
+
+bool FilterEntity::Equals(AbsEntity* entity) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return true if this FilterEntity is equal to the provided FilterEntity
+	// -----------------------------------------------------------------------
+	FilterEntity* filterEntity = (FilterEntity*)entity;
+	bool isEqual = false;
+
+	if(this->GetDatatype() == filterEntity->GetDatatype()) {
+		if(this->GetOperation() == filterEntity->GetOperation()) {
+			if(this->GetName().compare(filterEntity->GetName()) == 0) {
+				if(this->GetValue().compare(filterEntity->GetValue()) == 0) {
+					if(this->GetEntityCheck() == filterEntity->GetEntityCheck()) {
+						if(this->GetVarCheck() == filterEntity->GetVarCheck()) {
+							isEqual = true;
+						}
+					}
+				}
+			}
+		}
+	}
+	return isEqual;
+}
+
+void FilterEntity::Parse(DOMElement* FilterEntityElm) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Parse the provided FilterEntity element
+	// -----------------------------------------------------------------------
+
+	this->SetName(XmlCommon::GetElementName(FilterEntityElm));
+	this->SetValue(XmlCommon::GetDataNodeValue(FilterEntityElm));
+	this->SetOperation(OvalEnum::ToOperation(XmlCommon::GetAttributeByName(FilterEntityElm, "operation")));
+	this->SetDatatype(OvalEnum::ToDatatype(XmlCommon::GetAttributeByName(FilterEntityElm, "datatype")));
+	this->SetEntityCheck(OvalEnum::ToCheck(XmlCommon::GetAttributeByName(FilterEntityElm, "entity_check")));
+	this->SetVarCheck(OvalEnum::ToCheck(XmlCommon::GetAttributeByName(FilterEntityElm, "var_check")));
+
+	// get the nill attribute
+	string nilAttr = XmlCommon::GetAttributeByName(FilterEntityElm, "nil");
+	if(nilAttr.compare("") == 0 || nilAttr.compare("false") == 0) {
+		this->SetNil(false);
+	} else {
+		this->SetNil(true);
+	}
+
+	// get variable value if needed
+	string varRefStr = XmlCommon::GetAttributeByName(FilterEntityElm, "var_ref");
+	if(varRefStr.compare("") != 0) {
+		AbsVariable* var = VariableFactory::GetVariable(varRefStr);
+		this->SetValue("");
+		this->SetVarRef(var);
+	} else {
+		this->SetVarRef(NULL);
+	}
+}
+


Property changes on: trunk/ovaldi/src/FilterEntity.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/FilterEntity.h
===================================================================
--- trunk/ovaldi/src/FilterEntity.h	                        (rev 0)
+++ trunk/ovaldi/src/FilterEntity.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,67 @@
+//
+// $Id: FilterEntity.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef FILTERENTITY_H
+#define FILTERENTITY_H
+
+#include "AbsEntity.h" 
+#include "VariableFactory.h"
+
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	This class represents an entity in a Filter.
+	FilterEntity have an entityCheck attribute in additional to all attributes defined in the 
+	AbsEntity class.
+*/
+class FilterEntity : public AbsEntity {
+public:
+	/**
+		Copy constructor. Creates a new StateEntity based on the specified StateEntity. 
+		@param orig a StateEntity* to be copied
+	*/
+	FilterEntity(FilterEntity* orig);
+	FilterEntity(string name = "", string value = "", OvalEnum::Datatype datatype = OvalEnum::DATATYPE_STRING, OvalEnum::Operation operation = OvalEnum::OPERATION_EQUALS, AbsVariable* varRef = NULL, OvalEnum::Check entityCheck = OvalEnum::CHECK_ALL, OvalEnum::Check varCheck = OvalEnum::CHECK_ALL, bool nil = false);
+	~FilterEntity();
+
+	bool Equals(AbsEntity* entity);
+	void Parse(DOMElement* entitiyElm);
+
+	OvalEnum::Check GetEntityCheck();
+	void SetEntityCheck(OvalEnum::Check check);
+
+private:
+	OvalEnum::Check entityCheck; /*!< a flag that defines how to compare this enetity against multiple corresponding entities in an Item.  */
+};
+
+#endif


Property changes on: trunk/ovaldi/src/FilterEntity.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Item.cpp
===================================================================
--- trunk/ovaldi/src/Item.cpp	                        (rev 0)
+++ trunk/ovaldi/src/Item.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,555 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "Item.h"
+
+int Item::idCounter = 1;
+ItemMap Item::processedItemsMap;
+
+//****************************************************************************************//
+//									Item Class											  //	
+//****************************************************************************************//
+Item::Item(int id , string xmlns, string xmlnsAlias, string schemaLocation, OvalEnum::SCStatus status, string name) {
+
+	this->SetId(id);
+	this->SetXmlns(xmlns);
+	this->SetXmlnsAlias(xmlnsAlias);
+	this->SetSchemaLocation(schemaLocation);
+	this->SetName(name);
+	this->SetStatus(status);
+	this->SetIsWritten(false);
+}
+
+Item::~Item() {
+	
+	this->DeleteElements();
+}
+
+// ***************************************************************************************	//
+//								 Static Public members										//
+// ***************************************************************************************	//
+int Item::AssignId() {
+
+	return Item::idCounter++;
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+
+ItemEntityVector* Item::GetElements() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the elements field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return &this->elements;
+}
+
+void Item::SetElements(ItemEntityVector* elements) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the elements field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->elements = (*elements);
+}
+
+int Item::GetId() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the id field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->id;
+}
+
+void Item::SetId(int id) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the id field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->id = id;
+}
+
+void Item::SetIsWritten(bool isWritten) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the isWritten field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->isWritten = isWritten;
+}
+
+bool Item::GetIsWritten() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Get the isWritten field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->isWritten;
+}
+
+
+OvalMessageVector* Item::GetMessages() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Get the messages field's value
+	//
+	// -----------------------------------------------------------------------
+	return &this->messages;
+}
+void Item::SetMessages(OvalMessageVector* messages) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the messages field's value
+	//
+	// -----------------------------------------------------------------------
+	
+	this->messages = (*messages);
+}
+
+string Item::GetName() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the name field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->name;
+}
+
+void Item::SetName(string name) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the name field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->name = name;
+}
+
+OvalEnum::SCStatus Item::GetStatus() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the status field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->status;
+}
+
+void Item::SetStatus(OvalEnum::SCStatus status) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the scStatus field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->status = status;
+}
+
+string Item::GetXmlns() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the xmlns field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->xmlns;
+}
+
+void Item::SetXmlns(string xmlns) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the xmlns field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->xmlns = xmlns;
+}
+
+string Item::GetXmlnsAlias() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the xmlnsAlias field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->xmlnsAlias;
+}
+
+void Item::SetXmlnsAlias(string xmlnsAlias) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the xmlnsAlias field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->xmlnsAlias = xmlnsAlias;
+}
+
+string Item::GetSchemaLocation() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the schemaLocation field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->schemaLocation;
+}
+
+void Item::SetSchemaLocation(string schemaLocation) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the schemaLocation field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->schemaLocation = schemaLocation;
+}
+
+void Item::AppendElement(ItemEntity* itemEntity) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Add an element to the end of the elements vector
+	//
+	// -----------------------------------------------------------------------
+
+	this->elements.push_back(itemEntity);
+}
+
+void Item::AppendMessage(OvalMessage* msg) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Add an message to the end of the messages vector
+	//
+	// -----------------------------------------------------------------------
+
+	this->messages.push_back(msg);
+}
+
+bool Item::Equals(Item* item) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return true if this item is equal to the specified item.
+	//
+	//	NOTE: id and status are not compared
+	//	NOTE: Assumes that an object element will only ever occure once.
+	//	NOTE: Looks at only object elements
+	// -----------------------------------------------------------------------
+	bool isEqual = false;
+
+	try {
+
+		// compare name
+		if(this->GetName().compare(item->GetName()) == 0) {
+			// compare xmlns
+			if(this->GetXmlns().compare(item->GetXmlns()) == 0) {
+				// get the object elements for each item
+				ItemEntityVector* myObjElms = this->GetObjectElements();
+				ItemEntityVector* itemObjElms = item->GetObjectElements();
+				
+				// both the same number of object elements keep checking otherwise not equal
+				if(myObjElms->size() == itemObjElms->size()) {
+
+					// compare all object elements
+					unsigned int myElementCount = myObjElms->size();
+					if(myElementCount == 0) {
+						isEqual = true;
+					} else {
+						unsigned int i = 0;
+						bool finished = false;
+						while(i < myElementCount && !finished) {
+							ItemEntity* myElement = (ItemEntity*)myObjElms->at(i++);
+							
+							string elmName = myElement->GetName();
+							// loop over itemObjElms to find the element with the same name
+							ItemEntityVector::iterator it;
+							for(it = itemObjElms->begin(); it != itemObjElms->end(); it++) {
+								if((*it)->GetName().compare(elmName) == 0) {
+									if(myElement->Equals((*it))) {
+										isEqual = true;
+										finished = false;
+										break;
+									} else {
+										isEqual = false;
+										finished = true;
+										break;
+									}
+								}
+							}
+						}
+					}
+
+				} else {
+					isEqual = false;
+				}
+
+				delete myObjElms;
+				delete itemObjElms;
+			} 
+		}
+	} catch (Exception ex) {
+		throw Exception("Error: An error occured with comparing two Items", ERROR_FATAL, &ex);
+	} catch(...) {
+		throw Exception("Error: An unknown error occured with comparing two Items", ERROR_FATAL);
+	}
+
+	return isEqual;
+}
+
+ItemEntityVector* Item::GetObjectElements() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return all object elements
+	// -----------------------------------------------------------------------
+
+	ItemEntityVector* objElms = new ItemEntityVector();
+
+	ItemEntityVector::iterator iterator;
+	for(iterator = this->GetElements()->begin(); iterator != this->GetElements()->end(); iterator++) {
+		if((*iterator)->GetIsObjectEntity()) {
+			objElms->push_back((*iterator));   
+		}
+	}
+
+	return objElms;
+}
+
+ItemEntityVector* Item::GetElementsByName(string elementName) {
+
+	ItemEntityVector* matchingElements = new ItemEntityVector();
+
+	ItemEntityVector::iterator iterator;
+	for(iterator = this->GetElements()->begin(); iterator != this->GetElements()->end(); iterator++) {
+		ItemEntity* element = (ItemEntity*)(*iterator);
+		if(element->GetName().compare(elementName) == 0) {
+			matchingElements->push_back(element);   
+		}
+	}
+
+	return matchingElements;
+}
+
+void Item::Parse(DOMElement* scItemElm) {
+
+	this->SetName(XmlCommon::GetElementName(scItemElm));
+	this->SetId(atoi((XmlCommon::GetAttributeByName(scItemElm, "id")).c_str()));
+	this->SetXmlns(XmlCommon::GetNamespace(scItemElm));
+	this->SetStatus(OvalEnum::ToSCStatus(XmlCommon::GetAttributeByName(scItemElm, "status")));
+	
+	// loop over all elements
+	DOMNodeList *itemChildren = scItemElm->getChildNodes();
+	unsigned int index = 0;
+	while(index < itemChildren->getLength()) {
+		DOMNode* tmpNode = itemChildren->item(index);
+
+		//	only concerned with ELEMENT_NODEs
+		if (tmpNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+			DOMElement* itemChild = (DOMElement*)tmpNode;
+
+			//	get the name of the child
+			string childName = XmlCommon::GetElementName(itemChild);
+			if(childName.compare("message") == 0) {
+				OvalMessage* msg = new OvalMessage();
+				msg->Parse(itemChild);
+				this->AppendMessage(msg);
+			} else {
+                ItemEntity* itemEntity = new ItemEntity();
+				itemEntity->Parse(itemChild);
+				this->AppendElement(itemEntity);
+			}
+		}
+		index ++;
+	}	
+}
+
+void Item::Write(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* scFile, DOMElement* itemsElm) {
+
+	if(!this->GetIsWritten()) {
+		this->SetIsWritten(true);
+		//this->SetId(Item::AssignId());
+
+		// add the namespace and schema location to the sc document
+		XmlCommon::AddXmlns(DocumentManager::GetSystemCharacterisitcsDocument(), this->GetXmlns(), this->GetXmlnsAlias());
+		XmlCommon::AddSchemaLocation(DocumentManager::GetSystemCharacterisitcsDocument(), this->GetSchemaLocation());
+
+		// Create a new item element	
+		DOMElement *newItemElem = scFile->createElement(XMLString::transcode(this->GetName().c_str()));
+		itemsElm->appendChild(newItemElem);
+
+		// Add the attributes
+		// handling defaults in the schema
+		XmlCommon::AddAttribute(newItemElem, "id", Common::ToString(this->GetId()));	
+
+		string strStatus = OvalEnum::SCStatusToString(this->GetStatus());
+		if(strStatus.compare("exists") != 0)
+			XmlCommon::AddAttribute(newItemElem, "status", strStatus);
+
+		XmlCommon::AddAttribute(newItemElem, "xmlns", this->GetXmlns());	
+
+		// Add any messges
+		if(this->GetMessages()->size() > 0) {
+			string msgStr = "";
+			OvalMessageVector::iterator messageIterator;
+			for(messageIterator = this->GetMessages()->begin(); messageIterator != this->GetMessages()->end(); messageIterator++) {
+				OvalMessage* message = (*messageIterator);
+				//message->Write(scFile, newItemElem, "oval-sc");
+				msgStr.append(message->ToString() + "\n");
+			}
+				XmlCommon::AddChildElement(scFile, newItemElem, "oval-sc:message", msgStr);
+		}
+
+		// Call the write method for each element
+		ItemEntityVector::iterator elementIterator;
+		for(elementIterator = this->GetElements()->begin(); elementIterator != this->GetElements()->end(); elementIterator++) {
+			ItemEntity* element = (ItemEntity*)(*elementIterator);
+			element->Write(scFile, newItemElem);
+		}
+	}
+}
+
+Item* Item::GetItemById(string itemId) {
+
+	Item* item = NULL;
+	
+	// Search the cache
+	item = Item::SearchCache(atoi(itemId.c_str()));
+
+	// if not found try to parse it.
+	if(item == NULL) {
+
+		DOMElement* systemDataElm = XmlCommon::FindElement(DocumentManager::GetSystemCharacterisitcsDocument(), "system_data");
+		DOMElement* itemElm = XmlCommon::FindElementByAttribute(systemDataElm, "id", itemId);
+
+		if(itemElm == NULL) {
+			throw Exception("Unable to find specified item in system-characteristics document. Item id: " + itemId);
+		}
+
+		item = new Item();
+		item->Parse(itemElm);
+		Item::Cache(item);
+	}
+	
+	return item;
+}
+
+// ***************************************************************************************	//
+//								 Private members											//
+// ***************************************************************************************	//
+void Item::DeleteElements() {
+	
+	ItemEntity* currentElement = NULL;
+	while(elements.size() != 0) {
+	  	currentElement = elements[elements.size()-1];
+	  	elements.pop_back();
+	  	delete currentElement;
+	  	currentElement = NULL;
+	}
+
+	OvalMessage* currentMsg = NULL;
+	while(messages.size() != 0) {
+	  	currentMsg = messages[messages.size()-1];
+	  	messages.pop_back();
+	  	delete currentMsg;
+	  	currentMsg = NULL;
+	}
+}
+
+Item* Item::SearchCache(int id) {
+
+	Item* cachedItem = NULL;
+
+	ItemMap::iterator iterator;
+	iterator = Item::processedItemsMap.find(id);
+	if(iterator != Item::processedItemsMap.end()) {
+		cachedItem = iterator->second;
+	} 
+
+	return cachedItem;
+}
+
+void Item::ClearCache() {
+
+	ItemMap::iterator iterator;
+	for(iterator = Item::processedItemsMap.begin(); iterator != Item::processedItemsMap.end(); iterator++) {
+		
+		Item* item = iterator->second;
+		delete item;
+	}
+	
+	Item::processedItemsMap.clear();
+}
+
+void Item::Cache(Item* item) {
+
+	Item::processedItemsMap.insert(ItemPair(item->GetId(), item));
+}
+
+//****************************************************************************************//
+//								ItemException Class										  //	
+//****************************************************************************************//
+ItemException::ItemException(string errMsgIn, int severity, Exception* ex) : Exception(errMsgIn, severity, ex) {
+
+}
+
+ItemException::~ItemException() {
+
+}


Property changes on: trunk/ovaldi/src/Item.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Item.h
===================================================================
--- trunk/ovaldi/src/Item.h	                        (rev 0)
+++ trunk/ovaldi/src/Item.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,202 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef ITEM_H
+#define ITEM_H
+
+#include <string>
+#include <vector>
+#include <map>
+#include <utility>
+#include <iostream>
+#include <stdlib.h>
+
+//	required xerces includes
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/DOMAttr.hpp>
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xercesc/dom/DOMNodeList.hpp>
+#include <xercesc/util/XMLString.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/parsers/AbstractDOMParser.hpp>
+
+#include "ItemEntity.h"
+#include "OvalMessage.h"
+#include "Exception.h"
+#include "DocumentManager.h"
+
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+class Item;
+
+/**
+	A vector for storing Item objects. 
+	Stores only pointers to the objects. 
+*/
+typedef vector < Item*, allocator<Item*> > ItemVector;
+
+/**	
+	A pair for storing  item ids and Item objects together. 
+	Stores only pointers to the objects. 
+*/
+typedef pair <int, Item* > ItemPair;
+
+/**	
+	A map for storing ItemPairs. 
+	Stores only pointers to the objects. 
+*/
+typedef map <int, Item* > ItemMap;
+
+/**
+	This class represents an Item in a system characteristics document.
+
+	Items are created and populated by probes during data collection. During
+	data collection Items must be unique. The Item::Equals() method and the 
+	caching methods provided in this class should be utilized to ensure uniqueness.
+	This class also provides static methods for assigning Item ids.
+
+	Items are also created during analysis by parsing them from a system-characteristics 
+	document.
+      
+*/
+class Item {
+public:
+	/** Create a complete Item object. */
+	Item(int id = 0, string xmlns = "", string xmlnsAlias = "", string schemaLocation = "", OvalEnum::SCStatus status = OvalEnum::STATUS_EXISTS, string name = "");
+	
+	/** Clean up all the elements. */
+	~Item();
+
+	/** Assign a new Item Id. */
+	static int AssignId();
+
+	bool Equals(Item* Item);
+
+	/** Return all elements with the specified name.
+		@return Returns a vector of elements with a matching name. If no mathes are found the vector is empty. The caller should delete the returned vector but not its contents.
+	*/
+	ItemEntityVector* GetElementsByName(string elementName);
+
+	/** Parse the provided item element from an sc file into an Item object. */
+	void Parse(DOMElement* scItemElm);
+
+	/** Write this item to a sc file. 
+		Make sure the item has not already been written to the sc file.
+	*/
+	void Write(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* scFile, DOMElement* itemsElm);
+
+	ItemEntityVector* GetElements();
+	void SetElements(ItemEntityVector* elements);
+
+	int GetId();
+	void SetId(int id);
+
+	void SetIsWritten(bool isWritten);
+	bool GetIsWritten();
+
+	OvalMessageVector* GetMessages();
+	void SetMessages(OvalMessageVector* messages);
+
+	string GetName();
+	void SetName(string name);
+
+	string GetSchemaLocation();
+	void SetSchemaLocation(string schemaLocation);
+
+	string GetXmlns();
+	void SetXmlns(string xmlns);
+
+	string GetXmlnsAlias();
+	void SetXmlnsAlias(string xmlnsAlias);
+
+	OvalEnum::SCStatus GetStatus();
+	void SetStatus(OvalEnum::SCStatus status);
+
+	void AppendElement(ItemEntity* itemEntity);
+	void AppendMessage(OvalMessage* msg);
+
+	ItemEntityVector* GetObjectElements();
+
+	/** Delete all items in the cache. */
+	static void ClearCache();
+
+	/** Return an item object for the specified item id.
+		First the cache of Items is checked. If the item is
+		not found in the cache the item is looked up in the
+		system-characteristics document and parsed. Once parsed 
+		the new Item object is added to the cache.
+
+		If the item is not found an exception is thrown. 
+
+		
+		NOTE: This method is not intended to be used during data collection.
+	*/
+	static Item* GetItemById(string itemId);
+
+private:
+
+	/** Delete all the elements in the item entity vector. */
+	void DeleteElements();
+
+	/** Cache the specified item. */
+	static void Cache(Item* item);
+
+	/** Search the cache of Items for the specifed Item. 
+		@return Returns the item with the specified id or NULL if not found.
+	*/
+	static Item* SearchCache(int id);
+
+	ItemEntityVector elements;
+	int id;
+	OvalMessageVector messages;
+	string name;
+	OvalEnum::SCStatus status;
+	string xmlns;
+	string xmlnsAlias;
+	string schemaLocation;
+	bool isWritten;
+
+	static int idCounter;
+
+	static ItemMap processedItemsMap;
+};
+
+/** 
+	This class represents an Exception that occured while processing an item.
+*/
+class ItemException : public Exception {
+	public:
+		ItemException(string errMsgIn = "", int severity = ERROR_FATAL, Exception *ex = NULL);
+		~ItemException();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/Item.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/ItemEntity.cpp
===================================================================
--- trunk/ovaldi/src/ItemEntity.cpp	                        (rev 0)
+++ trunk/ovaldi/src/ItemEntity.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,153 @@
+//
+// $Id: ItemEntity.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "ItemEntity.h"
+
+//****************************************************************************************//
+//								ItemEntity Class										  //	
+//****************************************************************************************//
+ItemEntity::ItemEntity(string name, string value, OvalEnum::Datatype datatype, bool isObjectEntity, OvalEnum::SCStatus status) {
+
+	this->SetName(name);
+	this->SetValue(value);
+	this->SetDatatype(datatype);
+	this->SetIsObjectEntity(isObjectEntity);
+	this->SetStatus(status);
+}
+
+ItemEntity::~ItemEntity() {
+
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+string ItemEntity::GetName() {
+
+	return this->name;
+}
+
+void ItemEntity::SetName(string name) {
+
+	this->name = name;
+}
+
+string ItemEntity::GetValue() {
+
+	return this->value;
+}
+
+void ItemEntity::SetValue(string value) {
+
+	this->value = value;
+}
+
+OvalEnum::Datatype ItemEntity::GetDatatype() {
+
+	return this->datatype;
+}
+
+void ItemEntity::SetDatatype(OvalEnum::Datatype datatype) {
+
+	this->datatype = datatype;
+}
+
+bool ItemEntity::GetIsObjectEntity() {
+
+	return this->isObjectEntity;
+}
+
+void ItemEntity::SetIsObjectEntity(bool isObjectEntity) {
+
+	this->isObjectEntity = isObjectEntity;
+}
+
+OvalEnum::SCStatus ItemEntity::GetStatus() {
+
+	return this->scStatus;
+}
+
+void ItemEntity::SetStatus(OvalEnum::SCStatus scStatus) {
+	
+	this->scStatus = scStatus;
+}
+
+bool ItemEntity::Equals(ItemEntity* entity) {
+
+	bool isEqual = false;
+	try {
+	
+		if(this->GetDatatype() == entity->GetDatatype()) {
+			if(this->GetName().compare(entity->GetName()) == 0) {
+				if(this->GetValue().compare(entity->GetValue()) == 0) {
+					isEqual = true;	
+				}
+			}
+		}
+	} catch (Exception ex) {
+		throw Exception("Error: An error occured with comparing two ItemEntities", ERROR_FATAL, &ex);
+	} catch(...) {
+		throw Exception("Error: An error occured with comparing two ItemEntities", ERROR_FATAL);
+	}
+
+	return isEqual;
+}
+
+void ItemEntity::Write(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* scFile, DOMElement* itemElm) {
+
+	// Create new item element
+	DOMElement* newItemEntityElem = scFile->createElement(XMLString::transcode(this->GetName().c_str()));
+	itemElm->appendChild(newItemEntityElem);
+
+	// Add the attributes
+	// handling defaults in the schema
+	string strDatatype = OvalEnum::DatatypeToString(this->GetDatatype());
+	if(strDatatype.compare("string") != 0)
+		XmlCommon::AddAttribute(newItemEntityElem, "datatype", strDatatype);
+
+	string strStatus = OvalEnum::SCStatusToString(this->GetStatus());
+	if(strStatus.compare("exists") != 0)
+        XmlCommon::AddAttribute(newItemEntityElem, "status", strStatus);
+
+	// Add the value
+	if(this->GetValue().compare("") != 0) {
+		DOMText* newItemEntityElemValue = scFile->createTextNode(XMLString::transcode(this->GetValue().c_str()));
+		newItemEntityElem->appendChild(newItemEntityElemValue);
+	}
+}
+
+void ItemEntity::Parse(DOMElement* itemEntityElm) {
+	
+	this->SetName(XmlCommon::GetElementName(itemEntityElm));
+	this->SetValue(XmlCommon::GetDataNodeValue(itemEntityElm));
+	this->SetDatatype(OvalEnum::ToDatatype(XmlCommon::GetAttributeByName(itemEntityElm, "datatype")));
+	this->SetStatus(OvalEnum::ToSCStatus(XmlCommon::GetAttributeByName(itemEntityElm, "status")));
+}


Property changes on: trunk/ovaldi/src/ItemEntity.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/ItemEntity.h
===================================================================
--- trunk/ovaldi/src/ItemEntity.h	                        (rev 0)
+++ trunk/ovaldi/src/ItemEntity.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,132 @@
+//
+// $Id: ItemEntity.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef ITEMENTITY_H
+#define ITEMENTITY_H
+
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/DOMAttr.hpp>
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xercesc/dom/DOMNodeList.hpp>
+#include <xercesc/util/XMLString.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/parsers/AbstractDOMParser.hpp>
+
+#include <string>
+#include <iostream>
+#include <stdlib.h>
+
+#include "Log.h"
+#include "OvalEnum.h"
+#include "XmlCommon.h"
+#include "Exception.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	This class represents an entity in an Item as defined in the oval system characteristics schema.
+*/
+class ItemEntity {
+public:
+
+	/** Create a complete ItemEntity object. */
+	ItemEntity(string name = "", string value = "", OvalEnum::Datatype datatype = OvalEnum::DATATYPE_STRING, bool isObjectEntity = false, OvalEnum::SCStatus status = OvalEnum::STATUS_EXISTS);
+	~ItemEntity();
+
+	/** Return true if this ItemEntity is equal to the provided ItemEntity
+		Note: Status is not compared.
+	*/
+	bool Equals(ItemEntity* entity);
+
+	/** Write this ItemEntity to the sc file.
+	    Inserts this ItemEntity as the last child of the specified
+		itemElm.
+	*/
+	void Write(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* scFile, DOMElement* itemElm);
+
+	/** Parse the provided entity element */
+	void Parse(DOMElement* entityElm);
+
+	/** Return the status field's value. */
+	OvalEnum::SCStatus GetStatus();
+
+	/** Set the scStatus field's value. */
+	void SetStatus(OvalEnum::SCStatus status);
+
+	/** Return the name field's value. */
+	string GetName();
+
+	/** Set the name field's value. */
+	void SetName(string name);
+
+	/** Return the value field's value. */
+	string GetValue();
+
+	/** Set the value field's value. */
+	void SetValue(string value);
+
+	/** Get the datatype field's value. */
+	OvalEnum::Datatype GetDatatype();
+
+	/** Set the datatype field's value. */
+	void SetDatatype(OvalEnum::Datatype datatype);
+
+	/** Get the isObjectEntity field's value. */
+	bool GetIsObjectEntity();
+
+	/** Set the isObjectEntity field's value. */
+	void SetIsObjectEntity(bool isObjectEntity);
+
+private:
+	OvalEnum::SCStatus scStatus;
+	string name;
+	string value;
+	OvalEnum::Datatype datatype;
+	bool isObjectEntity;
+};
+
+/**	
+	A vector for storing ItemEntity objects. 
+	Stores only pointers to the objects. 
+*/
+typedef vector < ItemEntity*, allocator<ItemEntity*> > ItemEntityVector;
+
+/** 
+	This class represents an Exception that occured while processing an ItemEntity.
+*/
+class ItemEntityException : public Exception {
+	public:
+		ItemEntityException(string errMsgIn = "", int severity = ERROR_FATAL, Exception *ex = NULL);
+		~ItemEntityException();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/ItemEntity.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/LiteralComponent.cpp
===================================================================
--- trunk/ovaldi/src/LiteralComponent.cpp	                        (rev 0)
+++ trunk/ovaldi/src/LiteralComponent.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,129 @@
+//
+// $Id: LiteralComponent.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "LiteralComponent.h"
+
+//****************************************************************************************//
+//								LiteralComponent Class									  //	
+//****************************************************************************************//
+LiteralComponent::LiteralComponent(string value) : AbsComponent() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a complete LiteralComponent object
+	//
+	// -----------------------------------------------------------------------
+
+	this->SetValue(value);
+}
+
+LiteralComponent::~LiteralComponent() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Do nothing for now
+	//
+	// -----------------------------------------------------------------------
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+string LiteralComponent::GetValue() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the value field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->value;
+}
+
+void LiteralComponent::SetValue(string value) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the value field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->value = value;
+}
+
+
+ComponentValue* LiteralComponent::ComputeValue() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Compute the value for this component. 
+	//  Allows only one value.
+	//  If the value is an empty string set the OvalEnum::Flag on the 
+	//  resulting ComponentValue to OvalEnum::FLAG_ERROR
+	// -----------------------------------------------------------------------
+	
+	ComponentValue* result = new ComponentValue();
+
+	if(this->GetValue().compare("") != 0) {
+		StringVector* values = new StringVector();
+		values->push_back(this->GetValue());
+		result->SetValues(values);
+		result->SetFlag(OvalEnum::FLAG_COMPLETE);
+	} else {
+		result->SetFlag(OvalEnum::FLAG_ERROR);
+		result->AppendMessage("Error the specified literal component did not have a value. Literal components are required to have values.");
+	}
+
+	return result;	
+}
+
+void LiteralComponent::Parse(DOMElement* componentElm) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	parse the component element
+	// -----------------------------------------------------------------------
+    
+	this->SetValue(XmlCommon::GetDataNodeValue(componentElm));
+}
+
+VariableValueVector* LiteralComponent::GetVariableValues() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	return the variable values used to compute this component's value
+	// in this case just an empty vector.
+	// -----------------------------------------------------------------------
+	
+	VariableValueVector* values = new VariableValueVector();
+
+	return values;
+}


Property changes on: trunk/ovaldi/src/LiteralComponent.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/LiteralComponent.h
===================================================================
--- trunk/ovaldi/src/LiteralComponent.h	                        (rev 0)
+++ trunk/ovaldi/src/LiteralComponent.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,61 @@
+//
+// $Id: LiteralComponent.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef LITERALCOMPONENT_H
+#define LITERALCOMPONENT_H
+
+#include "AbsComponent.h"
+
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	This class represents a LiteralComponent in a local_variable in the oval definition schema
+*/
+class LiteralComponent : public AbsComponent {
+public:
+	LiteralComponent(string value = "");
+	~LiteralComponent();
+
+	void Parse(DOMElement* componentElm); 
+	ComponentValue* ComputeValue();
+
+	VariableValueVector* GetVariableValues();
+
+	string GetValue();
+	void SetValue(string value);
+
+private:
+	string value;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/LiteralComponent.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/LocalVariable.cpp
===================================================================
--- trunk/ovaldi/src/LocalVariable.cpp	                        (rev 0)
+++ trunk/ovaldi/src/LocalVariable.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,129 @@
+//
+// $Id: LocalVariable.cpp 4593 2008-01-03 16:39:57Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "LocalVariable.h"
+
+//****************************************************************************************//
+//									LocalVariable Class									  //	
+//****************************************************************************************//
+
+LocalVariable::LocalVariable(string id, string name, int version, OvalEnum::Datatype datatype, StringVector* msgs) : AbsVariable (id, name, version, datatype, msgs) {
+
+}
+
+LocalVariable::~LocalVariable() {
+
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+AbsComponent* LocalVariable::GetComponent() {
+	return this->component;
+}
+
+void LocalVariable::SetComponent(AbsComponent* component) {
+	this->component = component;
+}
+
+void LocalVariable::ComputeValue() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Compute the value of the component then create a VariableValue
+	//  for each value in the returned ComponentValue if the flag is set to complete
+	//  or incomplete.
+	// -----------------------------------------------------------------------
+
+	ComponentValue* value = this->GetComponent()->ComputeValue();
+
+	// set the flag for this variable
+	this->SetFlag(value->GetFlag());
+
+	// set the error message for this varaible
+	this->AppendMessages(value->GetMessages());
+
+	// if flag is complete or incomplete create VariableValues for each value.
+	if(value->GetFlag() == OvalEnum::FLAG_COMPLETE || value->GetFlag() == OvalEnum::FLAG_INCOMPLETE) {
+		StringVector::iterator iterator;
+		for(iterator = value->GetValues()->begin(); iterator != value->GetValues()->end(); iterator++) {
+			VariableValue* varValue = new VariableValue(this->GetId(), (*iterator));
+			this->AppendVariableValue(varValue);
+		}
+	}
+
+	delete value;
+}
+
+void LocalVariable::Parse(DOMElement* localVariableElm) {
+
+	this->SetId(XmlCommon::GetAttributeByName(localVariableElm, "id"));
+	this->SetDatatype(OvalEnum::ToDatatype(XmlCommon::GetAttributeByName(localVariableElm, "daatatype")));
+	string versionStr = XmlCommon::GetAttributeByName(localVariableElm, "version");
+	int version;
+	if(versionStr.compare("") != 0) {
+		version = atoi(versionStr.c_str());
+		this->SetVersion(version);
+	}	
+   
+	// now loop through all elements children
+	DOMNodeList *localVariableElmChildren = localVariableElm->getChildNodes();
+	unsigned int index = 0;
+	while(index < localVariableElmChildren->getLength()) {
+		DOMNode *tmpNode = localVariableElmChildren->item(index);
+		if (tmpNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+			DOMElement *childElm = (DOMElement*)tmpNode;
+
+			// Call the ComponentFactory
+			AbsComponent* absComponent = ComponentFactory::GetComponent(childElm);
+			this->SetComponent(absComponent);
+		}
+		index ++;
+	}
+
+	// Finally call ComputeValue
+	this->ComputeValue();
+}
+
+VariableValueVector* LocalVariable::GetVariableValues() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	return the variable values used to compute this variable's value
+	//	in this case just return the values used by the component.
+	// -----------------------------------------------------------------------
+	
+	VariableValueVector* values = NULL;
+
+	values = this->GetComponent()->GetVariableValues();
+
+	return values;
+}


Property changes on: trunk/ovaldi/src/LocalVariable.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/LocalVariable.h
===================================================================
--- trunk/ovaldi/src/LocalVariable.h	                        (rev 0)
+++ trunk/ovaldi/src/LocalVariable.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,65 @@
+//
+// $Id: LocalVariable.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef LOCALVARIABLE_H
+#define LOCALVARIABLE_H
+
+#include "AbsVariable.h"
+#include "ComponentFactory.h"
+#include "VariableFactory.h"
+
+using namespace std;
+
+/**
+	This class represents an local_variable in an oval definition schema.
+*/
+class LocalVariable : public AbsVariable {
+public:
+
+	/** Create a complete LocalVariable. */
+	LocalVariable(string id = "", string name = "local_variable", int version = 1, OvalEnum::Datatype datatype = OvalEnum::DATATYPE_STRING, StringVector* msgs = new StringVector());
+	~LocalVariable();
+
+	/** Parse the provided local_variable element into a LocalVariable. */
+	void Parse(DOMElement* localVariableElm);
+	void ComputeValue();
+	VariableValueVector* GetVariableValues();
+	
+	/** Get the AbsComponent. */
+	AbsComponent* GetComponent();
+	/** Set the AbsComponent. */
+	void SetComponent(AbsComponent* component);
+
+private:
+	AbsComponent* component;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/LocalVariable.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Log.cpp
===================================================================
--- trunk/ovaldi/src/Log.cpp	                        (rev 0)
+++ trunk/ovaldi/src/Log.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,229 @@
+//
+// $Id: Log.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "Log.h"
+
+// Initialize static variables.
+int Log::level = Log::DEBUG;
+bool Log::toScreen = true;
+bool Log::initialized = false;
+string Log::logFilename = "oval.log";
+FILE* Log::fp = NULL;
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+void Log::Shutdown() {
+	//------------------------------------------------------------------------------------//
+	//
+	//  ABSTRACT
+	//
+	//  Close the log file
+	//
+	//------------------------------------------------------------------------------------//
+
+	if(fp != NULL) {
+		fclose(fp);
+	}
+}
+
+void Log::Init(int level, string logFile, bool toScreen) {
+	//------------------------------------------------------------------------------------//
+	//
+	//  ABSTRACT
+	//
+	//  This function clears the existing log file.  Only return false if an existing
+	//  file can not be deleted.
+	//	Sets the log level to be used by the loggin system
+	//	Sets a flag indicating if log messages should be output to screen or not.
+	//
+	//------------------------------------------------------------------------------------//
+
+	// init the log level
+	Log::SetLevel(level);
+
+	// init the log file
+	Log::logFilename = logFile;
+
+	// init the to screen flag
+	Log::toScreen = toScreen;
+
+	// Reset the log file
+	Log::fp = NULL;
+	Log::fp = fopen(logFilename.c_str(), "w+"); 
+	if (Log::fp == NULL) {
+		throw Exception("Error initializing log system. Unable to clear log file.");
+	}
+
+	Log::initialized = true;
+}
+
+void Log::UnalteredMessage(string msg) {
+	if(!Log::initialized)
+		throw Exception("The loging system must first be initialized.");
+
+	bool tmp = Log::toScreen;
+	Log::toScreen = false;
+	fputs(msg.c_str(), Log::fp);
+	Log::toScreen = tmp;
+}
+
+void Log::Debug(string msg, bool fileOnly) {
+	if(!Log::initialized)
+		throw Exception("The loging system must first be initialized.");
+
+	if(Log::IsDebug()) {
+		msg = Common::GetTimeStamp() + " : DEBUG : " + msg;
+		Log::WriteLog(msg, fileOnly);
+	}
+}
+
+void Log::Info(string msg) {
+	if(!Log::initialized)
+		throw Exception("The loging system must first be initialized.");
+
+	if(Log::IsInfo()) {
+		msg = Common::GetTimeStamp() + " : INFO : " + msg;
+		Log::WriteLog(msg);
+	}
+}
+
+void Log::Message(string msg) {
+	if(!Log::initialized)
+		throw Exception("The loging system must first be initialized.");
+
+	if(Log::IsMessage()) {
+		msg = Common::GetTimeStamp() + " : MESSAGE : " + msg;
+		Log::WriteLog(msg);
+	}
+}
+
+void Log::Fatal(string msg) {
+	if(!Log::initialized)
+		throw Exception("The loging system must first be initialized.");
+
+	if(Log::IsFatal()) {
+		msg = Common::GetTimeStamp() + " : FATAL : " + msg;
+		Log::WriteLog(msg);
+	}
+}
+
+void Log::SetLevel(int level) {
+	Log::level = level;
+}
+
+int Log::GetLevel() {
+	return Log::level;
+}
+
+void Log::SetToScreen(bool screen) {
+	Log::toScreen = screen;
+}
+
+bool Log::IsDebug() {
+	bool enabled = false;
+	if(Log::GetLevel() <= DEBUG)
+		enabled = true;
+	return enabled;
+}
+
+bool Log::IsInfo() {
+	bool enabled = false;
+	if(Log::GetLevel() <= INFO)
+		enabled = true;
+	return enabled;
+}
+
+bool Log::IsMessage() {
+	bool enabled = false;
+	if(Log::GetLevel() <= MESSAGE)
+		enabled = true;
+	return enabled;
+}
+
+bool Log::IsFatal() {
+	bool enabled = false;
+	if(Log::GetLevel() <= FATAL)
+		enabled = true;
+	return enabled;
+}
+
+bool Log::WriteToScreen() {
+	return Log::toScreen;
+}
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+void Log::WriteLog(string logMessageIn, bool fileOnly) {
+	//------------------------------------------------------------------------------------//
+	//
+	//  ABSTRACT
+	//
+	//  Writes the given message to the log file
+	//
+	//  The log file is opened using fopen with a mode of "a+".  This opens the file for
+	//  reading and appending.  The appending operation includes the removal of the EOF
+	//  marker before new data is written to the file and the EOF marker is restored after
+	//  writing is complete.  The file is created first if it doesn’t exist.
+	//
+	//  If an error occurs, ignore it.  Just means that the error message will not get
+	//  written to the log file.
+	//
+	//------------------------------------------------------------------------------------//
+
+	string tmp = logMessageIn + "\n";
+	fputs(tmp.c_str(), fp);
+
+	if(Log::toScreen && !fileOnly) {
+		cout << logMessageIn << endl;
+	}
+}
+
+string Log::LevelToString(int level) {
+	string levelStr = "";
+	
+	switch(level) {
+		case Log::FATAL:
+			levelStr = "FATAL";
+			break;
+		case Log::INFO:
+			levelStr = "INFO";
+			break;
+		case Log::MESSAGE:
+			levelStr = "MESSAGE";
+			break;
+		case Log::DEBUG:
+			levelStr = "DEBUG";
+			break;
+	}
+
+	return levelStr;
+}


Property changes on: trunk/ovaldi/src/Log.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Log.h
===================================================================
--- trunk/ovaldi/src/Log.h	                        (rev 0)
+++ trunk/ovaldi/src/Log.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,80 @@
+//
+// $Id: Log.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef LOG_H
+#define LOG_H
+
+#include "Common.h"
+#include <string>
+#include <stdio.h>
+
+using namespace std;
+
+/** 
+	This class provides logging for the application.
+*/
+class Log {
+public:
+
+	static void Init(int level = DEBUG, string logFile = "", bool toScreen = false);
+	static void Shutdown();
+	static void Debug(string, bool fileOnly = false);
+	static void Info(string);
+	static void Message(string);
+	static void Fatal(string);
+	static int GetLevel();		
+	static void SetLevel(int level);
+	static void SetToScreen(bool screen);
+	static bool IsDebug();
+	static bool IsInfo();
+	static bool IsMessage();
+	static bool IsFatal();
+	static void UnalteredMessage(string);
+
+	static const int DEBUG = 1;
+	static const int INFO = 2;
+	static const int MESSAGE = 3;
+	static const int FATAL = 4;
+
+	static bool WriteToScreen();
+
+private:
+	static void WriteLog(string, bool fileOnly = false);
+	static string LevelToString(int level);
+	static string logFilename;
+	static int level;
+	static bool toScreen;
+	static bool initialized;
+	static FILE* fp;
+
+};
+
+#endif


Property changes on: trunk/ovaldi/src/Log.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/MD5.cpp
===================================================================
--- trunk/ovaldi/src/MD5.cpp	                        (rev 0)
+++ trunk/ovaldi/src/MD5.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,513 @@
+//
+// $Id: MD5.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+//
+// MD5.cpp - source code for the C++/object oriented translation and 
+//          modification of MD5.
+//
+// Translation and modification (c) 1995 by Mordechai T. Abzug 
+//
+// This translation/ modification is provided "as is," without express or 
+// implied warranty of any kind.
+//
+// The translator/ modifier does not claim (1) that MD5 will do what you think 
+// it does; (2) that this translation/ modification is accurate; or (3) that 
+// this software is "merchantible."  (Language for this disclaimer partially 
+// copied from the disclaimer below).
+//
+//****************************************************************************************//
+//
+// Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
+// rights reserved.
+//
+// License to copy and use this software is granted provided that it
+// is identified as the "RSA Data Security, Inc. MD5 Message-Digest
+// Algorithm" in all material mentioning or referencing this software
+// or this function.
+// 
+// License is also granted to make and use derivative works provided
+// that such works are identified as "derived from the RSA Data
+// Security, Inc. MD5 Message-Digest Algorithm" in all material
+// mentioning or referencing the derived work.
+// 
+// RSA Data Security, Inc. makes no representations concerning either
+// the merchantability of this software or the suitability of this
+// software for any particular purpose. It is provided "as is"
+// without express or implied warranty of any kind.
+// 
+// These notices must be retained in any copies of any part of this
+// documentation and/or software.
+// 
+//****************************************************************************************//
+
+#include "MD5.h"
+
+// MD5 simple initialization method
+
+MD5::MD5(){
+
+  init();
+
+}
+
+
+
+
+// MD5 block update operation. Continues an MD5 message-digest
+// operation, processing another message block, and updating the
+// context.
+
+void MD5::update (uint1 *input, uint4 input_length) {
+
+  uint4 input_index, buffer_index;
+  uint4 buffer_space;                // how much space is left in buffer
+
+  if (finalized){  // so we can't update!
+    cerr << "MD5::update:  Can't update a finalized digest!" << endl;
+    return;
+  }
+
+  // Compute number of bytes mod 64
+  buffer_index = (unsigned int)((count[0] >> 3) & 0x3F);
+
+  // Update number of bits
+  if (  (count[0] += ((uint4) input_length << 3))<((uint4) input_length << 3) )
+    count[1]++;
+
+  count[1] += ((uint4)input_length >> 29);
+
+  // SMC-AUDIT: REVIEW: buffer space calculations like this can sometimes hide overflows.
+  // Careful mathematics is required to make sure there isn't a way to set buffer_index in
+  // a way that screws up the resulting memcpy().
+  //
+  // ARB: I assume they got it right?
+
+  buffer_space = 64 - buffer_index;  // how much space is left in buffer
+
+  // Transform as many times as possible.
+  if (input_length >= buffer_space) { // ie. we have enough to fill the buffer
+    // fill the rest of the buffer and transform
+    memcpy (buffer + buffer_index, input, buffer_space);
+    transform (buffer);
+
+    // now, transform each 64-byte piece of the input, bypassing the buffer
+    for (input_index = buffer_space; input_index + 63 < input_length; 
+	 input_index += 64)
+      transform (input+input_index);
+
+    buffer_index = 0;  // so we can buffer remaining
+  }
+  else
+    input_index=0;     // so we can buffer the whole input
+
+
+  // and here we do the buffering:
+  memcpy(buffer+buffer_index, input+input_index, input_length-input_index);
+}
+
+
+
+// MD5 update for files.
+// Like above, except that it works on files (and uses above as a primitive.)
+
+void MD5::update(FILE *file){
+
+  unsigned char buffer[1024];
+  int len;
+
+  while ((len=fread(buffer, 1, 1024, file)))
+    update(buffer, len);
+
+  fclose (file);
+
+}
+
+
+
+// MD5 finalization. Ends an MD5 message-digest operation, writing the
+// the message digest and zeroizing the context.
+
+
+void MD5::finalize (){
+
+  unsigned char bits[8];
+  unsigned int index, padLen;
+  static uint1 PADDING[64]={
+    0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+    };
+
+  if (finalized){
+    cerr << "MD5::finalize:  Already finalized this digest!" << endl;
+    return;
+  }
+
+  // Save number of bits
+  encode (bits, count, 8);
+
+  // Pad out to 56 mod 64.
+
+  index = (uint4) ((count[0] >> 3) & 0x3f);
+  padLen = (index < 56) ? (56 - index) : (120 - index);
+  update (PADDING, padLen);
+
+  // Append length (before padding)
+  update (bits, 8);
+
+  // Store state in digest
+  encode (digest, state, 16);
+
+  /////////////////////////////////////////////////////////////////////////////////
+  // Zeroize sensitive information
+  //
+  // SMC-AUDIT: REVIEW: this memset only clears the first element of buffer, doesn't it?
+  // shouldn't it be sizeof(buffer) instead?
+  //
+  // ARB: I would have to agree.  Making the change.
+
+  memset (buffer, 0, sizeof(buffer));
+  //memset (buffer, 0, sizeof(*buffer));
+
+  //
+  /////////////////////////////////////////////////////////////////////////////////
+
+  finalized=1;
+
+}
+
+
+
+
+MD5::MD5(FILE *file){
+
+  init();  // must be called be all constructors
+  update(file);
+  finalize ();
+}
+
+
+
+
+unsigned char *MD5::raw_digest(){
+
+  uint1 *s = new uint1[16];
+
+  if (!finalized){
+    cerr << "MD5::raw_digest:  Can't get digest if you haven't "<<
+      "finalized the digest!" <<endl;
+    return ( (unsigned char*) "");
+  }
+
+  memcpy(s, digest, 16);
+  return s;
+}
+
+
+
+char *MD5::hex_digest(){
+
+  int i;
+  char *s= new char[33];
+
+  if (!finalized){
+    cerr << "MD5::hex_digest:  Can't get digest if you haven't "<<
+      "finalized the digest!" <<endl;
+    return "";
+  }
+
+  for (i=0; i<16; i++)
+    sprintf(s+i*2, "%02x", digest[i]);
+
+  s[32]='\0';
+
+  return s;
+}
+
+
+
+
+
+ostream& operator<<(ostream &stream, MD5 context){
+
+  stream << context.hex_digest();
+  return stream;
+}
+
+
+
+
+// PRIVATE METHODS:
+
+
+
+void MD5::init(){
+  finalized=0;  // we just started!
+
+  // Nothing counted, so count=0
+  count[0] = 0;
+  count[1] = 0;
+
+  // Load magic initialization constants.
+  state[0] = 0x67452301;
+  state[1] = 0xefcdab89;
+  state[2] = 0x98badcfe;
+  state[3] = 0x10325476;
+}
+
+
+
+// Constants for MD5Transform routine.
+// Although we could use C++ style constants, defines are actually better,
+// since they let us easily evade scope clashes.
+
+#define S11 7
+#define S12 12
+#define S13 17
+#define S14 22
+#define S21 5
+#define S22 9
+#define S23 14
+#define S24 20
+#define S31 4
+#define S32 11
+#define S33 16
+#define S34 23
+#define S41 6
+#define S42 10
+#define S43 15
+#define S44 21
+
+
+
+
+// MD5 basic transformation. Transforms state based on block.
+void MD5::transform (uint1 block[64]){
+
+  uint4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
+
+  decode (x, block, 64);
+
+  assert(!finalized);  // not just a user error, since the method is private
+
+  /* Round 1 */
+  FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
+  FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
+  FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
+  FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
+  FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
+  FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
+  FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
+  FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
+  FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
+  FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
+  FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
+  FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
+  FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
+  FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
+  FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
+  FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
+
+ /* Round 2 */
+  GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
+  GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
+  GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
+  GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
+  GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
+  GG (d, a, b, c, x[10], S22,  0x2441453); /* 22 */
+  GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
+  GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
+  GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
+  GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
+  GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
+  GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
+  GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
+  GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
+  GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
+  GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
+
+  /* Round 3 */
+  HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
+  HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
+  HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
+  HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
+  HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
+  HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
+  HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
+  HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
+  HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
+  HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
+  HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
+  HH (b, c, d, a, x[ 6], S34,  0x4881d05); /* 44 */
+  HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
+  HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
+  HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
+  HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */
+
+  /* Round 4 */
+  II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
+  II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
+  II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
+  II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
+  II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
+  II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
+  II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
+  II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
+  II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
+  II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
+  II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
+  II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
+  II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
+  II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
+  II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
+  II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
+
+  state[0] += a;
+  state[1] += b;
+  state[2] += c;
+  state[3] += d;
+
+  // Zeroize sensitive information.
+  memset ( (uint1 *) x, 0, sizeof(x));
+
+}
+
+
+
+// Encodes input (UINT4) into output (unsigned char). Assumes len is
+// a multiple of 4.
+void MD5::encode (uint1 *output, uint4 *input, uint4 len) {
+
+  unsigned int i, j;
+
+  for (i = 0, j = 0; j < len; i++, j += 4) {
+    output[j]   = (uint1)  (input[i] & 0xff);
+    output[j+1] = (uint1) ((input[i] >> 8) & 0xff);
+    output[j+2] = (uint1) ((input[i] >> 16) & 0xff);
+    output[j+3] = (uint1) ((input[i] >> 24) & 0xff);
+  }
+}
+
+
+
+
+// Decodes input (unsigned char) into output (UINT4). Assumes len is
+// a multiple of 4.
+void MD5::decode (uint4 *output, uint1 *input, uint4 len){
+
+  unsigned int i, j;
+
+  for (i = 0, j = 0; j < len; i++, j += 4)
+    output[i] = ((uint4)input[j]) | (((uint4)input[j+1]) << 8) |
+      (((uint4)input[j+2]) << 16) | (((uint4)input[j+3]) << 24);
+}
+
+
+
+
+
+// Note: Replace "for loop" with standard memcpy if possible.
+void MD5::memcpy (uint1 *output, uint1 *input, uint4 len){
+
+  unsigned int i;
+
+  for (i = 0; i < len; i++)
+    output[i] = input[i];
+}
+
+
+
+// Note: Replace "for loop" with standard memset if possible.
+void MD5::memset (uint1 *output, uint1 value, uint4 len){
+
+  unsigned int i;
+
+  for (i = 0; i < len; i++)
+    output[i] = value;
+}
+
+
+
+// ROTATE_LEFT rotates x left n bits.
+
+inline unsigned int MD5::rotate_left  (uint4 x, uint4 n){
+  return (x << n) | (x >> (32-n))  ;
+}
+
+
+
+
+// F, G, H and I are basic MD5 functions.
+
+inline unsigned int MD5::F            (uint4 x, uint4 y, uint4 z){
+  return (x & y) | (~x & z);
+}
+
+inline unsigned int MD5::G            (uint4 x, uint4 y, uint4 z){
+  return (x & z) | (y & ~z);
+}
+
+inline unsigned int MD5::H            (uint4 x, uint4 y, uint4 z){
+  return x ^ y ^ z;
+}
+
+inline unsigned int MD5::I            (uint4 x, uint4 y, uint4 z){
+  return y ^ (x | ~z);
+}
+
+
+
+// FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
+// Rotation is separate from addition to prevent recomputation.
+
+
+inline void MD5::FF(uint4& a, uint4 b, uint4 c, uint4 d, uint4 x, 
+		    uint4  s, uint4 ac){
+ a += F(b, c, d) + x + ac;
+ a = rotate_left (a, s) +b;
+}
+
+inline void MD5::GG(uint4& a, uint4 b, uint4 c, uint4 d, uint4 x, 
+		    uint4 s, uint4 ac){
+ a += G(b, c, d) + x + ac;
+ a = rotate_left (a, s) +b;
+}
+
+inline void MD5::HH(uint4& a, uint4 b, uint4 c, uint4 d, uint4 x, 
+		    uint4 s, uint4 ac){
+ a += H(b, c, d) + x + ac;
+ a = rotate_left (a, s) +b;
+}
+
+inline void MD5::II(uint4& a, uint4 b, uint4 c, uint4 d, uint4 x, 
+			     uint4 s, uint4 ac){
+ a += I(b, c, d) + x + ac;
+ a = rotate_left (a, s) +b;
+}


Property changes on: trunk/ovaldi/src/MD5.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/MD5.h
===================================================================
--- trunk/ovaldi/src/MD5.h	                        (rev 0)
+++ trunk/ovaldi/src/MD5.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,143 @@
+//
+// $Id: MD5.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+//
+// MD5.cpp - source code for the C++/object oriented translation and 
+//          modification of MD5.
+//
+// Translation and modification (c) 1995 by Mordechai T. Abzug 
+//
+// This translation/ modification is provided "as is," without express or 
+// implied warranty of any kind.
+//
+// The translator/ modifier does not claim (1) that MD5 will do what you think 
+// it does; (2) that this translation/ modification is accurate; or (3) that 
+// this software is "merchantible."  (Language for this disclaimer partially 
+// copied from the disclaimer below).
+//
+//****************************************************************************************//
+//
+// Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
+// rights reserved.
+//
+// License to copy and use this software is granted provided that it
+// is identified as the "RSA Data Security, Inc. MD5 Message-Digest
+// Algorithm" in all material mentioning or referencing this software
+// or this function.
+// 
+// License is also granted to make and use derivative works provided
+// that such works are identified as "derived from the RSA Data
+// Security, Inc. MD5 Message-Digest Algorithm" in all material
+// mentioning or referencing the derived work.
+// 
+// RSA Data Security, Inc. makes no representations concerning either
+// the merchantability of this software or the suitability of this
+// software for any particular purpose. It is provided "as is"
+// without express or implied warranty of any kind.
+// 
+// These notices must be retained in any copies of any part of this
+// documentation and/or software.
+// 
+//****************************************************************************************//
+
+#ifndef MD5_H
+#define MD5_H
+
+#include <assert.h>
+
+#include <fstream>
+#include <iostream>
+
+using namespace std;
+
+/**
+	Provides md5 support to the application.
+*/
+class MD5 {
+
+public:
+// methods for controlled operation:
+  MD5              ();  // simple initializer
+  void  update     (unsigned char *input, unsigned int input_length);
+  void  update     (FILE *file);
+  void  finalize   ();
+
+// constructors for special circumstances.  All these constructors finalize
+// the MD5 context.
+  MD5              (FILE *file);            // digest file, close, finalize
+
+// methods to acquire finalized result
+  unsigned char    *raw_digest ();  // digest as a 16-byte binary array
+  char *            hex_digest ();  // digest as a 33-byte ascii-hex string
+  friend ostream&   operator<< (ostream&, MD5 context);
+
+
+
+private:
+
+// first, some types:
+  typedef unsigned       int uint4; // assumes integer is 4 words long
+  typedef unsigned short int uint2; // assumes short integer is 2 words long
+  typedef unsigned      char uint1; // assumes char is 1 word long
+
+// next, the private data:
+  uint4 state[4];
+  uint4 count[2];     // number of *bits*, mod 2^64
+  uint1 buffer[64];   // input buffer
+  uint1 digest[16];
+  uint1 finalized;
+
+// last, the private methods, mostly static:
+  void init             ();               // called by all constructors
+  void transform        (uint1 *buffer);  // does the real update work.  Note 
+                                          // that length is implied to be 64.
+
+  static void encode    (uint1 *dest, uint4 *src, uint4 length);
+  static void decode    (uint4 *dest, uint1 *src, uint4 length);
+  static void memcpy    (uint1 *dest, uint1 *src, uint4 length);
+  static void memset    (uint1 *start, uint1 val, uint4 length);
+
+  static inline uint4  rotate_left (uint4 x, uint4 n);
+  static inline uint4  F           (uint4 x, uint4 y, uint4 z);
+  static inline uint4  G           (uint4 x, uint4 y, uint4 z);
+  static inline uint4  H           (uint4 x, uint4 y, uint4 z);
+  static inline uint4  I           (uint4 x, uint4 y, uint4 z);
+  static inline void   FF  (uint4& a, uint4 b, uint4 c, uint4 d, uint4 x, 
+			    uint4 s, uint4 ac);
+  static inline void   GG  (uint4& a, uint4 b, uint4 c, uint4 d, uint4 x, 
+			    uint4 s, uint4 ac);
+  static inline void   HH  (uint4& a, uint4 b, uint4 c, uint4 d, uint4 x, 
+			    uint4 s, uint4 ac);
+  static inline void   II  (uint4& a, uint4 b, uint4 c, uint4 d, uint4 x, 
+			    uint4 s, uint4 ac);
+
+};
+
+#endif


Property changes on: trunk/ovaldi/src/MD5.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Main.cpp
===================================================================
--- trunk/ovaldi/src/Main.cpp	                        (rev 0)
+++ trunk/ovaldi/src/Main.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,749 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "Main.h"
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Main  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+
+int main(int argc, char* argv[]) {
+	//------------------------------------------------------------------------------------//
+	//
+	//  ABSTRACT
+	//
+	//  This is the starting point for this app.
+	//
+	//------------------------------------------------------------------------------------//
+
+///////////////////////		DEBUG	///////////////////////////////////////
+#ifdef _DEBUG
+	int startTime = 0;
+	int endTime = 0;
+	int parseStart = 0;
+	int parseEnd = 0;
+	int collectionStart = 0;
+	int collectionEnd = 0;
+	int analysisStart = 0;
+	int analysisEnd = 0;
+	startTime = GetTickCount();
+#endif
+///////////////////////		DEBUG	///////////////////////////////////////
+
+
+// init the log system - set the log level here
+#ifdef _DEBUG
+	Log::Init(Log::DEBUG, "ovaldi.log", false);
+#else
+	Log::Init(Log::INFO, "ovaldi.log", false);
+#endif
+
+	//////////////////////////////////////////////////////
+	///////////////////  Print Header  ///////////////////
+	//////////////////////////////////////////////////////
+
+	// Get the current time measured in the number of seconds elapsed since 1/1/70.  Then
+	// format this time so it is readable.
+	time_t currentTime;
+	time(&currentTime);
+	char* timeBuffer = ctime(&currentTime);
+
+	// Create header.
+	string headerMessage = "";
+	headerMessage.append("\n");
+	headerMessage.append("----------------------------------------------------\n");
+	headerMessage.append("OVAL Definition Interpreter\n");
+    headerMessage.append("Version: " + Version::GetVersion() + " Build: " + Version::GetBuild() +"\n");
+    headerMessage.append("Build date: " + Version::GetBuildDate() + "\n");
+	headerMessage.append("Copyright (c) 2002-2008 - The MITRE Corporation\n");
+	headerMessage.append("----------------------------------------------------\n");
+	headerMessage.append("\n");
+	headerMessage.append(timeBuffer);
+	headerMessage.append("\n");
+
+	// Send header to console and log file.
+	cout << headerMessage;
+	Log::UnalteredMessage(headerMessage);
+
+	//////////////////////////////////////////////////////
+	/////////  Parse Command-line Options  ///////////////
+	//////////////////////////////////////////////////////
+	ProcessCommandLine(argc, argv);
+
+	//////////////////////////////////////////////////////
+	//////////////////  Check MD5 Flag  //////////////////
+	//////////////////////////////////////////////////////
+	if(Common::GetGenerateMD5()) {
+
+		// Open the xmlfile so we can pass it to the MD5 hash routine.  Make
+		// sure we open it in binary mode.  If not, ctrl+m characters will be
+		// stripped before computing the hash, resulting in the wrong hash
+		// being produced.
+
+		FILE* fpVerify = fopen(Common::GetXMLfile().c_str(), "rb");
+		if (fpVerify == NULL) {
+			cerr << endl << "** ERROR: Could not open file.";
+			exit(0);
+		}
+
+		// Create the md5 hash.  This constructor creates a new md5 object,
+		// updates the hash, finalizes the hash, and closes the FILE object.
+
+		MD5 context(fpVerify);
+
+		// Get the hash and print it to the screen.
+
+		string hashBuf = context.hex_digest();
+		cout << endl << hashBuf << endl;
+
+		exit(0);
+	}
+
+	//////////////////////////////////////////////////////
+	//////////////  Disable All Privileges  //////////////
+	//////////////////////////////////////////////////////
+	#ifdef WIN32
+		if (WindowsCommon::DisableAllPrivileges() == false) {
+			string errorMessage = "";
+
+			errorMessage.append("\nERROR: Unable to disable all privileges.  The program ");
+			errorMessage.append("will terminate.\n");
+
+			cerr << errorMessage;
+			Log::Fatal(errorMessage);
+
+			exit(0);
+		}
+	#endif
+
+	//////////////////////////////////////////////////////
+	///////////////  Verify oval.xml file - MD5  /////////
+	//////////////////////////////////////////////////////
+	string logMessage = "";
+
+	if (Common::GetVerifyXMLfile() == true) {
+
+		logMessage = " ** verifying the MD5 hash of'";
+		logMessage.append(Common::GetXMLfile());
+		logMessage.append("' file\n");
+
+		cout << logMessage;
+		Log::UnalteredMessage(logMessage);
+
+		// Open the xmlfile so we can pass it to the MD5 hash routine.  Make sure we open
+		// it in binary mode.  If not, ctrl+m characters will be stripped before computing
+		// the hash, resulting in the wrong hash being produced.
+
+		FILE* fpVerify = fopen(Common::GetXMLfile().c_str(), "rb");
+		if (fpVerify == NULL) {
+
+			string errorMessage = "";
+			errorMessage.append("\nERROR: Unable to open the '");
+			errorMessage.append(Common::GetXMLfile());
+			errorMessage.append("' file to verify it.  The program will terminate.\n");
+			cerr << errorMessage;
+			Log::Fatal(errorMessage);
+
+			exit(0);
+		}
+
+		// Create the md5 hash.  This constructor creates a new md5 object, updates the
+		// hash, finalizes the hash, and closes the FILE object.
+		
+		MD5 context(fpVerify);
+
+		string hashBuf = context.hex_digest();
+
+		// Compare (without regard to case) the MD5 hash we just created with the one
+		// given by the user.  If the two do not match, then exit the application.  Make
+		// sure we compare in both directions.  _strnicmp only checks that the first X
+		// characters of string2 are the same as the first X characters of string1.
+		// This means that without the second check, if the supplied datafile hash is only
+		// the first character of the real hash, then the test will succeed.
+
+		if ((STRNICMP(hashBuf.c_str(), Common::GetXMLfileMD5().c_str(), Common::GetXMLfileMD5().length()) != 0) ||
+			(STRNICMP(Common::GetXMLfileMD5().c_str(), hashBuf.c_str(), hashBuf.length()) != 0))
+		{
+			string errorMessage = "";
+
+			errorMessage.append("\nERROR: The '");
+			errorMessage.append(Common::GetXMLfile());
+			errorMessage.append("' file is not valid.  The program will terminate.\n");
+
+			cerr << errorMessage;
+			Log::Fatal(errorMessage);
+
+			exit(0);
+		}
+	}
+
+	//////////////////////////////////////////////////////
+	////////////  parse oval.xml file	//////////////////
+	//////////////////////////////////////////////////////
+	try {
+
+		XmlProcessor *processor = XmlProcessor::Instance();
+		
+		//	Write output.log message
+		logMessage = " ** parsing " + Common::GetXMLfile() + " file.\n";
+		logMessage.append("    - validating xml schema.\n");
+		cout << logMessage;
+		Log::UnalteredMessage(logMessage);
+		
+
+		//	Parse the file
+		// DEBUG
+		#ifdef _DEBUG
+			parseStart = GetTickCount();
+		#endif
+		DocumentManager::SetDefinitionDocument(processor->ParseFile(Common::GetXMLfile()));
+		#ifdef _DEBUG
+			parseEnd = GetTickCount();
+		#endif
+
+		//////////////////////////////////////////////////////
+		///////  Check the version of the xml schema	//////
+		//////////////////////////////////////////////////////
+		// The interpreter is implemented to support a set majnor and minor version of the OVAL
+		// Language and previous minor versions of that major version.
+		// Make sure that the schema version of the xml file provided is less than or equal to the 
+		// current major and minor version that the interpreter is built for.
+
+		logMessage = " ** checking schema version\n";
+				
+		//	Get the schema version from the provided definitions.xml 
+		DOMElement *schemaNode = XmlCommon::FindElementNS(DocumentManager::GetDefinitionDocument(), "schema_version");
+		string strSchemaVersion = XmlCommon::GetDataNodeValue(schemaNode);
+	    
+		logMessage.append("     - Schema version - " + strSchemaVersion + "\n");		
+		
+		cout << logMessage;
+		Log::UnalteredMessage(logMessage);
+
+		OvalEnum::ResultEnumeration lteCurrentVersionResult = EntityComparator::CompareVersion(OvalEnum::OPERATION_LESS_THAN_OR_EQUAL, Version::GetVersion(), strSchemaVersion);
+		OvalEnum::ResultEnumeration gteMinCompatVersionResult = EntityComparator::CompareVersion(OvalEnum::OPERATION_GREATER_THAN_OR_EQUAL, Version::GetMinumumCompatibleVersion(), strSchemaVersion);
+		if(lteCurrentVersionResult != OvalEnum::RESULT_TRUE || gteMinCompatVersionResult != OvalEnum::RESULT_TRUE) {
+			string errorMessage = "ERROR: Unsupported schema version found.\n";
+			errorMessage.append("The schema version of the definitions file is: " + strSchemaVersion + " ");
+			errorMessage.append("The OVAL Interpreter is compatible with versions ");
+			errorMessage.append(Version::GetMinumumCompatibleVersion() + " through " + Version::GetVersion());
+			errorMessage.append(".\n");
+
+			cerr << errorMessage;
+			Log::Fatal(errorMessage);
+			exit(0);
+		}
+
+
+		//////////////////////////////////////////////////////
+		// Schematron validation							//
+		//////////////////////////////////////////////////////
+		
+		if(Common::GetDoDefinitionSchematron()) {
+
+			logMessage = " ** running Schematron validation on " + Common::GetXMLfile() + "\n";
+			cout << logMessage;
+			Log::UnalteredMessage(logMessage);
+
+			string result = XslCommon::ApplyXSL(Common::GetXMLfile(), Common::GetDefinitionSchematronPath());
+			// strip the xml declaration
+			if(result.compare("") != 0) {
+				size_t pos = result.find(">", 0);
+				if(pos != string::npos) {
+					result = result.substr(pos+1, result.length()-pos);
+				}
+			}
+			if(result.compare("") != 0) {
+				string errorMessage = "ERROR: Schematron validation failed with the following errors:\n";
+				errorMessage.append(result);
+
+				cerr << errorMessage;
+				Log::Fatal(errorMessage);
+				exit(0);
+			} else {
+				logMessage = "     - Schematron validation succeeded\n";
+				cout << logMessage;
+				Log::UnalteredMessage(logMessage);
+			}
+
+		} else {
+			
+			logMessage = " ** skipping Schematron validation\n";
+			cout << logMessage;
+			Log::UnalteredMessage(logMessage);
+		}
+
+
+		//////////////////////////////////////////////////////
+		//  Get a data file									//
+		//		- either run collector or parse input file	//
+		//////////////////////////////////////////////////////
+		//	Run the collector if desired
+		if(!Common::GetUseProvidedData()) {
+
+			//	Create a new data document
+			logMessage = " ** creating a new OVAL System Charateristics file.\n";
+			cout << logMessage;
+			Log::UnalteredMessage(logMessage);
+
+			DocumentManager::SetSystemCharacterisitcsDocument(processor->CreateDOMDocumentNS("http://oval.mitre.org/XMLSchema/oval-system-characteristics-5", "oval_system_characteristics"));	       
+
+			//	Initialize the data collector and then get and instance.
+			DataCollector::Init();
+			AbsDataCollector* dataCollector = AbsDataCollector::Instance();
+
+			logMessage = " ** gathering data for the OVAL definitions.\n";
+			cout << logMessage;
+			Log::UnalteredMessage(logMessage);
+
+			// DEBUG
+			#ifdef _DEBUG
+				collectionStart = GetTickCount();
+			#endif
+
+			dataCollector->Run();
+
+			// DEBUG
+			#ifdef _DEBUG
+				collectionEnd = GetTickCount();
+			#endif
+
+			delete(dataCollector);
+
+			// save the data model
+			logMessage = " ** saving data model to " + Common::GetDatafile() +".\n";
+			cout << logMessage;
+			Log::UnalteredMessage(logMessage);
+			processor->WriteDOMDocument(DocumentManager::GetSystemCharacterisitcsDocument(), Common::GetDatafile());
+
+		//	Read in the data file
+		} else {
+
+			logMessage = " ** parsing " + Common::GetDatafile() + " for analysis.\n";
+			logMessage.append("    - validating xml schema.\n");
+			cout << logMessage;
+			Log::UnalteredMessage(logMessage);
+
+			//	Parse the data file
+			DocumentManager::SetSystemCharacterisitcsDocument(processor->ParseFile(Common::GetDatafile()));
+		}
+		
+		//////////////////////////////////////////////////////
+		///////////////		Run Analysis		//////////////
+		//////////////////////////////////////////////////////
+
+		// create a results docuemnt
+		DocumentManager::SetResultDocument(processor->CreateDOMDocumentNS("http://oval.mitre.org/XMLSchema/oval-results-5", "oval_results"));
+
+		//	Create the analyzer
+		Analyzer* analyzer = new Analyzer();
+
+		//	Output status
+		logMessage = " ** running the OVAL Definition analysis.\n";
+		cout << logMessage;
+		Log::UnalteredMessage(logMessage);
+
+		#ifdef _DEBUG
+			analysisStart = GetTickCount();
+		#endif
+		
+		//	run the analyzer
+		if(Common::GetLimitEvaluationToDefinitionIds()){
+			string idFile = Common::GetDefinitionIdsFile();
+
+			StringVector* ids = NULL;
+
+			if(idFile.compare("") != 0) {
+				ids = Common::ParseDefinitionIdsFile();	
+			} else {
+				ids = Common::ParseDefinitionIdsString();				
+			}				
+
+			analyzer->Run(ids);
+			
+		} else {
+			analyzer->Run();
+		}
+
+		#ifdef _DEBUG
+			analysisEnd = GetTickCount();
+		#endif
+
+		// print the results 
+		analyzer->PrintResults();
+
+		//	write the result document
+		logMessage = " ** saving OVAL results to " + Common::GetOutputFilename() + ".\n";
+		cout << logMessage;
+		Log::UnalteredMessage(logMessage);
+		processor->WriteDOMDocument(DocumentManager::GetResultDocument(), Common::GetOutputFilename());
+
+		delete analyzer;
+		delete processor;
+
+		// run the xsl
+		if(!Common::GetNoXsl()) {
+			logMessage = " ** running OVAL Results xsl: " + Common::GetXSLFilename() + ".\n";
+			cout << logMessage;
+			Log::UnalteredMessage(logMessage);
+			XslCommon::ApplyXSL(Common::GetOutputFilename(), Common::GetXSLFilename(), Common::GetXSLOutputFilename());
+		} else {
+			logMessage = " ** skippinging OVAL Results xsl\n";
+			cout << logMessage;
+			Log::UnalteredMessage(logMessage);
+		}
+
+	} catch(Exception ex) {
+		cout << ex.GetErrorMessage() << endl;
+		Log::Fatal(ex.GetErrorMessage());
+	}
+
+	//////////////////////////////////////////////////////
+	///////////////////  Print Footer  ///////////////////
+	//////////////////////////////////////////////////////
+	string footerMessage = "";
+	footerMessage.append("\n");
+	footerMessage.append("----------------------------------------------------\n");
+	cout << footerMessage;
+	Log::UnalteredMessage(footerMessage);
+
+	// DEBUG
+	#ifdef _DEBUG
+		endTime = GetTickCount();
+		cout << "Parse time: " << (parseEnd - parseStart)/1000.00 << endl;
+		cout << "Collection time: " << collectionEnd - collectionStart << endl;
+		cout << "Analysis time: " << analysisEnd - analysisStart << endl;
+		cout << "Other time: " << (endTime - startTime) - ((analysisEnd - analysisStart) + (collectionEnd - collectionStart)) << endl;
+		cout << "Run time: " << endTime - startTime << endl;
+	#endif
+
+	Log::Shutdown();
+
+	return 0;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Functions  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+void ProcessCommandLine(int argc, char* argv[]) {
+	//------------------------------------------------------------------------------------//
+	//
+	//  ABSTRACT
+	//
+	//  Parse list of options passed from command line.
+	//
+	//------------------------------------------------------------------------------------//
+
+	// There must be at least two arguments.  The program name and the xmlfile hash. (or
+	// the -m flag signifing no hash is required)
+	//
+	// Loop through each argument passed into this application.  With each one we need to
+	// check to see if it is a valid option.  After checking the argument, depricate the
+	// argc variable.  Therefore, with each loop, argc should get smaller and smaller until
+	// it is eventually less than or equal to 1.  (NOTE: We have already checked argv[0]
+	// which is why we stop when argc is less than or equal to 1)  This signifies that we
+	// have run out of arguments to check.
+
+	while (argc > 1) {
+		// Make sure that the switch control starts with a dash.
+
+		if (argv[1][0] != '-') {
+			if ((argc == 2) && (Common::GetVerifyXMLfile() == true)) {
+				Common::SetXMLfileMD5(argv[1]);
+				++argv;
+				--argc;
+				continue;
+			} else {
+				Usage();
+				exit(0);
+			}
+		}
+
+		// Determine which option has been signalled.  Perform necessary steps.
+
+		switch (argv[1][1]) {
+			// **********  save the data  ********** //
+			case 'd':
+
+				if ((argc < 3) || (argv[2][0] == '-')) {
+					Usage();
+					exit(0);
+				} else {
+					Common::SetDataFile(argv[2]);
+					++argv;
+					--argc;
+				}
+
+				break;	
+				
+			// **********  available options  ********** //
+			case 'h':
+
+				Usage();
+				exit(0);
+
+				break;
+
+			// **********  use input data file  ********** //
+			case 'i':
+
+				if ((argc < 3) || (argv[2][0] == '-')) {
+					Usage();
+					exit(0);
+				} else {
+					Common::SetDataFile(argv[2]);
+					Common::SetUseProvidedData(true);
+					++argv;
+					--argc;
+				}
+
+				break;
+
+			// **********  definition ids to evaluate  ********** //
+			case 'e':
+
+				if ((argc < 3) || (argv[2][0] == '-')) {
+					Usage();
+					exit(0);
+				} else {
+					Common::SetDefinitionIdsString(argv[2]);
+					Common::SetLimitEvaluationToDefinitionIds(true);
+					++argv;
+					--argc;
+				}
+
+				break;
+
+			// **********  file containing definition ids to evaluate  ********** //
+			case 'f':
+
+				if ((argc < 3) || (argv[2][0] == '-')) {
+					Usage();
+					exit(0);
+				} else {
+					Common::SetDefinitionIdsFile(argv[2]);
+					Common::SetLimitEvaluationToDefinitionIds(true);
+					++argv;
+					--argc;
+				}
+
+				break;
+
+			// ********  do oval definition schematron validation  ******** //
+			case 'n':
+
+				Common::SetDoDefinitionSchematron(true);
+
+				break;
+
+			// **********  path to the oval definitions schematron xsl  ********** //
+			case 'c':
+
+				if ((argc < 3) || (argv[2][0] == '-')) {
+					Usage();
+					exit(0);
+				} else {
+					Common::SetDefinitionSchematronPath(argv[2]);
+					Common::SetDoDefinitionSchematron(true);
+					++argv;
+					--argc;
+				}
+
+				break;
+
+			// ********  don't compare xmlfile to MD5 hash  ******** //
+			case 'm':
+
+				Common::SetVerifyXMLfile(false);
+
+				break;
+
+			// **********  path to definitions.xml file  ********** //
+			case 'o':
+
+				if ((argc < 3) || (argv[2][0] == '-')) {
+					Usage();
+					exit(0);
+				} else {
+					Common::SetXMLfile(argv[2]);
+					++argv;
+					--argc;
+				}
+
+				break;
+
+			// **********  save results in XML file  ********** //
+			case 'r':
+
+				if ((argc < 3) || (argv[2][0] == '-')) {
+					Usage();
+					exit(0);
+				} else {
+					Common::SetOutputFilename(argv[2]);
+					++argv;
+					--argc;
+				}
+
+				break;
+
+			// **********  no xsl  ********** //
+			case 's':
+
+				Common::SetNoXsl(true);
+
+				break;
+
+			// **********  apply the specified xsl to the results XML file  ********** //
+			case 't':
+
+				if ((argc < 3) || (argv[2][0] == '-')) {
+					Usage();
+					exit(0);
+				} else {
+					Common::SetXSLFilename(argv[2]);
+					++argv;
+					--argc;
+				}
+
+				break;
+
+			// **********  write specified xsl output to the specified file  ********** //
+			case 'x':
+
+				if ((argc < 3) || (argv[2][0] == '-')) {
+					Usage();
+					exit(0);
+				} else {
+					Common::SetXSLOutputFilename(argv[2]);
+					++argv;
+					--argc;
+				}
+
+				break;
+			
+			// **********  verbose mode  ********** //
+			case 'p':
+
+				Log::SetLevel(Log::DEBUG);
+				Log::SetToScreen(true);
+
+				break;
+
+			// **********  location of external variable file  ********** //
+			case 'v':
+
+				if ((argc < 3) || (argv[2][0] == '-')) {
+					Usage();
+					exit(0);
+				} else {
+					Common::SetExternalVariableFile(argv[2]);
+					++argv;
+					--argc;
+				}
+
+				break;
+
+			// **********  MD5 Utility  ********** //
+			case 'z':
+
+				Common::SetGenerateMD5(true);
+
+				break;
+
+			// **********  Default  ********** //
+			default:
+
+				Usage();
+				exit(0);
+		}
+
+		++argv;
+		--argc;
+	}
+
+	////////////////////////////////////////////////////////////
+	// Check to make sure the MD5 hash was included if required.  
+	// If not, we need to notify the user and exit.
+	////////////////////////////////////////////////////////////
+	if ((::Common::GetVerifyXMLfile() == true) && (::Common::GetXMLfileMD5().empty() == true)) {
+		cerr << endl << "You must supply the MD5 hash for the xmlfile or use the -m ";
+		cerr << "command to skip the MD5 check." << endl;
+		Usage();
+		exit(0);
+	}
+}
+
+void Usage() {
+	//------------------------------------------------------------------------------------//
+	//
+	//  ABSTRACT
+	//
+	//  Prints out a list of option flags that can be used with this exe.
+	//
+	//------------------------------------------------------------------------------------//
+
+	cout << endl;
+	cout << "Command Line: ovaldi [options] MD5Hash" << endl;
+	cout << endl;
+	cout << "Options:" << endl;
+	cout << "   -h           = show options available from command line." << endl;
+	cout << "\n";
+	
+	cout << "Definition Evaluation Options:" << endl;
+	cout << "   -o <string>  = path to the oval-definitions xml file. DEFAULT=\"definitions.xml\"" << endl;
+	cout << "   -v <string>  = path to external variable values file. DEFAULT=\"external-variables.xml\"" << endl;
+	cout << "   -e <string>  = evaluate the specified list of definitions. Supply definition ids as a comma seperated list like: oval:com.example:def:123" << endl;
+	cout << "   -f <string>  = path to a file containing a list of definitions to be evaluated. The file must comply with the evaluation-id schema." << endl;
+	cout << "\n";
+	
+	cout << "Input Validation Options:" << endl;
+	cout << "   -m           = do not verify the oval-definitions file with an MD5 hash." << endl;
+	cout << "   -n           = perform Schematron validation of the oval-definitions file." << endl;
+	cout << "   -c <string>  = path to xsl for oval-definitions Schematron validation. DEFAULT=\"oval-definitions-schematron.xsl\"" << endl;
+	cout << "\n";
+
+	cout << "Data Collection Options:" << endl;
+	cout << "   -i <string>  = path to input System Characteristics file. Evaluation will be based on the contents of the file." << endl;
+	cout << "\n";
+
+	cout << "Result Output Options:" << endl;	
+	cout << "   -d <string>  = save data to the specified XML file. DEFAULT=\"system-characteristics.xml\"" << endl;	
+	cout << "   -r <string>  = save results to the specified XML file. DEFAULT=\"oval-results.xml\"" << endl;
+	cout << "   -s           = do not apply a stylesheet to the results xml." << endl;
+	cout << "   -t <string>  = apply the sepcified xsl to the results xml. DEFAULT=\"results_to_html.xsl\"" << endl;
+	cout << "   -x <string>  = output xsl transform results to the specified file. DEFAULT=\"results.html\"" << endl;
+	cout << "\n";
+	
+	cout << "Other Options:" << endl;
+	//cout << "   -l <string>  = save log to the specified file DEFAULT=\"ovaldi.log\"" << endl;
+	cout << "   -p           = print all information and error messages." << endl;
+	cout << "   -z           = return md5 of current oval-definitions file." << endl;
+	cout << endl;
+}


Property changes on: trunk/ovaldi/src/Main.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Main.h
===================================================================
--- trunk/ovaldi/src/Main.h	                        (rev 0)
+++ trunk/ovaldi/src/Main.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,80 @@
+//
+// $Id: Main.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef MAIN_H
+#define MAIN_H
+
+#ifdef WIN32
+	#pragma warning(disable:4786)
+#endif
+
+#include "Common.h"
+#include "Log.h"
+#include "MD5.h"
+#include "AbsDataCollector.h"
+#include "XmlProcessor.h"
+#include "Version.h"
+#include "Analyzer.h"
+#include "DocumentManager.h"
+#include "DataCollector.h"
+#include "XslCommon.h"
+#include "EntityComparator.h"
+#include "OvalEnum.h"
+
+#ifdef WIN32
+	#include "WindowsCommon.h"
+	#include <windows.h>
+#endif
+
+#ifdef LINUX
+	#define STRNICMP strnicmp
+#endif
+
+//	xerces include
+#include <xercesc/dom/DOM.hpp>
+
+//	other includes
+#include <time.h>
+#include <fstream>
+#include <iostream>
+#include <sstream>
+#include <string>
+#include <vector>
+
+using namespace std;
+
+#define BUFFER_SIZE 4096
+
+// Local Function Definitions.
+void ProcessCommandLine(int argc, char* argv[]);
+void Usage();
+
+#endif


Property changes on: trunk/ovaldi/src/Main.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Object.cpp
===================================================================
--- trunk/ovaldi/src/Object.cpp	                        (rev 0)
+++ trunk/ovaldi/src/Object.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,221 @@
+//
+// $Id: Object.cpp 4601 2008-01-03 16:50:21Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "Object.h"
+
+//****************************************************************************************//
+//									Object Class										  //	
+//****************************************************************************************//
+
+Object::Object(string id, string comment, string xmlns, string name, int version) : AbsObject (id, comment, xmlns, name, version) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a complete object
+	//
+	// -----------------------------------------------------------------------
+
+	this->type = "Object";
+}
+
+Object::~Object() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	clean up all the elements
+	//
+	// -----------------------------------------------------------------------
+	
+	AbsEntity* currentElement = NULL;
+	while(elements.size() != 0) {
+	  	currentElement = elements[elements.size()-1];
+	  	elements.pop_back();
+	  	delete currentElement;
+	  	currentElement = NULL;
+	}
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+BehaviorVector* Object::GetBehaviors() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the behaviors field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return &this->behaviors;
+}
+
+void Object::SetBehaviors(BehaviorVector* behaviors) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the behaviors field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->behaviors = (*behaviors);
+}
+
+AbsEntityVector* Object::GetElements() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the elements field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return &this->elements;
+}
+
+void Object::SetElements(AbsEntityVector* elements) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the elements field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->elements = (*elements);
+}
+
+void Object::AppendElement(ObjectEntity* objectEntity) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Add an element to the end of the elements vector
+	//
+	// -----------------------------------------------------------------------
+
+	this->elements.push_back(objectEntity);
+}
+
+ObjectEntity* Object::GetElementByName(string elementName) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the set of elements with the specified name
+	//
+	// -----------------------------------------------------------------------
+
+	ObjectEntity* matchingElm = NULL;
+
+	AbsEntityVector::iterator iterator;
+	for(iterator = this->GetElements()->begin(); iterator != this->GetElements()->end(); iterator++) {
+		AbsEntity* element = (*iterator);
+		if(element->GetName().compare(elementName) == 0) {
+			matchingElm = (ObjectEntity*)element;   
+		}
+	}
+
+	return matchingElm;
+}
+
+VariableValueVector* Object::GetVariableValues() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return a vector of variable values that were used for this object.
+	//
+	// -----------------------------------------------------------------------
+
+	VariableValueVector* varValues = new VariableValueVector();
+
+	// get the variable values used on each element
+	AbsEntityVector::iterator iterator;
+	for(iterator = this->GetElements()->begin(); iterator != this->GetElements()->end(); iterator++) {
+		ObjectEntity* entity = (ObjectEntity*)(*iterator);
+		VariableValueVector* values = entity->GetVariableValues();
+		VariableValueVector::iterator varValueIt;
+		for(varValueIt = values->begin(); varValueIt != values->end(); varValueIt ++) {
+			VariableValue* var = (*varValueIt);
+			varValues->push_back(var);
+		}
+
+		delete values;
+		values = NULL;
+	}
+
+	return varValues;
+}
+
+void Object::Parse(DOMElement* objectElm) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Parse the provided object element int an object
+	//
+	// -----------------------------------------------------------------------
+
+	this->SetName(XmlCommon::GetElementName(objectElm));
+	this->SetId(XmlCommon::GetAttributeByName(objectElm, "id"));
+	this->SetComment(XmlCommon::GetAttributeByName(objectElm, "comment"));
+	this->SetXmlns(XmlCommon::GetNamespace(objectElm));
+	string versionStr = XmlCommon::GetAttributeByName(objectElm, "version");
+	int version;
+	if(versionStr.compare("") == 0) {
+		version = 1;
+	} else {
+		version = atoi(versionStr.c_str());
+	}
+	this->SetVersion(version);
+
+	//Log::Debug("Object::Parse Parsing object id: " + this->GetId());
+
+	// loop over all elements
+	DOMNodeList *objectChildren = objectElm->getChildNodes();
+	unsigned int index = 0;
+	while(index < objectChildren->getLength()) {
+		DOMNode *tmpNode = objectChildren->item(index++);
+
+		//	only concerned with ELEMENT_NODEs
+		if (tmpNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+
+			DOMElement *objectChild = (DOMElement*)tmpNode;
+
+			//	get the name of the child
+			string childName = XmlCommon::GetElementName(objectChild);
+			if(childName.compare("notes") == 0)
+				continue;
+
+			if(childName.compare("behaviors") == 0) {
+				this->SetBehaviors(Behavior::Parse(objectChild));
+			} else {
+                ObjectEntity* objectEntity = new ObjectEntity();
+				objectEntity->Parse(objectChild);
+				this->AppendElement(objectEntity);
+			}
+		}
+	}
+}


Property changes on: trunk/ovaldi/src/Object.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Object.h
===================================================================
--- trunk/ovaldi/src/Object.h	                        (rev 0)
+++ trunk/ovaldi/src/Object.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,70 @@
+//
+// $Id: Object.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef OBJECT_H
+#define OBJECT_H
+
+#include "AbsObject.h"
+#include "ObjectEntity.h"
+#include "Behavior.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+class ObjectEntity;
+
+/**
+	This class represents an Object in an oval definition file.	
+*/
+class Object : public AbsObject {
+public:
+	Object(string id = "", string comment = "", string xmlns = "", string name = "", int version = 1);
+	~Object();
+
+	void Parse(DOMElement* objectElm);
+	VariableValueVector* GetVariableValues();
+	
+	BehaviorVector* GetBehaviors();
+	void SetBehaviors(BehaviorVector* behaviors);
+
+	AbsEntityVector* GetElements();
+	void SetElements(AbsEntityVector* elements);
+
+	ObjectEntity* GetElementByName(string elementName);
+
+	void AppendElement(ObjectEntity* objectEntity);
+    
+private:
+	AbsEntityVector elements;
+	BehaviorVector behaviors;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/Object.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/ObjectComponent.cpp
===================================================================
--- trunk/ovaldi/src/ObjectComponent.cpp	                        (rev 0)
+++ trunk/ovaldi/src/ObjectComponent.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,219 @@
+//
+// $Id: ObjectComponent.cpp 4598 2008-01-03 16:46:45Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "ObjectComponent.h"
+
+//****************************************************************************************//
+//								ObjectComponent Class									  //	
+//****************************************************************************************//
+ObjectComponent::ObjectComponent(string objectId, string itemField) : AbsComponent() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a complete ObjectComponent object
+	//
+	// -----------------------------------------------------------------------
+
+	this->SetObjectId(objectId);
+	this->SetItemField(itemField);
+}
+
+ObjectComponent::~ObjectComponent() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Do nothing for now
+	//
+	// -----------------------------------------------------------------------
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+string ObjectComponent::GetObjectId() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the objectId field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->objectId;
+}
+
+void ObjectComponent::SetObjectId(string objectId) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the objectId field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->objectId = objectId;
+}
+
+string ObjectComponent::GetItemField() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the itemField field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->itemField;
+}
+
+void ObjectComponent::SetItemField(string itemField) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the itemField field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->itemField = itemField;
+}
+
+ComponentValue* ObjectComponent::ComputeValue() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	calculate the value of this ObjectComponent
+	//	- make call to AbsObjectCollector
+	//	- get a collected object and then get the matching Item(s)
+	//	- then look for the Item with the Entity named the same as this->itemField
+	//	- then get that value and return it as a string.
+	// -----------------------------------------------------------------------
+
+	bool foundElm = false;
+	ItemVector* items = NULL;
+	string errorMsg = "";
+	OvalEnum::Flag collectedObjFlag = OvalEnum::FLAG_ERROR;
+	if(AbsDataCollector::GetIsRunning()) {
+		CollectedObject* collectedObject = AbsObjectCollector::Instance()->Run(this->GetObjectId());
+		collectedObjFlag = collectedObject->GetFlag();
+		items = collectedObject->GetReferences();
+		if(collectedObject->GetMessages()->size() > 0) {
+			errorMsg = collectedObject->GetMessages()->at(1)->GetValue();
+		}
+
+	} else {
+		collectedObjFlag = ObjectReader::GetCollectedObjectFlag(this->GetObjectId());
+		items = ObjectReader::GetItemsForObject(this->GetObjectId());
+	}
+
+	ComponentValue* result = new ComponentValue();
+	// set the flag to the flag value of the collected object.
+	result->SetFlag(collectedObjFlag);
+
+	// only process the items if the flag on the colelcted obj is COMPLETE or INCOMPLETE
+	if(collectedObjFlag == OvalEnum::FLAG_COMPLETE || collectedObjFlag == OvalEnum::FLAG_INCOMPLETE) {
+
+		if(items->size() > 0) {
+			
+			ItemVector::iterator iterator;
+			for(iterator = items->begin(); iterator != items->end(); iterator++) {
+				Item* item = (*iterator);
+			
+				ItemEntityVector* elements = item->GetElementsByName(this->GetItemField());
+				ItemEntityVector::iterator iterator;
+				for(iterator = elements->begin(); iterator != elements->end(); iterator++) {
+					// need to check status on item entity
+					if((*iterator)->GetStatus() == OvalEnum::STATUS_DOES_NOT_EXIST) {
+						result->SetFlag(OvalEnum::FLAG_DOES_NOT_EXIST);
+					} else if((*iterator)->GetStatus() == OvalEnum::STATUS_NOT_COLLECTED) {
+						result->SetFlag(OvalEnum::FLAG_NOT_COLLECTED);
+					} else if((*iterator)->GetStatus() == OvalEnum::STATUS_ERROR) {
+						result->SetFlag(OvalEnum::FLAG_ERROR);
+					} else { // exists status
+						result->SetFlag(OvalEnum::FLAG_COMPLETE);
+						string value = (*iterator)->GetValue();
+						result->AppendValue(value);
+					}
+					foundElm = true;
+				}
+				elements->clear();
+				delete elements;
+			}
+
+			if(!foundElm) {
+				result->SetFlag(OvalEnum::FLAG_NOT_COLLECTED);
+				result->AppendMessage("ObjectComponent::ComputeValue() - Unable to compute variable value. No elements found for the specified object_component id: " + this->GetObjectId() + " that match the specified field name: " + this->GetItemField());
+			}
+
+		} else {
+
+			// This is an error because the collected object flag is set to COMPLETE or INCOMPLETE
+			// and there are no items associated with it.
+			result->SetFlag(OvalEnum::FLAG_ERROR);
+			result->AppendMessage("Error no items are associated witht eh specified collected object: " + this->GetObjectId());
+		}
+
+	} else {
+
+		if(errorMsg.compare("") != 0) {
+			result->AppendMessage("ObjectComponent::ComputeValue() - Unable to compute variable value. No items found for the specified object_component id: " + this->GetObjectId() + errorMsg);			
+		} else {
+			result->AppendMessage("ObjectComponent::ComputeValue() - Unable to compute variable value. No items found for the specified object_component id: " + this->GetObjectId());
+		}
+	}
+
+	return result;	
+}
+
+void ObjectComponent::Parse(DOMElement* ObjectComponentElm) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	parse the ObjectComponent element
+	// -----------------------------------------------------------------------
+    
+	this->SetObjectId(XmlCommon::GetAttributeByName(ObjectComponentElm, "object_ref"));
+	this->SetItemField(XmlCommon::GetAttributeByName(ObjectComponentElm, "item_field"));
+}
+
+VariableValueVector* ObjectComponent::GetVariableValues() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	return the variable values used to compute this component's value
+	// -----------------------------------------------------------------------
+
+	VariableValueVector* values = NULL;
+	if(AbsDataCollector::GetIsRunning()) {
+		CollectedObject* collectedObject = AbsObjectCollector::Instance()->Run(this->GetObjectId());
+		values = collectedObject->GetVariableValues();
+	} else {
+		values = ObjectReader::GetVariableValuesForObject(this->GetObjectId());
+	}
+	
+	return values;
+}


Property changes on: trunk/ovaldi/src/ObjectComponent.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/ObjectComponent.h
===================================================================
--- trunk/ovaldi/src/ObjectComponent.h	                        (rev 0)
+++ trunk/ovaldi/src/ObjectComponent.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,67 @@
+//
+// $Id: ObjectComponent.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef OBJECTCOMPONENT_H
+#define OBJECTCOMPONENT_H
+
+#include "AbsComponent.h"
+#include "AbsObjectCollector.h"
+#include "ObjectReader.h"
+
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	This class represents a ObjectComponent in a local_variable in the oval definition schema.
+*/
+class ObjectComponent : public AbsComponent {
+public:
+	ObjectComponent(string objectId = "", string itemField = "");
+	~ObjectComponent();
+
+	void Parse(DOMElement* componentElm); 
+	ComponentValue* ComputeValue();
+
+	VariableValueVector* GetVariableValues();
+
+	string GetObjectId();
+	void SetObjectId(string objectId);
+
+	string GetItemField();
+	void SetItemField(string itemField);
+
+private:
+	string objectId;
+	string itemField;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/ObjectComponent.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/ObjectEntity.cpp
===================================================================
--- trunk/ovaldi/src/ObjectEntity.cpp	                        (rev 0)
+++ trunk/ovaldi/src/ObjectEntity.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,134 @@
+//
+// $Id: ObjectEntity.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "ObjectEntity.h"
+
+//****************************************************************************************//
+//								ObjectEntity Class										  //	
+//****************************************************************************************//
+ObjectEntity::ObjectEntity(ObjectEntity* orig) : AbsEntity() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Copy constructor.
+	//	Create a complete ObjectEntity object based on the specified obj.
+	//
+	// -----------------------------------------------------------------------
+
+	this->SetDatatype(orig->GetDatatype());
+	this->SetIsObjectEntity(true);
+	this->SetName(orig->GetName());
+	this->SetNil(orig->GetNil());
+	this->SetOperation(orig->GetOperation());
+	this->SetValue(orig->GetValue());
+	this->SetVarCheck(orig->GetVarCheck());
+	this->SetVarRef(orig->GetVarRef());
+}
+
+ObjectEntity::ObjectEntity(string name, string value, OvalEnum::Datatype datatype, OvalEnum::Operation operation, AbsVariable* varRef, OvalEnum::Check varCheck, bool nil)
+									: AbsEntity(name, value, datatype, true, operation, varRef, varCheck, nil) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a complete ObjectEntity object
+	//
+	// -----------------------------------------------------------------------
+}
+
+ObjectEntity::~ObjectEntity() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Do nothing for now
+	//
+	// -----------------------------------------------------------------------
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+bool ObjectEntity::Equals(AbsEntity* entity) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return true if this ObjectEntity is equal to the provided ObjectEntity
+	// -----------------------------------------------------------------------
+	ObjectEntity* objectEntity = (ObjectEntity*)entity;
+	bool isEqual = false;
+
+	if(this->GetDatatype() == objectEntity->GetDatatype()) {
+		if(this->GetOperation() == objectEntity->GetOperation()) {
+			if(this->GetName().compare(objectEntity->GetName()) == 0) {
+				if(this->GetValue().compare(objectEntity->GetValue()) == 0) {
+					if(this->GetVarCheck() == objectEntity->GetVarCheck()) {
+						isEqual = true;
+					}
+				}
+			}
+		}
+	}
+
+	return isEqual;
+}
+
+void ObjectEntity::Parse(DOMElement* ObjectEntityElm) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Parse the provided ObjectEntity element
+	// -----------------------------------------------------------------------
+
+	this->SetName(XmlCommon::GetElementName(ObjectEntityElm));
+	this->SetValue(XmlCommon::GetDataNodeValue(ObjectEntityElm));
+	this->SetOperation(OvalEnum::ToOperation(XmlCommon::GetAttributeByName(ObjectEntityElm, "operation")));
+	this->SetDatatype(OvalEnum::ToDatatype(XmlCommon::GetAttributeByName(ObjectEntityElm, "datatype")));
+	this->SetVarCheck(OvalEnum::ToCheck(XmlCommon::GetAttributeByName(ObjectEntityElm, "var_check")));
+
+	// get the nill attribute
+	string nilAttr = XmlCommon::GetAttributeByName(ObjectEntityElm, "xsi:nil");
+	if(nilAttr.compare("") == 0 || nilAttr.compare("false") == 0) {
+		this->SetNil(false);
+	} else {
+		this->SetNil(true);
+	}
+
+	// get variable value if needed
+	string varRefStr = XmlCommon::GetAttributeByName(ObjectEntityElm, "var_ref");
+	if(varRefStr.compare("") != 0) {
+		//Log::Debug("ObjectEntity::Parse() - Found var_ref on object entity var id: " + varRefStr);
+		AbsVariable* var = VariableFactory::GetVariable(varRefStr);
+		this->SetValue("");
+		this->SetVarRef(var);
+	} else {
+		this->SetVarRef(NULL);
+	}
+}
+


Property changes on: trunk/ovaldi/src/ObjectEntity.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/ObjectEntity.h
===================================================================
--- trunk/ovaldi/src/ObjectEntity.h	                        (rev 0)
+++ trunk/ovaldi/src/ObjectEntity.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,61 @@
+//
+// $Id: ObjectEntity.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef OBJECTENTITY_H
+#define OBJECTENTITY_H
+
+#include "AbsEntity.h"
+#include "VariableFactory.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+class ObjectEntity;
+
+/**
+	This class represents an entity in an Object as definted in the oval definition schema. 
+	All new instances of this class are create with the AbsEntity::isObjectEntity flag set to true.
+*/
+class ObjectEntity : public AbsEntity {
+public:
+	/**
+		Copy constructor. Creates a new ObjectEntity based on the specified ObjectEntity. 
+		@param orig a ObjectEntity* to be copied
+	*/
+	ObjectEntity(ObjectEntity* orig);
+	ObjectEntity(string name = "", string value = "", OvalEnum::Datatype datatype = OvalEnum::DATATYPE_STRING, OvalEnum::Operation operation = OvalEnum::OPERATION_EQUALS, AbsVariable* varRef = NULL, OvalEnum::Check varCheck = OvalEnum::CHECK_ALL, bool nil = false);
+	~ObjectEntity();
+
+	bool Equals(AbsEntity* entity);
+	void Parse(DOMElement* entitiyElm);
+};
+
+#endif


Property changes on: trunk/ovaldi/src/ObjectEntity.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/ObjectFactory.cpp
===================================================================
--- trunk/ovaldi/src/ObjectFactory.cpp	                        (rev 0)
+++ trunk/ovaldi/src/ObjectFactory.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,64 @@
+//
+// $Id: ObjectFactory.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "ObjectFactory.h"
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+AbsObject* ObjectFactory::GetObjectById(string objectId) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Locate the specified Object by its id in the definiion file.
+	//	Parse the specified xml version of the object and return the resutling
+	//	populated AbsObject
+	// -----------------------------------------------------------------------
+
+	AbsObject* absObject = NULL;
+
+	// get the specified object element
+	DOMElement* objectsElm = XmlCommon::FindElementNS(DocumentManager::GetDefinitionDocument(), "objects");
+	DOMElement* objectElm = XmlCommon::FindElementByAttribute(objectsElm, "id", objectId);
+
+	// determine if this is a set object or a simple object
+	DOMElement* setElm = XmlCommon::FindElementNS(objectElm, "set");
+	if(setElm == NULL) {
+		absObject = new Object();
+		absObject->Parse(objectElm);
+	} else {
+		absObject = new SetObject();
+		absObject->Parse(objectElm);
+	}
+
+	return absObject;
+}
+


Property changes on: trunk/ovaldi/src/ObjectFactory.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/ObjectFactory.h
===================================================================
--- trunk/ovaldi/src/ObjectFactory.h	                        (rev 0)
+++ trunk/ovaldi/src/ObjectFactory.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,70 @@
+//
+// $Id: ObjectFactory.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef OBJECTFACTORY_H
+#define OBJECTFACTORY_H
+
+#include <string>
+#include <vector>
+#include <iostream>
+#include <stdlib.h>
+
+//	required xerces includes
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/DOMAttr.hpp>
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xercesc/dom/DOMNodeList.hpp>
+#include <xercesc/util/XMLString.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/parsers/AbstractDOMParser.hpp>
+
+#include "AbsDataCollector.h"
+#include "AbsObject.h"
+#include "SetObject.h"
+#include "Object.h"
+
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	This class is a Factory class for getting parsed objects.
+	This class provides a saingle method for getting all types of objects defined
+	in the oval definition schema.
+*/
+class ObjectFactory {
+
+public:
+	static AbsObject* GetObjectById(string objectId);
+
+};
+
+#endif


Property changes on: trunk/ovaldi/src/ObjectFactory.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/ObjectReader.cpp
===================================================================
--- trunk/ovaldi/src/ObjectReader.cpp	                        (rev 0)
+++ trunk/ovaldi/src/ObjectReader.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,148 @@
+//
+// $Id: ObjectReader.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "ObjectReader.h"
+
+//****************************************************************************************//
+//								ObjectReader Class										  //	
+//****************************************************************************************//
+OvalEnum::Flag ObjectReader::GetCollectedObjectFlag(string objectId) {
+
+	OvalEnum::Flag flag = OvalEnum::FLAG_ERROR;
+
+	DOMElement* collectedObjectsElm = XmlCommon::FindElement(DocumentManager::GetSystemCharacterisitcsDocument(), "collected_objects");
+	
+	if(collectedObjectsElm != NULL) {
+        DOMElement* objectElm = XmlCommon::FindElement(collectedObjectsElm, "object", "id", objectId);
+		if(objectElm != NULL) {
+			
+			flag = OvalEnum::ToFlag(XmlCommon::GetAttributeByName(objectElm, "flag"));
+			
+		} else {
+			throw Exception("Error: The specified object was not found in the provided System Characteristics file.");
+		}
+	} else {
+		throw Exception("Error: Unable to locate collected_object element in provided System Characteristics file.");
+	}
+	return flag;
+}
+
+ItemVector* ObjectReader::GetItemsForObject(string objectId) {
+
+	DOMElement* collectedObjectsElm = XmlCommon::FindElement(DocumentManager::GetSystemCharacterisitcsDocument(), "collected_objects");
+	
+	ItemVector* items = new ItemVector();
+	if(collectedObjectsElm != NULL) {
+        DOMElement* objectElm = XmlCommon::FindElement(collectedObjectsElm, "object", "id", objectId);
+		if(objectElm != NULL) {
+			// Check the flag value. acceptable values are "complete" && "incomplete"
+			OvalEnum::Flag flag = OvalEnum::ToFlag(XmlCommon::GetAttributeByName(objectElm, "flag"));
+			if(flag == OvalEnum::FLAG_COMPLETE || flag == OvalEnum::FLAG_INCOMPLETE) {
+
+				// loop through all references and get the corresponding item
+				DOMNodeList *objectChildren = objectElm->getChildNodes();
+				unsigned int index = 0;
+				while(index < objectChildren->getLength()) {
+					DOMNode* tmpNode = objectChildren->item(index);
+
+					//	only concerned with ELEMENT_NODEs
+					if (tmpNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+						DOMElement* objectChild = (DOMElement*)tmpNode;
+
+						//	get the name of the child
+						string childName = XmlCommon::GetElementName(objectChild);
+						if(childName.compare("reference") == 0) {
+							string itemRef = XmlCommon::GetAttributeByName(objectChild, "item_ref");
+							Item* item = Item::GetItemById(itemRef);
+							items->push_back(item);
+						}
+					}
+					index ++;
+				}
+
+			} else {
+				throw Exception("Error: The flag attribute value must be \'complete\'. Found: " + OvalEnum::FlagToString(flag));
+			}
+		} else {
+			throw Exception("Error: The specifeid object was not found in the provided System Characteristics file.");
+		}
+	} else {
+		throw Exception("Error: Unable to locate collected_object element in provided System Characteristics file.");
+	}
+	return items;
+}
+
+VariableValueVector* ObjectReader::GetVariableValuesForObject(string objectId) {
+
+	DOMElement* collectedObjectsElm = XmlCommon::FindElement(DocumentManager::GetSystemCharacterisitcsDocument(), "collected_objects");
+	
+	VariableValueVector* values = new VariableValueVector();
+	if(collectedObjectsElm != NULL) {
+        DOMElement* objectElm = XmlCommon::FindElement(collectedObjectsElm, "object", "id", objectId);
+		if(objectElm != NULL) {
+			// Check the flag value. only acceptable value is "complete"
+			OvalEnum::Flag flag = OvalEnum::ToFlag(XmlCommon::GetAttributeByName(objectElm, "flag"));
+			if(flag == OvalEnum::FLAG_COMPLETE) {
+
+				// loop through all variable values
+				DOMNodeList *objectChildren = objectElm->getChildNodes();
+				unsigned int index = 0;
+				while(index < objectChildren->getLength()) {
+					DOMNode* tmpNode = objectChildren->item(index);
+
+					//	only concerned with ELEMENT_NODEs
+					if (tmpNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+						DOMElement* objectChild = (DOMElement*)tmpNode;
+
+						//	get the name of the child
+						string childName = XmlCommon::GetElementName(objectChild);
+						if(childName.compare("variable_value") == 0) {
+							string varId = XmlCommon::GetAttributeByName(objectChild, "variable_id");
+							string varValue = XmlCommon::GetDataNodeValue(objectChild);
+							VariableValue* var = new VariableValue(varId, varValue);
+							values->push_back(var);
+						}
+					}
+					index ++;
+				}
+
+			} else {
+				throw Exception("Error: The flag attribute value must be \'complete\'. Found: " + OvalEnum::FlagToString(flag));
+			}
+		} else {
+			throw Exception("Error: The specified object was not found in the provided System Characteristics document.");
+		}
+	} else {
+		throw Exception("Error: Unable to locate collected_object element in provided System Characteristics document.");
+	}
+	return values;
+}
+


Property changes on: trunk/ovaldi/src/ObjectReader.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/ObjectReader.h
===================================================================
--- trunk/ovaldi/src/ObjectReader.h	                        (rev 0)
+++ trunk/ovaldi/src/ObjectReader.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,74 @@
+//
+// $Id: ObjectReader.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef OBJECTREADER_H
+#define OBJECTREADER_H
+
+//	required xerces includes
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/DOMAttr.hpp>
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xercesc/dom/DOMNodeList.hpp>
+#include <xercesc/util/XMLString.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/parsers/AbstractDOMParser.hpp>
+
+#include "XmlCommon.h"
+#include "DocumentManager.h"
+#include "Item.h"
+#include "VariableValue.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	This class reads collected objects in a system characteristics files.
+	Two static methods are provided that will fetch the set of items for a collected
+	object or the set of variable values used when collecting an object in a oval
+	system characterisitcs file.
+*/
+class ObjectReader {
+public:
+	
+	/** Return the flag associated with the collected object. 
+		Locate teh collected object in the System characteristics document and
+		return the flag attribute's value.
+	*/
+	static OvalEnum::Flag GetCollectedObjectFlag(string objectId);
+
+	/** Return the set of items for the specified id. */
+	static ItemVector* GetItemsForObject(string objectId);
+
+	/** Return the set of variable values used to collect the specified object. */
+	static VariableValueVector* GetVariableValuesForObject(string objectId);
+};
+
+#endif


Property changes on: trunk/ovaldi/src/ObjectReader.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/OvalEnum.cpp
===================================================================
--- trunk/ovaldi/src/OvalEnum.cpp	                        (rev 0)
+++ trunk/ovaldi/src/OvalEnum.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,954 @@
+//
+// $Id: OvalEnum.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "OvalEnum.h"
+
+
+//****************************************************************************************//
+//									OvalEnum Class										  //	
+//****************************************************************************************//
+
+string OvalEnum::CheckToString(OvalEnum::Check check) {
+
+	string checkStr = "";
+
+	switch(check) {
+		case (CHECK_ALL):
+			checkStr = "all";
+			break;
+		case (CHECK_AT_LEAST_ONE):
+			checkStr = "at least one";
+			break;
+		case (CHECK_EXISTENCE_NONE_EXIST):
+			Log::Info("DEPRECATED: the \'none exist\' CheckEnumeration value has been deprecated and will be removed with the next major version of the language.  One should use the other possible values in addition to the existence attributes instead of the \'none exist\' value here.");
+			checkStr = "none exist";
+			break;
+		case (CHECK_NONE_SATISFY):
+			checkStr = "none satisfy";
+			break;
+		case (CHECK_ONLY_ONE):
+			checkStr = "only one";
+			break;
+		default:	
+			throw Exception("OvalEnum::CheckToString - Error unsupported check value.");
+			break;
+	}
+
+	return checkStr;
+}
+
+OvalEnum::Check OvalEnum::ToCheck(string checkStr) {
+
+	OvalEnum::Check check;
+	
+	if(checkStr.compare(OvalEnum::CheckToString(CHECK_ALL)) == 0 || checkStr.compare("") == 0) {
+		check = CHECK_ALL;
+	} else if(checkStr.compare(OvalEnum::CheckToString(CHECK_AT_LEAST_ONE)) == 0) {
+		check = CHECK_AT_LEAST_ONE;
+	} else if(checkStr.compare(OvalEnum::CheckToString(CHECK_EXISTENCE_NONE_EXIST)) == 0) {
+		check = CHECK_EXISTENCE_NONE_EXIST;
+	} else if(checkStr.compare(OvalEnum::CheckToString(CHECK_NONE_SATISFY)) == 0) {
+		check = CHECK_NONE_SATISFY;
+	} else if(checkStr.compare(OvalEnum::CheckToString(CHECK_ONLY_ONE)) == 0) {
+		check = CHECK_ONLY_ONE;
+	} else {
+		throw Exception("OvalEnum::ToCheck - Error unsupported check value: " + checkStr);
+	}
+
+	return check;
+}
+
+string OvalEnum::ExistenceToString(OvalEnum::Existence existence) {
+
+	string existenceStr = "";
+
+	switch(existence) {
+		case (EXISTENCE_ALL_EXIST):
+			existenceStr = "all_exist";
+			break;
+		case (EXISTENCE_ANY_EXIST):
+			existenceStr = "any_exist";
+			break;
+		case (EXISTENCE_AT_LEAST_ONE_EXISTS):
+			existenceStr = "at_least_one_exists";
+			break;
+		case (EXISTENCE_NONE_EXIST):
+			existenceStr = "none_exist";
+			break;
+		case (EXISTENCE_ONLY_ONE_EXISTS):
+			existenceStr = "only_one_exists";
+			break;
+		default:	
+			throw Exception("OvalEnum::ExistenceToString - Error unsupported existence value.");
+			break;
+	}
+
+	return existenceStr;
+}
+
+OvalEnum::Existence OvalEnum::ToExistence(string existenceStr) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Convert the string to a Existence
+	//
+	// -----------------------------------------------------------------------
+
+	OvalEnum::Existence existence;
+	
+	if(existenceStr.compare(OvalEnum::ExistenceToString(EXISTENCE_ALL_EXIST)) == 0 || existenceStr.compare("") == 0) {
+		existence = EXISTENCE_ALL_EXIST;
+	} else if(existenceStr.compare(OvalEnum::ExistenceToString(EXISTENCE_ANY_EXIST)) == 0) {
+		existence = EXISTENCE_ANY_EXIST;
+	} else if(existenceStr.compare(OvalEnum::ExistenceToString(EXISTENCE_AT_LEAST_ONE_EXISTS)) == 0) {
+		existence = EXISTENCE_AT_LEAST_ONE_EXISTS;
+	} else if(existenceStr.compare(OvalEnum::ExistenceToString(EXISTENCE_NONE_EXIST)) == 0) {
+		existence = EXISTENCE_NONE_EXIST;
+	} else if(existenceStr.compare(OvalEnum::ExistenceToString(EXISTENCE_ONLY_ONE_EXISTS)) == 0) {
+		existence = EXISTENCE_ONLY_ONE_EXISTS;
+	} else {
+		throw Exception("OvalEnum::ToCheck - Error unsupported check value: " + existenceStr);
+	}
+
+	return existence;
+}
+
+string OvalEnum::DatatypeToString(OvalEnum::Datatype datatype){
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Conver the Datatype value to a string
+	// -----------------------------------------------------------------------
+
+	string datatypeStr = "";
+
+	switch(datatype) {
+		case (DATATYPE_STRING):
+			datatypeStr = "string";
+			break;
+		case (DATATYPE_INTEGER):
+			datatypeStr = "int";
+			break;
+		case (DATATYPE_IOS_VERSION):
+			datatypeStr = "ios_version";
+			break;			
+		case (DATATYPE_BINARY):
+			datatypeStr = "binary";
+			break;
+		case (DATATYPE_BOOLEAN):
+			datatypeStr = "boolean";
+			break;
+		case (DATATYPE_EVR_STRING):
+			datatypeStr = "evr_string";
+			break;
+		case (DATATYPE_FLOAT):
+			datatypeStr = "float";
+			break;
+		case (DATATYPE_VERSION):
+			datatypeStr = "version";
+			break;
+		default:	
+			throw Exception("OvalEnum::DatatypeToString - Error unsupported datatype.");
+			break;
+	}
+
+	return datatypeStr;
+}
+
+OvalEnum::Datatype OvalEnum::ToDatatype(string datatypeStr){
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Convert the string to a Datatype
+	//
+	// -----------------------------------------------------------------------
+
+	OvalEnum::Datatype datatype;
+	
+	if(datatypeStr.compare(OvalEnum::DatatypeToString(DATATYPE_STRING)) == 0 || datatypeStr.compare("") == 0) {
+		datatype = DATATYPE_STRING;
+	} else if(datatypeStr.compare(OvalEnum::DatatypeToString(DATATYPE_INTEGER)) == 0) {
+		datatype = DATATYPE_INTEGER;
+	} else if(datatypeStr.compare(OvalEnum::DatatypeToString(DATATYPE_IOS_VERSION)) == 0) {
+		datatype = DATATYPE_IOS_VERSION;
+	} else if(datatypeStr.compare(OvalEnum::DatatypeToString(DATATYPE_BINARY)) == 0) {
+		datatype = DATATYPE_BINARY;
+	} else if(datatypeStr.compare(OvalEnum::DatatypeToString(DATATYPE_BOOLEAN)) == 0) {
+		datatype = DATATYPE_BOOLEAN;
+	} else if(datatypeStr.compare(OvalEnum::DatatypeToString(DATATYPE_EVR_STRING)) == 0) {
+		datatype = DATATYPE_EVR_STRING;
+	} else if(datatypeStr.compare(OvalEnum::DatatypeToString(DATATYPE_FLOAT)) == 0) {
+		datatype = DATATYPE_FLOAT;
+	} else if(datatypeStr.compare(OvalEnum::DatatypeToString(DATATYPE_VERSION)) == 0) {
+		datatype = DATATYPE_VERSION;
+	} else {
+		throw Exception("OvalEnum::ToDatatype - Error unsupported datatype value: " + datatypeStr);
+	}
+
+	return datatype;
+}
+
+string OvalEnum::FlagToString(OvalEnum::Flag flag) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Convert the Flag value to a string
+	//
+	// -----------------------------------------------------------------------
+	string flagStr = "";
+
+	switch(flag) {
+		case (FLAG_ERROR):
+			flagStr = "error";
+			break;
+		case (FLAG_COMPLETE):
+			flagStr = "complete";
+			break;
+		case (FLAG_INCOMPLETE):
+			flagStr = "incomplete";
+			break;
+		case (FLAG_DOES_NOT_EXIST):
+			flagStr = "does not exist";
+			break;
+		case (FLAG_NOT_COLLECTED):
+			flagStr = "not collected";
+			break;
+		case (FLAG_NOT_APPLICABLE):
+			flagStr = "not applicable";
+			break;
+		default:
+			throw Exception("OvalEnum::FlagToString - Error unsupported flag value.");
+			break;
+	}
+	return flagStr;
+}
+
+OvalEnum::Flag OvalEnum::ToFlag(string flagStr){
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Convert the string to a CollectedObjectFlag value
+	// -----------------------------------------------------------------------
+
+	OvalEnum::Flag flag;
+	
+	if(flagStr.compare(OvalEnum::FlagToString(FLAG_COMPLETE)) == 0 || flagStr.compare("") == 0) {
+		flag = FLAG_COMPLETE;
+	} else if(flagStr.compare(OvalEnum::FlagToString(FLAG_ERROR)) == 0) {
+		flag = FLAG_ERROR;
+	} else if(flagStr.compare(OvalEnum::FlagToString(FLAG_INCOMPLETE)) == 0) {
+		flag = FLAG_INCOMPLETE;
+	} else if(flagStr.compare(OvalEnum::FlagToString(FLAG_DOES_NOT_EXIST)) == 0) {
+		flag = FLAG_DOES_NOT_EXIST;
+	} else if(flagStr.compare(OvalEnum::FlagToString(FLAG_NOT_COLLECTED)) == 0) {
+		flag = FLAG_NOT_COLLECTED;
+	} else if(flagStr.compare(OvalEnum::FlagToString(FLAG_NOT_APPLICABLE)) == 0) {
+		flag = FLAG_NOT_APPLICABLE;
+	} else {
+		throw Exception("OvalEnum::ToFlag - Error unsupported flag value: " + flagStr);
+	}
+
+	return flag;
+}
+
+OvalEnum::Flag OvalEnum::CombineFlags(IntVector* flags) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Combine the set of flag values to a single flag value.
+	// -----------------------------------------------------------------------
+
+	OvalEnum::Flag combinedFlag = OvalEnum::FLAG_ERROR;
+
+	// Make sure the flags vector has items. Return error flag if it is empty
+	if(flags->size() == 0) {
+		return combinedFlag;
+	}
+
+	// Get counts of flag values
+	int errorCount = 0;
+	int completeCount = 0;
+	int incompleteCount = 0;
+	int doesNotExistCount = 0;
+	int notCollectedCount = 0;
+	int notApplicableCount = 0;
+	IntVector::iterator flag;
+	for (flag=flags->begin(); flag!=flags->end(); flag++) {
+
+		if((*flag) == OvalEnum::FLAG_ERROR) {
+			errorCount++;
+		} else if((*flag) == OvalEnum::FLAG_COMPLETE) {
+			completeCount++;
+		} else if((*flag) == OvalEnum::FLAG_INCOMPLETE) {
+			incompleteCount++;
+		} else if((*flag) == OvalEnum::FLAG_DOES_NOT_EXIST) {
+			doesNotExistCount++;
+		} else if((*flag) == OvalEnum::FLAG_NOT_COLLECTED) {
+			notCollectedCount++;
+		} else if((*flag) == OvalEnum::FLAG_NOT_APPLICABLE) {
+			notApplicableCount++;
+		} 
+	}
+
+	if(errorCount > 0) {
+		combinedFlag = OvalEnum::FLAG_ERROR;
+	} else if(errorCount == 0 
+		&& completeCount > 0 
+		&& incompleteCount == 0 
+		&& doesNotExistCount == 0 
+		&& notCollectedCount == 0 
+		&& notApplicableCount == 0) {
+
+		combinedFlag = OvalEnum::FLAG_COMPLETE;
+
+	} else if(errorCount == 0 
+		&& completeCount > 0 
+		&& incompleteCount == 0 
+		&& doesNotExistCount == 0 
+		&& notCollectedCount == 0 
+		&& notApplicableCount == 0) {
+
+		combinedFlag = OvalEnum::FLAG_INCOMPLETE;
+
+	} else if(errorCount == 0 
+		&& completeCount >= 0 
+		&&  incompleteCount >= 0 
+		&& doesNotExistCount > 0 
+		&& notCollectedCount == 0 
+		&& notApplicableCount == 0) {
+
+		combinedFlag = OvalEnum::FLAG_DOES_NOT_EXIST;
+
+	} else if(errorCount == 0 
+		&& completeCount >= 0 
+		&&  incompleteCount >= 0 
+		&& doesNotExistCount >= 0 
+		&& notCollectedCount > 0 
+		&& notApplicableCount == 0) {
+
+		combinedFlag = OvalEnum::FLAG_NOT_COLLECTED;
+
+	} else if(errorCount == 0 
+		&& completeCount >= 0 
+		&&  incompleteCount >= 0 
+		&& doesNotExistCount >= 0 
+		&& notCollectedCount >= 0 
+		&& notApplicableCount > 0) {
+
+		combinedFlag = OvalEnum::FLAG_NOT_APPLICABLE;
+
+	}	
+
+	return combinedFlag;
+}
+
+string OvalEnum::LevelToString(OvalEnum::Level level){
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Convert the Level value to a string
+	// -----------------------------------------------------------------------
+
+	string levelStr = "";
+
+	switch(level) {
+		case (LEVEL_DEBUG):
+			levelStr = "debug";
+			break;
+		case (LEVEL_ERROR):
+			levelStr = "error";
+			break;
+		case (LEVEL_FATAL):
+			levelStr = "fatal";
+			break;
+		case (LEVEL_INFO):
+			levelStr = "info";
+			break;
+		case (LEVEL_WARNING):
+			levelStr = "warning";
+			break;
+		default:	
+			throw Exception("OvalEnum::LevelToString - Error unsupported level.");
+			break;
+	};
+
+	return levelStr;
+}
+
+OvalEnum::Level OvalEnum::ToLevel(string levelStr){
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Convert the string to a Datatype
+	//
+	// -----------------------------------------------------------------------
+
+	Level level;
+	
+	if(levelStr.compare(OvalEnum::LevelToString(LEVEL_INFO)) == 0 || levelStr.compare("") == 0) {
+		level = LEVEL_INFO;
+	} else if(levelStr.compare(OvalEnum::LevelToString(LEVEL_DEBUG)) == 0) {
+		level = LEVEL_DEBUG;
+	} else if(levelStr.compare(OvalEnum::LevelToString(LEVEL_ERROR)) == 0) {
+		level = LEVEL_ERROR;
+	} else if(levelStr.compare(OvalEnum::LevelToString(LEVEL_FATAL)) == 0) {
+		level = LEVEL_FATAL;
+	} else if(levelStr.compare(OvalEnum::LevelToString(LEVEL_WARNING)) == 0) {
+		level = LEVEL_WARNING;
+	} else {
+		throw Exception("OvalEnum::Tolevel - Error unsupported level value: " + levelStr);
+	}
+
+	return level;
+}
+
+string OvalEnum::OperationToString(OvalEnum::Operation operation){
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Convert the Operation value to a string
+	//
+	// -----------------------------------------------------------------------
+	string operationStr = "";
+
+	switch(operation) {
+		case (OPERATION_EQUALS):
+			operationStr = "equals";
+			break;
+		case (OPERATION_NOT_EQUAL):
+			operationStr = "not equal";
+			break;
+		case (OPERATION_GREATER_THAN):
+			operationStr = "greater than";
+			break;
+		case (OPERATION_LESS_THAN):
+			operationStr = "less than";
+			break;
+		case (OPERATION_GREATER_THAN_OR_EQUAL):
+			operationStr = "greater than or equal";
+			break;
+		case (OPERATION_LESS_THAN_OR_EQUAL):
+			operationStr = "less than or equal";
+			break;
+		case (OPERATION_BITWISE_AND):
+			operationStr = "bitwise and";
+			break;
+		case (OPERATION_BITWISE_OR):
+			operationStr = "bitwise or";
+			break;
+		case (OPERATION_PATTERN_MATCH):
+			operationStr = "pattern match";
+			break;
+		default:
+			throw Exception("OvalEnum::OperationToString - Error unsupported operation value.");
+			break;
+	}
+	return operationStr;
+}
+
+OvalEnum::Operation OvalEnum::ToOperation(string operationStr){
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Convert the string to a Operation value
+	// -----------------------------------------------------------------------
+
+	OvalEnum::Operation operation;
+	
+	if(operationStr.compare(OvalEnum::OperationToString(OPERATION_EQUALS)) == 0 || operationStr.compare("") == 0) {
+		operation = OPERATION_EQUALS;
+	} else if(operationStr.compare(OvalEnum::OperationToString(OPERATION_NOT_EQUAL)) == 0) {
+		operation = OPERATION_NOT_EQUAL;
+	} else if(operationStr.compare(OvalEnum::OperationToString(OPERATION_GREATER_THAN)) == 0) {
+		operation = OPERATION_GREATER_THAN;
+	} else if(operationStr.compare(OvalEnum::OperationToString(OPERATION_LESS_THAN)) == 0) {
+		operation = OPERATION_LESS_THAN;
+	} else if(operationStr.compare(OvalEnum::OperationToString(OPERATION_GREATER_THAN_OR_EQUAL)) == 0) {
+		operation = OPERATION_GREATER_THAN_OR_EQUAL;
+	} else if(operationStr.compare(OvalEnum::OperationToString(OPERATION_LESS_THAN_OR_EQUAL)) == 0) {
+		operation = OPERATION_LESS_THAN_OR_EQUAL;
+	} else if(operationStr.compare(OvalEnum::OperationToString(OPERATION_BITWISE_AND)) == 0) {
+		operation = OPERATION_BITWISE_AND;
+	} else if(operationStr.compare(OvalEnum::OperationToString(OPERATION_BITWISE_OR)) == 0) {
+		operation = OPERATION_BITWISE_OR;
+	} else if(operationStr.compare(OvalEnum::OperationToString(OPERATION_PATTERN_MATCH)) == 0) {
+		operation = OPERATION_PATTERN_MATCH;
+	} else {
+		throw Exception("OvalEnum::ToOperation - Error unsupported operation value: " + operationStr);
+	}
+
+	return operation;
+}
+
+OvalEnum::Operator OvalEnum::ToOperator(string operatorStr) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Convert the string to an Operator
+	//
+	// -----------------------------------------------------------------------
+
+	OvalEnum::Operator op;
+	
+	if(operatorStr.compare(OvalEnum::OperatorToString(OPERATOR_AND)) == 0 || operatorStr.compare("") == 0) {
+		op = OPERATOR_AND;
+	} else if(operatorStr.compare(OvalEnum::OperatorToString(OPERATOR_ONE)) == 0) {
+		op = OPERATOR_ONE;
+	} else if(operatorStr.compare(OvalEnum::OperatorToString(OPERATOR_OR)) == 0) {
+		op = OPERATOR_OR;
+	} else if(operatorStr.compare(OvalEnum::OperatorToString(OPERATOR_XOR)) == 0) {
+		op = OPERATOR_XOR;
+	} else {
+		throw Exception("OvalEnum::ToOperator - Error unsupported operator value: " + operatorStr);
+	}
+
+	return op;	
+}
+
+string OvalEnum::OperatorToString(OvalEnum::Operator op) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	convert the Operator to a string
+	//
+	// -----------------------------------------------------------------------
+	string operatorStr = "";
+
+	switch(op) {
+		case (OPERATOR_AND):
+			operatorStr = "AND";
+			break;
+		case (OPERATOR_ONE):
+			operatorStr = "ONE";
+			break;
+		case (OPERATOR_OR):
+			operatorStr = "OR";
+			break;
+		case (OPERATOR_XOR):
+			operatorStr = "XOR";
+			break;
+		default:
+			throw Exception("OvalEnum::OperationToString - Error unsupported operator value.");
+			break;
+	}
+	return operatorStr;
+}
+
+OvalEnum::ResultEnumeration OvalEnum::ToResult(string resultStr) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Convert the string to an Result
+	//
+	// -----------------------------------------------------------------------
+
+	OvalEnum::ResultEnumeration result;
+	
+	if(resultStr.compare(OvalEnum::ResultToString(RESULT_TRUE)) == 0) {
+		result = RESULT_TRUE;
+	} else if(resultStr.compare(OvalEnum::ResultToString(RESULT_FALSE)) == 0) {
+		result = RESULT_FALSE;
+	} else if(resultStr.compare(OvalEnum::ResultToString(RESULT_UNKNOWN)) == 0) {
+		result = RESULT_UNKNOWN;
+	} else if(resultStr.compare(OvalEnum::ResultToString(RESULT_ERROR)) == 0) {
+		result = RESULT_ERROR;
+	} else if(resultStr.compare(OvalEnum::ResultToString(RESULT_NOT_EVALUATED)) == 0) {
+		result = RESULT_NOT_EVALUATED;
+	} else if(resultStr.compare(OvalEnum::ResultToString(RESULT_NOT_APPLICABLE)) == 0) {
+		result = RESULT_NOT_APPLICABLE;
+	} else {
+		throw Exception("OvalEnum::ToOperator - Error unsupported result value: " + resultStr);
+	}
+
+	return result;	
+}
+
+string OvalEnum::ResultToString(OvalEnum::ResultEnumeration result) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	convert the ResultEnumeration to a string
+	//
+	// -----------------------------------------------------------------------
+	string resultStr = "";
+
+	switch(result) {
+		case (RESULT_TRUE):
+			resultStr = "true";
+			break;
+		case (RESULT_FALSE):
+			resultStr = "false";
+			break;
+		case (RESULT_UNKNOWN):
+			resultStr = "unknown";
+			break;
+		case (RESULT_ERROR):
+			resultStr = "error";
+			break;
+		case (RESULT_NOT_EVALUATED):
+			resultStr = "not evaluated";
+			break;
+		case (RESULT_NOT_APPLICABLE):
+			resultStr = "not applicable";
+			break;
+		default:
+			throw Exception("OvalEnum::ResultEnumeration - Error unsupported result value.");
+			break;
+	}
+	return resultStr;
+}
+
+OvalEnum::ResultEnumeration OvalEnum::CombineResultsByCheck(IntVector* results, OvalEnum::Check check) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return a result value based on combining the results in the 
+	//	provided array and considering the provided check value
+	//
+	//	This function assigns precidence to the non t/f result values as follows
+	//		- 1 - error
+	//		- 2 - unknown
+	//		- 3 - not evaluated
+	// -----------------------------------------------------------------------
+
+	OvalEnum::ResultEnumeration combinedResult = RESULT_UNKNOWN;
+
+	// Make sure the results vector has items. Return unknown_result if it is empty
+	if(results->size() == 0) {
+		return RESULT_UNKNOWN;
+	}
+
+	// Get counts of result values
+	int trueCount = 0;
+	int falseCount = 0;
+	int unknownCount = 0;
+	int errorCount = 0;
+	int notEvaluatedCount = 0;
+	int notApplicableCount = 0;
+	IntVector::iterator result;
+	for (result=results->begin(); result!=results->end(); result++) {
+
+		if((*result) == OvalEnum::RESULT_TRUE) {
+			trueCount++;
+		} else if((*result) == OvalEnum::RESULT_FALSE) {
+			falseCount++;
+		} else if((*result) == OvalEnum::RESULT_UNKNOWN) {
+			unknownCount++;
+		} else if((*result) == OvalEnum::RESULT_ERROR) {
+			errorCount++;
+		} else if((*result) == OvalEnum::RESULT_NOT_EVALUATED) {
+			notEvaluatedCount++;
+		} else if((*result) == OvalEnum::RESULT_NOT_APPLICABLE) {
+			notApplicableCount++;
+		} 
+	}
+
+	// first check for a possible Not Applicable result
+	if(notApplicableCount > 0 && notEvaluatedCount == 0 && falseCount == 0 && errorCount == 0 && unknownCount == 0 && trueCount == 0) {
+		return OvalEnum::RESULT_NOT_APPLICABLE;
+	}
+
+	// Set the combined result
+	if(check == OvalEnum::CHECK_ALL) {
+		if(trueCount > 0 && falseCount == 0 && errorCount == 0 && unknownCount == 0 && notEvaluatedCount == 0) {
+			combinedResult = OvalEnum::RESULT_TRUE;
+		} else if(falseCount > 0) {
+			combinedResult = OvalEnum::RESULT_FALSE;
+		} else if(falseCount == 0 && errorCount > 0) {
+			combinedResult = OvalEnum::RESULT_ERROR;
+		} else if(unknownCount > 0 && falseCount == 0 && errorCount == 0) {
+			combinedResult = OvalEnum::RESULT_UNKNOWN;
+		} else if(notEvaluatedCount > 0 && falseCount == 0 && errorCount == 0 && unknownCount == 0) {
+			combinedResult = OvalEnum::RESULT_NOT_EVALUATED;
+		}
+	} else if(check == OvalEnum::CHECK_AT_LEAST_ONE) {
+		if(trueCount > 0) {
+			combinedResult = OvalEnum::RESULT_TRUE;
+		} else if(falseCount > 0 && trueCount == 0 && unknownCount == 0 &&  errorCount == 0 &&  notEvaluatedCount == 0) {
+			combinedResult = OvalEnum::RESULT_FALSE;
+		} else if(errorCount > 0 && trueCount == 0) {
+			combinedResult = OvalEnum::RESULT_ERROR;
+		} else if(unknownCount > 0 && trueCount == 0 && errorCount == 0) {
+			combinedResult = OvalEnum::RESULT_UNKNOWN;
+		} else if(notEvaluatedCount > 0 && unknownCount == 0 && trueCount == 0 && errorCount == 0) {
+			combinedResult = OvalEnum::RESULT_NOT_EVALUATED;
+		}
+	} else if(check == OvalEnum::CHECK_NONE_SATISFY) {
+		if(trueCount > 0) {
+			combinedResult = OvalEnum::RESULT_FALSE;
+		} else if(errorCount > 0 && trueCount == 0) {	
+			combinedResult = OvalEnum::RESULT_ERROR;
+		} else if(unknownCount > 0 && errorCount == 0 && trueCount == 0) {	
+			combinedResult = OvalEnum::RESULT_UNKNOWN;
+		} else if(notEvaluatedCount > 0 && unknownCount == 0 && errorCount == 0 && trueCount == 0) {	
+			combinedResult = OvalEnum::RESULT_NOT_EVALUATED;
+		} else if(falseCount > 0 && notEvaluatedCount == 0 && unknownCount == 0 && errorCount == 0 && trueCount == 0) {	
+			combinedResult = OvalEnum::RESULT_TRUE;
+		}
+	} else if(check == OvalEnum::CHECK_ONLY_ONE) {
+		if(trueCount == 1 && unknownCount == 0 && errorCount == 0 && notEvaluatedCount == 0) {
+			combinedResult = OvalEnum::RESULT_TRUE;
+		} else if(trueCount > 1) {
+			combinedResult = OvalEnum::RESULT_FALSE;
+		} else if(errorCount > 0 && trueCount < 2) {
+			combinedResult = OvalEnum::RESULT_ERROR;
+		} else if(unknownCount > 0 && errorCount == 0 && trueCount < 2) {
+			combinedResult = OvalEnum::RESULT_UNKNOWN;
+		} else if(notEvaluatedCount > 0 && unknownCount == 0 && errorCount == 0 && trueCount < 2) {
+			combinedResult = OvalEnum::RESULT_NOT_EVALUATED;
+		} else if(falseCount > 0 && trueCount != 1) {
+            combinedResult = OvalEnum::RESULT_FALSE;
+		}
+	}
+
+	return combinedResult;
+}
+
+OvalEnum::ResultEnumeration OvalEnum::CombineResultsByOperator(IntVector* results, OvalEnum::Operator op) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return a result value based on combining the results in the 
+	//	provided array and considering the provided operation value
+	//
+	//	This function assigns precidence to the non t/f result values as follows
+	//		- 1 - error
+	//		- 2 - unknown
+	//		- 3 - not evaluated
+	// -----------------------------------------------------------------------
+
+	OvalEnum::ResultEnumeration combinedResult = RESULT_UNKNOWN;
+
+	// Make sure the results vector has items. Return unknown_result if it is empty
+	if(results->size() == 0) {
+		return RESULT_UNKNOWN;
+	}
+
+	// Get counts of result values
+	int trueCount = 0;
+	int falseCount = 0;
+	int unknownCount = 0;
+	int errorCount = 0;
+	int notEvaluatedCount = 0;
+	int notApplicableCount = 0;
+	IntVector::iterator result;
+	for (result=results->begin(); result!=results->end(); result++) {
+
+		if((*result) == OvalEnum::RESULT_TRUE) {
+			trueCount++;
+		} else if((*result) == OvalEnum::RESULT_FALSE) {
+			falseCount++;
+		} else if((*result) == OvalEnum::RESULT_UNKNOWN) {
+			unknownCount++;
+		} else if((*result) == OvalEnum::RESULT_ERROR) {
+			errorCount++;
+		} else if((*result) == OvalEnum::RESULT_NOT_EVALUATED) {
+			notEvaluatedCount++;
+		} else if((*result) == OvalEnum::RESULT_NOT_APPLICABLE) {
+			notApplicableCount++;
+		} 
+	}
+
+	// first check for a possible Not Applicable result
+	if(notApplicableCount > 0 && notEvaluatedCount == 0 && falseCount == 0 && errorCount == 0 && unknownCount == 0 && trueCount == 0) {
+		return OvalEnum::RESULT_NOT_APPLICABLE;
+	}
+
+	// Set the combined result
+	if(op == OvalEnum::OPERATOR_AND) {
+		if(trueCount > 0 && falseCount == 0 && errorCount == 0 && unknownCount == 0 && notEvaluatedCount == 0) {
+			combinedResult = OvalEnum::RESULT_TRUE;
+		} else if(falseCount > 0) {
+			combinedResult = OvalEnum::RESULT_FALSE;
+		} else if(falseCount == 0 && errorCount > 0) {
+			combinedResult = OvalEnum::RESULT_ERROR;
+		} else if(unknownCount > 0 && falseCount == 0 && errorCount == 0) {
+			combinedResult = OvalEnum::RESULT_UNKNOWN;
+		} else if(notEvaluatedCount > 0 && falseCount == 0 && errorCount == 0 && unknownCount == 0) {
+			combinedResult = OvalEnum::RESULT_NOT_EVALUATED;
+		}
+	} else if(op == OvalEnum::OPERATOR_ONE) {
+
+		if(trueCount == 1 && falseCount >= 0 && errorCount == 0 && unknownCount == 0 && notEvaluatedCount == 0 && notApplicableCount >= 0) {
+			combinedResult = OvalEnum::RESULT_TRUE;
+		} else if(trueCount >= 2 && falseCount >= 0 && errorCount >= 0 && unknownCount >= 0 && notEvaluatedCount >= 0 && notApplicableCount >= 0) {
+			combinedResult = OvalEnum::RESULT_FALSE;
+		} else if(trueCount == 0 && falseCount >= 0 && errorCount == 0 && unknownCount == 0 && notEvaluatedCount == 0 && notApplicableCount >= 0) {
+			combinedResult = OvalEnum::RESULT_FALSE;
+		} else if((trueCount == 0 || trueCount == 1) && falseCount >= 0 && errorCount >= 1 && unknownCount >= 0 && notEvaluatedCount >= 0 && notApplicableCount >= 0) {
+			combinedResult = OvalEnum::RESULT_ERROR;
+		} else if((trueCount == 0 || trueCount == 1) && falseCount >= 0 && errorCount == 0 && unknownCount >= 1 && notEvaluatedCount >= 0 && notApplicableCount >= 0) {
+			combinedResult = OvalEnum::RESULT_UNKNOWN;
+		} else if((trueCount == 0 || trueCount == 1) && falseCount >= 0 && errorCount == 0 && unknownCount == 0&& notEvaluatedCount >= 1 && notApplicableCount >= 0) {
+			combinedResult = OvalEnum::RESULT_NOT_EVALUATED;
+		}
+	} else if(op == OvalEnum::OPERATOR_OR) {
+		if(trueCount > 0) {
+			combinedResult = OvalEnum::RESULT_TRUE;
+		} else if(falseCount > 0 && trueCount == 0 && unknownCount == 0 &&  errorCount == 0 &&  notEvaluatedCount == 0) {
+			combinedResult = OvalEnum::RESULT_FALSE;
+		} else if(errorCount > 0 && trueCount == 0) {
+			combinedResult = OvalEnum::RESULT_ERROR;
+		} else if(unknownCount > 0 && trueCount == 0 && errorCount == 0) {
+			combinedResult = OvalEnum::RESULT_UNKNOWN;
+		} else if(notEvaluatedCount > 0 && unknownCount == 0 && trueCount == 0 && errorCount == 0) {
+			combinedResult = OvalEnum::RESULT_NOT_EVALUATED;
+		}
+	} else if(op == OvalEnum::OPERATOR_XOR) {
+		if(trueCount%2 == 1 && notEvaluatedCount == 0 && unknownCount == 0 && errorCount == 0) {
+			combinedResult = OvalEnum::RESULT_TRUE;
+		} else if(trueCount%2 == 0 && notEvaluatedCount == 0 && unknownCount == 0 && errorCount == 0) {	
+			combinedResult = OvalEnum::RESULT_FALSE;
+		} else if(errorCount > 0) {	
+			combinedResult = OvalEnum::RESULT_ERROR;
+		} else if(unknownCount > 0 && errorCount == 0) {	
+			combinedResult = OvalEnum::RESULT_UNKNOWN;
+		} else if(notEvaluatedCount > 0 && unknownCount == 0 && errorCount == 00) {	
+			combinedResult = OvalEnum::RESULT_NOT_EVALUATED;
+		}
+	}
+
+	return combinedResult;
+}
+
+OvalEnum::ResultEnumeration OvalEnum::NegateResult(OvalEnum::ResultEnumeration result) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	negate the result value and return it
+	//
+	// -----------------------------------------------------------------------
+
+	if(result == OvalEnum::RESULT_TRUE) {
+		return OvalEnum::RESULT_FALSE;
+	} else if(result == OvalEnum::RESULT_FALSE) {
+			return OvalEnum::RESULT_TRUE;
+	} else {
+		return result;
+	}
+
+}
+
+string OvalEnum::SCStatusToString(OvalEnum::SCStatus status){
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Convert the SCStatus value to a string
+	//
+	// -----------------------------------------------------------------------
+	string statusStr = "";
+
+	switch(status) {
+		case (OvalEnum::STATUS_DOES_NOT_EXIST):
+			statusStr = "does not exist";
+			break;
+		case (OvalEnum::STATUS_ERROR):
+			statusStr = "error";
+			break;
+		case (OvalEnum::STATUS_EXISTS):
+			statusStr = "exists";
+			break;
+		case (OvalEnum::STATUS_NOT_COLLECTED):
+			statusStr = "not collected";
+			break;
+	}
+	return statusStr;
+}
+
+OvalEnum::SCStatus OvalEnum::ToSCStatus(string statusStr){
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Convert the string to a SCStatus value
+	// -----------------------------------------------------------------------
+
+	OvalEnum::SCStatus scStatus = OvalEnum::STATUS_ERROR;
+	
+	if(statusStr.compare(OvalEnum::SCStatusToString(OvalEnum::STATUS_DOES_NOT_EXIST)) == 0) {
+		scStatus = OvalEnum::STATUS_DOES_NOT_EXIST;
+	} else if(statusStr.compare(OvalEnum::SCStatusToString(OvalEnum::STATUS_ERROR)) == 0) {
+		scStatus = OvalEnum::STATUS_ERROR;
+	} else if(statusStr.compare(OvalEnum::SCStatusToString(OvalEnum::STATUS_EXISTS)) == 0 || statusStr.compare("") == 0) {
+		scStatus = OvalEnum::STATUS_EXISTS;
+	} else if(statusStr.compare(OvalEnum::SCStatusToString(OvalEnum::STATUS_NOT_COLLECTED)) == 0) {
+		scStatus = OvalEnum::STATUS_NOT_COLLECTED;
+	}
+
+	return scStatus;
+}
+
+string OvalEnum::SetOperatorToString(OvalEnum::SetOperator setOperator){
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Convert the SetOperator value to a string
+	//
+	// -----------------------------------------------------------------------
+	string setOperatorStr = "";
+
+	switch(setOperator) {
+		case (OvalEnum::SET_OPERATOR_COMPLEMENT):
+			setOperatorStr = "COMPLEMENT";
+			break;
+		case (OvalEnum::SET_OPERATOR_INTERSECTION):
+			setOperatorStr = "INTERSECTION";
+			break;
+		case (OvalEnum::SET_OPERATOR_UNION):
+			setOperatorStr = "UNION";
+			break;
+		default:
+			throw Exception("Set::SetOperatorToString - Error unsupported setOperator value.");
+			break;
+	}
+	return setOperatorStr;
+}
+
+OvalEnum::SetOperator OvalEnum::ToSetOperator(string setOperatorStr){
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Convert the string to a SetOperator value
+	// -----------------------------------------------------------------------
+
+	SetOperator setOperator;
+	
+	if(setOperatorStr.compare(OvalEnum::SetOperatorToString(SET_OPERATOR_UNION)) == 0 || setOperatorStr.compare("") == 0) {
+		setOperator = OvalEnum::SET_OPERATOR_UNION;
+	} else if(setOperatorStr.compare(OvalEnum::SetOperatorToString(SET_OPERATOR_COMPLEMENT)) == 0) {
+		setOperator = OvalEnum::SET_OPERATOR_COMPLEMENT;
+	} else if(setOperatorStr.compare(OvalEnum::SetOperatorToString(SET_OPERATOR_INTERSECTION)) == 0) {
+		setOperator = OvalEnum::SET_OPERATOR_INTERSECTION;
+	} else {
+		throw Exception("OvalEnum::ToSetOperator - Error unsupported setOperator value: " + setOperatorStr);
+	}
+
+	return setOperator;
+}


Property changes on: trunk/ovaldi/src/OvalEnum.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/OvalEnum.h
===================================================================
--- trunk/ovaldi/src/OvalEnum.h	                        (rev 0)
+++ trunk/ovaldi/src/OvalEnum.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,153 @@
+//
+// $Id: OvalEnum.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef OVALENUM_H
+#define OVALENUM_H
+
+#include <string>
+#include <iostream>
+#include <stdlib.h>
+
+#include "Exception.h"
+#include "Common.h"
+
+using namespace std;
+
+/**
+	This class stores all the enumerations that are common to more than one oval schema.
+	Along with each enumeration are the methods need for translating that enumeration tothe oval 
+	schema equivalent values.
+*/
+class OvalEnum {
+
+public:
+	/** An enum to define the acceptable check values. */
+	enum Check	{CHECK_ALL,
+				CHECK_AT_LEAST_ONE,
+				CHECK_EXISTENCE_NONE_EXIST, // DEPRECATED in version 5.3
+				CHECK_NONE_SATISFY,
+				CHECK_ONLY_ONE};
+	static string CheckToString(OvalEnum::Check check);
+	static OvalEnum::Check ToCheck(string checkStr);
+
+	/** An enum to define the acceptable check_existence values. */
+	enum Existence	{EXISTENCE_ALL_EXIST,
+				EXISTENCE_ANY_EXIST,
+				EXISTENCE_AT_LEAST_ONE_EXISTS,
+				EXISTENCE_NONE_EXIST,
+				EXISTENCE_ONLY_ONE_EXISTS};
+	static string ExistenceToString(OvalEnum::Existence existence);
+	static OvalEnum::Existence ToExistence(string existenceStr);
+
+	/** An enum to define the acceptable data types. */
+	enum Datatype	{DATATYPE_STRING,
+					DATATYPE_INTEGER,
+					DATATYPE_IOS_VERSION,
+					DATATYPE_BINARY,
+					DATATYPE_BOOLEAN,
+					DATATYPE_EVR_STRING,
+					DATATYPE_FLOAT,
+					DATATYPE_VERSION};
+	static string DatatypeToString(OvalEnum::Datatype datatype);
+	static OvalEnum::Datatype ToDatatype(string datatypeStr);
+
+	/** enumeration of possible CollectedObject Flag values. */
+	enum Flag	{FLAG_ERROR,
+				FLAG_COMPLETE,
+				FLAG_INCOMPLETE,
+				FLAG_DOES_NOT_EXIST,
+				FLAG_NOT_COLLECTED,
+				FLAG_NOT_APPLICABLE};
+	static string FlagToString(OvalEnum::Flag flag);
+	static OvalEnum::Flag ToFlag(string flagStr);
+	static OvalEnum::Flag CombineFlags(IntVector* flags);
+
+	/** An enum to define the acceptable levels. */
+	enum Level	{LEVEL_DEBUG,
+				LEVEL_ERROR,
+				LEVEL_FATAL,
+				LEVEL_INFO,
+				LEVEL_WARNING};
+	static string LevelToString(OvalEnum::Level level);
+	static OvalEnum::Level ToLevel(string levelStr);
+
+	/** enumeration of Operations and supporting methods. */
+	enum Operation	{OPERATION_EQUALS, 
+					OPERATION_NOT_EQUAL, 
+					OPERATION_GREATER_THAN, 
+					OPERATION_LESS_THAN, 
+					OPERATION_GREATER_THAN_OR_EQUAL, 
+					OPERATION_LESS_THAN_OR_EQUAL, 
+					OPERATION_BITWISE_AND, 
+					OPERATION_BITWISE_OR, 
+					OPERATION_PATTERN_MATCH};
+	static string OperationToString(OvalEnum::Operation operation);
+	static OvalEnum::Operation ToOperation(string operationStr);
+
+	/** enumeration of Operators and supporting methods. */
+	enum Operator	{OPERATOR_AND,
+					OPERATOR_ONE,
+					OPERATOR_OR,
+					OPERATOR_XOR};
+	static OvalEnum::Operator ToOperator(string operatorStr);
+	static string OperatorToString(OvalEnum::Operator op);
+
+	/** enumeration of Result Values and supporting methods. */
+	enum ResultEnumeration	{RESULT_TRUE,
+							RESULT_FALSE,
+							RESULT_UNKNOWN,
+							RESULT_ERROR,
+							RESULT_NOT_EVALUATED,
+							RESULT_NOT_APPLICABLE};
+	static OvalEnum::ResultEnumeration ToResult(string resultStr);
+	static string ResultToString(OvalEnum::ResultEnumeration result);
+
+	static OvalEnum::ResultEnumeration CombineResultsByOperator(IntVector* results, OvalEnum::Operator op);    
+	static OvalEnum::ResultEnumeration CombineResultsByCheck(IntVector* results, OvalEnum::Check check);
+	static OvalEnum::ResultEnumeration NegateResult(OvalEnum::ResultEnumeration);
+
+	/** An enum to define the acceptable status values. */
+	enum SCStatus	{STATUS_ERROR,
+					STATUS_EXISTS,
+					STATUS_DOES_NOT_EXIST,
+					STATUS_NOT_COLLECTED};
+	static string SCStatusToString(OvalEnum::SCStatus status);
+	static OvalEnum::SCStatus ToSCStatus(string statusStr);
+
+	/** An eumeration of possible SetOperator values in the definition schema. */
+	enum SetOperator	{SET_OPERATOR_COMPLEMENT, 
+						SET_OPERATOR_INTERSECTION,
+						SET_OPERATOR_UNION};
+	static string SetOperatorToString(OvalEnum::SetOperator operation);
+	static OvalEnum::SetOperator ToSetOperator(string operationStr);
+};
+
+#endif


Property changes on: trunk/ovaldi/src/OvalEnum.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/OvalMessage.cpp
===================================================================
--- trunk/ovaldi/src/OvalMessage.cpp	                        (rev 0)
+++ trunk/ovaldi/src/OvalMessage.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,149 @@
+//
+// $Id: OvalMessage.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "OvalMessage.h"
+
+//****************************************************************************************//
+//								OvalMessage Class										  //	
+//****************************************************************************************//
+OvalMessage::OvalMessage(string value, OvalEnum::Level level) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a complete OvalMessage object
+	//
+	// -----------------------------------------------------------------------
+
+	this->SetValue(value);
+	this->SetLevel(level);
+}
+
+OvalMessage::~OvalMessage() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Do nothing for now
+	//
+	// -----------------------------------------------------------------------
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+string OvalMessage::GetValue() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the value field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->value;
+}
+
+void OvalMessage::SetValue(string value) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the value field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->value = value;
+}
+
+OvalEnum::Level OvalMessage::GetLevel() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the Level field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->level;
+}
+
+void OvalMessage::SetLevel(OvalEnum::Level level) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the Level field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->level = level;
+}
+
+string OvalMessage::ToString() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Make string representation of object
+	//
+	// -----------------------------------------------------------------------
+
+	string msgStr = "";
+
+	msgStr.append(OvalEnum::LevelToString(this->GetLevel()));
+	msgStr.append(" - ");
+	msgStr.append(this->GetValue());
+	return msgStr;
+}
+
+void OvalMessage::Write(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* doc, DOMElement* parentElm, string prefix) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Write this ItemEntity to the sc file
+	// -----------------------------------------------------------------------
+
+	// Create new item element
+	string elementName = prefix + ":message";
+	DOMElement* newOvalMessageElem = XmlCommon::CreateElement(doc, elementName, this->GetValue().c_str());
+	parentElm->appendChild(newOvalMessageElem);
+
+	// Add the attributes
+	// handling defaults in the schema
+	string strLevel = OvalEnum::LevelToString(this->GetLevel());
+	if(strLevel.compare("info") != 0)
+		XmlCommon::AddAttribute(newOvalMessageElem, "level", strLevel);
+}
+
+void OvalMessage::Parse(DOMElement* msgElm) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Parse the provided entity element
+	// -----------------------------------------------------------------------
+
+	this->SetValue(XmlCommon::GetDataNodeValue(msgElm));
+	this->SetLevel(OvalEnum::ToLevel(XmlCommon::GetAttributeByName(msgElm, "level")));
+}


Property changes on: trunk/ovaldi/src/OvalMessage.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/OvalMessage.h
===================================================================
--- trunk/ovaldi/src/OvalMessage.h	                        (rev 0)
+++ trunk/ovaldi/src/OvalMessage.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,86 @@
+//
+// $Id: OvalMessage.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef OVALMESSAGE_H
+#define OVALMESSAGE_H
+
+//	required xerces includes
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/DOMAttr.hpp>
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xercesc/dom/DOMNodeList.hpp>
+#include <xercesc/util/XMLString.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/parsers/AbstractDOMParser.hpp>
+
+#include <string>
+#include <iostream>
+#include <stdlib.h>
+
+#include "Exception.h"
+#include "Log.h"
+#include "XmlCommon.h"
+#include "OvalEnum.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	This class represents an OvalMessage in the oval schema
+*/
+class OvalMessage  {
+public:
+	OvalMessage(string value = "", OvalEnum::Level level = OvalEnum::LEVEL_INFO);
+	~OvalMessage();
+
+	void Write(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* scFile, DOMElement* itemElm, string prefix);
+	void Parse(DOMElement* msgElm);
+
+	string GetValue();
+	void SetValue(string value);
+
+	OvalEnum::Level GetLevel();
+	void SetLevel(OvalEnum::Level level);
+
+	string ToString();
+
+private:
+	string value;
+	OvalEnum::Level level;
+};
+
+/**
+	A vector for storing OvalMessage objects. 
+	Stores only pointers to the objects. 
+*/
+typedef vector < OvalMessage*, allocator<OvalMessage*> > OvalMessageVector;
+
+#endif


Property changes on: trunk/ovaldi/src/OvalMessage.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/PossibleRestrictionType.cpp
===================================================================
--- trunk/ovaldi/src/PossibleRestrictionType.cpp	                        (rev 0)
+++ trunk/ovaldi/src/PossibleRestrictionType.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,119 @@
+//
+// $Id: PossibleRestrictionType.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "PossibleRestrictionType.h"
+
+//****************************************************************************************//
+//									PossibleType Class									  //	
+//****************************************************************************************//
+
+PossibleRestrictionType::PossibleRestrictionType() {
+
+}
+
+PossibleRestrictionType::~PossibleRestrictionType() {
+
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+void PossibleRestrictionType::Parse(DOMElement* possibleRestrictionTypeElm) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Parse the provided PossibleRestrictionType element into a 
+	//  PossibleRestrictionType object.
+	//
+	// -----------------------------------------------------------------------
+
+	// get the hint
+	this->SetHint(XmlCommon::GetAttributeByName(possibleRestrictionTypeElm, "hint"));
+
+	// Get all the restriction elements' values
+	DOMNodeList *possibleRestrictionTypeElmChildren = possibleRestrictionTypeElm->getChildNodes();
+	unsigned int index = 0;
+	while(index < possibleRestrictionTypeElmChildren->getLength()) {
+		DOMNode *tmpNode = possibleRestrictionTypeElmChildren->item(index);
+		if (tmpNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+			DOMElement *childElm = (DOMElement*)tmpNode;
+
+			string elmName = XmlCommon::GetElementName(childElm);
+			
+			// parse each child element
+			if(elmName.compare("restriction") == 0) {
+				RestrictionType *restrictionType = new RestrictionType();
+				restrictionType->Parse(childElm);
+				this->AppendRestrictionType(restrictionType);
+			}
+		}
+		index ++;
+	}
+}
+
+void PossibleRestrictionType::SetHint(string hint) {
+	this->hint = hint;
+}
+
+string PossibleRestrictionType::GetHint() {
+	return this->hint;
+}
+
+RestrictionTypeVector* PossibleRestrictionType::GetRestrictionTypes() {
+	return &this->restrictionTypes;
+}
+
+void PossibleRestrictionType::AppendRestrictionType(RestrictionType* rt) {
+	this->restrictionTypes.push_back(rt);
+}
+
+bool PossibleRestrictionType::ValidateValue(OvalEnum::Datatype datatype, string externalValue) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Ensure that the specified value matches the criteria 
+	//	specified by this possible_restriction element
+	//	
+	// ----------------------------------------------------------------------
+
+	bool isValid = true;
+	
+	// loop through all restriction elements - if all are true return true 
+	RestrictionTypeVector::iterator iterator;
+	for(iterator = this->GetRestrictionTypes()->begin(); iterator != this->GetRestrictionTypes()->end(); iterator++) {
+		isValid = (*iterator)->ValidateValue(datatype, externalValue);
+		if(!isValid) {
+			break;
+		}
+	}
+
+	return isValid;
+}


Property changes on: trunk/ovaldi/src/PossibleRestrictionType.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/PossibleRestrictionType.h
===================================================================
--- trunk/ovaldi/src/PossibleRestrictionType.h	                        (rev 0)
+++ trunk/ovaldi/src/PossibleRestrictionType.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,72 @@
+//
+// $Id: PossibleRestrictionType.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef POSSIBLERESTRICTIONTYPE_H
+#define POSSIBLERESTRICTIONTYPE_H
+
+#include "XmlCommon.h"
+#include "RestrictionType.h"
+
+using namespace std;
+class PossibleRestrictionType;
+
+typedef vector < PossibleRestrictionType*, allocator<PossibleRestrictionType*> > PossibleRestrictionTypeVector;
+
+/**
+	This class represents an the PossibleRestrictionType related to external variables in the oval definition schema.
+*/
+class PossibleRestrictionType {
+public:
+
+	/** Create a new PossibleRestrictionType. */
+	PossibleRestrictionType();
+	~PossibleRestrictionType();
+
+	void SetHint(string hint);
+	string GetHint();
+
+	/** Parses a valid PossibleRestrictionType element as defined int eh oval definitions schema. */
+	void Parse(DOMElement* possibleRestrictionElm);
+
+	/** Ensure that the specified value matches the criteria specified by this possible_restriction element. */
+	bool ValidateValue(OvalEnum::Datatype datatype, string externalValue);
+
+	RestrictionTypeVector* GetRestrictionTypes();
+	void AppendRestrictionType(RestrictionType* rt);
+
+private:
+
+	string hint;
+	RestrictionTypeVector restrictionTypes;
+};
+
+
+#endif


Property changes on: trunk/ovaldi/src/PossibleRestrictionType.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/PossibleValueType.cpp
===================================================================
--- trunk/ovaldi/src/PossibleValueType.cpp	                        (rev 0)
+++ trunk/ovaldi/src/PossibleValueType.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,110 @@
+//
+// $Id: PossibleValueType.cpp 4613 2008-01-08 13:57:21Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "PossibleValueType.h"
+
+//****************************************************************************************//
+//									PossibleValueType Class								  //	
+//****************************************************************************************//
+
+PossibleValueType::PossibleValueType() {
+}
+
+PossibleValueType::~PossibleValueType() {
+
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+void PossibleValueType::Parse(DOMElement* possibleValueTypeElm) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Parse the provided PossibleValueType element into a PossibleValueType object
+	//
+	// -----------------------------------------------------------------------
+	
+	this->SetHint(XmlCommon::GetAttributeByName(possibleValueTypeElm, "hint"));
+	this->SetValue(XmlCommon::GetDataNodeValue(possibleValueTypeElm));
+}
+
+void PossibleValueType::SetHint(string hint) {
+	this->hint = hint;
+}
+
+string PossibleValueType::GetHint() {
+	return this->hint;
+}
+
+void PossibleValueType::SetValue(string value) {
+	this->value = value;
+}
+
+string PossibleValueType::GetValue() {
+	return this->value;
+}
+
+bool PossibleValueType::ValidateValue(OvalEnum::Datatype datatype, string externalValue) {
+
+	OvalEnum::ResultEnumeration result = OvalEnum::RESULT_ERROR;
+
+	// do comparison based on datatype
+	if(datatype == OvalEnum::DATATYPE_BINARY) {
+		result = EntityComparator::CompareBinary(OvalEnum::OPERATION_EQUALS, this->GetValue(), externalValue);
+	} else if(datatype == OvalEnum::DATATYPE_BOOLEAN) {
+		result = EntityComparator::CompareBoolean(OvalEnum::OPERATION_EQUALS, this->GetValue(), externalValue);
+	} else if(datatype == OvalEnum::DATATYPE_EVR_STRING) {
+		result = EntityComparator::CompareEvrString(OvalEnum::OPERATION_EQUALS, this->GetValue(), externalValue);
+	} else if(datatype == OvalEnum::DATATYPE_FLOAT) {
+		result = EntityComparator::CompareFloat(OvalEnum::OPERATION_EQUALS, this->GetValue(), externalValue);
+	} else if(datatype == OvalEnum::DATATYPE_INTEGER) {
+		result = EntityComparator::CompareInteger(OvalEnum::OPERATION_EQUALS, this->GetValue(), externalValue);
+	} else if(datatype == OvalEnum::DATATYPE_IOS_VERSION) {
+		result = EntityComparator::CompareIosVersion(OvalEnum::OPERATION_EQUALS, this->GetValue(), externalValue);
+	} else if(datatype == OvalEnum::DATATYPE_STRING) {
+		result = EntityComparator::CompareString(OvalEnum::OPERATION_EQUALS, this->GetValue(), externalValue);
+	} else if(datatype == OvalEnum::DATATYPE_VERSION) {
+		result = EntityComparator::CompareVersion(OvalEnum::OPERATION_EQUALS, this->GetValue(), externalValue);
+	}
+    
+	// convert the result to a boolean
+	bool isValid = false;
+	if(result == OvalEnum::RESULT_TRUE) {
+		isValid = true;
+	} else if(result == OvalEnum::RESULT_FALSE) {
+		isValid = false;	
+	} else {
+		throw Exception("PossibleValueType::ValidateValue method unable to convert result value to a boolean. Found result: " + OvalEnum::ResultToString(result));
+	}
+
+	return isValid;
+}


Property changes on: trunk/ovaldi/src/PossibleValueType.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/PossibleValueType.h
===================================================================
--- trunk/ovaldi/src/PossibleValueType.h	                        (rev 0)
+++ trunk/ovaldi/src/PossibleValueType.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,71 @@
+//
+// $Id: PossibleValueType.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef POSSIBLEVALUETYPE_H
+#define POSSIBLEVALUETYPE_H
+
+#include "XmlCommon.h"
+#include "OvalEnum.h"
+#include "EntityComparator.h"
+
+using namespace std;
+class PossibleValueType;
+
+typedef vector < PossibleValueType*, allocator<PossibleValueType*> > PossibleValueTypeVector;
+
+/**
+	This class represents an the PossibleValueType related to external variables in the oval definitions schema.
+*/
+class PossibleValueType {
+public:
+
+	/** Create a PossibleValueType. */
+	PossibleValueType();
+	~PossibleValueType();
+
+	/** Parses a valid PossibleValueType element as defined in the oval definitions schema. */
+	void Parse(DOMElement* possibleElm);
+
+	/** Ensure that the specified value matches the criteria specified by this possible_value element. */
+	bool ValidateValue(OvalEnum::Datatype datatype, string externalValue);
+
+	void SetHint(string hint);
+	string GetHint();
+
+	void SetValue(string value);
+	string GetValue();
+
+private:
+	string hint;
+	string value;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/PossibleValueType.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/REGEX.cpp
===================================================================
--- trunk/ovaldi/src/REGEX.cpp	                        (rev 0)
+++ trunk/ovaldi/src/REGEX.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,489 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "REGEX.h"
+
+REGEX::REGEX() {
+	this->matchCount = 0;
+}
+
+REGEX::~REGEX() {
+
+}
+
+string REGEX::EscapeRegexChars(string stringIn) {
+	
+	string regexChars ="^$\\.[](){}*+?";
+	string fixedString = stringIn;
+	string prevChar = "";
+
+	size_t pos = fixedString.find_first_of(regexChars, 0);
+	while (pos != string::npos) {
+
+		//	ensure that the char is not already escaped
+		if(pos == 0) {
+
+			// insert the escape char at the beginning of the string
+			fixedString.insert(0, "\\");
+
+			pos = fixedString.find_first_of(regexChars, pos+2);
+
+		} else {
+			prevChar = fixedString.at(pos-1);
+			if(prevChar.compare("\\") != 0) {
+
+				fixedString.insert(pos, "\\");
+
+				pos = fixedString.find_first_of(regexChars, pos+2);
+			} else {
+				pos = fixedString.find_first_of(regexChars, pos+1);
+			}
+		}
+	}
+
+	return fixedString;	
+}
+
+int REGEX::FindFirstRegexChar(const string stringIn) {
+	
+	string regexChars	= "^$\\.[](){}*+?";
+	string prevChar		= "";
+	string curChar		= "";
+	string nextChar		= "";
+	unsigned int pos	= string::npos;
+	int slashCount		= 0;
+	int prevIndex		= 0;
+
+	pos = stringIn.find_first_of(regexChars, 0);
+
+	//	Check that one is found
+	if(pos == string::npos)
+		return -1;
+
+	while (pos != string::npos)
+	{
+		//	ensure that the char is not escaped
+		prevIndex = pos-1;
+		if(prevIndex == -1)
+			prevChar = "";
+		else
+			prevChar = stringIn.at(prevIndex);
+
+		curChar = stringIn.at(pos);
+		nextChar = stringIn.at(pos+1);
+		
+		//	If a '\' check that the next char is a '\'
+		if (strncmp(curChar.c_str(), "\\", 1) == 0)
+		{
+			if(strncmp(nextChar.c_str(), "\\", 1) == 0)
+			{
+				pos = stringIn.find_first_of(regexChars, pos+2);
+
+			}else
+			{
+				break;
+			}
+			
+		}else
+		{
+			//	Get count of consecutive previous '\'s
+			slashCount = 0;
+			while(prevChar.compare("\\") == 0 && prevIndex > 0)
+			{
+				slashCount++;
+				prevChar = stringIn.at(--prevIndex);
+			}
+
+			if(slashCount % 2 == 0)
+				break;
+			
+			pos = stringIn.find_first_of(regexChars, pos+1);
+		}
+	}
+
+	return pos;	
+}
+
+int REGEX::FindLastRegexChar(const string stringIn) {
+
+	string regexChars	= "^$\\.[](){}*+?";
+	string prevChar		= "";
+	size_t pos	= string::npos;
+	int slashCount		= 0;
+	int prevIndex		= 0;
+
+	pos = stringIn.find_last_of(regexChars, stringIn.length());
+
+	// Check that at least one regex character is found.
+
+	if (pos == string::npos) return -1;
+
+	while (pos != string::npos)
+	{
+		// Ensure that the char in question is not escaped.
+
+		prevIndex = pos-1;
+
+		if ((prevIndex) == -1) prevChar = "";
+		else prevChar = stringIn.at(prevIndex);
+
+		if (strncmp(prevChar.c_str(), "\\", 1) == 0)
+		{
+			// We have to make sure the preceeding slash is not part of a double slash as
+			// that would negate the escape.  Get count of consecutive previous '\'s.  If
+			// it is an even number, then the regex character in question is not escaped.
+
+			slashCount = 1;
+			prevChar = stringIn.at(--prevIndex);
+
+			while(prevChar.compare("\\") == 0 && prevIndex > 0)
+			{
+				slashCount++;
+				prevChar = stringIn.at(--prevIndex);
+			}
+
+			if(slashCount % 2 == 0) break;
+			
+			pos = stringIn.find_last_of(regexChars, (pos - slashCount - 1));
+		}
+		else
+		{
+			break;
+		}
+	}
+
+	return pos;	
+}
+
+void REGEX::GetConstantPortion(string patternIn, string delimIn, string *patternOut, string *constOut) {
+	
+	size_t nextDelim = string::npos;
+	int delimLen = delimIn.length();
+	(*patternOut) = patternIn;
+	(*constOut) = "";
+	string tmpStr;
+	bool rmCarrot = false;
+	bool rmDollar = false;
+
+	//	Check if the pattern starts with a carrot (^)
+	if((*patternOut).at(0) == '^')
+	{
+		(*patternOut) = (*patternOut).substr(1, (*patternOut).length()-1);
+		rmCarrot = true;
+	}
+
+	//	Check if the pattern ends with a dollar ($)
+	if((*patternOut).at((*patternOut).length()-1) == '$')
+	{
+		(*patternOut) = (*patternOut).substr(0, (*patternOut).length()-1);
+		rmDollar = true;
+	}
+
+	while((nextDelim = (*patternOut).find(delimIn, 0)) != string::npos)
+	{
+		//	Get the next substring
+		tmpStr = (*patternOut).substr(0, nextDelim+1+delimLen);
+
+		//	Make sure the substring is constant
+		if(IsConstant(tmpStr))
+		{
+			//	Add the string to the constant string
+			(*constOut)  = (*constOut)  + tmpStr;
+
+			// Remove the string from the pattern
+			(*patternOut) = (*patternOut).substr(nextDelim+1+delimLen, (*patternOut).length()-nextDelim+1+delimLen);
+			
+		}else{
+			
+			// If not constant finished processing
+			break;
+		}
+	}
+
+	// Finally check the last piece of the pattern
+	if (IsConstant((*patternOut)))
+	{
+		(*constOut)  = (*constOut)  + (*patternOut);
+		(*patternOut) = "";
+	}
+
+	//	Add the $ to the end of the pattern if it was removed 
+	//	and there is a pattern ramaining
+	if(rmCarrot && (*patternOut).length() != 0)
+	{
+		(*patternOut) = (*patternOut) + "$";
+	}
+
+	//	Add the carrot to the beginning of the pattern (if removed 
+	//	or a constant portion was found) and there is still a pattern left
+	if((rmCarrot || (*constOut).length() != 0) && (*patternOut).length() > 0)
+	{
+		(*patternOut) = "^" + (*patternOut);
+	}
+}
+
+bool REGEX::IsConstant(string pattern) {
+
+	size_t regexChar = string::npos;
+	bool constant = true;
+	
+	regexChar = FindFirstRegexChar(pattern);
+	
+	//	If length is 0 return true
+	if(pattern.length() == 0)
+		return true;
+
+	if(regexChar != -1)
+	{
+		//	Try removing a leading ^ if it is not followed by a regex char
+		if (regexChar == 0 && pattern.at(regexChar) == '^')
+		{
+			//	Remove the ^
+			string tmpPattern = pattern.substr(1, pattern.length()-1);
+			
+			//	Retest with recursive call
+			constant = IsConstant(tmpPattern);
+
+		}else {
+
+			constant = false;
+		}
+	}
+
+	return constant;
+}
+
+bool REGEX::IsMatch(const char *patternIn, const char *searchStringIn) {
+	bool		result				= false;
+	pcre		*compiledPattern;
+	const char	*error;
+	int			erroffset = -1;
+
+	//	Test the match count
+	if(this->matchCount >= MAXMATCHES)
+	{
+		string errMsg = "Warning: The specified pattern has matched more than the supported number of items.";
+		errMsg.append("\nPattern: ");
+		errMsg.append(patternIn);
+		throw REGEXException(errMsg, ERROR_WARN);	
+	}
+		
+	//	Compile the pattern
+	compiledPattern = pcre_compile(	patternIn,			// the pattern					
+									0,					// default options				
+									&error,				// for error message			
+									&erroffset,			// for error offset				
+									NULL);				// use default character tables	
+
+	//	Check for compile errors
+	if(compiledPattern == NULL)
+	{
+		string errMsg = "Error: Failed to compile the specifed regular expression pattern.\n\tPattern: ";
+		errMsg.append(patternIn);
+		errMsg.append("\n\tOffset: ");
+		
+		ostringstream erroffsetStr;
+		erroffsetStr << erroffset;
+		
+		errMsg.append(erroffsetStr.str());
+		errMsg.append("\n\tMessage: ");
+		errMsg.append(error);
+		throw REGEXException(errMsg);
+	}
+ 
+
+	//	Match a pattern
+	int rc;
+	int ovector[60];
+	for(int i = 0; i < 60; i++){
+		ovector[i] = -1;
+	}
+	rc = pcre_exec(	compiledPattern,		// result of pcre_compile()			
+					NULL,					// we didn't study the pattern		
+					searchStringIn,			// the subject string				
+					strlen(searchStringIn),	// the length of the subject string	
+					0,						// start at offset 0 in the subject	
+					0,						// default options					
+					ovector,				// vector of integers for substring information	
+					60);					// number of elements in the vector	
+
+	//	Test the return value of the pattern match 
+	//	and increment the match count if a match was found
+	if(rc == 0) {
+		result = false;
+	} else if (rc < 0) {
+		// and some sort of erro we will not report for now.
+		result = false;
+	} else if (rc > 0) {
+		result = true;
+		this->matchCount++;
+	}
+
+	return(result);
+}
+
+bool REGEX::GetMatchingSubstrings(const char *patternIn, const char *searchStringIn, StringVector* substrings) {
+
+	bool		result				= false;
+	pcre		*compiledPattern;
+	const char	*error;
+	int			erroffset = -1;
+
+	//	Test the match count
+	if(this->matchCount >= MAXMATCHES) {
+		string errMsg = "Warning: The specified pattern has matched more than the supported number of items.";
+		errMsg.append("\nPattern: ");
+		errMsg.append(patternIn);
+		throw REGEXException(errMsg, ERROR_WARN);	
+	}
+		
+	//	Compile the pattern
+	compiledPattern = pcre_compile(	patternIn,			// the pattern					
+									0,					// default options				
+									&error,				// for error message			
+									&erroffset,			// for error offset				
+									NULL);				// use default character tables	
+
+	//	Check for compile errors
+	if(compiledPattern == NULL) {
+
+		string errMsg = "Error: Failed to compile the specifed regular expression pattern.\n\tPattern: ";
+		errMsg.append(patternIn);
+		errMsg.append("\n\tOffset: ");
+		
+		ostringstream erroffsetStr;
+		erroffsetStr << erroffset;
+		
+		errMsg.append(erroffsetStr.str());
+		errMsg.append("\n\tMessage: ");
+		errMsg.append(error);
+		throw REGEXException(errMsg);
+	}
+ 
+
+	//	Match a pattern
+	int rc;
+	int ovector[60];
+	for(int i = 0; i < 60; i++) {
+		ovector[i] = -1;
+	}
+	rc = pcre_exec(	compiledPattern,		// result of pcre_compile()			
+					NULL,					// we didn't study the pattern		
+					searchStringIn,			// the subject string				
+					strlen(searchStringIn),	// the length of the subject string	
+					0,						// start at offset 0 in the subject	
+					0,						// default options					
+					ovector,				// vector of integers for substring information	
+					60);					// number of elements in the vector	
+
+	//	Test the return value of the pattern match 
+	//	and increment the match count if a match was found
+	if(rc == 0) {
+		result = false;
+	} else if (rc == -1) {
+		result = false;
+	} else if (rc < -1) {
+		
+		// An error occured
+		string errMsg = "Error: PCRE returned error code (" + rc;
+		errMsg.append(") While evaluating the following regex: ");
+		errMsg.append(patternIn);
+		errMsg.append(" against this string: ");
+		errMsg.append(searchStringIn);
+		throw REGEXException(errMsg);
+
+	} else if (rc > 0) {
+		// The string did match
+		result = true;
+		this->matchCount++;
+
+		// next extract any matching substrings
+		if(rc > 1) {
+
+			const char **stringlist;
+			int res = pcre_get_substring_list(searchStringIn, ovector, rc, &stringlist);
+
+			if (res == PCRE_ERROR_NOMEMORY) {
+				string error = "get substring list failed " + res;
+				error.append(" unable to get memory for the result set.");
+				throw REGEXException(error);
+			} else {
+				int i = 0;
+				for (i = 0; i < rc; i++) {
+					string str = "";
+					str.append(stringlist[i]);
+					if(i > 0)
+						substrings->push_back(str);
+				}
+				
+				if (stringlist[i] != NULL) {
+					pcre_free_substring_list(stringlist);
+					string error = "string list not terminated by NULL";
+					throw REGEXException(error);
+				}
+
+				pcre_free_substring_list(stringlist);				
+			}
+		}
+	}
+
+	return(result);
+}
+
+string REGEX::RemoveExtraSlashes(string strIn) {
+
+	string doubleSlash ="\\\\";
+
+	size_t pos = strIn.find(doubleSlash, 0);
+	while (pos != string::npos)
+	{
+		strIn.erase(pos++, 1);
+		pos = strIn.find(doubleSlash, pos);
+	}
+
+	return strIn;	
+}
+
+void REGEX::Reset() {
+
+	this->matchCount = 0;
+
+}
+
+//****************************************************************************************//
+//								REGEXException Class									  //	
+//****************************************************************************************//
+REGEXException::REGEXException(string errMsgIn, int severity) : Exception(errMsgIn, severity) {
+
+}
+
+REGEXException::~REGEXException() {
+
+}


Property changes on: trunk/ovaldi/src/REGEX.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/REGEX.h
===================================================================
--- trunk/ovaldi/src/REGEX.h	                        (rev 0)
+++ trunk/ovaldi/src/REGEX.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,168 @@
+//
+// $Id: REGEX.h 4661 2008-01-17 22:28:03Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef REGEX_H
+#define REGEX_H
+
+//#include "Exception.h"
+#include "Common.h"
+
+//	required regex include
+#include <pcre.h> 
+
+#include <sstream>
+#include <string>
+#include <cstring>
+#include <vector>
+
+using namespace std;
+
+typedef vector < string, allocator<string> > StringVector;
+
+/**	The MAXMATCHES constant should be used by any search method to ensure that
+	endless/excessive matching searching doesn't occure. With out some sort of 
+	maximum it is possible to match so many items that the system would run out 
+	of memory.
+*/
+#define MAXMATCHES 5000
+
+/**
+	This class provides pattern matching support to the application.
+	inaddition to pattern mathcin support several related methods are also provided.
+	This class uses the pcre library found at www.pcre.org for pattern matching. 
+*/
+class REGEX {
+public:
+
+	/** Simple constructor to initialize the matchCount member variable. */
+	REGEX();
+
+	~REGEX();
+
+	/** 
+		This function takes a string and searches for all regular expression characters. 
+		If one is found and it is not already escaped it is escaped with a '\' The regular
+		expression chars are stored in a string. The following chars need to be escaped:
+		^ $ \ . [ ] ( ) * + ? 
+	*/
+	string EscapeRegexChars(string);
+
+	/**
+		This function takes a string and searches for the first regular	expression character that is not escaped. 
+		If one is found its location is returned. If none are found -1 is returned. Only 
+		regular expression chars that are not escaped are considered. The following are 
+		considered regular expression chars if they are not escaped:
+		^ $ \ . [ ] ( ) * + ?
+	*/
+	int FindFirstRegexChar(const string stringIn);
+
+	/**
+		This function takes a string and searches for the last regular expression character. 
+		If one is found its location is returned. If none are found -1 is returned. Only
+		regular expression chars that are not escaped are considered. The following are
+		considered regular expression chars if they are not escaped:
+        ^ $ \ . [ ] ( ) { } * + ?
+	*/
+	int FindLastRegexChar(const string stringIn);
+
+	/**
+		Return both the constant portion of a string and the remaining pattern. 
+		If no constant portion is found set constOut to "" If the entire string
+		is constant set patternOut to "". The input delimiter is used to ensure
+		that constant strings are treated as a unit. 
+
+		Loop through the provided pattern breaking it down by removing constant
+		pieces from the start of the pattern. Build the constant string out of
+		the pieces. Each piece is determined by looking for the next occurance
+		of the specified delimiter. As the constatn string is built the 
+		delimiter is added back in to the string.
+	
+		If an error occures an exception is thrown
+	*/
+	void GetConstantPortion(string patternIn, string delimIn, string *patternOut, string *constOut);
+	
+	/**	Return true if the searchString matches the specifed pattern.
+
+		Regular expression support is provided by the REGEX library package,
+		which is open source software, written by Philip Hazel, and copyright
+		by the University of Cambridge, England. 
+
+		Download site:	ftp://ftp.csx.cam.ac.uk/pub/software/programming/REGEX/
+	*/
+	bool IsMatch(const char *patternIn, const char *searchStringIn);
+
+	/**	Return true if the searchString matches the specifed pattern including the set of matched substrings.
+		If the input regex identifies any subexpressions the matching substrings for those subexpressions
+		are pushed onto the substrings input parameter.
+
+		Regular expression support is provided by the REGEX library package,
+		which is open source software, written by Philip Hazel, and copyright
+		by the University of Cambridge, England. 
+
+		Download site:	ftp://ftp.csx.cam.ac.uk/pub/software/programming/REGEX/
+	*/
+	bool GetMatchingSubstrings(const char *patternIn, const char *searchStringIn, StringVector* substrings);
+
+	/** 
+		This function takes a string and searches for all the double '\'s. 
+		Each double '\' //	is converted to a single '\'
+	*/
+	string	RemoveExtraSlashes(string);
+
+	/** Set the match count back to zero */
+	void	Reset();
+
+private:
+	/**
+		Return true if the specified pattern is constant. 
+		If the string is of length = 0 return true.
+	*/
+	bool IsConstant(string);
+
+	int matchCount;
+};
+
+/** 
+	This class represents an Exception that occured while processing a regex.
+*/
+class REGEXException : public Exception {
+public:
+	/** 
+		Set the error message and the severity to the specified values. 
+		This is done with the explicit call to the Exception class constructor that 
+		takes a string msg and an int severity param.
+	*/
+	REGEXException(string errMsgIn = "", int severity = ERROR_FATAL);
+
+	~REGEXException();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/REGEX.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/RestrictionType.cpp
===================================================================
--- trunk/ovaldi/src/RestrictionType.cpp	                        (rev 0)
+++ trunk/ovaldi/src/RestrictionType.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,129 @@
+//
+// $Id: RestrictionType.cpp 4614 2008-01-08 13:57:43Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "RestrictionType.h"
+
+//****************************************************************************************//
+//									RestrictionType Class								  //	
+//****************************************************************************************//
+
+RestrictionType::RestrictionType(OvalEnum::Datatype datatype, string value) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a complete RestrictionType
+	//
+	// -----------------------------------------------------------------------
+	this->datatype = datatype;
+	this->value = value;
+}
+
+RestrictionType::RestrictionType() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	// -----------------------------------------------------------------------
+
+}
+
+RestrictionType::~RestrictionType() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	// -----------------------------------------------------------------------
+
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+void RestrictionType::Parse(DOMElement* restrictionElm) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Parse the provided RestrictionType element into a RestrictionType
+	//
+	// -----------------------------------------------------------------------
+
+	this->SetOperation(OvalEnum::ToOperation(XmlCommon::GetAttributeByName(restrictionElm, "operation")));
+	this->SetValue(XmlCommon::GetDataNodeValue(restrictionElm));
+}
+
+void RestrictionType::SetValue(string value) {
+	this->value = value;
+}
+
+string RestrictionType::GetValue() {
+	return this->value;
+}
+
+void RestrictionType::SetOperation(OvalEnum::Operation operation) {
+	this->operation = operation;
+}
+OvalEnum::Operation RestrictionType::GetOperation() {
+	return this->operation;
+}
+
+bool RestrictionType::ValidateValue(OvalEnum::Datatype datatype, string externalValue) {
+
+	OvalEnum::ResultEnumeration result = OvalEnum::RESULT_ERROR;
+
+	// do comparison based on datatype
+	if(datatype == OvalEnum::DATATYPE_BINARY) {
+		result = EntityComparator::CompareBinary(this->GetOperation(), this->GetValue(), externalValue);
+	} else if(datatype == OvalEnum::DATATYPE_BOOLEAN) {
+		result = EntityComparator::CompareBoolean(this->GetOperation(), this->GetValue(), externalValue);
+	} else if(datatype == OvalEnum::DATATYPE_EVR_STRING) {
+		result = EntityComparator::CompareEvrString(this->GetOperation(), this->GetValue(), externalValue);
+	} else if(datatype == OvalEnum::DATATYPE_FLOAT) {
+		result = EntityComparator::CompareFloat(this->GetOperation(), this->GetValue(), externalValue);
+	} else if(datatype == OvalEnum::DATATYPE_INTEGER) {
+		result = EntityComparator::CompareInteger(this->GetOperation(), this->GetValue(), externalValue);
+	} else if(datatype == OvalEnum::DATATYPE_IOS_VERSION) {
+		result = EntityComparator::CompareIosVersion(this->GetOperation(), this->GetValue(), externalValue);
+	} else if(datatype == OvalEnum::DATATYPE_STRING) {
+		result = EntityComparator::CompareString(this->GetOperation(), this->GetValue(), externalValue);
+	} else if(datatype == OvalEnum::DATATYPE_VERSION) {
+		result = EntityComparator::CompareVersion(this->GetOperation(), this->GetValue(), externalValue);
+	}
+    
+	// convert the result to a boolean
+	bool isValid = false;
+	if(result == OvalEnum::RESULT_TRUE) {
+		isValid = true;
+	} else if(result == OvalEnum::RESULT_FALSE) {
+		isValid = false;	
+	} else {
+		throw Exception("RestrictionType::ValidateValue method unable to convert result value to a boolean. Found result: " + OvalEnum::ResultToString(result));
+	}
+
+	return isValid;
+}


Property changes on: trunk/ovaldi/src/RestrictionType.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/RestrictionType.h
===================================================================
--- trunk/ovaldi/src/RestrictionType.h	                        (rev 0)
+++ trunk/ovaldi/src/RestrictionType.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,71 @@
+//
+// $Id: RestrictionType.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef RESTRICTIONTYPE_H
+#define RESTRICTIONTYPE_H
+
+#include "XmlCommon.h"
+#include "OvalEnum.h"
+#include "EntityComparator.h"
+
+using namespace std;
+
+/**
+	This class represents the RestrictionType related to external variables in the oval definition schema.
+*/
+class RestrictionType {
+public:
+
+	RestrictionType(OvalEnum::Datatype datatype, string value);
+	RestrictionType();
+	~RestrictionType();
+
+	/** Parses a valid RestrictionType element as defined in the oval definitions schema. */
+	void Parse(DOMElement* restrictionTypeElm);
+
+	/** Ensure that the specified value matches the criteria specified by this restriction. */
+	bool ValidateValue(OvalEnum::Datatype datatype, string externalValue);
+
+	void SetValue(string value);
+	string GetValue();
+
+	void SetOperation(OvalEnum::Operation operation);
+	OvalEnum::Operation GetOperation();
+
+private:
+
+	string value;
+	OvalEnum::Datatype datatype;		
+	OvalEnum::Operation operation;		
+};
+
+typedef vector < RestrictionType*, allocator<RestrictionType*> > RestrictionTypeVector;
+#endif


Property changes on: trunk/ovaldi/src/RestrictionType.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Set.cpp
===================================================================
--- trunk/ovaldi/src/Set.cpp	                        (rev 0)
+++ trunk/ovaldi/src/Set.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,295 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "Set.h"
+
+//****************************************************************************************//
+//									Set Class											  //	
+//****************************************************************************************//
+Set::Set(DOMElement* setElm) {
+
+	this->SetReferenceOne(NULL);
+	this->SetReferenceTwo(NULL);
+	this->SetSetOne(NULL);
+	this->SetSetTwo(NULL);
+	this->SetIsSimpleSet(true);
+	this->Parse(setElm);
+}
+
+Set::Set() {
+
+	this->SetReferenceOne(NULL);
+	this->SetReferenceTwo(NULL);
+	this->SetSetOne(NULL);
+	this->SetSetTwo(NULL);
+	this->SetIsSimpleSet(true);
+}
+
+Set::~Set() {
+
+	Filter* filter = NULL;
+	while(filters.size() != 0) {
+	  	filter = (Filter*)filters[filters.size()-1];
+	  	filters.pop_back();
+	}
+
+	if(this->referenceOne != NULL) {
+		delete(this->referenceOne);
+	}
+	if(this->referenceTwo != NULL) {
+        delete(this->referenceTwo);
+	}
+
+	if(this->setOne != NULL) {
+        delete(this->setOne);
+	}
+	if(this->setTwo != NULL){
+		delete(this->setTwo);
+	}
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+AbsStateVector* Set::GetFilters() {
+	return &this->filters;
+}
+
+void Set::SetFilters(AbsStateVector* filters) {
+	this->filters = (*filters);
+}
+
+bool Set::GetIsSimpleSet() {
+	return this->isSimpleSet;
+}
+
+
+void Set::SetIsSimpleSet(bool isSimpleSet) {
+	this->isSimpleSet = isSimpleSet;	
+}
+
+AbsObject* Set::GetReferenceOne() {
+	return this->referenceOne;
+}
+
+void Set::SetReferenceOne(AbsObject* object) {
+	this->referenceOne = object;
+}
+
+AbsObject* Set::GetReferenceTwo() {
+	return this->referenceTwo;
+}
+
+void Set::SetReferenceTwo(AbsObject* object) {
+	this->referenceTwo = object;
+}
+
+Set* Set::GetSetOne() {
+	return this->setOne;
+}
+
+void Set::SetSetOne(Set* set) {
+	this->setOne = set;
+}
+
+Set* Set::GetSetTwo() {
+	return this->setTwo;
+}
+
+void Set::SetSetTwo(Set* set) {
+	this->setTwo = set;
+}
+
+OvalEnum::SetOperator Set::GetSetOperator() {
+	return this->setOperator;
+}
+
+void Set::SetSetOperator(OvalEnum::SetOperator setOperator) {
+	this->setOperator = setOperator;
+}
+
+void Set::AppendFilter(Filter* filter) {
+	this->filters.push_back(filter);
+}
+
+VariableValueVector* Set::GetVariableValues() {
+
+	VariableValueVector* varValues = new VariableValueVector();
+	VariableValue* varValue = NULL;
+    
+	if(this->GetIsSimpleSet()) {
+		// get the variable values used in each filter 
+		AbsStateVector::iterator iterator;
+		for(iterator = this->GetFilters()->end(); iterator != this->GetFilters()->end(); iterator++) {
+			Filter* filter = (Filter*)(*iterator);
+			VariableValueVector* filterVarValues = filter->GetVariableValues();
+			// copy the state's var values to the set's vector of var values
+			VariableValueVector::iterator vit;
+			for(vit = filterVarValues->end(); vit != filterVarValues->end(); vit++) {
+				varValue = (*vit);
+				varValues->push_back(varValue);
+			}
+			
+			delete filterVarValues;
+			filterVarValues = NULL;
+		}
+
+		// get the variable values used by reference one if it exists
+		VariableValueVector* refVarValues = NULL;
+		VariableValueVector::iterator rit;
+		if(this->GetReferenceOne() != NULL) {
+			refVarValues = this->GetReferenceOne()->GetVariableValues();
+			// copy the reference's var values to the set's vector of var values
+			for(rit = refVarValues->end(); rit != refVarValues->end(); rit++) {
+				varValue = (*rit);
+				varValues->push_back(varValue);
+			}
+			
+			delete refVarValues;
+			refVarValues = NULL;
+		}
+
+		// get the variable values used by reference 2 if it exists
+		if(this->GetReferenceTwo() != NULL) {
+			refVarValues = this->GetReferenceTwo()->GetVariableValues();
+			// copy the reference's var values to the set's vector of var values
+			for(rit = refVarValues->end(); rit != refVarValues->end(); rit++) {
+				varValue = (*rit);
+				varValues->push_back(varValue);
+			}
+			
+			delete refVarValues;
+			refVarValues = NULL;
+		}
+
+	} else {
+
+		// Get the variable values used by set one if it exists
+		VariableValueVector* setVarValues = NULL;
+		VariableValueVector::iterator sit;
+		if(this->GetSetOne() != NULL) {
+			setVarValues = this->GetSetOne()->GetVariableValues();
+			// copy the child set's var values to the set's vector of var values
+			for(sit = setVarValues->end(); sit != setVarValues->end(); sit++) {
+				varValue = (*sit);
+				varValues->push_back(varValue);
+			}
+			
+			delete setVarValues;
+			setVarValues = NULL;
+		}
+
+		// Get the variable values used by set two if it exists
+		if(this->GetSetTwo() != NULL) {
+			setVarValues = this->GetSetTwo()->GetVariableValues();
+			// copy the child set's var values to the set's vector of var values
+			for(sit = setVarValues->end(); sit != setVarValues->end(); sit++) {
+				varValue = (*sit);
+				varValues->push_back(varValue);
+			}
+			
+			delete setVarValues;
+			setVarValues = NULL;
+		}
+	}
+
+	return varValues;
+}
+
+void Set::Parse(DOMElement* setObjectElm) {
+
+	string setOperatorStr = XmlCommon::GetAttributeByName(setObjectElm, "set_operator");
+	this->SetSetOperator(OvalEnum::ToSetOperator(setOperatorStr));
+
+	// loop over all child elements
+	DOMNodeList *setObjectChildren = setObjectElm->getChildNodes();
+	unsigned int index = 0;
+	while(index < setObjectChildren->getLength()) {
+		DOMNode *tmpNode = setObjectChildren->item(index);
+
+		//	only concerned with ELEMENT_NODEs
+		if (tmpNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+			DOMElement *setChild = (DOMElement*)tmpNode;
+
+			//	get the name of the child
+			string childName = XmlCommon::GetElementName(setChild);
+			if(childName.compare("set") == 0) {
+
+				this->SetIsSimpleSet(false);
+
+				// create a new set object based on this element
+				if(this->GetSetOne() == NULL) {
+					Set* newSetObj = new Set(setChild);
+					//newSetObj->SetIsSimpleSet(false);
+					this->SetSetOne(newSetObj);
+				} else {
+					Set* newSetObj = new Set(setChild);
+					//newSetObj->SetIsSimpleSet(false);
+					this->SetSetTwo(newSetObj);
+				}
+
+			} else if(childName.compare("object_reference") == 0) {
+				this->SetIsSimpleSet(true);
+				string objId = XmlCommon::GetDataNodeValue(setChild);
+				AbsObject* tmpObj = ObjectFactory::GetObjectById(objId);
+				if(this->GetReferenceOne() == NULL) {
+					this->SetReferenceOne(tmpObj);
+				} else {
+					this->SetReferenceTwo(tmpObj);
+				}
+			} else if(childName.compare("filter") == 0) {
+				this->SetIsSimpleSet(true);
+				string stateId = XmlCommon::GetDataNodeValue(setChild);
+
+
+				Filter* tmpFilter = Filter::GetFilter(stateId);
+				//Filter* tmpFilter = Filter::SearchCache();
+				//if(tmpFilter == NULL) {
+				//	tmpFilter = new Filter(stateId);
+				//	Filter::Cache(tmpFilter);
+				//}
+				this->AppendFilter(tmpFilter);
+			}
+		}
+
+		index ++;
+	}
+}
+
+//****************************************************************************************//
+//								SetException Class										  //	
+//****************************************************************************************//
+SetException::SetException(string errMsgIn, int severity, Exception* ex) : Exception(errMsgIn, severity, ex) {
+
+}
+
+SetException::~SetException() {
+
+}


Property changes on: trunk/ovaldi/src/Set.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Set.h
===================================================================
--- trunk/ovaldi/src/Set.h	                        (rev 0)
+++ trunk/ovaldi/src/Set.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,141 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef SET_H
+#define SET_H
+
+#include <string>
+#include <vector>
+#include <iostream>
+#include <stdlib.h>
+
+#include "Exception.h"
+#include "XmlCommon.h"
+#include "Filter.h"
+#include "Object.h"
+#include "OvalEnum.h"
+#include "VariableValue.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+// Forward declarations to allow compilation.
+class Filter;
+class AbsState;
+typedef vector < AbsState*, allocator<AbsState*> > AbsStateVector;
+class Set;
+typedef vector < Set*, allocator<Set*> > SetVector;
+// end forward declarations
+
+/**
+	This class represents an Set in an oval definition schema.
+	Sets are used by set objects to construct complex sets of items on a sytem for analysis.
+*/
+class Set {
+
+public:
+	/** Parse the set element and populate this object with its data.*/
+	Set(DOMElement* setElm);
+
+	/** Initialize the set and set the simple set flag to true */
+	Set();
+
+	/** Clean up all the set elements. */
+	~Set();
+
+	/** Parse the provided Set object element. */
+	void Parse(DOMElement* setElm);
+
+	/** Return a vector of all variable values used for this set. */
+	VariableValueVector* GetVariableValues();
+	
+	/** Return the filters field's value. */
+	AbsStateVector* GetFilters();
+	/** Set the filters field's value. */
+	void SetFilters(AbsStateVector* filters);
+
+	/** Get the isSimpleSet field's value. */
+	bool GetIsSimpleSet();
+	/** Set the isSimpleSet field's value. */
+	void SetIsSimpleSet(bool isSimpleSet);
+
+	/** Return the referenceOne field's value. */
+	AbsObject* GetReferenceOne();
+	/** Set the referenceOne field's value. */
+	void SetReferenceOne(AbsObject* object);
+
+	/** Return the referenceTwo field's value. */
+	AbsObject* GetReferenceTwo();
+	/** Set the referenceTwo field's value. */
+	void SetReferenceTwo(AbsObject* object);
+
+	/** Return the setOne field's value. */
+	Set* GetSetOne();
+	/** Set the setOne field's value. */
+	void SetSetOne(Set* set);
+
+	/** Return the setTwo field's value. */
+	Set* GetSetTwo();
+	/** Set the setTwo field's value. */
+	void SetSetTwo(Set* set);
+	
+	/** Return the setOperator field's value. */
+	OvalEnum::SetOperator GetSetOperator();
+	/** Set the setOperator field's value. */
+	void SetSetOperator(OvalEnum::SetOperator setOperator);
+
+	/** Add a filter to the end of the filters vector. */
+	void AppendFilter(Filter* filter);
+    
+private:
+	AbsStateVector filters;
+	AbsObject* referenceOne;
+	AbsObject* referenceTwo;
+	Set* setOne;
+	Set* setTwo;
+	OvalEnum::SetOperator setOperator;
+	bool isSimpleSet;
+};
+
+/** 
+	This class represents an Exception that occured while processing a set.
+*/
+class SetException : public Exception {
+	public:
+		/** Set the error message and then set the severity to ERROR_FATAL. This is 
+			done with the explicit call to the Exception class constructor that 
+			takes a single string param.
+		*/
+		SetException(string errMsgIn = "", int severity = ERROR_FATAL, Exception *ex = NULL);
+
+		~SetException();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/Set.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/SetObject.cpp
===================================================================
--- trunk/ovaldi/src/SetObject.cpp	                        (rev 0)
+++ trunk/ovaldi/src/SetObject.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,147 @@
+//
+// $Id: SetObject.cpp 4590 2008-01-03 16:29:32Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "SetObject.h"
+
+//****************************************************************************************//
+//									SetObject Class										  //	
+//****************************************************************************************//
+SetObject::SetObject(string id, string comment, string name, int version, string xmlns)  : AbsObject (id, comment, xmlns, name, version) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a complete SetObject
+	//
+	// -----------------------------------------------------------------------
+
+	this->type = "SetObject";
+
+}
+
+SetObject::~SetObject() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	clean up all the elements
+	//
+	// -----------------------------------------------------------------------
+	
+	delete(this->set);
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+Set* SetObject::GetSet() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the set field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->set;
+}
+
+void SetObject::SetSet(Set* set) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the set field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->set = set;
+}
+
+VariableValueVector* SetObject::GetVariableValues() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return a vector of all variable values used in this SetObject
+	//
+	// -----------------------------------------------------------------------
+	
+	VariableValueVector* varValues = NULL;
+
+	// This call is ok because the Set creates a new VariableValueVector 
+	// and returns it to the caller 
+	varValues = this->GetSet()->GetVariableValues();
+
+	return varValues;
+}
+
+void SetObject::Parse(DOMElement* setObjectElm) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Parse the provided Set object element
+	//
+	// -----------------------------------------------------------------------
+
+	this->SetName(XmlCommon::GetElementName(setObjectElm));
+	this->SetId(XmlCommon::GetAttributeByName(setObjectElm, "id"));
+	this->SetComment(XmlCommon::GetAttributeByName(setObjectElm, "comment"));
+	this->SetXmlns(XmlCommon::GetNamespace(setObjectElm));
+	string versionStr = XmlCommon::GetAttributeByName(setObjectElm, "version");
+	int version;
+	if(versionStr.compare("") == 0) {
+		version = 1;
+	} else {
+		version = atoi(versionStr.c_str());
+	}
+	this->SetVersion(version);
+
+	// loop over all elements
+	DOMNodeList *setObjectChildren = setObjectElm->getChildNodes();
+	unsigned int index = 0;
+	while(index < setObjectChildren->getLength()) {
+		DOMNode *tmpNode = setObjectChildren->item(index++);
+
+		//	only concerned with ELEMENT_NODEs
+		if (tmpNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+			DOMElement *setObjectChild = (DOMElement*)tmpNode;
+
+			//	get the name of the child
+			string childName = XmlCommon::GetElementName(setObjectChild);
+			if(childName.compare("notes") == 0) { // ignore notes
+				continue;
+
+			// look for set object
+			} else if(childName.compare("set") == 0) {
+				// create a new set object based on this element
+				Set* newSetObj = new Set(setObjectChild);
+				this->SetSet(newSetObj);
+				break;
+			} 
+		}
+	}
+}


Property changes on: trunk/ovaldi/src/SetObject.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/SetObject.h
===================================================================
--- trunk/ovaldi/src/SetObject.h	                        (rev 0)
+++ trunk/ovaldi/src/SetObject.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,68 @@
+//
+// $Id: SetObject.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef SETOBJECT_H
+#define SETOBJECT_H
+
+#include "ObjectFactory.h"
+#include "AbsObject.h"
+#include "XmlCommon.h"
+#include "State.h"
+#include "Object.h"
+#include "Set.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+class Set;
+typedef vector < Set*, allocator<Set*> > SetVector;
+
+
+/**
+	This class represents an SetObject in an oval definition schema.
+*/
+class SetObject : public AbsObject {
+
+public:
+	SetObject(string id = "", string comment = "", string name = "", int version = 1, string xmlns = "");
+	~SetObject();
+
+	void Parse(DOMElement* setObjectElm);
+	VariableValueVector* GetVariableValues();
+	
+	Set* GetSet();
+	void SetSet(Set* set);
+    
+private:
+	Set* set;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/SetObject.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/State.cpp
===================================================================
--- trunk/ovaldi/src/State.cpp	                        (rev 0)
+++ trunk/ovaldi/src/State.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,191 @@
+//
+// $Id: State.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "State.h"
+
+AbsStateMap State::processedStatesMap;
+
+//****************************************************************************************//
+//									State Class											  //	
+//****************************************************************************************//
+
+State::State(OvalEnum::Operator myOperator, int version) : AbsState(myOperator, version) {
+
+}
+
+State::~State() {
+
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+
+OvalEnum::ResultEnumeration State::Analyze(Item* item) {
+
+	// Check the status of the Item
+	if(item->GetStatus() == OvalEnum::STATUS_ERROR) {
+		return OvalEnum::RESULT_ERROR;
+	} else if(item->GetStatus() == OvalEnum::STATUS_NOT_COLLECTED) {
+		return OvalEnum::RESULT_ERROR;
+	} else if(item->GetStatus() == OvalEnum::STATUS_DOES_NOT_EXIST) {
+		return OvalEnum::RESULT_FALSE;
+	}
+
+	// check data before analysis
+	if(this->GetElements()->size() == 0) {
+		return OvalEnum::RESULT_TRUE;
+	}
+
+	// vector of result values before the state operator is applied
+	IntVector stateResults;
+
+	// Loop through all elements in the state
+	AbsEntityVector::iterator stateElements;
+	for(stateElements = this->GetElements()->begin(); stateElements != this->GetElements()->end(); stateElements++) {
+		StateEntity* stateElm = (StateEntity*)(*stateElements);
+
+		// locate matching elements in the item
+		string stateElmName = stateElm->GetName(); 
+		ItemEntityVector* scElements = item->GetElementsByName(stateElmName);
+
+		// Analyze each matching element
+		ItemEntityVector::iterator scIterator;
+		IntVector stateElmResults;
+		for(scIterator = scElements->begin(); scIterator != scElements->end(); scIterator++) {
+			ItemEntity* scElm = (ItemEntity*)(*scIterator);
+			// call StateEntity->analyze method
+			stateElmResults.push_back(stateElm->Analyze(scElm));
+		}
+
+		// compute the overall state result
+		OvalEnum::ResultEnumeration stateResult = OvalEnum::CombineResultsByCheck(&stateElmResults, stateElm->GetEntityCheck());
+
+		// store the result for the current state element
+		stateResults.push_back(stateResult);
+	}
+	
+	OvalEnum::ResultEnumeration overallResult = OvalEnum::CombineResultsByOperator(&stateResults, this->GetOperator());
+
+	return overallResult;
+}
+
+void State::Parse(DOMElement* stateElm) {
+
+	this->SetName(XmlCommon::GetElementName(stateElm));
+	this->SetId(XmlCommon::GetAttributeByName(stateElm, "id"));
+	this->SetXmlns(XmlCommon::GetNamespace(stateElm));
+	string versionStr = XmlCommon::GetAttributeByName(stateElm, "version");
+	int version;
+	if(versionStr.compare("") == 0) {
+		version = 1;
+	} else {
+		version = atoi(versionStr.c_str());
+	}
+	this->SetVersion(version);
+
+	// loop over all elements
+	DOMNodeList *stateChildren = stateElm->getChildNodes();
+	unsigned int index = 0;
+	while(index < stateChildren->getLength()) {
+		DOMNode *tmpNode = stateChildren->item(index++);
+
+		//	only concerned with ELEMENT_NODEs
+		if (tmpNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+			DOMElement *stateChild = (DOMElement*)tmpNode;
+
+			//	get the name of the child
+			string childName = XmlCommon::GetElementName(stateChild);
+			if(childName.compare("notes") == 0) {
+				continue;
+			} else {
+                StateEntity* stateEntity = new StateEntity();
+				stateEntity->Parse(stateChild);
+				this->AppendElement(stateEntity);
+			}
+		}
+	}
+
+	State::Cache(this);
+}
+
+State* State::SearchCache(string id) {
+
+	AbsState* cachedState = NULL;
+
+	AbsStateMap::iterator iterator;
+	iterator = State::processedStatesMap.find(id);
+	if(iterator != State::processedStatesMap.end()) {
+		cachedState = iterator->second;
+	} 
+
+	return (State*)cachedState;
+}
+
+void State::ClearCache() {
+
+	AbsStateMap::iterator iterator;
+	for(iterator = State::processedStatesMap.begin(); iterator != State::processedStatesMap.end(); iterator++) {
+		AbsState* state = iterator->second;
+		delete state;
+	}
+	
+	State::processedStatesMap.clear();
+}
+
+void State::Cache(State* state) {
+
+	State::processedStatesMap.insert(AbsStatePair(state->GetId(), state));
+}
+
+State* State::GetStateById(string stateId) {
+
+	State* state = NULL;
+	
+	// Search the cache
+	state = State::SearchCache(stateId);
+
+	// if not found try to parse it.
+	if(state == NULL) {
+
+		DOMElement* statesElm = XmlCommon::FindElement(DocumentManager::GetDefinitionDocument(), "states");
+		DOMElement* stateElm = XmlCommon::FindElementByAttribute(statesElm, "id", stateId);
+
+		if(stateElm == NULL) {
+			throw Exception("Unable to find specified state in oval-definition document. State id: " + stateId);
+		}
+
+		state = new State();
+		state->Parse(stateElm);
+	}
+	
+	return state;
+}


Property changes on: trunk/ovaldi/src/State.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/State.h
===================================================================
--- trunk/ovaldi/src/State.h	                        (rev 0)
+++ trunk/ovaldi/src/State.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,100 @@
+//
+// $Id: State.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef STATE_H
+#define STATE_H
+
+#include "AbsState.h"
+#include "StateEntity.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+class StateEntity;
+class Item;
+class State;
+
+/**
+	This class represents a state in the oval definition schema.
+	States are used by tests for analysis purposes. The State 
+	declares what an expected condition is for some item on a system.
+*/
+class State : public AbsState {
+
+public:
+
+	~State();
+
+	/** Analyze the specified Item return the Result value for the Item.
+	
+		1 - create a vector of Item elements that match each element in the state.
+		2 - pass the vector to the StateEntity analyze method
+		3 - build a vector of results for each element in the state.
+		4 - combine the results to a single value based on the states operator
+	*/
+	OvalEnum::ResultEnumeration Analyze(Item* item);
+
+	/** Parse the provided state element from a oval definition file into a State object. */
+	void Parse(DOMElement* stateElm);
+
+	/** Sarch the cache of States for the specifed State. 
+		Return NULL if not found
+	*/
+	static State* SearchCache(string id);
+
+	/** Delete all items in the cache. */
+	static void ClearCache();
+
+	/** Cache the specified state. */
+	static void Cache(State* state);
+
+	/** Return a state object for the specified state id.
+		First the cache of States is checked. If the state is
+		not found in the cache the state is looked up in the
+		oval-definitions document and parsed. Once parsed the new State
+		object is added to the cache.
+
+		If the state is not found an exception is thrown. 
+	*/
+	static State* GetStateById(string stateId);
+
+private:
+
+	/** Create a new State object.
+		Sets the operator and version
+	*/
+	State(OvalEnum::Operator myOperator = OvalEnum::OPERATOR_AND, int version = 1);
+	
+
+	static AbsStateMap processedStatesMap;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/State.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/StateEntity.cpp
===================================================================
--- trunk/ovaldi/src/StateEntity.cpp	                        (rev 0)
+++ trunk/ovaldi/src/StateEntity.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,155 @@
+//
+// $Id: StateEntity.cpp 4662 2008-01-23 12:51:18Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "StateEntity.h"
+
+//****************************************************************************************//
+//								StateEntity Class									  //	
+//****************************************************************************************//
+StateEntity::StateEntity(StateEntity* orig) : AbsEntity() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Copy constructor.
+	//	Create a complete StateEntity object based on the specified obj.
+	//
+	// -----------------------------------------------------------------------
+
+	this->SetDatatype(orig->GetDatatype());
+	this->SetEntityCheck(orig->GetEntityCheck());
+	this->SetIsObjectEntity(orig->GetIsObjectEntity());
+	this->SetName(orig->GetName());
+	this->SetNil(orig->GetNil());
+	this->SetOperation(orig->GetOperation());
+	this->SetValue(orig->GetValue());
+	this->SetVarCheck(orig->GetVarCheck());
+	this->SetVarRef(orig->GetVarRef());
+}
+
+StateEntity::StateEntity(string name, string value, OvalEnum::Datatype datatype, OvalEnum::Operation operation, AbsVariable* varRef, OvalEnum::Check entityCheck, OvalEnum::Check varCheck, bool nil)
+									: AbsEntity(name, value, datatype, false, operation, varRef, varCheck, nil) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a complete StateEntity object
+	//
+	// -----------------------------------------------------------------------
+
+	this->SetEntityCheck(entityCheck);
+}
+
+StateEntity::~StateEntity() {
+
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+OvalEnum::Check StateEntity::GetEntityCheck() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the entityCheck field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->entityCheck;
+}
+
+void StateEntity::SetEntityCheck(OvalEnum::Check entityCheck) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the entityCheck field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->entityCheck = entityCheck;
+}
+
+bool StateEntity::Equals(AbsEntity* entity) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return true if this StateEntity is equal to the provided StateEntity
+	// -----------------------------------------------------------------------
+	StateEntity* stateEntity = (StateEntity*)entity;
+	bool isEqual = false;
+
+	if(this->GetDatatype() == stateEntity->GetDatatype()) {
+		if(this->GetOperation() == stateEntity->GetOperation()) {
+			if(this->GetName().compare(stateEntity->GetName()) == 0) {
+				if(this->GetValue().compare(stateEntity->GetValue()) == 0) {
+					if(this->GetEntityCheck() == stateEntity->GetEntityCheck()) {
+						if(this->GetVarCheck() == stateEntity->GetVarCheck()) {
+							isEqual = true;
+						}
+					}
+				}
+			}
+		}
+	}
+	return isEqual;
+}
+
+void StateEntity::Parse(DOMElement* stateEntityElm) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Parse the provided StateEntity element
+	// -----------------------------------------------------------------------
+
+	this->SetName(XmlCommon::GetElementName(stateEntityElm));
+	this->SetValue(XmlCommon::GetDataNodeValue(stateEntityElm));
+	this->SetOperation(OvalEnum::ToOperation(XmlCommon::GetAttributeByName(stateEntityElm, "operation")));
+	this->SetDatatype(OvalEnum::ToDatatype(XmlCommon::GetAttributeByName(stateEntityElm, "datatype")));
+	this->SetEntityCheck(OvalEnum::ToCheck(XmlCommon::GetAttributeByName(stateEntityElm, "entity_check")));
+	this->SetVarCheck(OvalEnum::ToCheck(XmlCommon::GetAttributeByName(stateEntityElm, "var_check")));
+
+	// get the nill attribute
+	string nilAttr = XmlCommon::GetAttributeByName(stateEntityElm, "nil");
+	if(nilAttr.compare("") == 0 || nilAttr.compare("false") == 0) {
+		this->SetNil(false);
+	} else {
+		this->SetNil(true);
+	}
+
+	// get variable value if needed
+	string varRefStr = XmlCommon::GetAttributeByName(stateEntityElm, "var_ref");
+	if(varRefStr.compare("") != 0) {
+		AbsVariable* var = VariableFactory::GetVariable(varRefStr);
+		this->SetValue("");
+		this->SetVarRef(var);
+	} else {
+		this->SetVarRef(NULL);
+	}
+}
+


Property changes on: trunk/ovaldi/src/StateEntity.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/StateEntity.h
===================================================================
--- trunk/ovaldi/src/StateEntity.h	                        (rev 0)
+++ trunk/ovaldi/src/StateEntity.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,67 @@
+//
+// $Id: StateEntity.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef STATEENTITY_H
+#define STATEENTITY_H
+
+#include "AbsEntity.h" 
+#include "VariableFactory.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	This class represents an entity in the State as definted in the oval definition schema. 
+	StateEntities have an entityCheck attribute in additional to all attributes defined in the 
+	AbsEntity class.
+*/
+class StateEntity : public AbsEntity {
+public:
+	/**
+		Copy constructor. Creates a new StateEntity based on the specified StateEntity. 
+		@param orig a StateEntity* to be copied
+	*/
+	StateEntity(StateEntity* orig);
+	StateEntity(string name = "", string value = "", OvalEnum::Datatype datatype = OvalEnum::DATATYPE_STRING, OvalEnum::Operation operation = OvalEnum::OPERATION_EQUALS, AbsVariable* varRef = NULL, OvalEnum::Check entityCheck = OvalEnum::CHECK_ALL, OvalEnum::Check varCheck = OvalEnum::CHECK_ALL, bool nil = false);
+	~StateEntity();
+
+	bool Equals(AbsEntity* entity);
+	void Parse(DOMElement* entitiyElm);
+
+	OvalEnum::Check GetEntityCheck();
+	void SetEntityCheck(OvalEnum::Check check);
+
+private:
+
+	OvalEnum::Check entityCheck;  /*!< a flag that defines how to compare this enetity against multiple corresponding entities in an Item.  */
+};
+
+#endif


Property changes on: trunk/ovaldi/src/StateEntity.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/SubstringFunction.cpp
===================================================================
--- trunk/ovaldi/src/SubstringFunction.cpp	                        (rev 0)
+++ trunk/ovaldi/src/SubstringFunction.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,144 @@
+//
+// $Id: SubstringFunction.cpp 4589 2008-01-03 16:29:12Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "SubstringFunction.h"
+
+//****************************************************************************************//
+//								Component Class											  //	
+//****************************************************************************************//
+SubstringFunction::SubstringFunction(int start, int length) : AbsFunctionComponent() {
+
+	this->SetStart(start);
+	this->SetLength(length);
+}
+
+SubstringFunction::~SubstringFunction() {
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+int SubstringFunction::GetStart() {
+	return this->start;
+}
+
+void SubstringFunction::SetStart(int start) {
+
+	this->start = start;
+}
+
+int SubstringFunction::GetLength() {
+
+	return this->length;
+}
+
+void SubstringFunction::SetLength(int length) {
+
+	this->length = length;
+}
+
+ComponentValue* SubstringFunction::ComputeValue() {
+
+	StringVector* values = NULL;
+	
+	AbsComponent* component = this->GetComponents()->at(0);
+
+	ComponentValue* componentValue = component->ComputeValue();
+
+	// create and populate a result ComponentValue
+	ComponentValue* result = new ComponentValue();
+	result->SetFlag(componentValue->GetFlag());
+	result->AppendMessages(componentValue->GetMessages());
+
+	if(componentValue->GetFlag() == OvalEnum::FLAG_COMPLETE) {
+		values = new StringVector();;
+
+		StringVector::iterator iterator;
+		for(iterator = componentValue->GetValues()->begin(); iterator != componentValue->GetValues()->end(); iterator++) {
+			string currentValue = (*iterator);
+			string newValue = currentValue.substr(this->GetStart()-1, this->GetLength());
+			values->push_back(newValue);
+		}
+		result->SetValues(values);
+	}
+
+	delete componentValue;
+
+	return result;	
+}
+
+void SubstringFunction::Parse(DOMElement* componentElm) {
+
+	// get the start and length attrs
+	string start = XmlCommon::GetAttributeByName(componentElm, "substring_start");
+	this->SetStart(atoi(start.c_str()));
+	string length = XmlCommon::GetAttributeByName(componentElm, "substring_length");
+	this->SetLength(atoi(length.c_str()));
+
+	// Loop through all child elements
+	// there should only ever be one 
+	DOMNodeList *componentElms = componentElm->getChildNodes();
+	unsigned int index = 0;
+	while(index < componentElms->getLength()) {
+		DOMNode *tmpNode = componentElms->item(index);
+		if (tmpNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+			DOMElement *childElm = (DOMElement*)tmpNode;
+
+			// Call the ComponentFactory
+			AbsComponent* absComponent = ComponentFactory::GetComponent(childElm);
+			// store the returned component
+			this->AppendComponent(absComponent);			
+		}
+		index ++;
+	}
+}
+
+VariableValueVector* SubstringFunction::GetVariableValues() {
+	
+	VariableValueVector* values = new VariableValueVector();
+	AbsComponentVector* components = this->GetComponents();
+	AbsComponentVector::iterator iterator;
+	for(iterator = components->begin(); iterator != components->end(); iterator++) {
+		AbsComponent* component = (AbsComponent*)(*iterator);
+		VariableValueVector* tmp = component->GetVariableValues();
+		VariableValueVector::iterator varIterator;
+		for(varIterator = tmp->begin(); varIterator != tmp->end(); varIterator++) {
+			values->push_back((*varIterator));
+		}
+		// BUG - These can not currenrtly be deleted. 
+		// The code is no consistant here. In places a new vector is returned
+		// in others a reference to a vector that is managed by other code is returned.
+		//delete tmp;
+		//tmp = NULL;
+	}
+
+	return values;
+}


Property changes on: trunk/ovaldi/src/SubstringFunction.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/SubstringFunction.h
===================================================================
--- trunk/ovaldi/src/SubstringFunction.h	                        (rev 0)
+++ trunk/ovaldi/src/SubstringFunction.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,75 @@
+//
+// $Id: SubstringFunction.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef SUBSTRINGFUNCTION_H
+#define SUBSTRINGFUNCTION_H
+
+#include "AbsFunctionComponent.h"
+#include "ComponentFactory.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	This class represents a SubstringFunction component in a local_variable in the oval definition schema.
+*/
+class SubstringFunction : public AbsFunctionComponent {
+public:
+
+	/** Create a complete SubstringFunction object. */
+	SubstringFunction(int start = 0, int length = 0);
+	~SubstringFunction();
+
+	/** Parse the substring element and its child component element. */
+	void Parse(DOMElement* componentElm); 
+
+	/** Compute the desired substring and return the value. */
+	ComponentValue* ComputeValue();
+
+	/** Return the variable values used to compute this function's value. */
+	VariableValueVector* GetVariableValues();
+
+	/** Get the start field's value. */
+	int GetStart();
+	/** Set the start field's value. */
+	void SetStart(int start);
+
+	/** Get the length field's value. */
+	int GetLength();
+	/** Set the length field's value. */
+	void SetLength(int length);
+
+private:
+	int start;
+	int length;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/SubstringFunction.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Test.cpp
===================================================================
--- trunk/ovaldi/src/Test.cpp	                        (rev 0)
+++ trunk/ovaldi/src/Test.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,729 @@
+//
+// $Id: Test.cpp 4608 2008-01-04 18:03:02Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "Test.h"
+
+TestMap Test::processedTestsMap;
+//****************************************************************************************//
+//								Test Class												  //	
+//****************************************************************************************//
+Test::Test() {
+
+	this->SetId("");
+	this->SetResult(OvalEnum::RESULT_ERROR);
+	this->SetVariableInstance(1);
+	this->SetVersion(1);
+	this->SetWritten(false);
+	this->SetAnalyzed(false);
+	this->SetCheckExistence(OvalEnum::EXISTENCE_ALL_EXIST);
+	this->SetCheck(OvalEnum::CHECK_ALL);
+	this->SetObjectId("");
+	this->SetStateId("");
+}
+
+Test::~Test() {
+	
+	TestedItem* item = NULL;
+	while(this->testedItems.size() != 0) {
+		item = this->testedItems[this->testedItems.size()-1];
+	  	this->testedItems.pop_back();
+	  	delete item;
+	  	item = NULL;
+	}
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+
+OvalEnum::Check Test::GetCheck() {
+	return this->check;
+}
+
+void Test::SetCheck(OvalEnum::Check check) {
+	this->check = check;
+}
+
+OvalEnum::Existence Test::GetCheckExistence() {
+	return this->checkExistence;
+}
+
+void Test::SetCheckExistence(OvalEnum::Existence checkExistence) {
+	this->checkExistence = checkExistence;
+}
+
+
+TestedItemVector* Test::GetTestedItems() {
+	return &this->testedItems;
+}
+
+void Test::SetTestedItems(TestedItemVector* testedItems) {
+	this->testedItems = (*testedItems);
+}
+
+void Test::AppendTestedItem(TestedItem* testedItem) {
+	this->GetTestedItems()->push_back(testedItem);
+}
+
+VariableValueVector* Test::GetTestedVariables() {
+
+	return &this->testedVariables;
+}
+
+void Test::SetTestedVariables(VariableValueVector* testedVariables) {
+
+	this->testedVariables = (*testedVariables);
+}
+
+void Test::AppendTestedVariable(VariableValue* testedVariable) {
+	
+	this->GetTestedVariables()->push_back(testedVariable);
+}
+
+string Test::GetId() {
+	
+	return this->id;
+}
+
+void Test::SetId(string id) {
+
+	this->id = id;
+}
+
+string Test::GetObjectId() {
+
+	return this->objectId;
+}
+
+void Test::SetObjectId(string objectId) {
+
+	this->objectId = objectId;
+}
+
+
+string Test::GetStateId() {
+
+	return this->stateId;
+}
+
+void Test::SetStateId(string stateId) {
+
+	this->stateId = stateId;
+}
+
+OvalEnum::ResultEnumeration Test::GetResult() {
+
+	return this->result;
+}
+
+void Test::SetResult(OvalEnum::ResultEnumeration result) {
+
+	this->result = result;
+}
+
+int Test::GetVariableInstance() {
+
+	return this->variableInstance;
+}
+
+void Test::SetVariableInstance(int variableInstance) {
+
+	this->variableInstance = variableInstance;
+}
+
+int Test::GetVersion() {
+
+	return this->version;
+}
+
+void Test::SetVersion(int version) {
+
+	this->version = version;
+}
+
+bool Test::GetWritten() {
+
+	return this->written;
+}
+
+void Test::SetWritten(bool written) {
+
+	this->written = written;
+}
+
+bool Test::GetAnalyzed() {
+
+	return this->analyzed;
+}
+
+void Test::SetAnalyzed(bool analyzed) {
+
+	this->analyzed = analyzed;
+}
+
+Test* Test::SearchCache(string id) {
+
+	Test* cachedTest = NULL;
+
+	TestMap::iterator iterator;
+	iterator = Test::processedTestsMap.find(id);
+	if(iterator != Test::processedTestsMap.end()) {
+		cachedTest = iterator->second;
+	} 
+
+	return cachedTest;
+}
+
+void Test::ClearCache() {
+
+	TestMap::iterator iterator;
+	for(iterator = Test::processedTestsMap.begin(); iterator != Test::processedTestsMap.end(); iterator++) {
+		
+		Test* test = iterator->second;
+		delete test;
+	}
+	
+	Test::processedTestsMap.clear();
+}
+
+void Test::Write(DOMElement* parentElm) {
+
+	if(!this->GetWritten()) {
+		this->SetWritten(true);
+
+		// get the parent document
+		XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* resultDoc = parentElm->getOwnerDocument();
+
+		// create a new Test element
+		DOMElement* testElm = XmlCommon::AddChildElement(resultDoc, parentElm, "test");
+
+		// add the attributes
+		XmlCommon::AddAttribute(testElm, "test_id", this->GetId());
+		XmlCommon::AddAttribute(testElm, "version", Common::ToString(this->GetVersion()));
+		XmlCommon::AddAttribute(testElm, "check_existence", OvalEnum::ExistenceToString(this->GetCheckExistence()));
+		XmlCommon::AddAttribute(testElm, "check", OvalEnum::CheckToString(this->GetCheck()));
+		XmlCommon::AddAttribute(testElm, "result", OvalEnum::ResultToString(this->GetResult()));
+
+		if(this->GetVariableInstance() != 1) {
+			XmlCommon::AddAttribute(testElm, "variable_instance", Common::ToString(this->GetVariableInstance()));
+		}	
+
+		TestedItem* currentElement = NULL;
+		while(this->GetTestedItems()->size() != 0) {
+			currentElement = this->GetTestedItems()->at(this->GetTestedItems()->size()-1);
+			this->GetTestedItems()->pop_back();
+			currentElement->Write(testElm);	  		
+	  		delete currentElement;
+	  		currentElement = NULL;
+		}
+
+		// loop through all variable values and call write method
+		VariableValueVector::iterator iterator1;
+		for(iterator1 = this->GetTestedVariables()->begin(); iterator1 != this->GetTestedVariables()->end(); iterator1++) {
+			(*iterator1)->WriteTestedVariable(testElm);
+		}
+
+		// loop through all vars in the state
+		if(this->GetStateId().compare("") != 0) {
+			State* tmpState = State::SearchCache(this->GetStateId());
+			if(tmpState != NULL) { 
+				VariableValueVector::iterator iterator2;
+				VariableValueVector* stateVars = tmpState->GetVariableValues();
+				for(iterator2 = stateVars->begin(); iterator2 != stateVars->end(); iterator2++) {
+					(*iterator2)->WriteTestedVariable(testElm);
+				}
+			}
+		}
+	}
+}
+
+void Test::Parse(DOMElement* testElm) {
+
+	// get id
+	string id = XmlCommon::GetAttributeByName(testElm, "id");
+
+	// get the attributes
+	this->SetId(XmlCommon::GetAttributeByName(testElm, "id"));
+	this->SetVersion(atoi(XmlCommon::GetAttributeByName(testElm, "version").c_str()));
+	this->SetCheckExistence(OvalEnum::ToExistence(XmlCommon::GetAttributeByName(testElm, "check_existence")));
+	this->SetCheck(OvalEnum::ToCheck(XmlCommon::GetAttributeByName(testElm, "check")));
+
+	// to support version 5.3 it is best to just look for the deprected check = none exist 
+	// and replace it with the correct pair of check = any and check_existence = none_exist
+	if(this->GetCheck() == OvalEnum::CHECK_EXISTENCE_NONE_EXIST) {
+		Log::Info("Converting deprected check=\'none exist\' attribute value to check_existence=\'none_exist\' and check=\'none satisfy\'.");
+		this->SetCheckExistence(OvalEnum::EXISTENCE_NONE_EXIST);
+		this->SetCheck(OvalEnum::CHECK_NONE_SATISFY);
+	}
+
+	// get the object element and the object id if it exists
+	DOMElement* objectElm = XmlCommon::FindElementNS(testElm, "object");
+	if(objectElm != NULL) {
+		this->SetObjectId(XmlCommon::GetAttributeByName(objectElm, "object_ref"));
+	}
+    
+	// get the state element and the state id if it exists
+	DOMElement* stateElm = XmlCommon::FindElementNS(testElm, "state");
+	if(stateElm != NULL) {
+		string stateId = XmlCommon::GetAttributeByName(stateElm, "state_ref");
+		this->SetStateId(stateId);
+	}
+
+	Test::Cache(this);
+}
+
+OvalEnum::ResultEnumeration Test::Analyze() {
+
+	if(!this->GetAnalyzed()) {
+
+		// Does the test have a object ref?
+		if(this->GetObjectId().compare("") == 0) {
+			// Assumes it is only unknown tests that do not have an object specifier and sets result to unknown
+			this->SetResult(OvalEnum::RESULT_UNKNOWN);
+		} else {
+			// get the collected object from the sc file
+			DOMElement* collectedObjElm = XmlCommon::FindElement(DocumentManager::GetSystemCharacterisitcsDocument(), "object", "id", this->GetObjectId());
+			
+			if(collectedObjElm == NULL) {
+				// this is an unknown result. the interpreter requires that all objects in a definition
+				// file have a corresponding collected object in the sc file to successfully evaluate.
+				Log::Info("Test::Analyze() - Test id: " + this->GetId() + " Unable to locate corresponding collected object in system characteristics file for object id: " + this->GetObjectId());
+				this->SetResult(OvalEnum::RESULT_UNKNOWN);
+
+			} else {
+
+				// Copy all variables in the collected object into VariableValues for the results file
+				// Copy all item references into TestedItems for the results file
+				// loop over all child elements and call tested object
+				DOMNodeList *collectedObjChildren = collectedObjElm->getChildNodes();
+				unsigned int index = 0;
+				while(index < collectedObjChildren->getLength()) {
+					DOMNode *tmpNode = collectedObjChildren->item(index);
+
+					//	only concerned with ELEMENT_NODEs
+					if (tmpNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+						DOMElement *collectedObjChildElm = (DOMElement*)tmpNode;
+						
+						//	get the name of the child and construct the appropriate criteria type
+						string childName = XmlCommon::GetElementName(collectedObjChildElm);
+						if(childName.compare("reference") == 0) {
+							// get the reference's id
+							string itemId = XmlCommon::GetAttributeByName(collectedObjChildElm, "item_ref");
+							
+							// create a new tested item
+						    TestedItem* testedItem = new TestedItem();
+							Item* item = Item::GetItemById(itemId);
+							testedItem->SetItem(item);
+
+							//Item* item = Item::SearchCache(atoi(itemId.c_str()));
+							//if(item != NULL) {                          
+							//	testedItem->SetItem(item);
+							//} else {
+							//	// get the item elm in the sc file
+							//	DOMElement* itemElm = XmlCommon::FindElementByAttribute(DocumentManager::GetSystemCharacterisitcsDocument()->getDocumentElement(), "id", itemId);
+       //                         testedItem->ParseItem(itemElm);
+							//}
+							this->AppendTestedItem(testedItem);
+						
+						} else if(childName.compare("variable_value") == 0) {
+							// create a new tested variable
+							VariableValue* testedVar = new VariableValue();
+							testedVar->Parse(collectedObjChildElm);
+							this->AppendTestedVariable(testedVar);
+						} 
+					}
+					index ++;
+				}
+
+				// check the flag on the collected object
+				string flagStr = XmlCommon::GetAttributeByName(collectedObjElm, "flag");
+				OvalEnum::Flag collectedObjFlag = OvalEnum::ToFlag(flagStr);
+
+				// determine how to proceed based on flag value
+				if(collectedObjFlag == OvalEnum::FLAG_ERROR) {
+					this->SetResult(OvalEnum::RESULT_ERROR);
+
+					// since we did no look at the state set the tested item result to not evaluated
+					TestedItemVector::iterator iterator;
+					for(iterator = this->GetTestedItems()->begin(); iterator != this->GetTestedItems()->end(); iterator++) {
+						(*iterator)->SetResult(OvalEnum::RESULT_NOT_EVALUATED);
+					}
+				} else if(collectedObjFlag == OvalEnum::FLAG_NOT_APPLICABLE) {
+					this->SetResult(OvalEnum::RESULT_NOT_APPLICABLE);
+					
+					// since we did no look at the state set the tested item result to not evaluated
+					TestedItemVector::iterator iterator;
+					for(iterator = this->GetTestedItems()->begin(); iterator != this->GetTestedItems()->end(); iterator++) {
+						(*iterator)->SetResult(OvalEnum::RESULT_NOT_EVALUATED);
+					}
+				} else if(collectedObjFlag == OvalEnum::FLAG_NOT_COLLECTED) {
+					this->SetResult(OvalEnum::RESULT_UNKNOWN);
+					
+					// since we did no look at the state set the tested item result to not evaluated
+					TestedItemVector::iterator iterator;
+					for(iterator = this->GetTestedItems()->begin(); iterator != this->GetTestedItems()->end(); iterator++) {
+						(*iterator)->SetResult(OvalEnum::RESULT_NOT_EVALUATED);
+					}
+				} else if(collectedObjFlag == OvalEnum::FLAG_INCOMPLETE) {
+
+					OvalEnum::ResultEnumeration overallResult = OvalEnum::RESULT_UNKNOWN;
+
+					// get the count of items with a status of exists
+					int existsCount = 0;
+					TestedItemVector::iterator iterator;
+					for(iterator = this->GetTestedItems()->begin(); iterator != this->GetTestedItems()->end(); iterator++) {
+						OvalEnum::SCStatus itemStatus = (*iterator)->GetItem()->GetStatus();
+						if(itemStatus == OvalEnum::STATUS_EXISTS) {
+							existsCount++;
+						} 
+					}
+
+					OvalEnum::ResultEnumeration existenceResult = OvalEnum::RESULT_UNKNOWN;
+
+					if(this->GetCheckExistence() == OvalEnum::EXISTENCE_NONE_EXIST && existsCount > 0) {
+
+						// if more than 0 then false	
+						existenceResult = OvalEnum::RESULT_FALSE;
+
+					} else if(this->GetCheckExistence() == OvalEnum::EXISTENCE_ONLY_ONE_EXISTS && existsCount > 1) {
+						
+						// if more than 1 then false					
+						existenceResult = OvalEnum::RESULT_FALSE;
+
+					} else if(this->GetCheckExistence() == OvalEnum::EXISTENCE_AT_LEAST_ONE_EXISTS && existsCount > 0) {
+
+						// if more than 1 then false					
+						existenceResult = OvalEnum::RESULT_TRUE;
+
+					} else if(this->GetCheckExistence() == OvalEnum::EXISTENCE_ANY_EXIST) {
+
+						// always true				
+						existenceResult = OvalEnum::RESULT_TRUE;
+
+					} 
+
+					if(existenceResult == OvalEnum::RESULT_TRUE) {
+
+						// consider the check_state if true so far...
+						OvalEnum::ResultEnumeration stateResult = this->EvaluateCheckState();
+
+						if(stateResult == OvalEnum::RESULT_FALSE) {
+							overallResult = OvalEnum::RESULT_FALSE;
+						} if(stateResult == OvalEnum::RESULT_TRUE && this->GetCheck() == OvalEnum::CHECK_AT_LEAST_ONE) {
+
+							overallResult = OvalEnum::RESULT_TRUE;
+						}
+
+					} else {
+						overallResult =	existenceResult;
+
+						// since we did no look at the state set the tested item result to not evaluated
+						TestedItemVector::iterator iterator;
+						for(iterator = this->GetTestedItems()->begin(); iterator != this->GetTestedItems()->end(); iterator++) {
+							(*iterator)->SetResult(OvalEnum::RESULT_NOT_EVALUATED);
+						}
+					}
+
+					this->SetResult(overallResult);
+
+				} else if(collectedObjFlag == OvalEnum::FLAG_DOES_NOT_EXIST) {
+
+					// if the check_existence is set to none_exist or 
+					// any_exist the result is true
+					// otherwise the result is false
+					if(this->GetCheckExistence() == OvalEnum::EXISTENCE_NONE_EXIST) {
+						this->SetResult(OvalEnum::RESULT_TRUE);
+						// no need to look at state when check_existence is set to none_exist
+
+						// since we did no look at the state set the tested item result to not evaluated
+						TestedItemVector::iterator iterator;
+						for(iterator = this->GetTestedItems()->begin(); iterator != this->GetTestedItems()->end(); iterator++) {
+							(*iterator)->SetResult(OvalEnum::RESULT_NOT_EVALUATED);
+						}
+
+					} else if(this->GetCheckExistence() == OvalEnum::EXISTENCE_ANY_EXIST) {
+						// need to look at state result if there is a state
+						if(this->GetStateId().compare("") != 0) {
+							OvalEnum::ResultEnumeration stateResult = this->EvaluateCheckState();
+							this->SetResult(stateResult);
+						} else {
+							this->SetResult(OvalEnum::RESULT_TRUE);
+						}
+					} else {
+						this->SetResult(OvalEnum::RESULT_FALSE);
+					}
+
+				} else if(collectedObjFlag == OvalEnum::FLAG_COMPLETE) {
+					
+					OvalEnum::ResultEnumeration overallResult = OvalEnum::RESULT_ERROR;
+
+					// Evaluate the check existence attribute.
+					OvalEnum::ResultEnumeration existenceResult = this->EvaluateCheckExistence();
+
+					// if the existence result is true evaluate the check_state attribute if there is a state
+					if(existenceResult == OvalEnum::RESULT_TRUE) {
+						if(this->GetStateId().compare("") != 0) {
+							overallResult = this->EvaluateCheckState();
+						} else {
+							overallResult = existenceResult;
+
+							// since we did no look at the state set the tested item result to not evaluated
+							TestedItemVector::iterator iterator;
+							for(iterator = this->GetTestedItems()->begin(); iterator != this->GetTestedItems()->end(); iterator++) {
+								(*iterator)->SetResult(OvalEnum::RESULT_NOT_EVALUATED);
+							}
+						}
+
+					} else {
+						overallResult = existenceResult;
+
+						// since we did no look at the state set the tested item result to not evaluated
+						TestedItemVector::iterator iterator;
+						for(iterator = this->GetTestedItems()->begin(); iterator != this->GetTestedItems()->end(); iterator++) {
+							(*iterator)->SetResult(OvalEnum::RESULT_NOT_EVALUATED);
+						}
+					}
+
+					this->SetResult(overallResult);
+				}
+			}
+		}
+		this->SetAnalyzed(true);
+	}
+
+	return this->GetResult();
+}
+
+OvalEnum::ResultEnumeration Test::NotEvaluated() {
+
+	if(!this->GetAnalyzed()) {
+		this->SetResult(OvalEnum::RESULT_NOT_EVALUATED);
+		this->SetAnalyzed(true);
+	}
+
+	return this->GetResult();
+}
+
+OvalEnum::ResultEnumeration Test::EvaluateCheckExistence() {
+
+	OvalEnum::ResultEnumeration existenceResult = OvalEnum::RESULT_ERROR;
+
+	// get the count of each status value
+	int errorCount = 0;
+	int existsCount = 0;
+	int doesNotExistCount = 0;
+	int notCollectedCount = 0;
+
+	TestedItemVector::iterator iterator;
+	for(iterator = this->GetTestedItems()->begin(); iterator != this->GetTestedItems()->end(); iterator++) {
+		OvalEnum::SCStatus itemStatus = (*iterator)->GetItem()->GetStatus();
+		if(itemStatus == OvalEnum::STATUS_ERROR) {
+			errorCount++;
+		} else if(itemStatus == OvalEnum::STATUS_EXISTS) {
+			existsCount++;
+		} else if(itemStatus == OvalEnum::STATUS_DOES_NOT_EXIST) {
+			doesNotExistCount++;
+		} else if(itemStatus == OvalEnum::STATUS_NOT_COLLECTED) {
+			notCollectedCount++;
+		} 
+	}
+
+	if(this->GetCheckExistence() == OvalEnum::EXISTENCE_ALL_EXIST) {
+
+		if(existsCount >= 1 && doesNotExistCount == 0 && errorCount == 0 && notCollectedCount == 0) {
+			existenceResult = OvalEnum::RESULT_TRUE;			
+		} else if(existsCount >= 0 && doesNotExistCount >= 1 && errorCount >= 0 && notCollectedCount >= 0) {
+			existenceResult = OvalEnum::RESULT_FALSE;
+		} else if(existsCount == 0 && doesNotExistCount == 0 && errorCount == 0 && notCollectedCount == 0) {
+			existenceResult = OvalEnum::RESULT_FALSE;
+		} else if(existsCount >= 0 && doesNotExistCount == 0 && errorCount >= 1 && notCollectedCount >= 0) {
+			existenceResult = OvalEnum::RESULT_ERROR;
+		} else if(existsCount >= 0 && doesNotExistCount == 0 && errorCount == 0 && notCollectedCount >= 1) {
+			existenceResult = OvalEnum::RESULT_UNKNOWN;
+		} else {
+			string msg = "Unexpected set of item statuses found while evaluating the check existence value for a test. check_existence='all_exist' Found";
+			msg.append(" exists count=" + existsCount);
+			msg.append(" does not exist count=" + doesNotExistCount);
+			msg.append(" error count=" + errorCount);
+			msg.append(" not collected count=" + notCollectedCount);
+			Log::Info(msg);
+		}
+		
+	} else if(this->GetCheckExistence() == OvalEnum::EXISTENCE_ANY_EXIST) {
+		
+		if(existsCount >= 0 && doesNotExistCount >= 0 && errorCount == 0 && notCollectedCount >= 0) {
+			existenceResult = OvalEnum::RESULT_TRUE;	
+		} else if(existsCount >= 1 && doesNotExistCount >= 0 && errorCount >= 1 && notCollectedCount >= 0) {
+			existenceResult = OvalEnum::RESULT_TRUE;	
+		} else if(existsCount == 0 && doesNotExistCount >= 0 && errorCount >= 1 && notCollectedCount >= 0) {
+			existenceResult = OvalEnum::RESULT_ERROR;
+		} else {
+			string msg = "Unexpected set of item statuses found while evaluating the check existence value for a test. check_existence='any_exist' Found";
+			msg.append(" exists count=" + existsCount);
+			msg.append(" does not exist count=" + doesNotExistCount);
+			msg.append(" error count=" + errorCount);
+			msg.append(" not collected count=" + notCollectedCount);
+			Log::Info(msg);
+		}
+
+	} else if(this->GetCheckExistence() == OvalEnum::EXISTENCE_AT_LEAST_ONE_EXISTS) {
+		
+		if(existsCount >= 1 && doesNotExistCount >= 0 && errorCount >= 0 && notCollectedCount >= 0) {
+			existenceResult = OvalEnum::RESULT_TRUE;			
+		} else if(existsCount == 0 && doesNotExistCount >= 1 && errorCount == 0 && notCollectedCount == 0) {
+			existenceResult = OvalEnum::RESULT_FALSE;
+		} else if(existsCount == 0 && doesNotExistCount >= 0 && errorCount >= 1 && notCollectedCount >= 0) {
+			existenceResult = OvalEnum::RESULT_ERROR;
+		} else if(existsCount == 0 && doesNotExistCount >= 0 && errorCount == 0 && notCollectedCount >= 1) {
+			existenceResult = OvalEnum::RESULT_UNKNOWN;
+		} else {
+			string msg = "Unexpected set of item statuses found while evaluating the check existence value for a test. check_existence='at_least_one_exists' Found";
+			msg.append(" exists count=" + existsCount);
+			msg.append(" does not exist count=" + doesNotExistCount);
+			msg.append(" error count=" + errorCount);
+			msg.append(" not collected count=" + notCollectedCount);
+			Log::Info(msg);
+		}
+
+	} else if(this->GetCheckExistence() == OvalEnum::EXISTENCE_NONE_EXIST) {
+		
+		if(existsCount == 0 && doesNotExistCount >= 0 && errorCount == 0 && notCollectedCount == 0) {
+			existenceResult = OvalEnum::RESULT_TRUE;			
+		} else if(existsCount >= 1 && doesNotExistCount >= 0 && errorCount >= 0 && notCollectedCount >= 0) {
+			existenceResult = OvalEnum::RESULT_FALSE;
+		} else if(existsCount == 0 && doesNotExistCount >= 0 && errorCount >= 1 && notCollectedCount >= 0) {
+			existenceResult = OvalEnum::RESULT_ERROR;
+		} else if(existsCount == 0 && doesNotExistCount >= 0 && errorCount == 0 && notCollectedCount >= 1) {
+			existenceResult = OvalEnum::RESULT_UNKNOWN;
+		} else {
+			string msg = "Unexpected set of item statuses found while evaluating the check existence value for a test. check_existence='none_exist' Found";
+			msg.append(" exists count=" + existsCount);
+			msg.append(" does not exist count=" + doesNotExistCount);
+			msg.append(" error count=" + errorCount);
+			msg.append(" not collected count=" + notCollectedCount);
+			Log::Info(msg);
+		}
+
+	} else if(this->GetCheckExistence() == OvalEnum::EXISTENCE_ONLY_ONE_EXISTS) {
+		
+		if(existsCount == 1 && doesNotExistCount >= 0 && errorCount == 0 && notCollectedCount == 0) {
+			existenceResult = OvalEnum::RESULT_TRUE;			
+		} else if(existsCount >= 2 && doesNotExistCount >= 0 && errorCount >= 0 && notCollectedCount >= 0) {
+			existenceResult = OvalEnum::RESULT_FALSE;
+		} else if(existsCount == 0 && doesNotExistCount >= 0 && errorCount == 0 && notCollectedCount == 0) {
+			existenceResult = OvalEnum::RESULT_FALSE;
+		} else if(existsCount == 0 && doesNotExistCount >= 0 && errorCount >= 1 && notCollectedCount >= 0) {
+			existenceResult = OvalEnum::RESULT_ERROR;
+		} else if(existsCount == 1 && doesNotExistCount >= 0 && errorCount >= 1 && notCollectedCount >= 0) {
+			existenceResult = OvalEnum::RESULT_ERROR;
+		} else if(existsCount == 0 && doesNotExistCount >= 0 && errorCount == 0 && notCollectedCount >= 1) {
+			existenceResult = OvalEnum::RESULT_UNKNOWN;
+		} else if(existsCount == 1 && doesNotExistCount >= 0 && errorCount == 0 && notCollectedCount >= 1) {
+			existenceResult = OvalEnum::RESULT_UNKNOWN;
+		} else {
+			string msg = "Unexpected set of item statuses found while evaluating the check existence value for a test. check_existence='only_one_exists' Found";
+			msg.append(" exists count=" + existsCount);
+			msg.append(" does not exist count=" + doesNotExistCount);
+			msg.append(" error count=" + errorCount);
+			msg.append(" not collected count=" + notCollectedCount);
+			Log::Info(msg);
+		}
+	}
+
+	return existenceResult;
+}
+
+OvalEnum::ResultEnumeration Test::EvaluateCheckState() {
+
+	OvalEnum::ResultEnumeration stateResult = OvalEnum::RESULT_ERROR;
+
+	// is there a state associated with this test?
+	if(this->GetStateId().compare("") == 0) {
+		// no state specified
+		// just report true...
+		stateResult = OvalEnum::RESULT_TRUE;
+
+	} else {
+
+		try {
+
+			State* state =  State::GetStateById(this->GetStateId());
+
+			// analyze each tested item
+			IntVector results;
+			TestedItemVector::iterator iterator;
+			for(iterator = this->GetTestedItems()->begin(); iterator != this->GetTestedItems()->end(); iterator++) {
+				OvalEnum::ResultEnumeration tmpResult;
+				tmpResult = state->Analyze((*iterator)->GetItem());
+				(*iterator)->SetResult(tmpResult);
+				results.push_back(tmpResult);
+			}
+
+			// combine results based on the check attribute
+			stateResult = OvalEnum::CombineResultsByCheck(&results, this->GetCheck());
+
+		} catch(Exception ex) {
+			this->SetResult(OvalEnum::RESULT_ERROR);
+			Log::Fatal("Unable to evaluate test " + this->GetId() + ". An error occured while processing the associated state " + this->GetStateId() + ". " + ex.GetErrorMessage());
+		}
+	}
+
+	return stateResult;
+}
+
+void Test::Cache(Test* test) {
+
+	Test::processedTestsMap.insert(TestPair(test->GetId(), test));
+}
+
+Test* Test::GetTestById(string testId) {
+
+	Test* test = NULL;
+	
+	// Search the cache
+	test = Test::SearchCache(testId);
+
+	// if not found try to parse it.
+	if(test == NULL) {
+
+		DOMElement* testsElm = XmlCommon::FindElement(DocumentManager::GetDefinitionDocument(), "tests");
+		DOMElement* testElm = XmlCommon::FindElementByAttribute(testsElm, "id", testId);
+
+		if(testElm == NULL) {
+			throw Exception("Unable to find specified test in oval-definition document. Test id: " + testId);
+		}
+
+		test = new Test();
+		test->Parse(testElm);
+	}
+	
+	return test;
+}


Property changes on: trunk/ovaldi/src/Test.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Test.h
===================================================================
--- trunk/ovaldi/src/Test.h	                        (rev 0)
+++ trunk/ovaldi/src/Test.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,218 @@
+//
+// $Id: Test.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef TEST_H
+#define TEST_H
+
+#include <vector>
+//#include "Analyzer.h"
+#include "TestedItem.h"
+#include "VariableValue.h"
+#include "Log.h"
+#include "State.h"
+
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+class Test;
+
+/**	
+	A pair for storing test ids and Test objects together. 
+	Stores only pointers to the objects. 
+*/
+typedef pair <string, Test* > TestPair;
+
+/**	
+	A map for storing TestPairs. 
+	Stores only pointers to the objects. 
+*/
+typedef map <string, Test* > TestMap;
+
+/**
+	This class represents a test in OVAL.
+	The class provides a method for parsing a test in an oval definition as well as methods
+	for analyzing that test and then writing the test result to an oval results document.
+*/
+class Test {
+
+public:
+
+	/** Distroy the Test object.
+	    Deletes each TestedItem.
+	*/
+	~Test();
+
+	/** Write the Test element to the result document if it has not already been written.
+		calls testedObject->Write() 
+		calls testedVariable->Write() for each tested var.
+	*/
+	void Write(DOMElement* parent);
+
+
+	/** Evaluate the test and return the result. 
+	    Make sure not previously analyzed.
+	  	Get the collected object from the sc file by its id
+	        - Parse all references in the colelcted object into Items
+	  		- check flag on collected object against check_existence attribute on test
+	        - If the test uses a state and the check_existence result is true 
+	            - Get the state by its id and parse it.
+	            - Analyze all items referenced by the collected object to determine individual results.
+	            - Then use the check_state to determine the overall result for the test.
+	 	 	- copy variable values from collected object to test as tested_variables
+	 	 		this is just a matter of passing the variable_value element in the colelcted obj
+	  	 		to the testedVaraible->Parse() method.
+	        - save and return the result
+	 */
+	OvalEnum::ResultEnumeration Analyze();
+
+	/** Set the test to not evaluated. */
+	OvalEnum::ResultEnumeration NotEvaluated();
+
+	/** Determine the result of evaluating the check_existence attribute. */
+	OvalEnum::ResultEnumeration EvaluateCheckExistence();
+
+	/** Determine the result of evaluating the check attribute. */
+	OvalEnum::ResultEnumeration EvaluateCheckState();
+
+	/** Return the version field's value. */
+	int GetVersion();
+	/** Set the version field's value. */
+	void SetVersion(int version);
+	
+	/** Return the variableInstance field's value. */
+	int GetVariableInstance();
+	/** Set the variableInstance field's value. */
+	void SetVariableInstance(int variableInstance);
+    
+	/** Return the result field's value. */
+	OvalEnum::ResultEnumeration GetResult();
+	/** Set the result field's value. */
+	void SetResult(OvalEnum::ResultEnumeration result);
+    
+	/** Return the id field's value. */
+	string GetId();
+	/** Set the id field's value. */
+	void SetId(string id);
+
+	/** Return the objectId field's value. */
+	string GetObjectId();
+	/** Set the objectId field's value. */
+	void SetObjectId(string objectId);
+
+	/** Return the stateId field's value. */
+	string GetStateId();
+	/** Set the stateId field's value. */
+	void SetStateId(string stateId);
+
+	/** Return the written field's value. */
+	bool GetWritten();
+	/** Set the written field's value. */
+	void SetWritten(bool written);
+
+	/** Return the analyzed field's value. */
+	bool GetAnalyzed();
+	/** Set the analyzed field's value. */
+	void SetAnalyzed(bool analyzed);
+
+	/** Return the check field's value. */
+	OvalEnum::Check GetCheck();
+	/** Set the check field's value. */
+	void SetCheck(OvalEnum::Check check);
+
+	/** Return the checkExistence field's value. */
+	OvalEnum::Existence GetCheckExistence();
+	/** Set the checkExistence field's value. */
+	void SetCheckExistence(OvalEnum::Existence checkExistence);
+
+	/** Return the testedItems field's value. */
+	TestedItemVector* GetTestedItems();
+	/** Set the testedItems field's value. */
+	void SetTestedItems(TestedItemVector* testedItems);
+	/** Add the specifed TestedItem to the set of tested Items. */
+	void AppendTestedItem(TestedItem* testedItem);
+
+	/** Return the testedVariables field's value **/
+	VariableValueVector* GetTestedVariables();
+
+	/** Set the testedVariables field's value **/
+	void SetTestedVariables(VariableValueVector* testedVariables);
+	/** Add the specified TestedVariable to the set of tested variables **/
+	void AppendTestedVariable(VariableValue* testedVariable);
+
+	/** Delete all items in the cache. **/
+	static void ClearCache();
+	/** Cache the specified Test. */
+	static void Cache(Test* test);
+
+	/** Return a test object for the specified test id.
+		First the cache of Tests is checked. If the test is
+		not found in the cache the test is looked up in the
+		oval-definitions document and parsed. Once parsed the new Test
+		object is added to the cache.
+
+		If the test is not found an exception is thrown. 
+	*/
+	static Test* GetTestById(string testId);
+
+private:
+
+	/** Create a complete Test object **/
+	Test();
+
+	/** Parse the Test elmement into a Test object. 
+		The resulting object is cached.
+	*/
+	void Parse(DOMElement* testElm);
+
+	/** Search the cache of Tests for the specifed Test. 
+	    Return NULL if not found 
+	*/
+	static Test* SearchCache(string id);
+
+	int version;
+	int variableInstance;
+	OvalEnum::ResultEnumeration result;
+	string id;
+	bool written;
+	bool analyzed;
+	OvalEnum::Check check;
+	OvalEnum::Existence checkExistence;
+	OvalEnum::Check checkState;
+	TestedItemVector testedItems;
+	VariableValueVector testedVariables;
+	string objectId;
+	string stateId;
+
+	static TestMap processedTestsMap;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/Test.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/TestedItem.cpp
===================================================================
--- trunk/ovaldi/src/TestedItem.cpp	                        (rev 0)
+++ trunk/ovaldi/src/TestedItem.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,81 @@
+//
+// $Id: TestedItem.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "TestedItem.h"
+
+//****************************************************************************************//
+//								Test Class												  //	
+//****************************************************************************************//
+TestedItem::TestedItem() {
+
+	this->SetResult(OvalEnum::RESULT_NOT_EVALUATED);
+}
+
+TestedItem::~TestedItem() {
+	
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+
+Item* TestedItem::GetItem() {
+
+	return this->item;
+}
+
+void TestedItem::SetItem(Item* item) {
+
+	this->item = item;
+}
+
+OvalEnum::ResultEnumeration TestedItem::GetResult() {
+
+	return this->result;
+}
+
+void TestedItem::SetResult(OvalEnum::ResultEnumeration result) {
+
+	this->result = result;
+}
+
+void TestedItem::Write(DOMElement* parentElm) {
+
+	// get the parent document
+	XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* resultDoc = parentElm->getOwnerDocument();
+
+	// create a new tested_item element
+	DOMElement* testedItemElm = XmlCommon::AddChildElement(resultDoc, parentElm, "tested_item");
+
+	// add the attributes
+	XmlCommon::AddAttribute(testedItemElm, "item_id", Common::ToString(this->GetItem()->GetId()));
+	XmlCommon::AddAttribute(testedItemElm, "result", OvalEnum::ResultToString(this->GetResult()));
+}


Property changes on: trunk/ovaldi/src/TestedItem.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/TestedItem.h
===================================================================
--- trunk/ovaldi/src/TestedItem.h	                        (rev 0)
+++ trunk/ovaldi/src/TestedItem.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,79 @@
+//
+// $Id: TestedItem.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef TESTEDITEM_H
+#define TESTEDITEM_H
+
+#include "Log.h"
+#include "Item.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	This class representsa tested_item int eh oval results schema.
+	The class pairs an Item tieh the result of its analysis in the context of a specific test.
+*/
+class TestedItem {
+
+public:
+
+	/** Create a Test object and initialize its result to OvalEnum::RESULT_NOT_EVALUATED. */
+	TestedItem();
+	~TestedItem();
+
+	/** Write a TestedItem element as a child of the parent element. */
+	void Write(DOMElement* parent);
+	
+	/** Return the result field's value. */
+	OvalEnum::ResultEnumeration GetResult();
+
+	/** Set the result field's value. */
+	void SetResult(OvalEnum::ResultEnumeration result);
+    
+	/** Return the item field's value. */
+	Item* GetItem();
+
+	/** Set the item field's value. */
+	void SetItem(Item* item);
+
+private:
+	OvalEnum::ResultEnumeration result;
+	Item* item;
+};
+
+/**	
+	A vector for storing TestedItem objects. 
+	Stores only pointers to the objects. 
+*/
+typedef vector < TestedItem*, allocator<TestedItem*> > TestedItemVector;
+
+#endif


Property changes on: trunk/ovaldi/src/TestedItem.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/VariableComponent.cpp
===================================================================
--- trunk/ovaldi/src/VariableComponent.cpp	                        (rev 0)
+++ trunk/ovaldi/src/VariableComponent.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,145 @@
+//
+// $Id: VariableComponent.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "VariableComponent.h"
+
+//****************************************************************************************//
+//								VariableComponent Class									  //	
+//****************************************************************************************//
+VariableComponent::VariableComponent(AbsVariable* varRef) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a complete VariableComponent object
+	//
+	// -----------------------------------------------------------------------
+
+	this->SetVarRef(varRef);
+}
+
+VariableComponent::~VariableComponent() {
+
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+AbsVariable* VariableComponent::GetVarRef() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the varRef field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->varRef;
+}
+
+void VariableComponent::SetVarRef(AbsVariable* varRef) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the varRef field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->varRef = varRef;
+}
+
+ComponentValue* VariableComponent::ComputeValue() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	// Compute the value for this component. 
+	// -----------------------------------------------------------------------
+
+	VariableValueVector* varValues = this->GetVarRef()->GetValues();
+	StringVector* values = new StringVector();
+
+	VariableValueVector::iterator iterator;
+	for(iterator = varValues->begin(); iterator != varValues->end(); iterator++) {
+		values->push_back((*iterator)->GetValue());
+	}
+
+	// need to create a copy of the messages.
+	StringVector* msg = this->GetVarRef()->GetMessages();
+	StringVector* messages = new StringVector();
+	StringVector::iterator iterator1;
+	for(iterator1 = msg->begin(); iterator1 != msg->end(); iterator1++) {
+		messages->push_back((*iterator1));
+	}
+
+	// create the ComponentValue to return. 
+	// Always passing the flag associated with this var ref and the values
+	ComponentValue* result = new ComponentValue(this->GetVarRef()->GetFlag(), values, messages);
+
+	return result;
+}
+
+void VariableComponent::Parse(DOMElement* componentElm) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	parse the VariableComponent element
+	// -----------------------------------------------------------------------
+
+	string varId = XmlCommon::GetAttributeByName(componentElm, "var_ref");
+	AbsVariable* var = VariableFactory::GetVariable(varId);
+	this->SetVarRef(var);
+}
+
+VariableValueVector* VariableComponent::GetVariableValues() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	return the variable values used to compute this component's value
+	// -----------------------------------------------------------------------
+	
+	VariableValueVector* values = new VariableValueVector();
+	
+	// loop through the variable values used by the var ref
+    VariableValueVector* varRefDeps = this->GetVarRef()->GetVariableValues();
+	VariableValueVector::iterator iterator;
+	for(iterator = varRefDeps->begin(); iterator != varRefDeps->end(); iterator++) {
+		VariableValue* varRefDep = (*iterator);
+		values->push_back(varRefDep);
+	}
+
+	// Add the values associated with the var ref
+	VariableValueVector* varRefValues = this->GetVarRef()->GetValues();
+	VariableValueVector::iterator iterator2;
+	for(iterator2 = varRefValues->begin(); iterator2 != varRefValues->end(); iterator2++) {
+		VariableValue* varRefValue = (*iterator2);
+		values->push_back(varRefValue);
+	}
+
+	return values;
+}


Property changes on: trunk/ovaldi/src/VariableComponent.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/VariableComponent.h
===================================================================
--- trunk/ovaldi/src/VariableComponent.h	                        (rev 0)
+++ trunk/ovaldi/src/VariableComponent.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,63 @@
+//
+// $Id: VariableComponent.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef VARIABLECOMPONENT_H
+#define VARIABLECOMPONENT_H
+
+#include "AbsComponent.h"
+#include "VariableFactory.h"
+#include "AbsVariable.h"
+
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	This class represents a VariableComponent in a local_variable in the oval definition schema.
+*/
+class VariableComponent : public AbsComponent {
+public:
+	VariableComponent(AbsVariable* varRef = NULL);
+	~VariableComponent();
+
+	void Parse(DOMElement* componentElm); 
+	ComponentValue* ComputeValue();
+
+	VariableValueVector* GetVariableValues();
+
+	AbsVariable* GetVarRef();
+	void SetVarRef(AbsVariable* varRef);
+
+private:
+	AbsVariable* varRef;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/VariableComponent.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/VariableFactory.cpp
===================================================================
--- trunk/ovaldi/src/VariableFactory.cpp	                        (rev 0)
+++ trunk/ovaldi/src/VariableFactory.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,117 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+
+#include "VariableFactory.h"
+
+//****************************************************************************************//
+//								VariableFactory Class									  //
+//****************************************************************************************//
+DOMElement* VariableFactory::variablesElm = NULL;
+// ***************************************************************************************	//
+//								Public members												//
+// ***************************************************************************************	//
+AbsVariable* VariableFactory::GetVariable(string varId) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return a AbsVariable object for the specified id. 
+	//	- check to see if the variable has already been processed.
+	//	- determine what type of variable to process based on its element name
+	//	- call the appropriate variable constructor
+	//	- cache any newly parsed variable
+	//
+	// -----------------------------------------------------------------------
+	
+	AbsVariable* var = AbsVariable::SearchCache(varId);
+
+	// check cache of processed vars first
+	if(var == NULL) {
+		// get the variables element in the definition document
+		DOMElement* variablesElm = XmlCommon::FindElementNS(DocumentManager::GetDefinitionDocument(), "variables");
+
+		// get the specific variable for this varId
+		DOMElement* varElm = XmlCommon::FindElementByAttribute(variablesElm, "id", varId);
+		// get the element name
+		string elmName = XmlCommon::GetElementName(varElm);
+		if(elmName.compare("local_variable") == 0) {
+			var = new LocalVariable();
+		} else if(elmName.compare("constant_variable") == 0) {
+			var = new ConstantVariable();
+		} else if(elmName.compare("external_variable") == 0) {
+			var = new ExternalVariable();
+		}
+
+		var->SetId(varId);
+		AbsVariable::Cache(var);
+		try {
+			var->Parse(varElm);
+		} catch(Exception ex) {
+			Log::Info("VariableFactory::GetVariable() - Error while parsing variable: " + varId + " " + ex.GetErrorMessage());
+			throw ex;
+		} catch(...) {
+			Log::Info("VariableFactory::GetVariable() - Error while parsing variable: " + varId + "  Unknown Error");
+			throw Exception("VariableFactory::GetVariable() - Error while parsing variable: " + varId + " Unknown Error");
+		}
+
+		// look for errors on the variable 
+		if(var->GetFlag() != OvalEnum::FLAG_COMPLETE) {
+			throw VariableFactoryException(var, "Error while computing variable value. \n" + var->ListMessages());
+		}
+
+	} else {
+		// look for errors on the cached variable 
+		if(var->GetFlag() != OvalEnum::FLAG_COMPLETE) {
+			throw VariableFactoryException(var, "Error while computing variable value. \n" + var->ListMessages());
+		}
+	}
+
+	return var;
+}
+
+//****************************************************************************************//
+//							VariableFactoryException Class								  //	
+//****************************************************************************************//
+VariableFactoryException::VariableFactoryException(AbsVariable* var, string errMsgIn, int severity, Exception* ex) : Exception(errMsgIn, severity, ex) {
+
+	this->SetVariable(var);
+}
+
+VariableFactoryException::~VariableFactoryException() {
+
+}
+
+void VariableFactoryException::SetVariable(AbsVariable* var) {
+	this->var = var;
+}
+
+AbsVariable* VariableFactoryException::GetVariable() {
+	return this->var;
+}


Property changes on: trunk/ovaldi/src/VariableFactory.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/VariableFactory.h
===================================================================
--- trunk/ovaldi/src/VariableFactory.h	                        (rev 0)
+++ trunk/ovaldi/src/VariableFactory.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,75 @@
+//
+// $Id: VariableFactory.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+#ifndef VARIABLEFACTORY_H
+#define VARIABLEFACTORY_H
+
+//	other includes
+#include <string>
+#include <iostream>
+#include <sstream>
+
+#include "Common.h" 
+#include "Exception.h" 
+#include "LocalVariable.h"
+#include "ConstantVariable.h"
+#include "ExternalVariable.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	This class provides a single interface to all variable classes.
+
+*/
+class VariableFactory {
+public:
+	static AbsVariable* GetVariable(string varId);
+
+private:
+	static DOMElement* variablesElm;
+};
+
+/** 
+	This class represents an Exception that occured while running the variable factory.
+*/
+class VariableFactoryException : public Exception {
+	public:
+		VariableFactoryException(AbsVariable* var = NULL, string errMsgIn = "", int severity = ERROR_FATAL, Exception *ex = NULL);
+		~VariableFactoryException();
+
+		void SetVariable(AbsVariable* var);
+		AbsVariable* GetVariable();
+
+	private:
+		AbsVariable* var;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/VariableFactory.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/VariableValue.cpp
===================================================================
--- trunk/ovaldi/src/VariableValue.cpp	                        (rev 0)
+++ trunk/ovaldi/src/VariableValue.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,175 @@
+//
+// $Id: VariableValue.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "VariableValue.h"
+
+VariableValueVector VariableValue::vars;
+
+//****************************************************************************************//
+//								VariableValue Class										  //	
+//****************************************************************************************//
+VariableValue::VariableValue(string id, string value) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a complete VariableValue object
+	//
+	// -----------------------------------------------------------------------
+
+	this->SetId(id);
+	this->SetValue(value);
+	VariableValue::vars.push_back(this);
+}
+
+VariableValue::~VariableValue() {
+
+}
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+string VariableValue::GetId() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the id field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->id;
+}
+
+void VariableValue::SetId(string id) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the id field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->id = id;
+}
+
+string VariableValue::GetValue() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return the value field's value
+	//
+	// -----------------------------------------------------------------------
+
+	return this->value;
+}
+
+void VariableValue::SetValue(string value) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the value field's value
+	//
+	// -----------------------------------------------------------------------
+
+	this->value = value;
+}
+
+void VariableValue::Write(DOMElement* collectedObjectElm) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Write this VariableValue to the sc file
+	// -----------------------------------------------------------------------
+
+	// Create new item element
+	XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* scFile = collectedObjectElm->getOwnerDocument();
+	string elementName = "variable_value";
+	DOMElement* newVariableValueElem = scFile->createElement(XMLString::transcode(elementName.c_str()));
+	collectedObjectElm->appendChild(newVariableValueElem);
+
+	// Add the attributes
+	// handling defaults in the schema
+	XmlCommon::AddAttribute(newVariableValueElem, "variable_id", this->GetId());
+
+	// Add the value
+	if(this->GetValue().compare("") != 0) {
+		DOMText* newVariableValueElemValue = scFile->createTextNode(XMLString::transcode(this->GetValue().c_str()));
+		newVariableValueElem->appendChild(newVariableValueElemValue);
+	}
+}
+
+void VariableValue::WriteTestedVariable(DOMElement* parentElm) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Write this VariableValue to the sc file
+	// -----------------------------------------------------------------------
+
+	// get the parent document
+	XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* resultDoc = parentElm->getOwnerDocument();
+
+	// create a new tested_item element
+	DOMElement* testedVarElm = XmlCommon::AddChildElement(resultDoc, parentElm, "tested_variable", this->GetValue());
+
+	// add the attributes
+	XmlCommon::AddAttribute(testedVarElm, "variable_id", this->GetId());
+}
+
+
+void VariableValue::Parse(DOMElement* variableValueElm) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	parses variable_value elm to a VariableValue obj
+	//
+	// -----------------------------------------------------------------------
+
+	// get the attributes
+	this->SetId(XmlCommon::GetAttributeByName(variableValueElm, "variable_id"));
+
+	// get the value
+	this->SetValue(XmlCommon::GetDataNodeValue(variableValueElm));
+}
+
+void VariableValue::ClearCache() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	delete all items in the cache
+	//
+	// -----------------------------------------------------------------------
+
+	VariableValue* variableValue = NULL;
+	while(VariableValue::vars.size() != 0) {
+	  	variableValue = VariableValue::vars[VariableValue::vars.size()-1];
+	  	VariableValue::vars.pop_back();
+	  	delete variableValue;
+	  	variableValue = NULL;
+	}
+}


Property changes on: trunk/ovaldi/src/VariableValue.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/VariableValue.h
===================================================================
--- trunk/ovaldi/src/VariableValue.h	                        (rev 0)
+++ trunk/ovaldi/src/VariableValue.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,82 @@
+//
+// $Id: VariableValue.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef VARIABLEVALUE_H
+#define VARIABLEVALUE_H
+
+//	required xerces includes
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/DOMAttr.hpp>
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xercesc/dom/DOMNodeList.hpp>
+#include <xercesc/util/XMLString.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/parsers/AbstractDOMParser.hpp>
+
+#include "XmlCommon.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+class VariableValue;
+typedef vector < VariableValue*, allocator<VariableValue*> > VariableValueVector;
+
+/**
+	This class represents a variable value.
+	Vairable values are used in the oval system characterisitcs schema and the oval results schema.
+*/
+class VariableValue {
+public:
+	VariableValue(string id = "", string value = "");
+	~VariableValue();
+
+	void Parse(DOMElement* variableValueElm);
+	void Write(DOMElement* collectedObjectElm);
+	void WriteTestedVariable(DOMElement* parentElm);
+
+	string GetId();
+	void SetId(string id);
+
+	string GetValue();
+	void SetValue(string value);
+
+	static void ClearCache();
+
+private:
+	string id;
+	string value;
+
+	static VariableValueVector vars;
+};
+
+typedef vector < VariableValue*, allocator<VariableValue*> > VariableValueVector;
+
+#endif


Property changes on: trunk/ovaldi/src/VariableValue.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Version.cpp
===================================================================
--- trunk/ovaldi/src/Version.cpp	                        (rev 0)
+++ trunk/ovaldi/src/Version.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,80 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+//
+
+#include "Version.h"
+
+// Define the version.  The build and date are automatically updated
+// prior to each build.
+//
+#define MAJOR_VERSION "5"
+#define MIN_COMPATIBLE_VERSION "5.0"
+#define VENDOR "The MITRE Corporation"
+#define VERSION "5.4"
+#define BUILD 2
+
+string Version::GetMinumumCompatibleVersion() {
+
+	string version;
+	version.append(MIN_COMPATIBLE_VERSION);
+    return(version);
+}
+
+string Version::GetVendor() {
+
+	string vendor;
+	vendor.append(VENDOR);
+    return(vendor);
+}
+
+string Version::GetVersion() {
+
+	string version;
+	version.append(VERSION);
+    return(version);
+}
+
+string Version::GetBuild() {
+	
+	string version;
+	ostringstream bld;
+	bld << BUILD;
+	version.append(bld.str());
+    return(version);
+}
+
+string Version::GetBuildDate() {
+
+	string version;
+	version.append(__DATE__);
+	version.append(" ");
+	version.append(__TIME__);
+    return(version);
+}


Property changes on: trunk/ovaldi/src/Version.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/Version.h
===================================================================
--- trunk/ovaldi/src/Version.h	                        (rev 0)
+++ trunk/ovaldi/src/Version.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,62 @@
+//
+// $Id: Version.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef VERSION_H
+#define VERSION_H
+
+#include <iostream>
+#include <sstream>
+
+using namespace std;
+
+/**
+	Maintians the version of the OVAL Interpreter
+*/
+class Version {
+
+	public:
+		/** Return the build of this interpreter as a string. */
+		static string GetBuild();
+
+		/** Return the build date of this interpreter as a string. */
+		static string GetBuildDate();
+
+		/** Return the vendor of this interpreter as a string. */
+		static string GetVendor();
+
+		/** Return the version of this interpreter as a string. */
+		static string GetVersion();
+
+		/** Return the minimum compatible version of this interpreter as a string. */
+		static string GetMinumumCompatibleVersion();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/Version.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/XmlCommon.cpp
===================================================================
--- trunk/ovaldi/src/XmlCommon.cpp	                        (rev 0)
+++ trunk/ovaldi/src/XmlCommon.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,580 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "XmlCommon.h"
+
+//****************************************************************************************//
+//										XmlCommon Class									  //	
+//****************************************************************************************//
+void XmlCommon::AddAttribute(DOMElement *node, string attName, string attValue) {
+
+	const XMLCh *name = XMLString::transcode(attName.c_str());
+	const XMLCh *value = XMLString::transcode(attValue.c_str());
+	node->setAttribute(name, value);
+
+}
+
+DOMElement* XmlCommon::AddChildElement(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, DOMElement *parent, string nodeName, string nodeValue) {
+
+	DOMElement *newElem = NULL;
+
+	newElem = CreateElement(doc, nodeName, nodeValue);
+	parent->appendChild(newElem);
+
+	return newElem;
+}
+
+void XmlCommon::CopyNamespaces(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* source, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* dest) {
+
+	DOMNamedNodeMap* attributes = source->getDocumentElement()->getAttributes();
+	for(unsigned int i = 0; i < attributes->getLength(); i++) {
+		DOMNode* attr = attributes->item(i);
+		string name = XmlCommon::ToString(attr->getNodeName());
+		string localPart = XmlCommon::ToString(attr->getLocalName());
+		string prefix = XmlCommon::ToString(attr->getPrefix());
+		if(localPart.compare("xmlns") != 0 && prefix.compare("xmlns") == 0) {
+            string value = XmlCommon::ToString(attr->getNodeValue());
+			XmlCommon::AddXmlns(dest, value, localPart);
+		}		
+	}
+}
+
+void XmlCommon::CopySchemaLocation(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* source, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* dest) {
+
+	string srcSchemaLocations = XmlCommon::GetAttributeByName(source->getDocumentElement(), "xsi:schemaLocation");
+
+	// break the schema location values into sepearte strings
+	// and add each of them to the destionation document
+	int len =srcSchemaLocations.length();
+	string currentSchemaLocation = "";
+	string suffix = "";
+	for(int i = 0; i < len; i++) {
+		char c = srcSchemaLocations[i];
+		if(c == '.') {
+			suffix = suffix + c;
+			currentSchemaLocation = currentSchemaLocation + c;
+		} else if(c == 'x' && suffix.compare(".") == 0) {
+			suffix = suffix + c;
+			currentSchemaLocation = currentSchemaLocation + c;
+		} else if(c == 's' && suffix.compare(".x") == 0) {
+			suffix = suffix + c;
+			currentSchemaLocation = currentSchemaLocation + c;
+		} else if(c == 'd' && suffix.compare(".xs") == 0) {
+			suffix = "";
+			currentSchemaLocation = currentSchemaLocation + c;
+			XmlCommon::AddSchemaLocation(dest, currentSchemaLocation);
+			currentSchemaLocation = "";
+		} else if(c == ' ' && currentSchemaLocation.compare("") == 0) {
+			suffix = "";
+		} else {
+			suffix = "";
+			currentSchemaLocation = currentSchemaLocation + c;
+		}
+	}
+}
+
+void XmlCommon::RemoveAttributes(DOMElement* elm) {
+
+	DOMNamedNodeMap* attributes = elm->getAttributes();
+	unsigned int len = attributes->getLength();
+	while(len > 0) {
+		DOMAttr* attr = (DOMAttr*)attributes->item(0);
+		string ln = XmlCommon::ToString(attr->getLocalName());
+		string p = XmlCommon::ToString(attr->getPrefix());
+		string v = XmlCommon::ToString(attr->getNodeValue());
+		string n = XmlCommon::ToString(attr->getName());
+
+		DOMNode* oldAttr = attributes->removeNamedItem(attr->getName());
+		oldAttr->release();
+		attributes = elm->getAttributes();
+		len = attributes->getLength();
+	}
+}
+
+DOMElement* XmlCommon::CreateElement(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, string nodeName, string nodeValue) {
+	
+	DOMText *tmpTextNode = NULL;
+	DOMElement *newElem = NULL;
+
+
+	newElem = doc->createElement(XMLString::transcode(nodeName.c_str()));
+	if(nodeValue.compare("") != 0) {
+		tmpTextNode = doc->createTextNode(XMLString::transcode(nodeValue.c_str()));
+		newElem->appendChild(tmpTextNode);
+	}
+
+	return newElem;
+}
+
+ElementVector* XmlCommon::FindAllElements(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, string nodeName, string attribute, string attValue, string xmlns) {
+
+	ElementVector *nodes		= new ElementVector();
+	DOMElement *tmpNode		= NULL;
+	DOMNodeList *nodeList	= NULL;
+	int listLen				= 0;
+	int index				= 0;
+
+	nodeList = doc->getElementsByTagName(XMLString::transcode(nodeName.c_str()));
+
+	listLen = nodeList->getLength();
+	while(index < listLen)
+	{
+		tmpNode = (DOMElement*)nodeList->item(index++);	
+		if(tmpNode != NULL)
+		{
+			//	Check for attribute if desired
+			if(attribute.compare("") == 0)
+			{
+				nodes->push_back(tmpNode);
+				continue;
+			}else if(tmpNode->hasAttribute(XMLString::transcode(attribute.c_str())))
+			{
+				//	Check for attribute value if desired
+				if(attValue.compare("") == 0)
+				{
+					nodes->push_back(tmpNode);
+					continue;
+				}else if((GetAttributeByName(tmpNode, attribute)).compare(attValue) == 0)
+				{
+					nodes->push_back(tmpNode);
+					continue;
+				}
+			}
+		}
+	}
+
+	return nodes;
+}
+
+DOMElement* XmlCommon::FindElement(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, string nodeName, string attribute, string attValue) {
+
+	DOMElement *tmpNode		= NULL;
+	DOMElement *result			= NULL;
+	DOMNodeList *nodeList	= NULL;
+	int listLen				= 0;
+	int index				= 0;
+
+
+	//	Get a list of all the nodes in the document with the nodeName and loop through them
+	nodeList = doc->getElementsByTagName(XMLString::transcode(nodeName.c_str()));
+	listLen = nodeList->getLength();
+	while(index < listLen)
+	{
+		tmpNode = (DOMElement*)nodeList->item(index++);	
+		if(tmpNode != NULL)
+		{
+			//	Check for attribute if desired
+			if(attribute.compare("") == 0)
+			{
+				result = tmpNode;
+				break;
+			}else if(tmpNode->hasAttribute(XMLString::transcode(attribute.c_str())))
+			{
+				//	Check for attribute value if desired
+				if(attValue.compare("") == 0)
+				{
+					result = tmpNode;
+					break;
+				}else if((GetAttributeByName(tmpNode, attribute)).compare(attValue) == 0)
+				{
+					result = tmpNode;
+					break;
+				}
+			}
+		}
+	}
+
+	return result;
+}
+
+DOMElement* XmlCommon::FindElement(DOMElement *element, string nodeName, string attribute, string attValue) {
+
+	DOMElement *tmpNode		= NULL;
+	DOMElement *result			= NULL;
+	DOMNodeList *nodeList	= NULL;
+	int listLen				= 0;
+	int index				= 0;
+
+	nodeList = element->getElementsByTagName(XMLString::transcode(nodeName.c_str()));
+	listLen = nodeList->getLength();
+	while(index < listLen)
+	{
+		tmpNode = (DOMElement*)nodeList->item(index++);
+		if(tmpNode != NULL)
+		{
+			//	Check for attribute if desired
+			if(attribute.compare("") == 0)
+			{
+				result = tmpNode;
+				break;
+			}else if(tmpNode->hasAttribute(XMLString::transcode(attribute.c_str())))
+			{
+				//	Check for attribute value if desired
+				if(attValue.compare("") == 0)
+				{
+					result = tmpNode;
+					break;
+	
+				}else if((GetAttributeByName(tmpNode, attribute)).compare(attValue) == 0)
+				{
+					result = tmpNode;
+					break;
+				}
+			}
+		}
+	}
+
+	return result;
+}
+
+DOMElement* XmlCommon::FindElementNS(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, string nodeName, string attribute, string attValue, string xmlns) {
+
+	DOMElement *tmpNode		= NULL;
+	DOMElement *result			= NULL;
+	DOMNodeList *nodeList	= NULL;
+	int listLen				= 0;
+	int index				= 0;
+
+
+	//	Get a list of all the nodes in the document with the nodeName and loop through them
+	nodeList = doc->getElementsByTagNameNS(XMLString::transcode(xmlns.c_str()), XMLString::transcode(nodeName.c_str()));
+	listLen = nodeList->getLength();
+	while(index < listLen)
+	{
+		tmpNode = (DOMElement*)nodeList->item(index++);	
+		if(tmpNode != NULL)
+		{
+			//	Check for attribute if desired
+			if(attribute.compare("") == 0)
+			{
+				result = tmpNode;
+				break;
+			}else if(tmpNode->hasAttribute(XMLString::transcode(attribute.c_str())))
+			{
+				//	Check for attribute value if desired
+				if(attValue.compare("") == 0)
+				{
+					result = tmpNode;
+					break;
+				}else if((GetAttributeByName(tmpNode, attribute)).compare(attValue) == 0)
+				{
+					result = tmpNode;
+					break;
+				}
+			}
+		}
+	}
+
+	return result;
+}
+
+DOMElement* XmlCommon::FindElementNS(DOMElement *element, string nodeName, string attribute, string attValue, string xmlns) {
+
+	DOMElement *tmpNode		= NULL;
+	DOMElement *result			= NULL;
+	DOMNodeList *nodeList	= NULL;
+	int listLen				= 0;
+	int index				= 0;
+
+
+	nodeList = element->getElementsByTagNameNS(XMLString::transcode(xmlns.c_str()), XMLString::transcode(nodeName.c_str()));
+
+	listLen = nodeList->getLength();
+	while(index < listLen)
+	{
+		tmpNode = (DOMElement*)nodeList->item(index++);	
+		if(tmpNode != NULL)
+		{
+			//	Check for attribute if desired
+			if(attribute.compare("") == 0)
+			{
+				result = tmpNode;
+				break;
+			}else if(tmpNode->hasAttribute(XMLString::transcode(attribute.c_str())))
+			{
+				//	Check for attribute value if desired
+				if(attValue.compare("") == 0)
+				{
+					result = tmpNode;
+					break;
+				}else if((GetAttributeByName(tmpNode, attribute)).compare(attValue) == 0)
+				{
+					result = tmpNode;
+					break;
+				}
+			}
+		}
+	}
+
+	return result;
+}
+
+DOMElement* XmlCommon::FindElementByAttribute(DOMElement *node, string attribute, string attValue) {
+	
+	DOMElement *child;
+	DOMElement *found = NULL;
+
+    if (node) {
+		//	test to see if the node has attributes
+		if(node->hasAttributes()) {
+			// get all the attributes of the node
+			DOMNamedNodeMap *pAttributes = node->getAttributes();
+			int nSize = pAttributes->getLength();
+
+			//	Loop through the attributes
+		    for(int i=0;i<nSize;++i) {
+				DOMAttr *pAttributeNode = (DOMAttr*) pAttributes->item(i);
+				// get attribute name
+				string attName = ToString(pAttributeNode->getName());
+
+				//	Is this the attribute we are looking for
+				if(attribute.compare(attName)==0) {   
+					//	Get the attribute value
+					string attVal = ToString(pAttributeNode->getValue());
+					
+					//	Is the value correct
+					if(attValue.compare(attVal) == 0) {
+						//	found the match we are looking for
+						//	return a ptr to the node 
+						found = node;
+						break;
+					}
+				}
+			}
+			//	No attributes match for this node search children
+			if(found == NULL) {
+				//	loop through all child nodes calling this function recursively
+				for (DOMNode *childNode = node->getFirstChild(); childNode != 0; childNode=childNode->getNextSibling()) {
+					if(childNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+						child = (DOMElement*)childNode;
+						found = FindElementByAttribute(child, attribute, attValue);
+		
+						//	Break out of the loop if found a node
+						if(found != NULL)
+							break;
+					}
+				}
+			}
+
+		//	No attributes found search its children
+		} else 	{
+			//	loop through all child nodes calling this function recursively
+			for (DOMNode *childNode = node->getFirstChild(); childNode != 0; childNode=childNode->getNextSibling()) {
+				if(childNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+					child = (DOMElement*)childNode;
+					found = FindElementByAttribute(child, attribute, attValue);
+	
+					//	Break out of the loop if found a node
+					if(found != NULL)
+						break;
+				}
+			}
+		}
+    }
+
+    return (found);
+}
+
+string XmlCommon::GetAttributeByName(DOMElement *node, string name) {
+	
+	string value = "";
+
+	//	Check inputs
+	if(node == NULL)
+		throw XmlCommonException("Error: Unable to get attribute value. NULL node supplied\n");
+
+	if(name.compare("") == 0)
+		throw XmlCommonException("Error: Unable to get attribute value. NULL attribute name supplied\n");
+
+
+	const XMLCh *attName = XMLString::transcode(name.c_str());
+	value = ToString(((DOMElement*)node)->getAttribute(attName));
+
+	//////////   DEBUG ////////////////////
+	//	cout << "***** debug *****" <<endl;
+	//	cout << "GetAttributeByName()" << endl;
+	//	cout << "Name: " << name << endl;
+	//	cout << "Value: " << value << endl;
+	//////////   DEBUG ////////////////////
+
+	return(value);
+}
+
+void XmlCommon::RemovetAttributeByName(DOMElement *node, string name) {
+
+	const XMLCh *attName = XMLString::transcode(name.c_str());
+	node->removeAttribute(attName);
+}
+
+string XmlCommon::GetDataNodeValue(DOMElement *node) {
+
+	string result = "";
+
+	//	Check input
+	if(node == NULL)
+		throw XmlCommonException("Error: Attempted to get the value of a NULL node.");
+
+	if(node->hasChildNodes()) {
+		DOMNodeList *childList = node->getChildNodes();
+		if(childList->getLength() == 1) {
+			DOMNode *child = node->getFirstChild();
+			if(child->getNodeType() == DOMNode::TEXT_NODE)
+				result = ToString(((DOMText*)child)->getData());
+			else
+				throw XmlCommonException("Error: When getting the value of a node there should be exactly one child of that node and it should be a TEXT_NODE");
+
+		} else {
+			throw XmlCommonException("Error: When getting the value of a node there should be exactly one child of that node. The specified node has more than one child.");
+		}
+	} else {
+	//	throw XmlCommonException("Error: When getting the value of a node there should be exactly one child of that node. The specified node has no children.");
+		result = "";
+	}
+
+	return result;
+}
+
+string XmlCommon::GetElementName(DOMElement *elm) {
+
+	string name = "";
+
+	name = XmlCommon::ToString(elm->getLocalName());
+	if (name.compare("") == 0) {
+		name = XmlCommon::ToString(elm->getTagName());
+	}
+
+	return name;
+}
+
+string XmlCommon::GetElementPrefix(DOMElement *elm) {
+
+	string prefix = "";
+
+	prefix = XmlCommon::ToString(elm->getPrefix());
+	if (prefix.compare("") == 0) {
+		prefix = "";
+	}
+
+	return prefix;
+}
+
+bool XmlCommon::HasChildElements(DOMNode *node) {
+
+	bool hasChildElms = false;
+
+	//	check for child nodes of the definition node that are ELEMENT_NODE's
+	DOMNodeList *nodeChildList = node->getChildNodes();
+	unsigned int index = 0;
+	while(index < nodeChildList->getLength()) {
+		DOMNode *child = nodeChildList->item(index++);
+		if(child->getNodeType() == DOMNode::ELEMENT_NODE) {
+			hasChildElms = true;
+			break;
+		}
+	}
+
+	return hasChildElms;
+}
+
+string XmlCommon::ToString(const XMLCh *xml) {
+
+	string result = "";
+	char *tmp;
+	
+	if(xml != NULL) {
+		tmp = XMLString::transcode(xml);
+		result = tmp;
+		XMLString::release(&tmp);
+	}
+
+	return(result);
+}
+
+void XmlCommon::AddXmlns(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* doc, string newXmlnsUri, string newXmlnsAlias) {
+
+	DOMElement *rootElm = doc->getDocumentElement();
+	if(newXmlnsAlias.compare("") == 0) {
+		XmlCommon::AddAttribute(rootElm, "xmlns", newXmlnsUri);
+	} else {
+		XmlCommon::AddAttribute(rootElm, "xmlns:" + newXmlnsAlias, newXmlnsUri);
+	}
+}
+
+void XmlCommon::AddSchemaLocation(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, string newSchemaLocation) {
+
+	DOMElement *rootElm = doc->getDocumentElement();
+	string currentSchemaLocation = XmlCommon::GetAttributeByName(rootElm, "xsi:schemaLocation");
+
+	if(currentSchemaLocation.compare("") != 0) {
+		size_t pos = currentSchemaLocation.find(newSchemaLocation, 0);
+		if(pos == string::npos) {
+			currentSchemaLocation.append(" " + newSchemaLocation);
+			XmlCommon::AddAttribute(rootElm, "xsi:schemaLocation", currentSchemaLocation);
+		}
+	} else {
+		XmlCommon::AddAttribute(rootElm, "xsi:schemaLocation", newSchemaLocation);
+	}
+}	
+
+string XmlCommon::GetNamespace(DOMElement *element) {
+
+	string xmlns = "";
+	xmlns = XmlCommon::ToString(element->getTypeInfo()->getNamespace());
+	if (xmlns.compare("") == 0) {
+		xmlns = "";
+	}
+	return xmlns;
+}
+//****************************************************************************************//
+//							XmlCommonException Class									  //	
+//****************************************************************************************//
+XmlCommonException::XmlCommonException(string errMsgIn, int severity) : Exception(errMsgIn, severity) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the error message and then set the severity to ERROR_FATAL. This is 
+	//	done with the explicit call to the Exception class constructor that 
+	//	takes a single string param.
+	//
+	// -----------------------------------------------------------------------
+
+}
+
+XmlCommonException::~XmlCommonException()
+{
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Do nothing for now
+	//
+	// -----------------------------------------------------------------------
+
+}
+


Property changes on: trunk/ovaldi/src/XmlCommon.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/XmlCommon.h
===================================================================
--- trunk/ovaldi/src/XmlCommon.h	                        (rev 0)
+++ trunk/ovaldi/src/XmlCommon.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,157 @@
+//
+// $Id: XmlCommon.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef XMLCOMMON_H
+#define XMLCOMMON_H
+
+//	required xerces includes
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/DOMAttr.hpp>
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xercesc/dom/DOMNodeList.hpp>
+#include <xercesc/util/XMLString.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/parsers/AbstractDOMParser.hpp>
+
+
+//	other includes
+#include <string>
+#include <iostream>
+#include <sstream>
+#include <stdlib.h>
+#include <vector>
+
+#include "Exception.h"
+
+//	namespaces
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**	
+	A vector for storing DOMElement objects. 
+	Stores only pointers to the objects. 
+*/
+typedef vector < DOMElement*, allocator<DOMElement*> > ElementVector;
+
+/**
+	This class encapsulates a set of static methods for manipulating XML
+*/
+class XmlCommon {
+public:
+	/** Add an attribute to the specified DOMElement. */
+	static void AddAttribute(DOMElement *node, string attName, string attValue); 
+	/** Add a new DOMElement node to the parent node.  
+		Use nodeName and nodeValue to construct the new node. Only attempt
+		to add a value if a value is specified. Return a ptr to the new DOMElement. 
+	*/
+	static DOMElement* AddChildElement(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, DOMElement *parent, string nodeName, string nodeValue = "");
+	/** Create a new DOMElement node with the specified value. 
+		Use nodeName and nodeValue to construct the new node. Only attempt
+		to add a value if a value is specified. 
+		Return a ptr to the new DOMElement. 
+	*/
+	static DOMElement* CreateElement(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument*, string, string nodeValue = "");
+	/** Return the all nodes in the specified document that match the node name and attribute value.
+		Attribute name and value are optional as well as xmlns.
+	*/
+	static ElementVector* FindAllElements(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *node, string nodeName, string attribute = "", string attValue = "", string xmlns = "*");
+	/** Return the first node found that has the corresponding name with the attribute and attribute value specified.
+		Requires input of at least a node name and a DOMDocument to search. 
+		The attribute and attribute value parameters are optional.
+	*/
+	static DOMElement* FindElement(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, string nodeName, string attribute = "", string attValue ="");
+	/** Return the first node found that has the corresponding name with the attribute and attribute value specified.
+		Requires input of at least a DOMElement name and a DOMElement.
+		The attribute and attribute value parameters are optional.
+	*/
+	static DOMElement* FindElement(DOMElement *node, string nodeName, string attribute = "", string attValue ="");
+	/**	Return the first node found that has the corresponding name with the attribute and attribute value specified and the specified xmlns.
+		Requires input of at least a DOMElement name and a DOMDocument.
+		Attribute name and value are optional as well as xmlns.
+	*/
+	static DOMElement* FindElementNS(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, string nodeName, string attribute = "", string attValue ="", string xmlns = "*");
+	/**	Return the first node found that has the corresponding name with the attribute and attribute value specified and the specified xmlns.
+		Requires input of at least a DOMElement name and a DOMElement.
+		Attribute name and value are optional as well as xmlns.
+	*/
+	static DOMElement* FindElementNS(DOMElement *node, string nodeName, string attribute = "", string attValue ="", string xmlns = "*");
+	/** Recursively search the specified  DOMElement for an element with a corresponding attribute and attribute value.
+	*/
+	static DOMElement* FindElementByAttribute(DOMElement *node, string attribute, string attValue);
+	/**	Get the name of the specified attribute.
+		Return empty string if the attribute is not found. 
+	*/
+	static string GetAttributeByName(DOMElement *node, string name);
+	/**	Get the text value of the specified node. 
+		Return an empty string if there is no value. 
+		Throws an exception if the specifeid DOMElement has child elements.
+	*/
+	static string GetDataNodeValue(DOMElement*);
+	/** Get the name of the specified element. */
+	static string GetElementName(DOMElement*);
+	/** Get the prefix of the specified element. */
+	static string GetElementPrefix(DOMElement*);
+	/** Return true if the specified node has child elements. */
+	static bool HasChildElements(DOMNode*);
+	/**	Remove the specified attribute. */
+	static void RemovetAttributeByName(DOMElement*, string);
+	/** Convert the XMLCh* to a string and handle memory allocation. */
+	static string ToString(const XMLCh*);
+	/** Add the specifed namespace to the root element in the specified document. */
+	static void AddXmlns(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, string newXmlnsUri, string newXmlnsAlias = "");
+	/** Add the specified schema location to the document. 
+		Ensures that schema locations are unique. 
+	*/
+	static void AddSchemaLocation(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, string newSchemaLocation);
+	//static void SplitnNSPrefixandElmenetName(string nameAndPrefix
+	/** Remove all the attributes from the specified element. */
+	static void RemoveAttributes(DOMElement* elm);
+	/** Copy the schema location from the source document to the destionation document. */
+	static void CopySchemaLocation(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* source, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* dest);
+	/** Copy the namespace on the source elmement to the destination element.
+		Do not overwrite the destination element's default xmlns. 
+	*/
+	static void CopyNamespaces(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* source, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* dest); 
+	
+	/** Return the namespace of the specifed element or null if no namespace is present. */
+	static string GetNamespace(DOMElement*);
+};
+
+/** 
+	This class represents an Exception that occured using one of the XmlCommon functions.
+*/
+class XmlCommonException : public Exception {
+	public:
+		XmlCommonException(string errMsgIn = "", int severity = ERROR_FATAL);
+		~XmlCommonException();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/XmlCommon.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/XmlProcessor.cpp
===================================================================
--- trunk/ovaldi/src/XmlProcessor.cpp	                        (rev 0)
+++ trunk/ovaldi/src/XmlProcessor.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,290 @@
+//
+// $Id: XmlProcessor.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+#include "XmlProcessor.h"
+
+//****************************************************************************************//
+//								XmlProcessor Class										  //	
+//****************************************************************************************//
+XmlProcessor* XmlProcessor::instance = NULL;
+XmlProcessor* XmlProcessor::Instance() {
+
+	if(XmlProcessor::instance == NULL) {
+		XmlProcessor::instance = new XmlProcessor();
+	}
+
+	return XmlProcessor::instance;
+}
+
+XmlProcessor::XmlProcessor() {
+
+    try  {
+        XMLPlatformUtils::Initialize();
+    } catch (const XMLException& toCatch) {
+        string errMsg = "Error:  An error occured durring initialization of the xml utilities:\n";
+        errMsg.append(XmlCommon::ToString(toCatch.getMessage()));
+		errMsg.append("\n");
+
+		throw XmlProcessorException(errMsg);
+    }	
+}
+
+XmlProcessor::~XmlProcessor() {
+
+	//  Delete the parser itself.  Must be done prior to calling Terminate, below.
+	if(parser != NULL)
+		delete parser; //parser->release();
+
+	XMLPlatformUtils::Terminate();
+
+}
+
+XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* XmlProcessor::ParseFile(string filePathIn) {
+	
+    XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *resultDocument = NULL;
+
+    // Instantiate the DOM parser.
+    static const XMLCh gLS[] = { chLatin_L, chLatin_S, chNull };
+    DOMImplementation *impl = DOMImplementationRegistry::getDOMImplementation(gLS);
+    parser = ((DOMImplementationLS*)impl)->createDOMBuilder(DOMImplementationLS::MODE_SYNCHRONOUS, 0);
+
+	///////////////////////////////////////////////////////
+    //	Set fetuares on the builder
+	///////////////////////////////////////////////////////
+
+
+	parser->setFeature(XMLUni::fgDOMComments, false); // Discard Comment nodes in the document. 
+    parser->setFeature(XMLUni::fgDOMDatatypeNormalization, true); // Let the validation process do its datatype normalization that is defined in the used schema language.  
+	parser->setFeature(XMLUni::fgDOMNamespaces, true); //  Perform Namespace processing
+	parser->setFeature(XMLUni::fgDOMValidation, true); // Report all validation errors.  
+	parser->setFeature(XMLUni::fgXercesSchema, true); //  Enable the parser's schema support.
+	parser->setFeature(XMLUni::fgXercesSchemaFullChecking, true); //  Enable full schema constraint checking, including checking which may be time-consuming or memory intensive. Currently, particle unique attribution constraint checking and particle derivation restriction checking are controlled by this option.  
+	parser->setFeature(XMLUni::fgXercesValidationErrorAsFatal, true); //  The parser will treat validation error as fatal and will exit  
+	parser->setFeature(XMLUni::fgXercesDOMHasPSVIInfo, true); // Enable storing of PSVI information in element and attribute nodes.
+
+	///////////////////////////////////////////////////////
+    //	Add an Error Handler
+	///////////////////////////////////////////////////////
+	// Create a new DOMErrorHandler
+	// and set it to the builder
+	XmlProcessorErrorHandler *errHandler = new XmlProcessorErrorHandler();
+	parser->setErrorHandler(errHandler);
+
+    try  {
+		// reset document pool
+		parser->resetDocumentPool();
+        resultDocument = parser->parseURI(filePathIn.c_str());
+
+    } catch (const XMLException& toCatch) {
+		string error = "Error while parsing xml file:";
+		error.append(filePathIn);
+		error.append("\n\tMessage: \n\t");
+		error.append(XmlCommon::ToString(toCatch.getMessage()));
+		throw XmlProcessorException(error);
+
+    } catch (const DOMException& toCatch) {
+		string error = "Error while parsing xml file:";
+		error.append(filePathIn);
+		error.append("\n\tMessage: \n\t");
+		error.append(XmlCommon::ToString(toCatch.msg));
+		throw XmlProcessorException(error);
+
+	} catch (...) {
+        string error = "Error while parsing xml file:";
+		error.append(filePathIn);
+		error.append("\n\tMessage: \n\tUnknown message");
+		throw XmlProcessorException(error);
+    }
+
+	if(errHandler->getSawErrors()) {
+		string error = "Error while parsing xml file:";
+		error.append(errHandler->getErrorMessages());
+		throw XmlProcessorException(error);
+	}
+
+	return resultDocument;
+}
+
+XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* XmlProcessor::CreateDOMDocument(string root) {
+
+	const XMLCh *xmlRoot = XMLString::transcode(root.c_str());
+
+	DOMImplementation* impl =  DOMImplementationRegistry::getDOMImplementation(XMLString::transcode ("Core"));
+	XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* doc = impl->createDocument(0, xmlRoot, 0);
+
+	return(doc);
+}
+
+XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* XmlProcessor::CreateDOMDocumentNS(string namespaceURI, string qualifiedName) {
+
+	const XMLCh *uri = XMLString::transcode(namespaceURI.c_str());
+	const XMLCh *name = XMLString::transcode(qualifiedName.c_str());
+
+	DOMImplementation* impl =  DOMImplementationRegistry::getDOMImplementation(XMLString::transcode ("Core"));
+	XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* doc = impl->createDocument(uri, name, NULL);
+
+	return(doc);
+}
+
+void XmlProcessor::WriteDOMDocument(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* doc,  string filePath, bool writeToFile) {
+
+	try
+	{
+		// get a serializer, an instance of DOMWriter
+		XMLCh tempStr[100];
+		XMLString::transcode("LS", tempStr, 99);
+		DOMImplementation *impl = DOMImplementationRegistry::getDOMImplementation(tempStr);
+		DOMWriter *theSerializer = ((DOMImplementationLS*)impl)->createDOMWriter();
+
+		// set feature if the serializer supports the feature/mode
+		if (theSerializer->canSetFeature(XMLUni::fgDOMWRTSplitCdataSections, true))
+			theSerializer->setFeature(XMLUni::fgDOMWRTSplitCdataSections, true);
+
+		if (theSerializer->canSetFeature(XMLUni::fgDOMWRTDiscardDefaultContent, true))
+			theSerializer->setFeature(XMLUni::fgDOMWRTDiscardDefaultContent, true);
+
+		if (theSerializer->canSetFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true))
+			theSerializer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true);
+
+		if (theSerializer->canSetFeature(XMLUni::fgDOMWRTBOM, false))
+			theSerializer->setFeature(XMLUni::fgDOMWRTBOM, false);
+
+		//if (theSerializer->canSetFeature(XMLUni::fgDOMWRTDiscardDefaultContent, true))
+		//	theSerializer->setFeature(XMLUni::fgDOMWRTBOM, true);
+
+		//
+		// Plug in a format target to receive the resultant
+		// XML stream from the serializer.
+		//
+		// StdOutFormatTarget prints the resultant XML stream
+		// to stdout once it receives any thing from the serializer.
+		//
+		XMLFormatTarget *myFormTarget;
+		if (writeToFile)
+			myFormTarget = new LocalFileFormatTarget(filePath.c_str());
+		else
+			myFormTarget = new StdOutFormatTarget();
+
+		//
+		// do the serialization through DOMWriter::writeNode();
+		//
+		theSerializer->writeNode(myFormTarget, *doc);
+
+		delete theSerializer;
+		delete myFormTarget;
+	}
+	catch(...)
+	{
+		string error;
+		if(writeToFile)
+		{
+			error.append("Error while writing Document to XML file: ");
+			error.append(filePath);
+		}else
+		{
+			error.append("Error while writing Document to screen");
+		}
+
+		throw XmlProcessorException(error);
+	}
+}
+
+//****************************************************************************************//
+//								XmlProcessorException Class								  //	
+//****************************************************************************************//
+XmlProcessorException::XmlProcessorException(string errMsgIn, int severity) : Exception(errMsgIn, severity) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Set the error message and then set the severity to ERROR_FATAL. This is 
+	//	done with the explicit call to the Exception class constructor that 
+	//	takes a single string param.
+	//
+	// -----------------------------------------------------------------------
+
+}
+
+XmlProcessorException::~XmlProcessorException() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Do nothing for now
+	//
+	// -----------------------------------------------------------------------
+
+}
+
+//****************************************************************************************//
+//								XmlProcessorErrorHandler Class							  //	
+//****************************************************************************************//
+XmlProcessorErrorHandler::XmlProcessorErrorHandler() : fSawErrors(false) {
+	errorMessages = "";
+}
+
+XmlProcessorErrorHandler::~XmlProcessorErrorHandler() { }
+
+// ---------------------------------------------------------------------------
+//  XmlProcessorErrorHandler: Overrides of the DOM ErrorHandler interface
+// ---------------------------------------------------------------------------
+bool XmlProcessorErrorHandler::handleError(const DOMError& domError) {
+
+    fSawErrors = true;
+    if (domError.getSeverity() == DOMError::DOM_SEVERITY_WARNING)
+        errorMessages.append("\n\tSeverity: Warning");
+    else if (domError.getSeverity() == DOMError::DOM_SEVERITY_ERROR)
+        errorMessages.append("\n\tSeverity: Error");
+    else
+        errorMessages.append("\n\tSeverity: Fatal Error");
+
+	string msg =  XmlCommon::ToString(domError.getMessage());
+	string file = XmlCommon::ToString(domError.getLocation()->getURI());
+	long line = domError.getLocation()->getLineNumber();
+	long at = domError.getLocation()->getColumnNumber();
+
+	errorMessages.append("\n\tMessage: " + msg);
+	errorMessages.append("\n\tFile: " + file);
+	errorMessages.append("\n\tLine " + Common::ToString(line));
+	errorMessages.append("\n\tAt char " + Common::ToString(at));
+	
+    return true;
+}
+
+void XmlProcessorErrorHandler::resetErrors() {
+    fSawErrors = false;
+}
+
+bool XmlProcessorErrorHandler::getSawErrors() const {
+    return fSawErrors;
+}
+
+string XmlProcessorErrorHandler::getErrorMessages() const {
+    return errorMessages;
+}
+


Property changes on: trunk/ovaldi/src/XmlProcessor.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/XmlProcessor.h
===================================================================
--- trunk/ovaldi/src/XmlProcessor.h	                        (rev 0)
+++ trunk/ovaldi/src/XmlProcessor.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,153 @@
+//
+// $Id: XmlProcessor.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source	and	binary forms, with or without modification,	are
+// permitted provided that the following conditions	are	met:
+//
+//	   * Redistributions of	source code	must retain	the	above copyright	notice,	this list
+//		 of	conditions and the following disclaimer.
+//	   * Redistributions in	binary form	must reproduce the above copyright notice, this	
+//		 list of conditions	and	the	following disclaimer in	the	documentation and/or other
+//		 materials provided	with the distribution.
+//	   * Neither the name of The MITRE Corporation nor the names of	its	contributors may be
+//		 used to endorse or	promote	products derived from this software	without	specific 
+//		 prior written permission.
+//
+// THIS	SOFTWARE IS	PROVIDED BY	THE	COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A	PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR	CONTRIBUTORS BE	LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL,	EXEMPLARY, OR CONSEQUENTIAL	DAMAGES	(INCLUDING,	BUT	NOT	LIMITED	TO,	PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES;	LOSS OF	USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT	(INCLUDING NEGLIGENCE OR OTHERWISE)	ARISING	IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN	IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef	XMLPROCESSOR_H
+#define	XMLPROCESSOR_H
+
+#ifdef WIN32
+#pragma	warning(disable:4786)
+#endif
+
+//	required xerces	includes
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/DOMAttr.hpp>
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xercesc/dom/DOMNodeList.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/util/XMLString.hpp>
+#include <xercesc/parsers/AbstractDOMParser.hpp>
+#include <xercesc/dom/DOMImplementationRegistry.hpp>
+#include <xercesc/dom/DOMBuilder.hpp>
+#include <xercesc/dom/DOMException.hpp>
+#include <xercesc/dom/DOMErrorHandler.hpp>
+#include <xercesc/dom/DOMError.hpp>
+#include <xercesc/dom/DOMLocator.hpp>
+#include <xercesc/dom/DOMNamedNodeMap.hpp>
+
+// for dom Writer
+#include <xercesc/dom/DOMImplementation.hpp>
+#include <xercesc/dom/DOMImplementationLS.hpp>
+#include <xercesc/dom/DOMWriter.hpp>
+#include <xercesc/framework/StdOutFormatTarget.hpp>
+#include <xercesc/framework/LocalFileFormatTarget.hpp>
+#include <xercesc/parsers/XercesDOMParser.hpp>
+#include <xercesc/util/XMLUni.hpp>
+
+#include "Common.h"
+#include "XmlCommon.h"
+#include "Exception.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace	std;
+
+/**
+	This class uses xerces to parse, create and write XML documents.
+	The XmlProcessor is a singleton. To get and instance of this class call the static Instance method.
+*/
+class XmlProcessor {
+public:
+
+	/** Clean up after the DOMBuilder. */
+	~XmlProcessor();
+
+	/** Static instance method is implemented to keep this calss as a singlton. 
+		This method should be used to get an instance of this class.
+	*/
+	static XmlProcessor* Instance();
+	
+	/** Create a new DOMDocument with the specified root element. */ 
+	XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument*	CreateDOMDocument(string root);
+	/** Create a new DOMDocument with the specified qualifiedName and default namespace. */ 
+	XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument*	CreateDOMDocumentNS(string namespaceURI, string qualifiedName);
+	/** Parse the specified file and return a DOMDocument. 
+		'filePathIn' should be the complete path to the desired file.
+		When validating and xml file the schema must be in the same directory as the file.  
+	*/
+	XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument*	ParseFile(string);
+	/** Write the DOMDocument to the specified XML file.
+		filePath is the filename and path to the file that will be written
+	*/
+	void WriteDOMDocument(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* doc, string filePath,	bool writeToFile=true);
+
+private:
+	/** Init the XmlProcessor
+		Throws an exception if there is an error.
+	*/
+	XmlProcessor();
+
+	static XmlProcessor* instance;
+	
+	DOMBuilder *parser;
+};
+
+/** 
+	This class represents an Exception that occured while running the XmlProcessor.
+*/
+class XmlProcessorException	: public Exception {
+public:
+	XmlProcessorException(string errMsgIn =	"",	int	severity = ERROR_FATAL);
+	~XmlProcessorException();
+};
+
+
+/**
+	Simple error handler deriviative to	install	on parser.
+*/
+class XmlProcessorErrorHandler : public	DOMErrorHandler {
+public:
+	XmlProcessorErrorHandler();
+	~XmlProcessorErrorHandler();
+
+	bool getSawErrors()	const;
+	string getErrorMessages() const;
+
+	bool handleError(const DOMError& domError);
+	void resetErrors();
+
+private:
+
+	/** Unimplemented constructor */
+	XmlProcessorErrorHandler(const XmlProcessorErrorHandler&);
+	/** Unimplemented operators */
+	void operator=(const XmlProcessorErrorHandler&);
+
+	/**
+		This is	set	if we get any errors, and is queryable via a getter
+		method.	Its	used by	the	parser check if	there are errors.
+	*/
+	bool	fSawErrors;
+	/**
+		This string	is used	to store all error messages	that are generated 
+	*/
+	string	errorMessages;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/XmlProcessor.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/XslCommon.cpp
===================================================================
--- trunk/ovaldi/src/XslCommon.cpp	                        (rev 0)
+++ trunk/ovaldi/src/XslCommon.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,78 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "XslCommon.h"
+
+//****************************************************************************************//
+//										XslCommon Class									  //	
+//****************************************************************************************//
+
+void XslCommon::ApplyXSL(string xmlIn, string xslIn, string xmlOut) {
+
+	// 2. Initialize Xalan and Xerces
+	XalanInitialize();
+
+	// 3. Create a Xalan transformer
+	XalanHandle xalan = NULL;
+	xalan = CreateXalanTransformer();
+
+	// 4. Perform each transformation
+	int theResult = 0;
+	theResult = XalanTransformToFile(xmlIn.c_str(),xslIn.c_str(), xmlOut.c_str(), xalan);
+
+	// 5. Shut down Xalan
+	XalanTerminate(false);
+}
+
+string XslCommon::ApplyXSL(string xmlIn, string xslIn) {
+
+	// 2. Initialize Xalan and Xerces
+	XalanInitialize();
+
+	// 3. Create a Xalan transformer
+	XalanHandle xalan = NULL;
+	xalan = CreateXalanTransformer();
+
+	char* theData = NULL;
+
+	// 4. Perform each transformation
+	int theResult = 0;
+	theResult = XalanTransformToData(xmlIn.c_str(),xslIn.c_str(), &theData, xalan);
+
+	string result = "";
+	result.append(theData);
+
+	XalanFreeData(theData);
+
+	// 5. Shut down Xalan
+	XalanTerminate(false);
+
+	return result;
+}


Property changes on: trunk/ovaldi/src/XslCommon.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/XslCommon.h
===================================================================
--- trunk/ovaldi/src/XslCommon.h	                        (rev 0)
+++ trunk/ovaldi/src/XslCommon.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,68 @@
+//
+// $Id: XslCommon.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef XSLCOMMON_H
+#define XSLCOMMON_H
+
+
+// See: 
+// http://xml.apache.org/xalan-c/usagepatterns.html#xalantransformer
+// for info about how to use the XalanTransformer C++ API
+
+//	required xalan includes 
+#include <xalanc/XalanTransformer/XalanCAPI.h>
+
+
+//	other includes
+#include "Log.h"
+
+//	namespaces
+using namespace std;
+
+/**
+	This class encapsulates a set of static methods for applying an xsl to an xml file
+*/
+class XslCommon {
+public:
+	/** 
+		Apply the specified xsl to the specified xml and output to the 
+		specified file.
+	*/
+	static void ApplyXSL(string xmlFilePath, string xslFilePath, string outputFilePath);
+
+	/** 
+		Apply the specified xsl to the specified xml and output the reuslt as a string.
+	*/
+	static string ApplyXSL(string xmlFilePath, string xslFilePath);
+};
+
+
+#endif


Property changes on: trunk/ovaldi/src/XslCommon.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/linux/DataCollector.cpp
===================================================================
--- trunk/ovaldi/src/linux/DataCollector.cpp	                        (rev 0)
+++ trunk/ovaldi/src/linux/DataCollector.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,89 @@
+//
+// $Id: DataCollector.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "DataCollector.h"
+
+//****************************************************************************************//
+//								DataCollector Class										  //	
+//****************************************************************************************//
+DataCollector::DataCollector() : AbsDataCollector() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//
+	// -----------------------------------------------------------------------
+}
+
+DataCollector::~DataCollector() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Nothing for now
+	// -----------------------------------------------------------------------
+}
+
+// ***************************************************************************************	//
+//								Static Public members										//
+// ***************************************************************************************	//
+void DataCollector::Init() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a new instance of the data collector
+	//	Set the oval and sc document references
+	//	Add the System info for this platform
+	//
+	// -----------------------------------------------------------------------
+
+	AbsDataCollector* odc = new DataCollector();
+	odc->InitBase(new ObjectCollector());
+	
+	AbsDataCollector::instance = odc;
+}
+
+
+void DataCollector::WriteSystemInfo() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a new instance of the data collector
+	//	Set the oval and sc document references
+	//	Add the System info for this platform
+	//
+	// -----------------------------------------------------------------------
+
+	SystemInfo* systemInfo = SystemInfoCollector::CollectSystemInfo();
+	systemInfo->Write(DocumentManager::GetSystemCharacterisitcsDocument());
+}
+
+
+
+


Property changes on: trunk/ovaldi/src/linux/DataCollector.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/linux/DataCollector.h
===================================================================
--- trunk/ovaldi/src/linux/DataCollector.h	                        (rev 0)
+++ trunk/ovaldi/src/linux/DataCollector.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,56 @@
+//
+// $Id: DataCollector.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef DATACOLLECTOR_H
+#define DATACOLLECTOR_H
+
+#include "AbsDataCollector.h"
+#include "ObjectCollector.h"
+#include "SystemInfo.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	The linux specific data collector
+*/
+class DataCollector : public AbsDataCollector {
+public:
+	~DataCollector();
+
+	static void Init();
+
+protected:
+	DataCollector();
+	void WriteSystemInfo();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/linux/DataCollector.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/linux/FileFinder.cpp
===================================================================
--- trunk/ovaldi/src/linux/FileFinder.cpp	                        (rev 0)
+++ trunk/ovaldi/src/linux/FileFinder.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,461 @@
+//
+// $Id: FileFinder.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "FileFinder.h"
+
+FileFinder::FileFinder() {
+
+}
+
+FileFinder::~FileFinder() {
+
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+
+StringVector* FileFinder::ProcessPathBehaviors(StringVector* paths, BehaviorVector* behaviors) {
+	
+	// Process the behaviors to identify any additional paths.
+	// initialize these default values based on the defaults 
+	// set in the oval definitions schema
+	string recurseDirection = Behavior::GetBehaviorValue(behaviors, "recurse_direction");
+	if(recurseDirection.compare("") == 0) {
+		recurseDirection = "none";
+	}
+
+	string maxDepthStr = Behavior::GetBehaviorValue(behaviors, "max_depth");
+	int maxDepth = -1;
+	if(maxDepthStr.compare("") != 0) {
+		maxDepth = atoi(maxDepthStr.c_str());
+		if(maxDepth < -1) 
+			maxDepth = -1;
+	}
+
+	string recurseStr = Behavior::GetBehaviorValue(behaviors, "recurse");
+	if(recurseStr.compare("") != 0) {
+		throw ProbeException("Unsupported behavior: recurse");
+	}
+
+	string recurse_file_systemStr = Behavior::GetBehaviorValue(behaviors, "recurse_file_system");
+	if(recurse_file_systemStr.compare("") != 0) {
+		throw ProbeException("Unsupported behavior: recurse_file_system");
+	}
+
+
+	// only need to address recurseDirection up & down if maxDepth is not 0
+	StringVector* behaviorPaths = new StringVector();
+	if(recurseDirection.compare("up") == 0 && maxDepth != 0) {
+		StringVector::iterator path;
+		for(path = paths->begin(); path != paths->end(); path++) {
+			this->UpwardPathRecursion(behaviorPaths, (*path), maxDepth);
+		}
+
+	} else if(recurseDirection.compare("down") == 0 && maxDepth != 0) {
+		StringVector::iterator path;
+		for(path = paths->begin(); path != paths->end(); path++) {
+			this->DownwardPathRecursion(behaviorPaths, (*path), maxDepth);
+		}
+	}
+
+	return behaviorPaths;
+}
+
+void FileFinder::FindPaths(string regex, StringVector* paths, bool isRegex) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//	Search the file system for paths that match the provided regex.
+	//	Attempt to break off a constant portion of the path to spead up searching
+	// -----------------------------------------------------------------------
+
+	string fileName = "";
+
+	string patternOut= "";
+	string constPortion= "";
+	string fileSeperatorStr = "";
+	fileSeperatorStr+=Common::fileSeperator;
+	this->fileMatcher->GetConstantPortion(regex, fileSeperatorStr, &patternOut, &constPortion);
+	// Remove extra slashes
+	constPortion = this->fileMatcher->RemoveExtraSlashes(constPortion);
+
+	// Found a constant portion
+	if(constPortion.compare("") != 0 && patternOut.compare("") != 0) {
+
+		//	Call search function
+		this->GetPathsForPattern(constPortion, regex, paths, isRegex);
+
+	//	No constant portion.
+	} else if(constPortion.compare("") == 0) { 
+		
+		try  {
+
+			this->GetPathsForPattern(fileSeperatorStr, regex, paths, isRegex);
+
+		} catch(REGEXException ex) {
+			if(ex.GetSeverity() == ERROR_WARN) {
+				string pcreMsg = "";
+				pcreMsg.append("Filefinder Warning - while searching for matching files:\n");
+				pcreMsg.append("-----------------------------------------------------------------------\n");
+				pcreMsg.append(ex.GetErrorMessage());
+				Log::Debug(pcreMsg);
+			} else {
+				throw;
+			}		
+		}
+
+	} else if(patternOut.compare("") == 0) {
+
+		//	There are no pattern matching chars treat this as a normal path 
+		if(this->PathExists(constPortion)) {
+			paths->push_back(constPortion);
+		}
+	}
+
+}
+
+void FileFinder::GetPathsForPattern(string dirIn, string pattern, StringVector *pathVector, bool isRegex) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  This function gets all paths that match a given pattern.
+	//	This does call itself recursively as it must search all sub directories of dirIn.
+	//	If a match is found the path is pushed on to a vector of strings.
+	//
+	// -----------------------------------------------------------------------
+
+	try {
+
+		struct stat statbuf;
+		struct dirent *dirp;
+		DIR *dp;
+		string tmp = "";
+
+		//	Call stat 
+		if(lstat(dirIn.c_str(), &statbuf) < 0) {
+			//if(errno == ENOTDIR) {
+			//	throw ProbeException("A component of the path prefix is not a directory.");
+			//} else if(errno == ENAMETOOLONG) {
+			//	throw ProbeException("A component of a pathname exceeded {NAME_MAX} characters, or an entire path name exceeded {PATH_MAX} characters.");		
+			//} else if(errno == EACCES) {
+			//	throw ProbeException("Search permission is denied for a component of the path prefix.");
+			//} else if(errno == ELOOP) {
+			//	throw ProbeException("Too many symbolic links were encountered in translating the pathname.");
+			//} else if(errno == EFAULT) {
+			//	throw ProbeException("Sb or name points to an invalid address.");
+			//} else if(errno == EIO) {	
+			//	throw ProbeException("An I/O error occurred while reading from or writing to the file system.");
+			//} else if(errno == ENOENT) {
+			//	// does not exist
+			//}
+
+			return; 
+		}
+
+		// only consider dirs
+		if(S_ISDIR(statbuf.st_mode) == 1) {
+
+			// record it if it matches the regex.
+			if(this->IsMatch(pattern.c_str(), dirIn.c_str(), isRegex))
+				pathVector->push_back(dirIn);
+
+			//	Append a '/'
+			if(dirIn.at(dirIn.length()-1) != Common::fileSeperator)
+				dirIn.append("/");
+
+			//	Open the directory
+			dp = opendir(dirIn.c_str());
+			if(dp == NULL) {
+				//	Error opening directory
+				//	not sure this error matters
+				// cout << "Failed to open the directory" << endl;
+				return;
+			}
+
+			//	Loop through all names in the directory and make recursive call
+			while((dirp = readdir(dp)) != NULL) {
+				//	Ignore dot and dot-dot
+				if(strcmp(dirp->d_name, ".") == 0 || strcmp(dirp->d_name, "..") == 0)
+					continue;
+
+				//	append the name after the "/"
+				tmp = dirIn;
+				tmp.append(dirp->d_name);
+
+				// Nake recursive call
+				GetPathsForPattern(tmp, pattern, pathVector, isRegex);
+			}
+
+
+			//	Close the directory
+			if(closedir(dp) < 0) {
+				//	Error closing the directory
+				//	not sure this error matters
+				// cout << "Failed to close the directory" << endl;
+				return;
+			}
+		}
+
+	//	Just need to ensure that all exceptions have a nice message. 
+	//	So rethrow the exceptions I created catch the others and format them.
+	} catch(Exception ex) {
+		throw;
+	} catch(...) {
+
+		string errorMessage = "";
+		errorMessage.append("Error: ");
+		errorMessage.append("An unspecified error was encountered while trying to search for matching paths. \n\tDirectory: ");
+		errorMessage.append(dirIn);
+		errorMessage.append("\n\tPattern: ");
+		errorMessage.append(pattern);
+		throw FileFinderException(errorMessage);
+	}
+}
+
+void FileFinder::GetFilesForPattern(string path, string pattern, StringVector* fileNames, bool isRegex) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  This function gets all file names that match a given pattern on the spaecified path.
+	//	If a match is found the filename is pushed on to a vector of strings.
+	//
+	// -----------------------------------------------------------------------
+
+	try {
+
+		// Verify that the path that was passed into this function ends with a slash.  If
+		// it doesn't, then add one.
+		if (path[path.length()-1] != Common::fileSeperator)
+			path.append(1, Common::fileSeperator);
+
+		//	Open the directory
+		DIR *dp = opendir(path.c_str());
+		if(dp == NULL) {
+			string errorMessage = "Error opening directory. Directory: " + path;
+			throw FileFinderException(errorMessage);
+		}
+
+		//	Loop through all names in the directory
+		struct dirent *dirp;
+		while((dirp = readdir(dp)) != NULL) {
+			//	Ignore dot and dot-dot
+			if(strcmp(dirp->d_name, ".") == 0 || strcmp(dirp->d_name, "..") == 0)
+				continue;
+
+			//	Call stat 
+			struct stat statbuf;
+			string filepath = path;
+			filepath.append(dirp->d_name);
+			if(lstat(filepath.c_str(), &statbuf) < 0) {
+				//if(errno == ENOTDIR) {
+				//	throw ProbeException("A component of the path prefix is not a directory.");
+				//} else if(errno == ENAMETOOLONG) {
+				//	throw ProbeException("A component of a pathname exceeded {NAME_MAX} characters, or an entire path name exceeded {PATH_MAX} characters.");		
+				//} else if(errno == EACCES) {
+				//	throw ProbeException("Search permission is denied for a component of the path prefix.");
+				//} else if(errno == ELOOP) {
+				//	throw ProbeException("Too many symbolic links were encountered in translating the pathname.");
+				//} else if(errno == EFAULT) {
+				//	throw ProbeException("Sb or name points to an invalid address.");
+				//} else if(errno == EIO) {	
+				//	throw ProbeException("An I/O error occurred while reading from or writing to the file system.");
+				//} else if(errno == ENOENT) {
+				//	throw ProbeException("Does not exist");
+				//}
+				// no errors to report
+			}
+
+			//	If not a directory check if a match
+			if(S_ISREG(statbuf.st_mode) == 0) {
+				string fileName = dirp->d_name;
+				if(this->IsMatch(pattern, fileName, isRegex))
+					fileNames->push_back(fileName);
+			}
+		}
+
+		//	Close the directory
+		if(closedir(dp) < 0) {
+			//	Error closing the directory
+			//	not sure this error matters
+			// cout << "Failed to close the directory" << endl;
+			return;
+		}
+
+	//	Just need to ensure that all exceptions have a nice message. 
+	//	So rethrow the exceptions I created catch the others and format them.
+	} catch(Exception ex) {
+
+		throw;
+
+	} catch(...) {
+
+		string errorMessage = "";
+		errorMessage.append("Error: ");
+		errorMessage.append("An unspecified error was encountered while trying to search for matching paths. \n\tDirectory: ");
+		errorMessage.append(path);
+		errorMessage.append("\n\tPattern: ");
+		errorMessage.append(pattern);
+		throw FileFinderException(errorMessage);
+	}
+}
+
+bool FileFinder::PathExists(string path) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  Return true if the specified path exists.
+	//
+	// -----------------------------------------------------------------------
+
+	bool exists = false;
+
+	// Verify that the path that was passed into this function ends with a slash.  If
+	// it doesn't, then add one.
+	if (path[path.length()-1] != Common::fileSeperator)
+		path.append(1, Common::fileSeperator);
+
+	//	Open the directory
+	DIR *dp = opendir(path.c_str());
+	if(dp != NULL) {
+		exists = true;
+		closedir(dp);	
+	}
+
+	return exists;
+}
+
+bool FileFinder::FileNameExists(string path, string fileName) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  Return true if the specified file exists on the specifeid path.
+	//
+	// -----------------------------------------------------------------------
+
+	bool exists = false;
+
+	// Verify that the path that was passed into this function ends with a slash.  If
+	// it doesn't, then add one.
+	if (path[path.length()-1] != Common::fileSeperator)
+		path.append(1, Common::fileSeperator);
+
+	//	Call stat 
+	struct stat statbuf;
+	string filepath = path + fileName;
+	if(stat(filepath.c_str(), &statbuf) == 0) {
+		exists = true;
+	}
+
+	return exists;
+}
+
+StringVector* FileFinder::GetChildDirectories(string path) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  This function returns the set of child directories in the specified directory.
+	//	The caller is responsible for deleting the StringVector* of child paths.
+	//
+	// -----------------------------------------------------------------------
+
+	StringVector* childDirs = new StringVector();
+	try {
+
+		struct stat statbuf;
+		struct dirent *dirp;
+		DIR *dp;
+
+		//	Call stat 
+		if(lstat(path.c_str(), &statbuf) < 0) {
+			// dir does not exist
+			return childDirs; 
+		}
+
+		// only consider dirs
+		if(S_ISDIR(statbuf.st_mode) == 1) {
+
+			//	Append a '/'
+			if(path.at(path.length()-1) != Common::fileSeperator)
+				path.append("/");
+
+			//	Open the directory
+			dp = opendir(path.c_str());
+			if(dp == NULL) {
+				//	Error opening directory
+				//	not sure this error matters
+				// cout << "Failed to open the directory" << endl;
+				return childDirs;
+			}
+
+			//	Loop through all names in the directory and make recursive call
+			while((dirp = readdir(dp)) != NULL) {
+				//	Ignore dot and dot-dot
+				if(strcmp(dirp->d_name, ".") == 0 || strcmp(dirp->d_name, "..") == 0)
+					continue;
+
+				//	append the name after the "/"
+				string childDir = path;	
+				childDir.append(dirp->d_name);
+				
+				childDirs->push_back(childDir);
+			}
+
+
+			//	Close the directory
+			if(closedir(dp) < 0) {
+				//	Error closing the directory
+				//	not sure this error matters
+				// cout << "Failed to close the directory" << endl;
+				return childDirs;
+			}
+		}
+
+	//	Just need to ensure that all exceptions have a nice message. 
+	//	So rethrow the exceptions I created catch the others and format them.
+	} catch(Exception ex) {
+		throw;
+	} catch(...) {
+
+		string errorMessage = "";
+		errorMessage.append("Error: An unspecified error was encountered while trying to get child directories. Parent Directory: ");
+		errorMessage.append(path);
+		throw FileFinderException(errorMessage);
+	}
+
+	return childDirs;
+}


Property changes on: trunk/ovaldi/src/linux/FileFinder.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/linux/FileFinder.h
===================================================================
--- trunk/ovaldi/src/linux/FileFinder.h	                        (rev 0)
+++ trunk/ovaldi/src/linux/FileFinder.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,74 @@
+//
+// $Id: FileFinder.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef FILEFINDER_H
+#define FILEFINDER_H
+
+#include "AbsFileFinder.h"
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <time.h>
+
+#include <dirent.h>
+#include <limits.h>
+
+using namespace std;
+
+/**
+	This class is the linux file searching implmentation used by this application
+*/
+class FileFinder : public AbsFileFinder {
+public:
+	FileFinder();
+	~FileFinder();
+
+private:
+	/** Return the set of matching paths after applying behaviors.
+	    The only defined behaviors for unix files are:
+		recurse_direction, max_depth, recurse, and recurse_file_system
+		Currently only recurse_direction and max_depth are implemented.
+	*/
+	StringVector* ProcessPathBehaviors(StringVector* paths, BehaviorVector* behaviors);
+
+	bool PathExists(string path);
+	bool FileNameExists(string path, string fileName);
+	void FindPaths(string regex, StringVector* paths, bool isRegex = true);
+	void GetFilesForPattern(string path, string pattern, StringVector* fileNames, bool isRegex = true);
+	void GetPathsForPattern(string dirIn, string pattern, StringVector* pathVector, bool isRegex = true);	
+	/** Get the full path of all child directories as a StringVector. 
+	    The caller is responsible for deleting the StringVector* of child paths.
+	*/
+	StringVector* GetChildDirectories(string path);
+};
+
+#endif


Property changes on: trunk/ovaldi/src/linux/FileFinder.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/linux/ObjectCollector.cpp
===================================================================
--- trunk/ovaldi/src/linux/ObjectCollector.cpp	                        (rev 0)
+++ trunk/ovaldi/src/linux/ObjectCollector.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,109 @@
+//
+// $Id: ObjectCollector.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "ObjectCollector.h"
+
+//****************************************************************************************//
+//								DataCollector Class										  //	
+//****************************************************************************************//
+
+ObjectCollector::ObjectCollector() : AbsObjectCollector() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Initialize the instance of the oval object collector
+	// -----------------------------------------------------------------------
+	
+	AbsObjectCollector::instance = this;
+}
+
+ObjectCollector::~ObjectCollector() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Nothing for now
+	// -----------------------------------------------------------------------
+	
+	ProbeFactory::Shutdown();
+}
+
+// ***************************************************************************************	//
+//								Public members												//
+// ***************************************************************************************	//
+bool ObjectCollector::IsApplicable(AbsObject* object) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return true if the specified object is applicable to this object 
+	//	collector. All objects defined in the linux, unix, or independent schemas
+	//	are applicable
+	// -----------------------------------------------------------------------
+
+	bool isApplicable = false;
+
+	if(object->GetXmlns().find("linux") != string::npos) {
+		isApplicable = true;
+	} else if(object->GetXmlns().find("unix") != string::npos) {
+		isApplicable = true;
+	} else if(object->GetXmlns().find("independent") != string::npos) {
+		isApplicable = true;
+	}
+
+	return isApplicable;
+}
+
+bool ObjectCollector::IsSupported(AbsObject* object) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return true if the specified object is supported by this object 
+	//	collector. 
+	// -----------------------------------------------------------------------
+
+	bool isSupported = false;
+
+	if(ProbeFactory::GetProbe(object->GetName()) != NULL) {
+		isSupported = true;
+	}
+
+	return isSupported;
+}
+
+AbsProbe* ObjectCollector::GetProbe(Object* object) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return true if the specified object is supported to this object 
+	//	collector
+	// -----------------------------------------------------------------------
+
+	return ProbeFactory::GetProbe(object->GetName());
+}


Property changes on: trunk/ovaldi/src/linux/ObjectCollector.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/linux/ObjectCollector.h
===================================================================
--- trunk/ovaldi/src/linux/ObjectCollector.h	                        (rev 0)
+++ trunk/ovaldi/src/linux/ObjectCollector.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,58 @@
+//
+// $Id: ObjectCollector.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef OBJECTCOLLECTOR_H
+#define OBJECTCOLLECTOR_H
+
+//	include the parent class.
+#include "AbsObjectCollector.h"
+#include "ProbeFactory.h"
+
+//	namespaces
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	The object collector for linux definitions.
+*/
+class ObjectCollector : public AbsObjectCollector {
+public:
+
+	ObjectCollector();
+	~ObjectCollector();
+
+protected:
+	bool IsApplicable(AbsObject* object);
+	bool IsSupported(AbsObject* object);
+	AbsProbe* GetProbe(Object* object);
+};
+
+#endif


Property changes on: trunk/ovaldi/src/linux/ObjectCollector.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/linux/ProbeFactory.cpp
===================================================================
--- trunk/ovaldi/src/linux/ProbeFactory.cpp	                        (rev 0)
+++ trunk/ovaldi/src/linux/ProbeFactory.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,136 @@
+//
+// $Id: ProbeFactory.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "ProbeFactory.h"
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+AbsProbe* ProbeFactory::GetProbe(string objectName) {
+
+	AbsProbe* probe = NULL;
+
+// here are the objects defined in the independent schema
+	if(objectName.compare("family_object") == 0) {
+		probe = FamilyProbe::Instance();
+	} else if(objectName.compare("filemd5_object") == 0) {
+		probe = FileMd5Probe::Instance();
+	} else if(objectName.compare("filehash_object") == 0) {
+		probe = FileHashProbe::Instance();
+	} else if(objectName.compare("environmentvariable_object") == 0) {
+		probe = EnvironmentVariableProbe::Instance();
+	} else if(objectName.compare("textfilecontent_object") == 0) {
+		probe = TextFileContentProbe::Instance();
+	} else if(objectName.compare("variable_object") == 0) {
+		probe = VariableProbe::Instance();
+	} else if(objectName.compare("xmlfilecontent_object") == 0) {
+		probe = XmlFileContentProbe::Instance();
+
+// here are the objects defined in the unix schema
+	} else if(objectName.compare("file_object") == 0) {
+		probe = FileProbe::Instance();	
+	} else if(objectName.compare("inetd_object") == 0) {
+		// Not currently implemented for any unix systems
+	} else if(objectName.compare("interface_object") == 0) {
+		// Not currently implemented for any unix systems
+	} else if(objectName.compare("password_object") == 0) {
+		// Not currently implemented for any unix systems
+	} else if(objectName.compare("process_object") == 0) {
+		probe = ProcessProbe::Instance();
+	} else if(objectName.compare("runlevel_object") == 0) {
+		// Not currently implemented for any unix systems
+	} else if(objectName.compare("sccs_object") == 0) {
+		// Not currently implemented for any unix systems
+	} else if(objectName.compare("shadow_object") == 0) {
+		// Not currently implemented for any unix systems
+	} else if(objectName.compare("uname_object") == 0) {
+		probe = UnameProbe::Instance();
+
+// here are the objects defined in the linux schema
+#ifdef PACKAGE_DPKG
+	} else if(objectName.compare("dpkginfo_object") == 0) {
+		probe = DPKGInfoProbe::Instance();
+#endif
+	} else if(objectName.compare("inetlisteningservers_object") == 0) {
+		probe = InetListeningServersProbe::Instance();
+#ifdef PACKAGE_RPM
+	} else if(objectName.compare("rpminfo_object") == 0) {
+		probe = RPMInfoProbe::Instance();
+#endif
+	}
+
+	return probe;
+}
+
+void ProbeFactory::Shutdown() {
+
+	AbsProbe* probe = NULL;
+
+	probe = FileProbe::Instance();
+	delete probe;
+
+	probe = UnameProbe::Instance();
+	delete probe;
+
+#ifdef PACKAGE_RPM
+ 	probe = RPMInfoProbe::Instance();
+ 	delete probe;
+#endif
+ 	
+#ifdef PACKAGE_DPKG
+ 	probe = DPKGInfoProbe::Instance();
+ 	delete probe;
+#endif
+
+	probe = ProcessProbe::Instance();
+	delete probe;
+
+	probe = InetListeningServersProbe::Instance();
+	delete probe;
+
+	probe = FamilyProbe::Instance();
+	delete probe;
+
+	probe = EnvironmentVariableProbe::Instance();
+	delete probe;
+
+	probe = VariableProbe::Instance();
+	delete probe;
+
+	probe = XmlFileContentProbe::Instance();
+	delete probe;
+
+	probe = TextFileContentProbe::Instance();
+	delete probe;
+
+	probe = FileHashProbe::Instance();
+	delete probe;
+}


Property changes on: trunk/ovaldi/src/linux/ProbeFactory.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/linux/ProbeFactory.h
===================================================================
--- trunk/ovaldi/src/linux/ProbeFactory.h	                        (rev 0)
+++ trunk/ovaldi/src/linux/ProbeFactory.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,95 @@
+//
+// $Id: ProbeFactory.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef PROBEFACTORY_H
+#define PROBEFACTORY_H
+
+#include <string>
+#include <vector>
+#include <iostream>
+#include <stdlib.h>
+
+#include "AbsDataCollector.h"
+
+
+//	include the probe classes
+#include "FileProbe.h"
+#include "FileMd5Probe.h"
+#include "FileHashProbe.h"
+#include "FamilyProbe.h"
+#include "UnameProbe.h"
+#ifdef PACKAGE_RPM
+ #include "RPMInfoProbe.h"
+#endif
+#ifdef PACKAGE_DPKG
+ #include "DPKGInfoProbe.h"
+#endif
+
+#include "InetListeningServersProbe.h"
+#include "ProcessProbe.h"
+//#include "ShadowProbe.h"
+//#include "InterfaceProbe.h"
+#include "EnvironmentVariableProbe.h"
+#include "XmlFileContentProbe.h"
+#include "TextFileContentProbe.h"
+#include "VariableProbe.h"
+
+using namespace std;
+
+class AbsProbe;
+
+/**
+	This class is a Factory class for getting probes for an object in an oval definitions file. 
+	Each object defined in the oval definition schema has a corresponding probe for data collection. 
+	This class provides uniform access to all probes in the application, and is responsible for determining
+	which probe to associate with a given object.
+
+	Each supported platform should implement its own ProbeFactory that manages the probes for that platform.
+
+	All Probes are singlestons.
+*/
+class ProbeFactory {
+
+public:
+	/**
+		Factory method. Based on the specifed object name return the appropriate probe.
+		@param objectName a string taht corresponds to the name of an object in the oval definition schema.
+		@return The probe for the specifed object or NULL.
+	*/
+	static AbsProbe* GetProbe(string objectName);
+
+	/** 
+		Shutdown the ProbeFactory.
+	*/
+	static void Shutdown();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/linux/ProbeFactory.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/linux/SystemInfo.cpp
===================================================================
--- trunk/ovaldi/src/linux/SystemInfo.cpp	                        (rev 0)
+++ trunk/ovaldi/src/linux/SystemInfo.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,380 @@
+//
+// $Id: SystemInfo.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "SystemInfo.h"
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~		Class SystemInfo		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+
+SystemInfo::SystemInfo() {
+	// -----------------------------------------------------------------------
+	//	ABSTRACT
+	//
+	//	Initialize data memebres
+	//
+	// -----------------------------------------------------------------------
+
+	os_name = "";
+	os_version = "";
+	architecture = "";
+	primary_host_name = "";
+}
+
+SystemInfo::~SystemInfo() {
+	// -----------------------------------------------------------------------
+	//	ABSTRACT
+	//
+	//	Delete all objects in the interfaces vector.
+	//
+	// -----------------------------------------------------------------------
+
+	IfData *tmp	= NULL;
+	while(interfaces.size() !=0) {
+
+		tmp = interfaces[interfaces.size()-1];
+		interfaces.pop_back();
+		delete tmp;
+		tmp = NULL;
+	}
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+
+void SystemInfo::Write(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *scDoc)
+{
+	//------------------------------------------------------------------------------------//
+	//
+	//  ABSTRACT
+	//
+	//	Write the system_info node to the sc file.
+	//------------------------------------------------------------------------------------//
+
+	//	Find the system_info node
+	DOMElement* sysInfoNode = XmlCommon::FindElement(scDoc, "system_info");
+
+	DOMElement* tmpElm = XmlCommon::CreateElement(scDoc, "os_name", os_name);
+	sysInfoNode->appendChild(tmpElm);
+
+	tmpElm = XmlCommon::CreateElement(scDoc, "os_version", os_version);
+	sysInfoNode->appendChild(tmpElm);
+
+	tmpElm = XmlCommon::CreateElement(scDoc, "architecture", architecture);
+	sysInfoNode->appendChild(tmpElm);
+
+	tmpElm = XmlCommon::CreateElement(scDoc, "primary_host_name", primary_host_name);
+	sysInfoNode->appendChild(tmpElm);
+
+	// Add the interfaces element and its children
+	DOMElement* interfacesElm = XmlCommon::CreateElement(scDoc, "interfaces");
+	sysInfoNode->appendChild(interfacesElm);
+
+	// Loop through contents of the interfaces vector and write each IfData objet
+	IfDataVector::iterator iterator;
+	for (iterator=interfaces.begin(); iterator!=interfaces.end(); iterator++) {
+
+		if((*iterator)->ipAddress.compare("127.0.0.1") != 0) {
+
+			// Create a new interface element
+			DOMElement* interfaceElm = XmlCommon::CreateElement(scDoc, "interface");
+			interfacesElm->appendChild(interfaceElm);
+
+			// Add the childer to the inerface element
+			tmpElm = XmlCommon::CreateElement(scDoc, "interface_name", (*iterator)->ifName);
+			interfaceElm->appendChild(tmpElm);
+			
+			tmpElm = XmlCommon::CreateElement(scDoc, "ip_address", (*iterator)->ipAddress);
+			interfaceElm->appendChild(tmpElm);
+
+			tmpElm = XmlCommon::CreateElement(scDoc, "mac_address", (*iterator)->macAddress);
+			interfaceElm->appendChild(tmpElm);
+		}
+	}
+}
+
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~		 Class SystemInfoCollector		~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+
+SystemInfo* SystemInfoCollector::CollectSystemInfo() {
+	//------------------------------------------------------------------------------------//
+	//
+	//  ABSTRACT
+	//
+	//  Run the system info collector. Return a SystemInfo object. 
+	//
+	//------------------------------------------------------------------------------------//
+
+	SystemInfo *sysInfo = new SystemInfo();
+	SystemInfoCollector::GetOSInfo(sysInfo);
+	sysInfo->interfaces = SystemInfoCollector::GetInterfaces();
+
+	return sysInfo;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+#define MAXHOSTNAMELENGTH 256
+void SystemInfoCollector::GetOSInfo(SystemInfo *sysInfo) {
+	//------------------------------------------------------------------------------------//
+	//
+	//  ABSTRACT
+	//
+	//  Get the OS name and version, the architecture, and the primary host name
+	//	for the system.
+	//
+	//------------------------------------------------------------------------------------/
+
+	struct utsname tmpName;
+	
+	if (uname(&tmpName) > -1) {
+		sysInfo->os_name = tmpName.sysname;
+		sysInfo->os_version = tmpName.version;
+		sysInfo->architecture = tmpName.machine;
+	} else {
+		// error
+		throw SystemInfoException("Error: Unable to get uname information.");
+	}
+
+	//////////////////////////////////////////////////////////
+	////////// Get fully qulaified host name     /////////////
+	//////////////////////////////////////////////////////////
+
+	// First make a call to gethostname()
+	string strHostName = "";
+	char *chHostName = (char*)malloc(sizeof(char*)*MAXHOSTNAMELENGTH);
+	int res = 0;
+	res = gethostname(chHostName, MAXHOSTNAMELENGTH);
+
+	if(res != 0)
+		throw SystemInfoException("Error: Unable to determine the host name.");
+
+	strHostName = chHostName;
+	// Next get the fqdn with a call to gethostbyname
+	struct hostent *hostData = NULL;
+	hostData = gethostbyname((const char*)chHostName); 
+	if(hostData == NULL)
+	  throw SystemInfoException("Error: Unable to get the fully qualified domain name.");
+	
+	// Process the hostData structure
+	sysInfo->primary_host_name = hostData->h_name;
+}
+
+IfDataVector SystemInfoCollector::GetInterfaces() {
+	//------------------------------------------------------------------------------------//
+	//
+	//  ABSTRACT
+	//
+	//  Create a vector of IfData objects that will represent all the available
+	//	interfaces on the system.
+	//
+	//	Must get interface_name, ip_address, and mac_address for each interface
+	//------------------------------------------------------------------------------------//
+
+	IfDataVector interfaces;
+	/*
+	struct ifconf conf;
+	struct sockaddr_in *s_in;
+	struct  sockaddr_in *hwAddr;
+	int sock, count;
+
+	// Open dummy socket
+	if((sock = socket(PF_INET, SOCK_DGRAM, 0)) == -1) {
+	  throw SystemInfoException("Error: Unable to open socket.");
+	}
+
+	// Get the list of devices - only gets 20
+	memset(&conf, 0, sizeof(conf));
+	conf.ifc_len = sizeof(struct ifreq) * 20;
+	conf.ifc_buf = (char*)malloc(conf.ifc_len);
+
+	if(ioctl(sock, SIOCGIFCONF, &conf) == -1) {
+	  throw SystemInfoException("Error: Unable to get a device list.");
+	}
+
+	count = conf.ifc_len/sizeof(struct ifreq);
+	for(int i = 0; i < count; i++) {
+	  IfData *tmpIfData = new IfData();
+	  s_in = (struct sockaddr_in*)&conf.ifc_req[i].ifr_addr;
+	  tmpIfData->ifName = conf.ifc_req[i].ifr_name;
+	  tmpIfData->ipAddress = inet_ntoa(s_in->sin_addr);
+
+	  hwAddr = (struct sockaddr_in*)&conf.ifc_req[i].ifr_hwaddr;
+	  tmpIfData->macAddress = inet_ntoa(hwAddr->sin_addr);
+
+	  tmpIfData->macAddress = " UNKNOWN ";
+	  
+	  interfaces.push_back(tmpIfData);
+	}
+
+	free(conf.ifc_buf);	  
+*/
+
+	/* here is the test sample code i found on the net
+	*/
+
+	unsigned char      *u;
+	int                sockfd, size  = 1;
+	struct ifreq       *ifr;
+	struct ifconf      ifc;
+	struct sockaddr_in sa;
+
+	if (0 > (sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP))) {
+	  throw SystemInfoException("Error: Unable to open socket.");
+	}	
+
+	ifc.ifc_len = IFRSIZE;
+	ifc.ifc_req = NULL;
+
+	do {
+	++size;
+	/* realloc buffer size until no overflow occurs  */
+
+		if (NULL == (ifc.ifc_req = (ifreq*)realloc(ifc.ifc_req, IFRSIZE))) {
+		  throw SystemInfoException("Error: Unable to allocate mememory.");
+		}
+		ifc.ifc_len = IFRSIZE;
+		if (ioctl(sockfd, SIOCGIFCONF, &ifc)) {
+		  throw SystemInfoException("Error: ioctl SIOCFIFCONF.");
+		}
+	} while  (IFRSIZE <= ifc.ifc_len);
+
+	ifr = ifc.ifc_req;
+
+	for (;(char *) ifr < (char *) ifc.ifc_req + ifc.ifc_len; ++ifr) {
+
+		if (ifr->ifr_addr.sa_data == (ifr+1)->ifr_addr.sa_data) {
+		  continue;  // duplicate, skip it
+		}
+
+		if (ioctl(sockfd, SIOCGIFFLAGS, ifr)) {
+		  continue;  // failed to get flags, skip it
+		}
+
+		//printf("Interface:  %s\n", ifr->ifr_name);
+		//printf("IP Address: %s\n", inet_ntoa(inaddrr(ifr_addr.sa_data)));
+		IfData *tmpIfData = new IfData();
+		tmpIfData->ifName = ifr->ifr_name;
+		tmpIfData->ipAddress = inet_ntoa(inaddrr(ifr_addr.sa_data));
+
+		if (0 == ioctl(sockfd, SIOCGIFHWADDR, ifr)) {
+
+			/* Select which  hardware types to process.
+			*
+			*    See list in system include file included from
+			*    /usr/include/net/if_arp.h  (For example, on
+			*    Linux see file /usr/include/linux/if_arp.h to
+			*    get the list.)
+			*/
+		  /* No used 
+			switch (ifr->ifr_hwaddr.sa_family) {
+
+				default:
+					printf("\n");
+					continue;
+				case  ARPHRD_NETROM:  case  ARPHRD_ETHER:  case  ARPHRD_PPP:
+				case  ARPHRD_EETHER:  case  ARPHRD_IEEE802: break;
+			}
+		  */
+
+		  
+			u = (unsigned char *) &ifr->ifr_addr.sa_data;
+			char *macStr = (char*)malloc(sizeof(char*)*128);
+			memset(macStr, 0, 128);
+			if (u[0] + u[1] + u[2] + u[3] + u[4] + u[5]) {
+			  //printf("HW Address: %2.2x.%2.2x.%2.2x.%2.2x.%2.2x.%2.2x\n", u[0], u[1], u[2], u[3], u[4], u[5]);
+			  sprintf(macStr, "%2.2x.%2.2x.%2.2x.%2.2x.%2.2x.%2.2x", u[0], u[1], u[2], u[3], u[4], u[5]); 
+			  tmpIfData->macAddress = macStr;
+			}
+			free(macStr);
+
+			interfaces.push_back(tmpIfData);
+		}
+
+		/* netmask 
+		if (0 == ioctl(sockfd, SIOCGIFNETMASK, ifr) && strcmp("255.255.255.255", inet_ntoa(inaddrr(ifr_addr.sa_data)))) {
+
+			printf("Netmask:    %s\n", inet_ntoa(inaddrr(ifr_addr.sa_data)));
+		}
+		*/
+
+		/* broadcast
+		if (ifr->ifr_flags & IFF_BROADCAST) {
+
+			if (0 == ioctl(sockfd, SIOCGIFBRDADDR, ifr) && strcmp("0.0.0.0", inet_ntoa(inaddrr(ifr_addr.sa_data)))) {
+				printf("Broadcast:  %s\n", inet_ntoa(inaddrr(ifr_addr.sa_data)));
+			}
+		}
+		*/
+		
+		/* MTU
+		if (0 == ioctl(sockfd, SIOCGIFMTU, ifr)) {
+
+			printf("MTU:        %u\n",  ifr->ifr_mtu);
+		}
+		*/
+
+		/* Metric
+		if (0 == ioctl(sockfd, SIOCGIFMETRIC, ifr)) {
+			printf("Metric:     %u\n",  ifr->ifr_metric);
+		}
+		printf("\n");
+		*/
+	}
+
+	close(sockfd);
+
+	/* end sample code from the net
+	*/
+
+	return interfaces;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~  Class SystemInfoException  ~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+SystemInfoException::SystemInfoException(string errMsgIn, int severity, Exception* ex) : Exception(errMsgIn, severity, ex) {
+	// Set the error message and then set the severity to ERROR_FATAL. This is done with
+	// the explicit call to the Exception class constructor that takes a single string
+	// param.
+}
+
+SystemInfoException::~SystemInfoException() {
+	// Do nothing for now
+}


Property changes on: trunk/ovaldi/src/linux/SystemInfo.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/linux/SystemInfo.h
===================================================================
--- trunk/ovaldi/src/linux/SystemInfo.h	                        (rev 0)
+++ trunk/ovaldi/src/linux/SystemInfo.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,144 @@
+//
+// $Id: SystemInfo.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef SYSTEMINFO_H
+#define SYSTEMINFO_H
+
+//	required xerces includes
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/DOMAttr.hpp>
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xercesc/dom/DOMNodeList.hpp>
+#include <xercesc/util/XMLString.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/parsers/AbstractDOMParser.hpp>
+
+#include "XmlCommon.h"
+#include "Common.h"
+#include "Exception.h"
+#include "Log.h"
+
+#ifdef LINUX
+#include <sys/sysinfo.h>
+#endif
+
+#include <sys/utsname.h>
+
+#include <unistd.h>
+
+#include <netdb.h>
+#include <sys/ioctl.h>
+#include <net/if.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+/* from net */
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
+#include <net/if_arp.h>
+#include <arpa/inet.h>
+
+#define inaddrr(x) (*(struct in_addr *) &ifr->x[sizeof sa.sin_port])
+#define IFRSIZE   ((int)(size * sizeof (struct ifreq)))
+/* end from net */
+
+#include <iostream>
+#include <string>
+#include <vector>
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	This class stores interface information as strings.
+	the interface name, mac address and ip address are stored.
+*/
+class IfData {
+public:
+	IfData(){};
+	~IfData(){};
+	IfData(string ifn, string ipAddr, string macAddr) : ifName(ifn), ipAddress(ipAddr), macAddress(macAddr) {}
+
+	string ifName;
+	string ipAddress;
+	string macAddress;
+};
+
+/**	
+	A vector for storing interface data dobjects. 
+	Stores only pointers to the objects. 
+*/
+typedef vector < IfData*, allocator<IfData*> > IfDataVector;
+
+/**
+	This class stores system info as defined in the oval system characteristics schema.
+	A write method is provide for writing out the system infor element as defined in the oval 
+	system characteristics schema.
+*/
+class SystemInfo {
+
+public:
+	SystemInfo();
+	~SystemInfo();
+	void Write(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *scDoc);
+		
+	string os_name;
+	string os_version;
+	string architecture;
+	string primary_host_name;
+	IfDataVector interfaces;
+};
+
+/**
+	This class is responsible for collecting system information.
+*/
+class SystemInfoCollector {
+	public:
+		static SystemInfo* CollectSystemInfo();
+		
+	private:
+		static void GetOSInfo(SystemInfo*);
+		static IfDataVector GetInterfaces();
+};
+
+/** 
+	This class represents an Exception that occured while collecting system info.
+*/
+class SystemInfoException : public Exception {
+	public:
+		SystemInfoException(string errMsgIn = "", int severity = ERROR_FATAL, Exception* ex = NULL);
+		~SystemInfoException();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/linux/SystemInfo.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/independent/EnvironmentVariableProbe.cpp
===================================================================
--- trunk/ovaldi/src/probes/independent/EnvironmentVariableProbe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/probes/independent/EnvironmentVariableProbe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,176 @@
+//
+// $Id: EnvironmentVariableProbe.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "EnvironmentVariableProbe.h"
+
+//****************************************************************************************//
+//								EnvironmentVariableProbe Class							  //	
+//****************************************************************************************//
+EnvironmentVariableProbe *EnvironmentVariableProbe::instance = NULL;
+
+EnvironmentVariableProbe::EnvironmentVariableProbe() {
+}
+
+EnvironmentVariableProbe::~EnvironmentVariableProbe() {
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AbsProbe* EnvironmentVariableProbe::Instance() {
+
+	// Use lazy initialization
+	if(instance == NULL) 
+		instance = new EnvironmentVariableProbe();
+
+	return instance;	
+}
+
+ItemVector* EnvironmentVariableProbe::CollectItems(Object *object) {
+	ItemVector *collectedItems = new ItemVector();
+
+	// get the name from the provided object
+	ObjectEntity* name = object->GetElementByName("name");
+
+	// check datatypes - only allow string
+	if(name->GetDatatype() != OvalEnum::DATATYPE_STRING) {
+		throw ProbeException("Error: invalid data type specified on name. Found: " + OvalEnum::DatatypeToString(name->GetDatatype()));
+	}
+
+	// check operation - only allow  equals, not equals and pattern match
+	if(name->GetOperation() != OvalEnum::OPERATION_EQUALS && name->GetOperation() != OvalEnum::OPERATION_PATTERN_MATCH && name->GetOperation() != OvalEnum::OPERATION_NOT_EQUAL) {
+		throw ProbeException("Error: invalid operation specified on name. Found: " + OvalEnum::OperationToString(name->GetOperation()));
+	}
+
+	if(name->GetVarRef() == NULL) {
+		if(name->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			char * envValue = getenv(name->GetValue().c_str());
+
+			//	Check the value 
+			if(envValue != NULL) {
+				Item* item = this->CreateItem();
+				item->SetStatus(OvalEnum::STATUS_EXISTS);
+				item->AppendElement(new ItemEntity("name", name->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+				item->AppendElement(new ItemEntity("value", envValue, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+				collectedItems->push_back(item);
+			} else {
+				Item* item = this->CreateItem();
+				item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+				item->AppendElement(new ItemEntity("name", name->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+				collectedItems->push_back(item);
+			}
+		} else {			
+			StringPairVector* envs = this->GetAllEnvs();
+
+			// loop through all envs if they are a regex match on name create item an return it
+			StringPairVector::iterator iterator;
+			for(iterator = envs->begin(); iterator != envs->end(); iterator++) {
+				string first = (*iterator)->first;
+				if(name->GetOperation() == OvalEnum::OPERATION_NOT_EQUAL) {
+					if(name->GetValue().compare(first) != 0) {
+						string second = (*iterator)->second;
+						Item* item = this->CreateItem();
+						item->SetStatus(OvalEnum::STATUS_EXISTS);
+						item->AppendElement(new ItemEntity("name", first, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+						item->AppendElement(new ItemEntity("value", second, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+						collectedItems->push_back(item);
+					}
+				} else {
+					if(this->myMatcher->IsMatch(name->GetValue().c_str(), first.c_str())) {
+						string second = (*iterator)->second;
+						Item* item = this->CreateItem();
+						item->SetStatus(OvalEnum::STATUS_EXISTS);
+						item->AppendElement(new ItemEntity("name", first, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+						item->AppendElement(new ItemEntity("value", second, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+						collectedItems->push_back(item);
+					}
+				}
+				
+			}
+			delete envs;
+		}
+	} else {
+		StringPairVector* envs = this->GetAllEnvs();
+
+	
+		// loop through all envs on the system
+		// only keep envs that match operation and value and var check
+		StringPairVector::iterator it;
+		for(it = envs->begin(); it != envs->end(); it++) {
+			ItemEntity* tmp = new ItemEntity("name", (*it)->first, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS);
+			if(name->Analyze(tmp) == OvalEnum::RESULT_TRUE) {
+				Item* item = this->CreateItem();
+				item->SetStatus(OvalEnum::STATUS_EXISTS);
+				item->AppendElement(new ItemEntity("name", (*it)->first, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+				item->AppendElement(new ItemEntity("value", (*it)->second, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+				collectedItems->push_back(item);
+			}
+			delete tmp;
+			tmp = NULL;
+		}
+		delete envs;
+	}
+
+	return collectedItems;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+Item* EnvironmentVariableProbe::CreateItem() {
+
+	Item* item = new Item(0, 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#independent", 
+						"ind-sc", 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#independent independent-system-characteristics-schema.xsd", 
+						OvalEnum::STATUS_ERROR, 
+						"environmentvariable_item");
+
+	return item;
+}
+
+StringPairVector* EnvironmentVariableProbe::GetAllEnvs() {
+	
+	StringPairVector* envs = new StringPairVector();
+
+	unsigned int i = 0;
+	while(_environ[i] != NULL) {
+		string strVarAndValue = _environ[i++];
+		unsigned int eq = strVarAndValue.find("=", 0);
+		string name = strVarAndValue.substr(0, eq);
+		string value = strVarAndValue.substr(eq+1, strVarAndValue.length()-eq);
+		StringPair* pair = new StringPair();
+		pair->first = name;
+		pair->second = value;
+		envs->push_back(pair);
+	} 
+	return envs;
+}


Property changes on: trunk/ovaldi/src/probes/independent/EnvironmentVariableProbe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/independent/EnvironmentVariableProbe.h
===================================================================
--- trunk/ovaldi/src/probes/independent/EnvironmentVariableProbe.h	                        (rev 0)
+++ trunk/ovaldi/src/probes/independent/EnvironmentVariableProbe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,68 @@
+//
+// $Id: EnvironmentVariableProbe.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+#ifndef ENVIRONMENTVARIABLEPROBE_H
+#define ENVIRONMENTVARIABLEPROBE_H
+
+#include "AbsProbe.h"
+
+#include <stdlib.h>
+
+using namespace std;
+
+extern char ** _environ; 
+
+/**
+	This class is responsible for collecting enviroment variable data.
+	This class should be platform independent.
+*/
+class EnvironmentVariableProbe : public AbsProbe {
+public:
+	~EnvironmentVariableProbe();
+	
+	/** Run the environment variable probe */
+	ItemVector* CollectItems(Object* object);
+
+	/**  */
+	Item* CreateItem();
+
+	/** Ensure that the EnvironmentVariableProbe is a singleton. */
+	static AbsProbe* Instance();
+	
+private:
+	EnvironmentVariableProbe();
+	/** Get all the environment variables currently defined. */
+	StringPairVector* GetAllEnvs();
+	/** The static instance of the EnvironmentVariableProbe. 
+	All Probes are singletons. The ProbeFactory is responsible for managing instances of Probes. */
+	static EnvironmentVariableProbe *instance;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/probes/independent/EnvironmentVariableProbe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/independent/FamilyProbe.cpp
===================================================================
--- trunk/ovaldi/src/probes/independent/FamilyProbe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/probes/independent/FamilyProbe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,92 @@
+//
+// $Id: FamilyProbe.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "FamilyProbe.h"
+
+//****************************************************************************************//
+//								FamilyProbe Class										  //	
+//****************************************************************************************//
+FamilyProbe *FamilyProbe::instance = NULL;
+
+FamilyProbe::FamilyProbe() {
+
+	#if WIN32
+		myFamily = "windows";
+	#elif LINUX
+		myFamily = "unix";
+	#elif SUNOS
+		myFamily = "unix";
+	#else
+		myFamily = "error";
+	#endif
+}
+
+FamilyProbe::~FamilyProbe() {
+
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AbsProbe* FamilyProbe::Instance() {
+
+	// Use lazy initialization
+	if(instance == NULL) 
+		instance = new FamilyProbe();
+
+	return instance;	
+}
+
+ItemVector* FamilyProbe::CollectItems(Object *object) {
+	ItemVector *collectedItems = new ItemVector();
+
+	Item* item = this->CreateItem();
+	item->SetStatus(OvalEnum::STATUS_EXISTS);
+	item->AppendElement(new ItemEntity("family", this->myFamily, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+	collectedItems->push_back(item);
+
+	return collectedItems;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+Item* FamilyProbe::CreateItem() {
+
+	Item* item = new Item(0, 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#independent", 
+						"ind-sc", 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#independent independent-system-characteristics-schema.xsd", 
+						OvalEnum::STATUS_ERROR, 
+						"family_item");
+
+	return item;
+}


Property changes on: trunk/ovaldi/src/probes/independent/FamilyProbe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/independent/FamilyProbe.h
===================================================================
--- trunk/ovaldi/src/probes/independent/FamilyProbe.h	                        (rev 0)
+++ trunk/ovaldi/src/probes/independent/FamilyProbe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,63 @@
+//
+// $Id: FamilyProbe.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+#ifndef FAMILYPROBE_H
+#define FAMILYPROBE_H
+
+#include "AbsProbe.h"
+
+using namespace std;
+
+/**
+	This class is resposible for determing family information for the windows platform.
+*/
+class FamilyProbe : public AbsProbe {
+public:
+	~FamilyProbe();
+	
+	/** Run the FamilyProbe */
+	ItemVector* CollectItems(Object* object);
+
+	/** Return a new Item created for storing family information. */
+	Item* CreateItem();
+
+	/** Ensure that the FamilyProbe is a singleton. */
+	static AbsProbe* Instance();
+
+private:
+	/** sets the family at compile time. **/
+	FamilyProbe();
+
+	static FamilyProbe *instance;
+
+	string myFamily;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/probes/independent/FamilyProbe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/independent/FileHashProbe.cpp
===================================================================
--- trunk/ovaldi/src/probes/independent/FileHashProbe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/probes/independent/FileHashProbe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,225 @@
+//
+// $Id: FileHashProbe.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "FileHashProbe.h"
+
+//****************************************************************************************//
+//								FileHashProbe Class										  //	
+//****************************************************************************************//
+FileHashProbe* FileHashProbe::instance = NULL;
+
+FileHashProbe::FileHashProbe() {
+
+}
+
+FileHashProbe::~FileHashProbe() {
+
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AbsProbe* FileHashProbe::Instance() {
+
+	// Use lazy initialization
+	if(instance == NULL) 
+		instance = new FileHashProbe();
+
+	return instance;	
+}
+
+ItemVector* FileHashProbe::CollectItems(Object* object) {
+
+	ItemVector *collectedItems = new ItemVector();
+
+	// get the path and file name
+	ObjectEntity* path = object->GetElementByName("path");
+	ObjectEntity* fileName = object->GetElementByName("filename");
+
+	FileFinder fileFinder;
+	StringPairVector* filePaths = fileFinder.SearchFiles(path, fileName, object->GetBehaviors());
+
+	if(filePaths->size() > 0) {
+		// Loop through all file paths
+		StringPairVector::iterator iterator;
+		for(iterator = filePaths->begin(); iterator != filePaths->end(); iterator++) {
+
+			StringPair* fp = (*iterator);
+
+			if(fp->second.compare("") == 0) {
+
+				Item* item = NULL;
+
+				// check if the code should report that the filename does not exist.
+				StringVector fileNames;
+				if(fileFinder.ReportFileNameDoesNotExist(fp->first, fileName, &fileNames)) {
+					StringVector::iterator iterator;
+					for(iterator = fileNames.begin(); iterator != fileNames.end(); iterator++) {
+
+						item = this->CreateItem();
+						item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+						item->AppendElement(new ItemEntity("path", fp->first, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+						item->AppendElement(new ItemEntity("filename", (*iterator), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+						collectedItems->push_back(item);
+					}
+					
+				} else {
+
+					item = this->CreateItem();
+					item->SetStatus(OvalEnum::STATUS_EXISTS);
+					item->AppendElement(new ItemEntity("path", fp->first, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+					collectedItems->push_back(item);
+
+				}
+
+			} else {
+
+				// build the path string
+				string filePath = fp->first;
+				if(filePath[filePath.length()-1] != Common::fileSeperator)
+					filePath.append(1, Common::fileSeperator);
+
+				if(fp->second[0] != Common::fileSeperator) {
+					filePath.append(fp->second);
+				} else {
+					filePath.append(fp->second.substr(1, fp->second.length()-2));
+				}
+
+				// create a new item
+				Item *item = NULL;
+				item = this->CreateItem();
+				item->SetStatus(OvalEnum::STATUS_EXISTS);
+				item->AppendElement(new ItemEntity("path", fp->first, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+				item->AppendElement(new ItemEntity("filename", fp->second, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+
+				// call the hashing functions
+				this->GetMd5(filePath, item);
+				this->GetSha1(filePath, item);
+
+				if(item != NULL) {
+					collectedItems->push_back(item);
+				}
+				item = NULL;
+
+			}
+
+			delete fp;
+		}
+
+	} else {
+		// if no filepaths check if the code should report that the path does not exist
+		StringVector paths;
+		if(fileFinder.ReportPathDoesNotExist(path, &paths)) {
+
+			Item* item = NULL;
+			StringVector::iterator iterator;
+			for(iterator = paths.begin(); iterator != paths.end(); iterator++) {
+
+				item = this->CreateItem();
+				item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+				item->AppendElement(new ItemEntity("path", (*iterator), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+				collectedItems->push_back(item);
+			}
+		}
+	}
+	delete filePaths;
+
+	return collectedItems;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+Item* FileHashProbe::CreateItem() {
+
+	Item* item = new Item(0, 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#independent", 
+						"ind-sc", 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#independent independent-system-characteristics-schema.xsd", 
+						OvalEnum::STATUS_ERROR, 
+						"filehash_item");
+
+	return item;
+}
+
+void FileHashProbe::GetMd5(string filePath, Item* item) {
+
+	try {
+
+		//////////////////////////////////////////////////////
+		////////////////////////  MD5  ///////////////////////
+		//////////////////////////////////////////////////////
+
+		char buf[1024];
+		FILE* fp = NULL;
+		fp = fopen(filePath.c_str(), "r");
+		if (fp == NULL) {
+			string errorMessage = "(FileHashProbe) Unable to get MD5 information for the file '";
+			errorMessage.append(filePath);
+			errorMessage.append("'");
+			item->AppendElement(new ItemEntity("md5", buf, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR));
+			item->AppendMessage(new OvalMessage(errorMessage));
+		
+		} else {
+			// Create the md5 hash.  This constructor creates a new md5 object, updates the hash,
+			// finalizes the hash, and closes the FILE object.
+			
+			MD5 context(fp);
+
+			memset(buf, '\0', sizeof(buf));
+			SNPRINTF(buf, sizeof(buf)-1, "%s", context.hex_digest());
+			buf[sizeof(buf)-1] = '\0';
+			item->AppendElement(new ItemEntity("md5", buf, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+		}
+
+		//////////////////////////////////////////////////////
+		//////////////////////////////////////////////////////
+	} catch(ProbeException ex) {	
+	
+		Log::Debug(ex.GetErrorMessage());
+
+	} catch(...) {	
+	
+		string errMsg = "";
+		errMsg.append("(FileMd5Probe) Unknown error attempting to get md5 information for the file '");
+		errMsg.append(filePath);
+		errMsg.append("'");
+		Log::Debug(errMsg);		
+	}
+}
+
+void FileHashProbe::GetSha1(string filePath, Item* item) {
+	
+	// TODO: need to find an implementation of the sha1 algorithm and implement this function.
+	
+	item->AppendElement(new ItemEntity("sha1", "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_NOT_COLLECTED));
+	item->AppendMessage(new OvalMessage("sha1 hashing of files is not currently supported."));
+}


Property changes on: trunk/ovaldi/src/probes/independent/FileHashProbe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/independent/FileHashProbe.h
===================================================================
--- trunk/ovaldi/src/probes/independent/FileHashProbe.h	                        (rev 0)
+++ trunk/ovaldi/src/probes/independent/FileHashProbe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,77 @@
+//
+// $Id: FileHashProbe.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef FILEHASHPROBE_H
+#define FILEHASHPROBE_H
+
+#include "FileFinder.h"
+#include "AbsProbe.h"
+#include "MD5.h"
+
+#ifdef WIN32
+	#define SNPRINTF _snprintf
+#else
+	#define SNPRINTF snprintf
+#endif
+
+using namespace std;
+
+/**
+	This class is responsible for collecting file hash data.
+	This class should be platform independant.
+*/
+class FileHashProbe : public AbsProbe {
+
+public:
+	~FileHashProbe();
+	
+	/** Get all the files on the system that match the pattern and generate and md5 and sha1 */
+	ItemVector* CollectItems(Object* object);
+
+	/** Return a new Item created for storing file hash information */
+	Item* CreateItem();
+
+	/** Ensure that the FileHashProbe is a singleton. */
+	static AbsProbe* Instance();
+
+private:
+	FileHashProbe();
+
+	static FileHashProbe* instance;
+
+	/** Generates the md5 hash for a file. */
+	void GetMd5(string filePath, Item* item);
+
+	/** Generates the sha1 hash for a file. */
+	void GetSha1(string filePath, Item* item);
+};
+
+#endif


Property changes on: trunk/ovaldi/src/probes/independent/FileHashProbe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/independent/FileMd5Probe.cpp
===================================================================
--- trunk/ovaldi/src/probes/independent/FileMd5Probe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/probes/independent/FileMd5Probe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,229 @@
+//
+// $Id: FileMd5Probe.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "FileMd5Probe.h"
+
+//****************************************************************************************//
+//								FileMd5Probe Class										  //	
+//****************************************************************************************//
+FileMd5Probe* FileMd5Probe::instance = NULL;
+
+FileMd5Probe::FileMd5Probe() {
+
+}
+
+FileMd5Probe::~FileMd5Probe() {
+
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AbsProbe* FileMd5Probe::Instance() {
+
+	// Use lazy initialization
+	if(instance == NULL) 
+		instance = new FileMd5Probe();
+
+	return instance;	
+}
+
+ItemVector* FileMd5Probe::CollectItems(Object* object) {
+
+	ItemVector *collectedItems = new ItemVector();
+
+	// get the path and file name
+	ObjectEntity* path = object->GetElementByName("path");
+	ObjectEntity* fileName = object->GetElementByName("filename");
+
+	FileFinder fileFinder;
+	StringPairVector* filePaths = fileFinder.SearchFiles(path, fileName, object->GetBehaviors());
+
+	if(filePaths->size() > 0) {
+		// Loop through all file paths
+		StringPairVector::iterator iterator;
+		for(iterator = filePaths->begin(); iterator != filePaths->end(); iterator++) {
+
+			StringPair* fp = (*iterator);
+
+			if(fp->second.compare("") == 0) {
+
+				Item* item = NULL;
+
+				// check if the code should report that the filename does not exist.
+				StringVector fileNames;
+				if(fileFinder.ReportFileNameDoesNotExist(fp->first, fileName, &fileNames)) {
+					StringVector::iterator iterator;
+					for(iterator = fileNames.begin(); iterator != fileNames.end(); iterator++) {
+
+						item = this->CreateItem();
+						item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+						item->AppendElement(new ItemEntity("path", fp->first, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+						item->AppendElement(new ItemEntity("filename", (*iterator), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+						collectedItems->push_back(item);
+					}
+					
+				} else {
+
+					item = this->CreateItem();
+					item->SetStatus(OvalEnum::STATUS_EXISTS);
+					item->AppendElement(new ItemEntity("path", fp->first, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+					collectedItems->push_back(item);
+
+				}
+
+			} else {
+
+				Item* item = this->GetMd5(fp->first, fp->second);
+				if(item != NULL) {
+					collectedItems->push_back(item);
+				}
+				item = NULL;
+
+			}
+
+			delete fp;
+		}
+
+	} else {
+		// if no filepaths check if the code should report that the path does not exist
+		StringVector paths;
+		if(fileFinder.ReportPathDoesNotExist(path, &paths)) {
+
+			Item* item = NULL;
+			StringVector::iterator iterator;
+			for(iterator = paths.begin(); iterator != paths.end(); iterator++) {
+
+				item = this->CreateItem();
+				item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+				item->AppendElement(new ItemEntity("path", (*iterator), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+				collectedItems->push_back(item);
+			}
+		}
+	}
+	delete filePaths;
+
+	return collectedItems;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+Item* FileMd5Probe::CreateItem() {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  Return a new Item created for storing file information
+	//
+	// -----------------------------------------------------------------------
+
+	Item* item = new Item(0, 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#independent", 
+						"ind-sc", 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#independent independent-system-characteristics-schema.xsd", 
+						OvalEnum::STATUS_ERROR, 
+						"filemd5_item");
+
+	return item;
+}
+
+Item* FileMd5Probe::GetMd5(string path, string fileName) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//	Get all attributes for the file specified in fileIn..Return them in a 
+	//	FileAttribute
+	// -----------------------------------------------------------------------
+
+	string errorMessage = "";
+	Item *item = NULL;
+	string filePath = path;
+	if(path[path.length()-1] != Common::fileSeperator)
+		filePath.append(1, Common::fileSeperator);
+
+	if(fileName[0] != Common::fileSeperator) {
+		filePath.append(fileName);
+	} else {
+		filePath.append(fileName.substr(1, fileName.length()-2));
+	}
+
+
+	try {
+
+		//////////////////////////////////////////////////////
+		////////////////////////  MD5  ///////////////////////
+		//////////////////////////////////////////////////////
+
+		char buf[1024];
+		FILE* fp = NULL;
+		fp = fopen(filePath.c_str(), "r");
+		if (fp == NULL) {
+			/*
+			errorMessage.append("(FileMd5Probe) Unable to get MD5 information for the file '");
+			errorMessage.append(filePath);
+			errorMessage.append("' \n");
+			*/
+		
+		} else {
+			// Create the md5 hash.  This constructor creates a new md5 object, updates the hash,
+			// finalizes the hash, and closes the FILE object.
+			
+			MD5 context(fp);
+
+			memset(buf, '\0', sizeof(buf));
+			SNPRINTF(buf, sizeof(buf)-1, "%s", context.hex_digest());
+			buf[sizeof(buf)-1] = '\0';
+			item = this->CreateItem();
+			item->SetStatus(OvalEnum::STATUS_EXISTS);
+			item->AppendElement(new ItemEntity("path", path, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+			item->AppendElement(new ItemEntity("filename", fileName, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+			item->AppendElement(new ItemEntity("md5", buf, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+		}
+
+		//////////////////////////////////////////////////////
+		//////////////////////////////////////////////////////
+	} catch(ProbeException ex) {	
+	
+		Log::Debug(ex.GetErrorMessage());
+
+	} catch(...) {	
+	
+		string errMsg = "";
+		errMsg.append("(FileMd5Probe) Unknown error attempting to get file attribute information for the file '");
+		errMsg.append(filePath);
+		errMsg.append("'");
+		Log::Debug(errMsg);		
+	}
+
+	return item;
+}


Property changes on: trunk/ovaldi/src/probes/independent/FileMd5Probe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/independent/FileMd5Probe.h
===================================================================
--- trunk/ovaldi/src/probes/independent/FileMd5Probe.h	                        (rev 0)
+++ trunk/ovaldi/src/probes/independent/FileMd5Probe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,71 @@
+//
+// $Id: FileMd5Probe.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef FILEMD5PROBE_H
+#define FILEMD5PROBE_H
+
+#include "FileFinder.h"
+#include "AbsProbe.h"
+#include "MD5.h"
+
+#ifdef WIN32
+	#define SNPRINTF _snprintf
+#else
+	#define SNPRINTF snprintf
+#endif
+
+using namespace std;
+
+/**
+	This class is responsible for collecting file md5 data.
+	This class should be platform independant.
+*/
+class FileMd5Probe : public AbsProbe {
+
+public:
+	~FileMd5Probe();
+	
+	/** Get all the files on the system that match the pattern and generate an md5 */
+	ItemVector* CollectItems(Object* object);
+	Item* CreateItem();
+
+	/** Ensure that the FileMd5Probe is a singleton. */
+	static AbsProbe* Instance();
+
+private:
+	FileMd5Probe();
+
+	static FileMd5Probe* instance;
+
+	Item* GetMd5(string path, string fileName);
+};
+
+#endif


Property changes on: trunk/ovaldi/src/probes/independent/FileMd5Probe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/independent/TextFileContentProbe.cpp
===================================================================
--- trunk/ovaldi/src/probes/independent/TextFileContentProbe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/probes/independent/TextFileContentProbe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,214 @@
+//
+// $Id: TextFileContentProbe.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "TextFileContentProbe.h"
+
+//****************************************************************************************//
+//								TextFileContentProbe Class								  //	
+//****************************************************************************************//
+TextFileContentProbe* TextFileContentProbe::instance = NULL;
+
+TextFileContentProbe::TextFileContentProbe() {
+
+}
+
+TextFileContentProbe::~TextFileContentProbe() {
+
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AbsProbe* TextFileContentProbe::Instance() {
+
+	// Use lazy initialization
+	if(instance == NULL) 
+		instance = new TextFileContentProbe();
+
+	return instance;	
+}
+
+ItemVector* TextFileContentProbe::CollectItems(Object* object) {
+
+	ItemVector *collectedItems = new ItemVector();
+
+	// get the path and file name
+	ObjectEntity* path = object->GetElementByName("path");
+	ObjectEntity* fileName = object->GetElementByName("filename");
+	ObjectEntity* line = object->GetElementByName("line");
+
+	if (line->GetDatatype() != OvalEnum::DATATYPE_STRING) {
+		throw ProbeException("Error: invalid datatype specified on line. Found: " + OvalEnum::DatatypeToString(line->GetDatatype()));
+	}
+	if (line->GetOperation() != OvalEnum::OPERATION_PATTERN_MATCH) {
+		throw ProbeException("Error: invalid operation specified on line. Found: " + OvalEnum::OperationToString(line->GetOperation()));
+	}
+
+	FileFinder fileFinder;
+	StringPairVector* filePaths = fileFinder.SearchFiles(path, fileName, object->GetBehaviors());
+
+	if(filePaths->size() > 0) {
+		// Loop through all file paths
+		StringPairVector::iterator iterator;
+		for(iterator = filePaths->begin(); iterator != filePaths->end(); iterator++) {
+
+			StringPair* fp = (*iterator);
+
+			if(fp->second.compare("") == 0) {
+
+				Item* item = NULL;
+
+				// check if the code should report that the filename does not exist.
+				StringVector fileNames;
+				if(fileFinder.ReportFileNameDoesNotExist(fp->first, fileName, &fileNames)) {
+					StringVector::iterator iterator;
+					for(iterator = fileNames.begin(); iterator != fileNames.end(); iterator++) {
+
+						item = this->CreateItem();
+						item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+						item->AppendElement(new ItemEntity("path", fp->first, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+						item->AppendElement(new ItemEntity("filename", (*iterator), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+						collectedItems->push_back(item);
+					}
+					
+				} else {
+
+					item = this->CreateItem();
+					item->SetStatus(OvalEnum::STATUS_EXISTS);
+					item->AppendElement(new ItemEntity("path", fp->first, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+					collectedItems->push_back(item);
+
+				}
+
+			} else {
+
+				this->GetLines(fp->first, fp->second, line, collectedItems);
+			}
+
+			delete fp;
+		}
+
+	} else {
+
+		// if no filepaths check if the code should report that the path does not exist
+		StringVector paths;
+		if(fileFinder.ReportPathDoesNotExist(path, &paths)) {
+
+			Item* item = NULL;
+			StringVector::iterator iterator;
+			for(iterator = paths.begin(); iterator != paths.end(); iterator++) {
+
+				item = this->CreateItem();
+				item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+				item->AppendElement(new ItemEntity("path", (*iterator), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+				collectedItems->push_back(item);
+			}
+		}
+	}
+	delete filePaths;
+
+	return collectedItems;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+Item* TextFileContentProbe::CreateItem() {
+
+	Item* item = new Item(0, 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#independent", 
+						"ind-sc", 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#independent independent-system-characteristics-schema.xsd", 
+						OvalEnum::STATUS_ERROR, 
+						"textfilecontent_item");
+
+	return item;
+}
+
+void TextFileContentProbe::GetLines(string path, string fileName, ObjectEntity* line, ItemVector* collectedItems) {
+
+	Item *item = NULL;
+
+	// construct the file path
+	string filePath = path;
+	if(path[path.length()-1] != Common::fileSeperator)
+		filePath.append(1, Common::fileSeperator);
+
+	if(fileName[0] != Common::fileSeperator) {
+		filePath.append(fileName);
+	} else {
+		filePath.append(fileName.substr(1, fileName.length()-2));
+	}
+
+	// read the file line by line
+	string buffer;
+	ifstream infile;
+	infile.open (filePath.c_str());
+	if (infile.is_open()) {
+
+		while (!infile.eof()) {
+			
+			StringVector* results = new StringVector();
+			
+			// call the GetSubstrings method	
+			getline (infile, buffer);
+			if (this->GetSubstrings (buffer, line, results)) {
+
+				// create one item if there were any matching substrings
+				item = this->CreateItem();
+				collectedItems->push_back(item);
+				item->SetStatus(OvalEnum::STATUS_EXISTS);
+				item->AppendElement(new ItemEntity("path", path, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+				item->AppendElement(new ItemEntity("filename", fileName, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+				item->AppendElement(new ItemEntity("line", buffer, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+
+				StringVector::iterator iterator;
+				for (iterator = results->begin(); iterator != results->end(); iterator++) {
+					// add a line for each matching subexpression
+					item->AppendElement(new ItemEntity("subexpression", (*iterator), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));					
+				}
+			} 
+		}
+		infile.close();
+	}
+}
+
+bool TextFileContentProbe::GetSubstrings(string lineFromFile, ObjectEntity* line, StringVector* substrings) {
+
+	bool retVal = false;
+	string pattern = line->GetValue();
+
+	if (this->myMatcher->GetMatchingSubstrings(pattern.c_str(), lineFromFile.c_str(), substrings) ) {
+		retVal = true;
+	}
+
+	return retVal;
+}


Property changes on: trunk/ovaldi/src/probes/independent/TextFileContentProbe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/independent/TextFileContentProbe.h
===================================================================
--- trunk/ovaldi/src/probes/independent/TextFileContentProbe.h	                        (rev 0)
+++ trunk/ovaldi/src/probes/independent/TextFileContentProbe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,119 @@
+//
+// $Id: TextFileContentProbe.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef TEXTFILECONTENTPROBE_H
+#define TEXTFILECONTENTPROBE_H
+
+#include "FileFinder.h"
+#include "AbsProbe.h"
+#include <fstream>
+
+#ifdef WIN32
+	#define SNPRINTF _snprintf
+#else
+	#define SNPRINTF snprintf
+#endif
+
+using namespace std;
+
+/**
+	This class is responsible for collecting data for the ind-sc:textfilecontent_item defined OVAL System Characteristics Schema.
+	This class should be platform independent.
+
+	--- SCHEMA BUG AND RELATED INTERPRETER BUG ---
+	There is a known issue with the schema definition of this object in the oval-definitions-schema and corresponding
+	item in the oval-system-characteristics-schema. There are three key issues and a pending feature request related to
+	this object. Each is described below:
+
+	- Feature Request - Allow matching to occur over multiple lines. When checking system configurations contained 
+	in text files sections of the text file must frequently first be identified before looking for a particular 
+	setting. A request was made to allow for regular expressions that would match multi lines at once.
+
+	- BUG - If a pattern used in a textfilecontent_object identifies two identical lines in a file only one item will
+	be written to the system characteristics file. This is due to the fact that all items must be unique. The only way 
+	to uniquely identify a line in a text file is line number and/or character position. One possible fix to this bug would
+	be to add a position element to the textfilecontent_object. This solution would allow lines to be uniquely identified.
+
+	- BUG - If 2 different textfilecontent_objects identify the same file and the regular expressions identified by the 
+	2 objects' line entity identify overlapping lines only the first set of subexpressions for the overlapping line matches
+	will be recorded in the item. This is due to the fact that collection efforts for one regex are not currently seperable
+	from collection efforts for another regex.
+
+	- BUG - If a textfilecontent_object has a line regular expression which identifies more than one substring in a line
+	it is not possible to know which resulting substrings in the item correspond with which subexpression in the line regex. 
+	When one or more of the subexpressions in the line regex do not match any substring it is not possible to convey that
+	no substring was matched for a specific subexpression.
+
+	Below is a proposed change tot he textfilecontent object and state:
+	<textfilecontent_object ...>
+      <path>C:\mydir</path>
+      <filename>myfile.txt</filename>
+      <position>6:0</position><!-- line:char index possibly to include length too -->
+      <pattern>(ol).+(ak)\.\n(ok).</pattern><!-- defined in schema to be a regular expression only that identifies one substring -->
+	</textfilecontent_object>
+	<textfilecontent_state ...>
+      <substring>ol</substring><!-- one substring -->
+    </textfilecontent_state>
+
+*/
+class TextFileContentProbe : public AbsProbe {
+
+public:
+	~TextFileContentProbe();
+	
+	ItemVector* CollectItems(Object* object);
+
+	/**  Return a new Item created for storing text file content information */
+	Item* CreateItem();
+
+	/** Gets single instance of the TextFileContentProbe. Uses lazy initialization. */
+	static AbsProbe* Instance();
+
+private:
+	TextFileContentProbe();
+
+	/** The static Singleton instance of the TextFileContentFileProbe. */
+	static TextFileContentProbe* instance;
+
+	/** Return true if the specified line matches the criteria in the ObjectEntity. 
+		If true any resulting substrings are returned on the substrings vector. 
+	*/
+	bool GetSubstrings(string lineFromFile, ObjectEntity* line, StringVector* substrings);
+
+	/** Read the specified file one line at time if any matching line is found with matching 
+		subexpressions create a new item and add it topt he set of collectedItems. If none 
+		are found the set is returned empty. Calls out to the GetSubstrings function to 
+		determine if a given line in a file matches the criteria specified in the ObjectEntity. 
+	*/
+	void GetLines(string path, string fileName, ObjectEntity* line, ItemVector* collectedItems);
+};
+
+#endif


Property changes on: trunk/ovaldi/src/probes/independent/TextFileContentProbe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/independent/VariableProbe.cpp
===================================================================
--- trunk/ovaldi/src/probes/independent/VariableProbe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/probes/independent/VariableProbe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,210 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "VariableProbe.h"
+
+//****************************************************************************************//
+//								VariableProbe Class										  //	
+//****************************************************************************************//
+VariableProbe *VariableProbe::instance = NULL;
+
+VariableProbe::VariableProbe() {
+}
+
+VariableProbe::~VariableProbe() {
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AbsProbe* VariableProbe::Instance() {
+
+	// Use lazy initialization
+	if(instance == NULL) 
+		instance = new VariableProbe();
+
+	return instance;	
+}
+
+ItemVector* VariableProbe::CollectItems(Object *object) {
+	ItemVector *collectedItems = new ItemVector();
+
+	// get the varRef from the provided object
+	ObjectEntity* varRef = object->GetElementByName("var_ref");
+
+	// check datatypes - only allow string
+	if(varRef->GetDatatype() != OvalEnum::DATATYPE_STRING) {
+		throw ProbeException("Error: invalid data type specified on var_ref. Found: " + OvalEnum::DatatypeToString(varRef->GetDatatype()));
+	}
+
+	// check operation - only allow  equals, not equals and pattern match
+	if(varRef->GetOperation() != OvalEnum::OPERATION_EQUALS 
+		&& varRef->GetOperation() != OvalEnum::OPERATION_PATTERN_MATCH 
+		&& varRef->GetOperation() != OvalEnum::OPERATION_NOT_EQUAL) {
+		throw ProbeException("Error: invalid operation specified on var_ref. Found: " + OvalEnum::OperationToString(varRef->GetOperation()));
+	}
+
+	if(varRef->GetVarRef() == NULL) {
+		if(varRef->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			
+			// get an item for this var ref
+			Item* item = this->GetItemForVarId(varRef->GetValue());
+			if(item != NULL) {
+				collectedItems->push_back(item);
+			} 
+
+		} else {
+
+			//
+			// handle operation of not equal or pattern match
+			// 
+
+			StringVector* varIds = this->GetVariableIds();
+
+			// loop through all vars
+			StringVector::iterator iterator;
+			for(iterator = varIds->begin(); iterator != varIds->end(); iterator++) {
+
+				if(varRef->GetOperation() == OvalEnum::OPERATION_NOT_EQUAL) {
+					if(varRef->GetValue().compare((*iterator)) != 0) {
+						
+						Item* item = this->GetItemForVarId((*iterator));
+						if(item != NULL) {
+							collectedItems->push_back(item);
+						}
+					}
+				} else {
+					if(this->myMatcher->IsMatch(varRef->GetValue().c_str(), (*iterator).c_str())) {
+						Item* item = this->GetItemForVarId((*iterator));
+						if(item != NULL) {
+							collectedItems->push_back(item);
+						}
+					}
+				}
+				
+			}
+			delete varIds;
+		}
+	} else {
+
+		StringVector* varIds = this->GetVariableIds();
+	
+		// loop through all varIds in the definitions document
+		// only keep varIds that match operation and value and var check
+		StringVector::iterator it;
+		for(it = varIds->begin(); it != varIds->end(); it++) {
+			ItemEntity* tmp = new ItemEntity("var_ref", (*it), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS);
+			if(varRef->Analyze(tmp) == OvalEnum::RESULT_TRUE) {
+				Item* item = this->GetItemForVarId((*it));
+				if(item != NULL) {
+					collectedItems->push_back(item);
+				}
+			}
+			delete tmp;
+			tmp = NULL;
+		}
+		delete varIds;
+	}
+
+	return collectedItems;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+Item* VariableProbe::CreateItem() {
+
+	Item* item = new Item(0, 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#independent", 
+						"ind-sc", 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#independent independent-system-characteristics-schema.xsd", 
+						OvalEnum::STATUS_ERROR, 
+						"variable_item");
+
+	return item;
+}
+
+StringVector* VariableProbe::GetVariableIds() {
+
+	DOMElement* variablesElm = XmlCommon::FindElementNS(DocumentManager::GetDefinitionDocument(), "variables");
+
+	StringVector* varIds = new StringVector();
+		
+	if(variablesElm != NULL) {
+
+		// loop through all child elements
+		DOMNodeList *vars = variablesElm->getChildNodes();
+		unsigned int index = 0;
+		while(index < vars->getLength()) {
+			DOMNode *tmpNode = vars->item(index);
+
+			//	only concerned with ELEMENT_NODEs
+			if (tmpNode->getNodeType() == DOMNode::ELEMENT_NODE) {
+				DOMElement *var = (DOMElement*)tmpNode;
+
+				//	get the id
+				string id = XmlCommon::GetAttributeByName(var, "id");
+				varIds->push_back(id);
+			}
+
+			index ++;
+		}
+
+	} else {
+		throw ProbeException("Error: Variable probe is unable to locate any variables in the current oval-definitions-docuemnt.");
+	}
+
+	return varIds;
+}
+
+
+Item* VariableProbe::GetItemForVarId(string varId) {
+
+	// note that if the oval-definitions document is valid the variable id will always exist. 
+	// So an item should always be returned
+
+	Item* item = NULL;
+	item = this->CreateItem();
+	item->SetStatus(OvalEnum::STATUS_EXISTS);
+	item->AppendElement(new ItemEntity("var_ref", varId, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+		
+	AbsVariable* var = VariableFactory::GetVariable(varId);
+
+	VariableValueVector* varValues = var->GetValues();
+
+	// loop through all values
+	VariableValueVector::iterator iterator;
+	for(iterator = varValues->begin(); iterator != varValues->end(); iterator++) { 		
+		string value = (*iterator)->GetValue();	
+		item->AppendElement(new ItemEntity("value", value, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+	}
+
+	return item;
+}


Property changes on: trunk/ovaldi/src/probes/independent/VariableProbe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/independent/VariableProbe.h
===================================================================
--- trunk/ovaldi/src/probes/independent/VariableProbe.h	                        (rev 0)
+++ trunk/ovaldi/src/probes/independent/VariableProbe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,68 @@
+//
+// $Id: VariableProbe.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+#ifndef VARIABLEPROBE_H
+#define VARIABLEPROBE_H
+
+#include "AbsProbe.h"
+
+using namespace std;
+
+/**
+	This class is responsible for collecting variable information for variable_objects.
+	This class should be platform independant.
+*/
+class VariableProbe : public AbsProbe {
+public:
+	~VariableProbe();
+	
+	/** Run the variable probe */
+	ItemVector* CollectItems(Object* object);
+
+	/** Return a new Item created for storing variable information */
+	Item* CreateItem();
+
+	/** Ensure that the VariableProbe is a singleton. */
+	static AbsProbe* Instance();
+	
+private:
+
+	/** Return an Item for the specified variable id. */
+	Item* GetItemForVarId(string varId);
+
+	/** Return all the variable ids in the definitions file being processed. */
+	StringVector* GetVariableIds();
+
+	VariableProbe();
+
+	static VariableProbe *instance;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/probes/independent/VariableProbe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/independent/XmlFileContentProbe.cpp
===================================================================
--- trunk/ovaldi/src/probes/independent/XmlFileContentProbe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/probes/independent/XmlFileContentProbe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,362 @@
+//
+// $Id: XmlFileContentProbe.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "XmlFileContentProbe.h"
+
+XmlFileContentProbe* XmlFileContentProbe::instance = NULL;
+
+XmlFileContentProbe::XmlFileContentProbe() {
+
+}
+
+XmlFileContentProbe::~XmlFileContentProbe() {
+
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AbsProbe* XmlFileContentProbe::Instance() {
+
+	// Use lazy initialization
+	if(instance == NULL) 
+		instance = new XmlFileContentProbe();
+
+	return instance;	
+}
+
+ItemVector* XmlFileContentProbe::CollectItems(Object* object) {
+
+	ItemVector *collectedItems = new ItemVector();
+
+	// get the hive, key, and name from the provided object
+	ObjectEntity* path = object->GetElementByName("path");
+	ObjectEntity* fileName = object->GetElementByName("filename");
+	ObjectEntity* xpath = object->GetElementByName("xpath");
+	
+	// check datatypes - only allow string
+	if(path->GetDatatype() != OvalEnum::DATATYPE_STRING) {
+		throw ProbeException("Error: invalid data type specified on path. Found: " + OvalEnum::DatatypeToString(path->GetDatatype()));
+	}
+	if(fileName->GetDatatype() != OvalEnum::DATATYPE_STRING) {
+		throw ProbeException("Error: invalid data type specified on fileName. Found: " + OvalEnum::DatatypeToString(fileName->GetDatatype()));
+	}
+	if(xpath->GetDatatype() != OvalEnum::DATATYPE_STRING) {
+		throw ProbeException("Error: invalid data type specified on xpath. Found: " + OvalEnum::DatatypeToString(xpath->GetDatatype()));
+	}
+
+	// check operation 
+	if(path->GetOperation() != OvalEnum::OPERATION_EQUALS 
+		&& path->GetOperation() != OvalEnum::OPERATION_PATTERN_MATCH 
+		&& path->GetOperation() != OvalEnum::OPERATION_NOT_EQUAL) {
+		throw ProbeException("Error: invalid operation specified on path. Found: " + OvalEnum::OperationToString(path->GetOperation()));
+	}
+	if(fileName->GetOperation() != OvalEnum::OPERATION_EQUALS 
+		&& fileName->GetOperation() != OvalEnum::OPERATION_PATTERN_MATCH 
+		&& fileName->GetOperation() != OvalEnum::OPERATION_NOT_EQUAL) {
+		throw ProbeException("Error: invalid operation specified on fileName. Found: " + OvalEnum::OperationToString(fileName->GetOperation()));
+	}
+	if(xpath->GetOperation() != OvalEnum::OPERATION_EQUALS) {
+		throw ProbeException("Error: invalid operation specified on xpath. Found: " + OvalEnum::OperationToString(xpath->GetOperation()));
+	}
+
+	FileFinder fileFinder;
+	StringPairVector* filePaths = fileFinder.SearchFiles(path, fileName, object->GetBehaviors());
+
+	//StringPairVector* filePaths = this->GetFiles(path, fileName, object->GetBehaviors());
+
+	if(filePaths->size() > 0) {
+		// Loop through all file paths
+		StringPairVector::iterator iterator;
+		for(iterator = filePaths->begin(); iterator != filePaths->end(); iterator++) {
+
+			StringPair* fp = (*iterator);
+
+			if(fp->second.compare("") == 0) {
+
+				Item* item = NULL;
+
+				// check if the code should report that the filename does not exist.
+				StringVector fileNames;
+				if(fileFinder.ReportFileNameDoesNotExist(fp->first, fileName, &fileNames)) {
+					StringVector::iterator iterator;
+					for(iterator = fileNames.begin(); iterator != fileNames.end(); iterator++) {
+
+						item = this->CreateItem();
+						item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+						item->AppendElement(new ItemEntity("path", fp->first, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+						item->AppendElement(new ItemEntity("filename", (*iterator), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+						collectedItems->push_back(item);
+					}
+					
+				} else {
+
+					item = this->CreateItem();
+					item->SetStatus(OvalEnum::STATUS_EXISTS);
+					item->AppendElement(new ItemEntity("path", fp->first, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+					collectedItems->push_back(item);
+
+				}
+
+			} else {
+
+				Item* item = this->EvaluateXpath((*iterator)->first, (*iterator)->second, xpath->GetValue());
+				if(item != NULL) {
+					collectedItems->push_back(item);
+				}
+				item = NULL;
+
+			}
+
+			delete fp;
+		}
+
+	} else {
+		// if no filepaths check if the code should report that the path does not exist
+		StringVector paths;
+		if(fileFinder.ReportPathDoesNotExist(path, &paths)) {
+
+			Item* item = NULL;
+			StringVector::iterator iterator;
+			for(iterator = paths.begin(); iterator != paths.end(); iterator++) {
+
+				item = this->CreateItem();
+				item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+				item->AppendElement(new ItemEntity("path", (*iterator), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+				collectedItems->push_back(item);
+			}
+		}
+	}
+	delete filePaths;
+
+	return collectedItems;
+}
+
+Item* XmlFileContentProbe::EvaluateXpath(string path, string fileName, string xpath) {
+
+	Item* item = NULL;
+
+	string contextNode = "/";
+
+	string filePath = path;
+	if(path[path.length()-1] != Common::fileSeperator)
+		filePath.append(1, Common::fileSeperator);
+
+	if(fileName[0] != Common::fileSeperator) {
+		filePath.append(fileName);
+	} else {
+		filePath.append(fileName.substr(1, fileName.length()-2));
+	}
+
+	XALAN_USING_XALAN(XSLException)
+
+	//XALAN_USING_XERCES(XMLPlatformUtils)
+	XALAN_USING_XALAN(XPathEvaluator)
+	XMLPlatformUtils::Initialize();
+	XPathEvaluator::initialize();
+
+	XALAN_USING_XERCES(LocalFileInputSource)
+	XALAN_USING_XALAN(XalanDocument)
+	XALAN_USING_XALAN(XalanDocumentPrefixResolver)
+	XALAN_USING_XALAN(XalanDOMString)
+	XALAN_USING_XALAN(XalanNode)
+	XALAN_USING_XALAN(XalanSourceTreeInit)
+	XALAN_USING_XALAN(XalanSourceTreeDOMSupport)
+	XALAN_USING_XALAN(XalanSourceTreeParserLiaison)
+	XALAN_USING_XALAN(XObjectPtr)
+	XALAN_USING_XALAN(NodeRefList)
+	XALAN_USING_XALAN(CharVectorType)
+
+	// Initialize the XalanSourceTree subsystem...
+	XalanSourceTreeInit	theSourceTreeInit;
+
+	// We'll use these to parse the XML file.
+	XalanSourceTreeDOMSupport theDOMSupport;
+	XalanSourceTreeParserLiaison theLiaison(theDOMSupport);
+
+	// Hook the two together...
+	theDOMSupport.setParserLiaison(&theLiaison);
+		
+	try {
+
+		const XalanDOMString theFileName(filePath.c_str());
+
+		// Create an input source that represents a local file...
+		const LocalFileInputSource theInputSource(theFileName.c_str());
+
+		// Parse the document...
+		XalanDocument* theDocument = NULL;
+		try {
+			theDocument = theLiaison.parseXMLStream(theInputSource);
+
+		} catch(...) {
+			theDocument = NULL;
+			// this should never happen at this point only documents that exist should get here
+			//string errMsg = "Error: The specified document does not exist: " + filePath;
+		}
+
+		if(theDocument == NULL) {
+			throw ProbeException("Error: Unable to parse the current document: " + filePath);
+		} else {
+
+			XalanDocumentPrefixResolver	thePrefixResolver(theDocument);
+
+			XPathEvaluator theEvaluator;
+
+			// find the context node...
+			XalanNode* const theContextNode =
+					theEvaluator.selectSingleNode(	theDOMSupport,
+													theDocument,
+													XalanDOMString(contextNode.c_str()).c_str(),
+													thePrefixResolver);
+
+			if (theContextNode == 0) {
+				throw ProbeException("Error the specified context node, \'" + contextNode + "\' was not found.");
+			} else {
+
+				// evaluate the expression...
+				/*const XObjectPtr theResult = XObjectPtr(
+				theEvaluator.evaluate(
+						theDOMSupport,
+						theContextNode,
+						XalanDOMString(xpath.c_str()).c_str(),
+						thePrefixResolver));*/
+
+				NodeRefList nodeList;
+				theEvaluator.selectNodeList(nodeList,
+											theDOMSupport,
+											theContextNode,
+											XalanDOMString(xpath.c_str()).c_str(),
+											thePrefixResolver);
+
+
+				if(nodeList.getLength() <= 0) {
+					// no nodes were found
+					item = this->CreateItem();
+					item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+					item->AppendElement(new ItemEntity("path", path, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+					item->AppendElement(new ItemEntity("filename", fileName, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+					item->AppendElement(new ItemEntity("xpath", xpath, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+					item->AppendElement(new ItemEntity("value_of", "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_DOES_NOT_EXIST));
+
+				} else {
+
+					item = this->CreateItem();
+					item->SetStatus(OvalEnum::STATUS_EXISTS);
+					item->AppendElement(new ItemEntity("path", path, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+					item->AppendElement(new ItemEntity("filename", fileName, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+					item->AppendElement(new ItemEntity("xpath", xpath, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+
+					// add each value returned.
+					int length = nodeList.getLength();
+					for(int i = 0; i < length; i++) {
+						XalanNode* node = nodeList.item(i);
+
+						if(node->getNodeType() == XalanNode::TEXT_NODE) {
+							
+							const CharVectorType chVec = TranscodeToLocalCodePage(node->getNodeValue());
+							string value;
+							for( int i=0; chVec[i] !='\0'; i++)
+								value += chVec[i];
+
+							item->AppendElement(new ItemEntity("value_of", value, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+
+						} else if(node->getNodeType() == XalanNode::ATTRIBUTE_NODE) {
+
+							const CharVectorType chVec = TranscodeToLocalCodePage(node->getNodeValue());
+							string value;
+							for( int i=0; chVec[i] !='\0'; i++)
+								value += chVec[i];
+
+							item->AppendElement(new ItemEntity("value_of", value, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+
+						} else {
+
+							throw ProbeException("Error: invalid xpath specified. An xpath is only allowed to select text nodes or attribute nodes from a document.");
+						}
+					}
+				}
+			}
+		}
+
+		XPathEvaluator::terminate();
+		XMLPlatformUtils::Terminate();
+
+	} catch(const XSLException& theException) {
+		// Convert the XSLException message to a string
+		ostringstream m;
+		m << (theException.getMessage());
+		string errMsg = m.str();
+
+		XPathEvaluator::terminate();
+		XMLPlatformUtils::Terminate();
+
+		throw ProbeException("Error while evaluating an xpath. " + errMsg);
+
+	} catch(ProbeException ex) {
+
+		XPathEvaluator::terminate();
+		XMLPlatformUtils::Terminate();
+
+		throw ex;
+
+	} catch(Exception ex) {
+
+		XPathEvaluator::terminate();
+		XMLPlatformUtils::Terminate();
+
+		throw ex;
+
+	} catch(...) {
+
+		XPathEvaluator::terminate();
+		XMLPlatformUtils::Terminate();
+
+		throw ProbeException("Error: XmlFileContentProbe() An unknown error occured while collecting data.");
+	}
+
+	return item;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+Item* XmlFileContentProbe::CreateItem() {
+
+	Item* item = new Item(0, 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#independent", 
+						"ind-sc", 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#independent independent-system-characteristics-schema.xsd", 
+						OvalEnum::STATUS_ERROR, 
+						"xmlfilecontent_item");
+
+	return item;
+}


Property changes on: trunk/ovaldi/src/probes/independent/XmlFileContentProbe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/independent/XmlFileContentProbe.h
===================================================================
--- trunk/ovaldi/src/probes/independent/XmlFileContentProbe.h	                        (rev 0)
+++ trunk/ovaldi/src/probes/independent/XmlFileContentProbe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,109 @@
+//
+// $Id: XmlFileContentProbe.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef XMLFILECONTENTPROBE_H
+#define XMLFILECONTENTPROBE_H
+
+#ifdef WIN32
+	#pragma warning(disable:4786)
+#endif
+
+#include "AbsProbe.h"
+#include "FileFinder.h"
+
+#include <string>
+#include <vector>
+
+// Xalan and Xerces includes
+#include <xalanc/Include/PlatformDefinitions.hpp>
+#include <cassert>
+
+#if defined(XALAN_CLASSIC_IOSTREAMS)
+#include <iostream.h>
+#else
+#include <iostream>
+#endif
+
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/framework/LocalFileInputSource.hpp>
+#include <xalanc/PlatformSupport/XSLException.hpp>
+#include <xalanc/DOMSupport/XalanDocumentPrefixResolver.hpp>
+#include <xalanc/XPath/XObject.hpp>
+#include <xalanc/XPath/NodeRefList.hpp>
+#include <xalanc/XPath/XPathEvaluator.hpp>
+#include <xalanc/XalanSourceTree/XalanSourceTreeDOMSupport.hpp>
+#include <xalanc/XalanSourceTree/XalanSourceTreeInit.hpp>
+#include <xalanc/XalanSourceTree/XalanSourceTreeParserLiaison.hpp>
+// end xalan and xerces includes
+
+using namespace std;
+
+/**
+	This class encapsulates common functionality for the XmlFileContentProbe. 
+*/
+class XmlFileContentProbe : public AbsProbe {
+public:
+	virtual ~XmlFileContentProbe();
+
+	/**
+	    Use a platform specifc FileFinder to find all files that match the 
+	    specified object. Then evaulate xpath expression on each matching file and
+	    create an Item to hold the resulting data.
+	    
+	    Note 1: xpath expressions are treated as though they always evaluate to 
+	    a single node.
+	    
+	    Note 2: regular expressions are not allowed as part of an xpath
+	    
+	    Note 3: this probe should allow for a context node to be provided
+	    for now the context node will default to '/' (document root)
+	*/
+	ItemVector* CollectItems(Object* object);
+
+	/** Return a new Item created for storing xml file content information. */
+	Item* CreateItem();
+
+	/** Gets single instance of the XmlFileContentProbe. Uses lazy initialization. */
+	static AbsProbe* Instance();
+
+protected:
+
+	XmlFileContentProbe();
+
+	/** The static Singleton instance of the XmlFileContentProbe. */
+	static XmlFileContentProbe* instance;
+
+	/** Return an Item for the specified xpath if is succeeds otherwise return NULL. */
+	Item* EvaluateXpath(string path, string fileName, string xpath);
+};
+
+#endif
+


Property changes on: trunk/ovaldi/src/probes/independent/XmlFileContentProbe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/linux/DPKGInfoProbe.cpp
===================================================================
--- trunk/ovaldi/src/probes/linux/DPKGInfoProbe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/probes/linux/DPKGInfoProbe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,381 @@
+//
+// $Id: DPKGInfoProbe.cpp 4194 2007-07-10 15:33:35Z blaze $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "DPKGInfoProbe.h"
+
+//****************************************************************************************//
+//				DPKGInfoProbe Class					  //	
+//****************************************************************************************//
+DPKGInfoProbe *DPKGInfoProbe::instance = NULL;
+
+DPKGInfoProbe::DPKGInfoProbe() {
+	this->StatusFile = "/var/lib/dpkg/status";
+}
+
+DPKGInfoProbe::~DPKGInfoProbe() {
+
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AbsProbe* DPKGInfoProbe::Instance() {
+
+	// Use lazy initialization
+	if(instance == NULL) 
+		instance = new DPKGInfoProbe();
+
+	return instance;	
+}
+
+//bad
+ItemVector* DPKGInfoProbe::CollectItems(Object* object) {
+
+	ItemVector *collectedItems = new ItemVector();
+
+	ObjectEntity* name = object->GetElementByName("name");
+
+	// check datatypes - only allow string
+	if(name->GetDatatype() != OvalEnum::DATATYPE_STRING) {
+		throw ProbeException("Error: invalid data type specified on name. Found: " + OvalEnum::DatatypeToString(name->GetDatatype()));
+	}
+
+	// check operation - only allow  equals, not equals and pattern match
+	if(name->GetOperation() != OvalEnum::OPERATION_EQUALS && name->GetOperation() != OvalEnum::OPERATION_PATTERN_MATCH && name->GetOperation() != OvalEnum::OPERATION_NOT_EQUAL) {
+		throw ProbeException("Error: invalid operation specified on name. Found: " + OvalEnum::OperationToString(name->GetOperation()));
+	}
+
+	StringVector* names = this->GetDPKGNames(name);
+	if(names->size() > 0) {
+		StringVector::iterator iterator;
+		for(iterator = names->begin(); iterator != names->end(); iterator++) {		
+			this->GetDPKGInfo((*iterator), collectedItems);
+		}
+	} else {
+
+		if(name->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+
+			if(name->GetVarRef() == NULL) {
+
+				Item* item = this->CreateItem();
+				item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+				item->AppendElement(new ItemEntity("name",  name->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+				collectedItems->push_back(item);
+
+			} else {
+
+				VariableValueVector::iterator iterator;
+				for(iterator = name->GetVarRef()->GetValues()->begin(); iterator != name->GetVarRef()->GetValues()->end(); iterator++) {
+
+					Item* item = this->CreateItem();
+					item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+					item->AppendElement(new ItemEntity("name",  (*iterator)->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+					collectedItems->push_back(item);
+				}
+			}
+		}
+	}
+	names->clear();
+	delete names;
+
+	return collectedItems;
+}  
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+Item* DPKGInfoProbe::CreateItem() {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  Return a new Item created for storing file information
+	//
+	// -----------------------------------------------------------------------
+
+	Item* item = new Item(0, 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#linux", 
+						"linux-sc", 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#linux linux-system-characteristics-schema.xsd", 
+						OvalEnum::STATUS_ERROR, 
+						"dpkginfo_item");
+
+	return item;
+}
+
+StringVector* DPKGInfoProbe::GetDPKGNames(ObjectEntity* name) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  Get the set of all rpm names on the system that match the object
+	//
+	// -----------------------------------------------------------------------
+	StringVector* names = NULL;
+
+	// does this name use variables?
+	if(name->GetVarRef() == NULL) {
+		
+		// proceed based on operation
+		if(name->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			names = new StringVector();
+			// if the name exists add it to the list 
+			if(this->DPKGExists(name->GetValue())) {
+				names->push_back(name->GetValue());
+			}
+
+		} else if(name->GetOperation() == OvalEnum::OPERATION_NOT_EQUAL) {
+			
+			names = this->GetMatchingDPKGNames(name->GetValue(), false);
+
+		} else if(name->GetOperation() == OvalEnum::OPERATION_PATTERN_MATCH) {
+			names = this->GetMatchingDPKGNames(name->GetValue(), true);
+		}		
+
+	} else {
+
+		names = new StringVector();
+
+		// Get all names
+		StringVector allNames;
+
+		if(name->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			// in the case of equals simply loop through all the 
+			// variable values and add them to the set of all names
+			// if they exist on the system
+			VariableValueVector::iterator iterator;
+			for(iterator = name->GetVarRef()->GetValues()->begin(); iterator != name->GetVarRef()->GetValues()->end(); iterator++) {
+				
+				if(this->DPKGExists((*iterator)->GetValue())) {
+					allNames.push_back((*iterator)->GetValue());
+				}
+			}
+
+		} else {
+            		this->GetMatchingDPKGNames(".*", &allNames);
+		}
+	
+		// loop through all names on the system
+		// only keep names that match operation and value and var check
+		ItemEntity* tmp = this->CreateItemEntity(name);
+		StringVector::iterator it;
+		for(it = allNames.begin(); it != allNames.end(); it++) {
+			tmp->SetValue((*it));
+			
+			if(name->Analyze(tmp) == OvalEnum::RESULT_TRUE) {
+				names->push_back((*it));
+			}
+		}
+	}
+
+	return names;
+}
+
+//bad
+StringVector* DPKGInfoProbe::GetMatchingDPKGNames(string pattern, bool isRegex) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  Get the set of all rpm names on the system that match the pattern
+	//
+	// -----------------------------------------------------------------------
+	
+	string installed_dpkg_name;
+	string installed_dpkg_status;
+
+	StringVector* names = new StringVector ();
+
+	FileFd Fd(this->StatusFile, FileFd::ReadOnly);
+	pkgTagFile Tags(&Fd);
+
+	if (_error->PendingError() == true)
+		throw ProbeException("Error: (DPKGInfoProbe) Could not read DPKG status file, which is necessary to read the packages status.");
+   
+	pkgTagSection Section;
+		
+	while (Tags.Step(Section) == true)
+   	{
+		/* Fetch the name, auto-detecting if this is a source file or a package file */
+		installed_dpkg_name = readHeaderString (Section, "Package");
+      		installed_dpkg_status = readHeaderString (Section, "Status");
+		if ( installed_dpkg_status.compare ("install ok installed") == 0 ) 
+		{
+			if (this->IsMatch (pattern, installed_dpkg_name, isRegex))
+				names->push_back (installed_dpkg_name);
+		}
+   	}
+	
+   	if (_error->PendingError() == true)
+   		throw ProbeException("Error: (DPKGInfoProbe) Error while walking DPKG database.");
+
+	return names;
+}
+
+bool DPKGInfoProbe::DPKGExists(string name) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  return true if the specifeid deb exists
+	//
+	// -----------------------------------------------------------------------
+	bool exist = false;
+	bool found = false;
+	
+	FileFd Fd(this->StatusFile, FileFd::ReadOnly);
+	pkgTagFile Tags(&Fd);
+
+	if (_error->PendingError() == true) {
+		throw ProbeException("Error: (DPKGInfoProbe) Could not read DPKG status file, which is necessary to read the DPKG database.");
+	}
+   
+	pkgTagSection Section;
+	
+	while (Tags.Step(Section) == true && found == false)
+   	{
+    		/* Fetch the name, auto-detecting if this is a source file or a package file */
+      		string installed_dpkg_name = readHeaderString (Section, "Package");
+      		string installed_dpkg_status = readHeaderString (Section, "Status");
+      		
+      		if (installed_dpkg_name.empty() == true)
+      			throw ProbeException("Error: (DPKGInfoProbe) Error while walking DPKG database.");
+      
+      		if ( installed_dpkg_name.compare (name) == 0 ) 
+      		{
+      			if (installed_dpkg_status.compare ("install ok installed") == 0 ) 
+      			{
+      				exist = true;
+	      		}	
+	      		found = true; 
+      		}
+		}
+	
+   	if (_error->PendingError() == true)
+   		throw ProbeException("Error: (DPKGInfoProbe) Error while walking DPKG database.");
+   	
+   	return exist;
+}
+
+//bad
+void DPKGInfoProbe::GetDPKGInfo(string name, ItemVector* items) {
+  //------------------------------------------------------------------------------------//
+  //
+  //  ABSTRACT
+  //
+  //  Get the data for all packages that have the name that matches dpkg_name.  
+  //
+  //------------------------------------------------------------------------------------//
+
+  /* Get the dpkg_name form the data object. */
+  const char *dpkg_name = name.c_str();
+
+  /* Create a tmp data object reference. */
+  Item *item = NULL;
+
+  /* Epoch, version, release and architecture data for output. */
+  string installed_epoch, installed_version, installed_release,installed_architecture, installed_evr;
+  string installedEpochEvr;
+
+    /* Header object for the installed package. */
+  pkgTagSection section;
+
+  /* Read in the DPKG status files */
+  FileFd Fd(this->StatusFile, FileFd::ReadOnly);
+  pkgTagFile Tags(&Fd);
+
+  if (_error->PendingError() == true) {
+	  throw ProbeException("Error: (DPKGInfoProbe) Could not read DPKG status file, which is necessary to read the DPKG database.");
+  }
+
+  while (Tags.Step(section) == true)
+  {
+	  /* Fetch the name, auto-detecting if this is a source file or a package file */
+	  string installed_dpkg_name = readHeaderString (section, "Package");
+	  string installed_dpkg_status = readHeaderString (section, "Status");
+    		
+	  if ( installed_dpkg_name.compare (dpkg_name) == 0 ) 
+	  {
+		  if (installed_dpkg_status.compare ("install ok installed") == 0 ) 
+		  {
+			  /* epoch is an int_32 -- we'll display a string to handle the None case well. */
+			  /*    char intermediate_string[11];
+			      int_32 epoch = readHeaderInt32(header, RPMTAG_EPOCH);
+			  	string installedEpochEvr;
+			  	if (epoch == -1 ) {
+			        installed_epoch = "(none)";
+			  		installedEpochEvr = "0";
+			  	} else {
+			        snprintf(intermediate_string,11,"%d",epoch);
+			        installed_epoch = intermediate_string;
+			  	  installedEpochEvr = installed_epoch;
+			      }
+			*/
+			  	//installed_epoch = "(none)";
+				installed_epoch = "0";
+			  	installedEpochEvr = installed_epoch;
+			  /* the remaining arguments are all normal strings */
+				string version = this->readHeaderString(section, "Version");
+				string::size_type find = version.rfind('-');
+				if (find != string::npos) {
+					installed_version = version.substr(0, find);
+					installed_release = version.substr(find+1, version.length());
+				} else {
+					installed_version = version;
+					installed_release = "0";
+				}
+			    	installed_architecture = this->readHeaderString(section, "Architecture");
+				installed_evr = installedEpochEvr + ":" + installed_version + "-" + installed_release;
+
+			    /* Put the data in a data object. */
+			    item = this->CreateItem();
+			    item->SetStatus(OvalEnum::STATUS_EXISTS);
+				item->AppendElement(new ItemEntity("name",  name, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+				item->AppendElement(new ItemEntity("arch",  installed_architecture, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+				item->AppendElement(new ItemEntity("epoch",  installed_epoch, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+				item->AppendElement(new ItemEntity("release",  installed_release, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+				item->AppendElement(new ItemEntity("version",  installed_version, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+				item->AppendElement(new ItemEntity("evr",  installed_evr, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+
+			    /* add the new item to the vector. */
+			    items->push_back(item);
+		  }
+	  }
+  }
+}
+
+string DPKGInfoProbe::readHeaderString(pkgTagSection Section, char* sectionName) {
+	string value;
+
+	value = Section.FindS(sectionName);
+
+	return (value);
+}


Property changes on: trunk/ovaldi/src/probes/linux/DPKGInfoProbe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/linux/DPKGInfoProbe.h
===================================================================
--- trunk/ovaldi/src/probes/linux/DPKGInfoProbe.h	                        (rev 0)
+++ trunk/ovaldi/src/probes/linux/DPKGInfoProbe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,109 @@
+//
+// $Id: DPKGInfoProbe.h 4194 2007-07-03 15:33:35Z blaze $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef DPKGInfoProbe_H
+#define DPKGInfoProbe_H
+
+#include "AbsProbe.h"
+
+#include <apt-pkg/progress.h> 	//OpTextProgress
+#include <apt-pkg/cachefile.h> 	//pkgCacheFile
+#include <apt-pkg/configuration.h> //_config
+#include <apt-pkg/tagfile.h>	//pkgTagFile, pkgTagSection 
+#include <apt-pkg/error.h> 	//_error
+
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/termios.h>
+#include <sys/wait.h>
+
+#include <fcntl.h>
+
+#include <iostream>
+#include <string>
+#include <vector>
+
+using namespace std;
+/**
+	Data collector for dpkg info test.
+*/
+class DPKGInfoProbe : public AbsProbe {
+public:
+	~DPKGInfoProbe();       
+
+	ItemVector* CollectItems(Object* object);
+	Item* CreateItem();
+
+	/** Ensure that the DPKGInfoProbe is a singleton. */
+	static AbsProbe* Instance();
+
+private:
+	string StatusFile;
+
+	DPKGInfoProbe();
+
+	/**
+		Return the name of all debs on the system that match the specirfied Object entity's criteria.
+		All names that are return have been checked and exist on the system.
+		@param name an ObjectEntity* that represents the objects to collect on the system
+		@return The matching names
+	*/
+	StringVector* GetDPKGNames(ObjectEntity* name);
+
+	/**
+		Get all deb names on the system that match the specified pattern.
+		@param pattern a string used that deb names are compared against.
+		@param isRegex a bool that is indicates how system deb names should be compared against the specifed pattern
+		@return The set of matching names.
+	*/
+	StringVector* GetMatchingDPKGNames(string pattern, bool isRegex);
+
+	/**
+		Return true if the specifeid deb exists on the system.
+		@param name a string that hold the name of the deb to check for.
+		@result The result of checking for the specifed deb on the system.
+	*/
+	bool DPKGExists(string name);
+
+	/**
+		Get all the information for the named deb.
+		@param name a string representing the name of an deb on the system.
+		@param items a vector of items that matched the deb name.
+	*/
+	void GetDPKGInfo(string name, ItemVector* items);
+
+	string readHeaderString(pkgTagSection section, char* sectionName);
+
+	static DPKGInfoProbe *instance;
+};
+
+#endif
+


Property changes on: trunk/ovaldi/src/probes/linux/DPKGInfoProbe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/linux/InetListeningServersProbe.cpp
===================================================================
--- trunk/ovaldi/src/probes/linux/InetListeningServersProbe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/probes/linux/InetListeningServersProbe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,987 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "InetListeningServersProbe.h"
+
+//****************************************************************************************//
+//						InetListeningServersProbe Class									  //	
+//****************************************************************************************//
+InetListeningServersProbe *InetListeningServersProbe::instance = NULL;
+
+InetListeningServersProbe::InetListeningServersProbe() {
+
+	netstatResult = NULL;
+}
+
+InetListeningServersProbe::~InetListeningServersProbe() {
+
+	delete this->netstatResult;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AbsProbe* InetListeningServersProbe::Instance() {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//	Ensure that the InetListeningServersProbe is a singleton.
+	// -----------------------------------------------------------------------
+
+	// Use lazy initialization
+	if(instance == NULL) 
+		instance = new InetListeningServersProbe();
+
+	return instance;	
+}
+
+
+ItemVector* InetListeningServersProbe::CollectItems(Object* object) {
+	//------------------------------------------------------------------------------------//
+	//
+	//  ABSTRACT
+	//
+	//------------------------------------------------------------------------------------//
+
+	ItemVector *collectedItems = new ItemVector();
+
+	ObjectEntity* protocol = object->GetElementByName("protocol");
+	ObjectEntity* localAddress = object->GetElementByName("local_address");
+	ObjectEntity* localPort = object->GetElementByName("local_port");
+
+
+	// check operation - only allow  equals, not equals and pattern match
+	if(protocol->GetOperation() != OvalEnum::OPERATION_EQUALS && protocol->GetOperation() != OvalEnum::OPERATION_PATTERN_MATCH && protocol->GetOperation() != OvalEnum::OPERATION_NOT_EQUAL) {
+		throw ProbeException("Error: invalid operation specified on protocol. Found: " + OvalEnum::OperationToString(protocol->GetOperation()));
+	}
+
+	// check datatypes - only allow string
+	if(protocol->GetDatatype() != OvalEnum::DATATYPE_STRING) {
+		throw ProbeException("Error: invalid data type specified on protocol. Found: " + OvalEnum::DatatypeToString(protocol->GetDatatype()));
+	}
+
+	// check operation - only allow  equals, not equals and pattern match
+	if(localAddress->GetOperation() != OvalEnum::OPERATION_EQUALS && localAddress->GetOperation() != OvalEnum::OPERATION_PATTERN_MATCH && localAddress->GetOperation() != OvalEnum::OPERATION_NOT_EQUAL) {
+		throw ProbeException("Error: invalid operation specified on protocol. Found: " + OvalEnum::OperationToString(localAddress->GetOperation()));
+	}
+
+	// check datatypes - only allow string
+	if(localAddress->GetDatatype() != OvalEnum::DATATYPE_STRING) {
+		throw ProbeException("Error: invalid data type specified on local_address. Found: " + OvalEnum::DatatypeToString(localAddress->GetDatatype()));
+	}
+
+	// check operation - only allow  equals, not equals and pattern match
+	if(localPort->GetOperation() != OvalEnum::OPERATION_EQUALS && localPort->GetOperation() != OvalEnum::OPERATION_PATTERN_MATCH && localPort->GetOperation() != OvalEnum::OPERATION_NOT_EQUAL) {
+		throw ProbeException("Error: invalid operation specified on local_port. Found: " + OvalEnum::OperationToString(localPort->GetOperation()));
+	}
+
+	// check datatypes - only allow string
+	if(localPort->GetDatatype() != OvalEnum::DATATYPE_STRING) {
+		throw ProbeException("Error: invalid data type specified on program_name. Found: " + OvalEnum::DatatypeToString(localPort->GetDatatype()));
+	}
+
+	// passed initial checks make call to netstat
+	if(this->netstatResult == NULL) {
+		this->ExecNetstat();
+		this->ParseNetstatResult();
+	}
+
+	StringVector* protocols = this->GetProtocols(protocol);
+
+	if(protocols->size() > 0) {
+		StringVector::iterator iterator;
+		for(iterator = protocols->begin(); iterator != protocols->end(); iterator++) {
+			string protocolStr = (*iterator);
+
+			StringVector* localAddresses = this->GetLocalAddresses(protocolStr, localAddress);
+
+			if(localAddresses->size() > 0) {
+
+				StringVector::iterator iterator2;
+				for(iterator2 = localAddresses->begin(); iterator2 != localAddresses->end(); iterator2++) {
+					string localAddressStr = (*iterator2);
+
+					StringVector* localPorts = this->GetLocalPorts(protocolStr, localAddressStr, localPort);
+
+					if(localPorts->size() > 0) {
+
+						StringVector::iterator iterator3;
+						for(iterator3 = localPorts->begin(); iterator3 != localPorts->end(); iterator3++) {
+							string localPortStr = (*iterator3);
+
+							Item* item = this->GetNetstat(protocolStr, localAddressStr, localPortStr);
+							if(item != NULL) {
+								collectedItems->push_back(item);
+							}				
+						}
+
+					} else {
+
+						if(localPort->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+
+							if(localPort->GetVarRef() == NULL) {
+
+								Item* item = this->CreateItem();
+								item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+								item->AppendElement(new ItemEntity("protocols",  protocolStr, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+								item->AppendElement(new ItemEntity("local_address",  localAddressStr, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+								item->AppendElement(new ItemEntity("local_port", localPort->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+								collectedItems->push_back(item);
+
+							} else {
+
+								VariableValueVector::iterator iterator;
+								for(iterator = localPort->GetVarRef()->GetValues()->begin(); iterator != localPort->GetVarRef()->GetValues()->end(); iterator++) {
+
+									Item* item = this->CreateItem();
+									item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+									item->AppendElement(new ItemEntity("protocols",  protocolStr, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+									item->AppendElement(new ItemEntity("local_address",  localAddressStr, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+									item->AppendElement(new ItemEntity("local_port", (*iterator)->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+									collectedItems->push_back(item);
+								}
+							}
+						}
+					}
+
+					localPorts->clear();
+					delete localPorts;
+				}
+
+			} else {
+
+				if(localAddress->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+
+					if(localAddress->GetVarRef() == NULL) {
+
+						Item* item = this->CreateItem();
+						item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+						item->AppendElement(new ItemEntity("protocols",  protocolStr, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+						item->AppendElement(new ItemEntity("local_address",  localAddress->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+						collectedItems->push_back(item);
+
+					} else {
+
+						VariableValueVector::iterator iterator;
+						for(iterator = localAddress->GetVarRef()->GetValues()->begin(); iterator != localAddress->GetVarRef()->GetValues()->end(); iterator++) {
+
+							Item* item = this->CreateItem();
+							item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+							item->AppendElement(new ItemEntity("protocols",  protocolStr, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+							item->AppendElement(new ItemEntity("local_address",  (*iterator)->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+							collectedItems->push_back(item);
+						}
+					}
+				}
+			}
+
+			localAddresses->clear();
+			delete localAddresses;
+		}
+
+	} else {
+
+		if(protocol->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+
+			if(protocol->GetVarRef() == NULL) {
+
+				Item* item = this->CreateItem();
+				item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+				item->AppendElement(new ItemEntity("protocols",  protocol->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+				collectedItems->push_back(item);
+
+			} else {
+
+				VariableValueVector::iterator iterator;
+				for(iterator = protocol->GetVarRef()->GetValues()->begin(); iterator != protocol->GetVarRef()->GetValues()->end(); iterator++) {
+
+					Item* item = this->CreateItem();
+					item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+					item->AppendElement(new ItemEntity("protocols",  (*iterator)->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+					collectedItems->push_back(item);
+				}
+			}
+		}
+	}
+
+	protocols->clear();
+	delete protocols;
+
+	return collectedItems;
+}  
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+Item* InetListeningServersProbe::CreateItem() {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  Return a new Item created for storing file information
+	//
+	// -----------------------------------------------------------------------
+
+	Item* item = new Item(0, 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#linux", 
+						"linux-sc", 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#linux linux-system-characteristics-schema.xsd", 
+						OvalEnum::STATUS_ERROR, 
+						"inetlisteningserver_item");
+
+	return item;
+}
+
+StringVector* InetListeningServersProbe::GetProtocols(ObjectEntity* protocol) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  Get the set of all protocols on the system that match the object
+	//
+	// -----------------------------------------------------------------------
+	StringVector* protocols = NULL;
+
+	// does this name use variables?
+	if(protocol->GetVarRef() == NULL) {
+		
+		// proceed based on operation
+		if(protocol->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			protocols = new StringVector();
+			// if the protocol exists add it to the list 
+			if(this->ProtocolExists(protocol->GetValue())) {
+				protocols->push_back(protocol->GetValue());
+			}
+
+		} else if(protocol->GetOperation() == OvalEnum::OPERATION_NOT_EQUAL) {
+			
+			protocols = this->GetMatchingProtocols(protocol->GetValue(), false);
+
+		} else if(protocol->GetOperation() == OvalEnum::OPERATION_PATTERN_MATCH) {
+			protocols = this->GetMatchingProtocols(protocol->GetValue(), true);
+		}		
+
+	} else {
+
+		protocols = new StringVector();
+
+		// Get all names
+		StringVector allProtocols;
+
+		if(protocol->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			// in the case of equals simply loop through all the 
+			// variable values and add them to the set of all names
+			// if they exist on the system
+			VariableValueVector::iterator iterator;
+			for(iterator = protocol->GetVarRef()->GetValues()->begin(); iterator != protocol->GetVarRef()->GetValues()->end(); iterator++) {
+				
+				if(this->ProtocolExists((*iterator)->GetValue())) {
+					allProtocols.push_back((*iterator)->GetValue());
+				}
+			}
+
+		} else {
+            this->GetMatchingProtocols(".*", &allProtocols);
+		}
+	
+		// loop through all names on the system
+		// only keep names that match operation and value and var check
+		ItemEntity* tmp = this->CreateItemEntity(protocol);
+		StringVector::iterator it;
+		for(it = allProtocols.begin(); it != allProtocols.end(); it++) {
+			tmp->SetValue((*it));			
+			if(protocol->Analyze(tmp) == OvalEnum::RESULT_TRUE) {
+				protocols->push_back((*it));
+			}
+		}
+	}
+
+	return protocols;
+}
+
+StringVector* InetListeningServersProbe::GetMatchingProtocols(string pattern, bool isRegex) {
+
+	StringVector* protocols = new StringVector();
+
+	// loop through the NetstatRecord Vector
+	NetstatRecordVector::iterator iterator;
+	for(iterator = this->nrv.begin(); iterator != this->nrv.end(); iterator++) {
+		NetstatRecord* nr = (NetstatRecord*)(*iterator);
+
+		if(this->IsMatch(pattern, nr->protocol, isRegex)) {
+
+			// make sure local addresses are unique
+			StringVector::iterator iterator2;
+			bool isUnique = true;
+			for(iterator2 = protocols->begin(); iterator2 != protocols->end(); iterator2++) {	
+				if((*iterator2).compare(nr->protocol) == 0) {
+					isUnique = false;
+					break;
+				}
+			}
+			if(isUnique) {
+				protocols->push_back(nr->protocol);
+			}
+		}			
+	}
+	return protocols;
+}
+
+bool InetListeningServersProbe::ProtocolExists(string protocol) {
+
+	bool exists = false;
+	// loop through the NetstatRecord Vector
+	NetstatRecordVector::iterator iterator;
+	for(iterator = this->nrv.begin(); iterator != this->nrv.end(); iterator++) {
+		NetstatRecord* nr = (NetstatRecord*)(*iterator);
+
+		if(protocol.compare(nr->protocol) == 0) {
+			exists = true;
+			break;
+		}			
+	}
+	 
+	return exists;
+}
+
+StringVector* InetListeningServersProbe::GetLocalAddresses(string protocolStr, ObjectEntity* localAddress) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  Get the set of all protocols on the system that match the object
+	//
+	// -----------------------------------------------------------------------
+	StringVector* localAddresses = NULL;
+
+	// does this name use variables?
+	if(localAddress->GetVarRef() == NULL) {
+		
+		// proceed based on operation
+		if(localAddress->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			localAddresses = new StringVector();
+			// if the localAddress exists add it to the list 
+			if(this->LocalAddressExists(protocolStr, localAddress->GetValue())) {
+				localAddresses->push_back(localAddress->GetValue());
+			}
+
+		} else if(localAddress->GetOperation() == OvalEnum::OPERATION_NOT_EQUAL) {
+			
+			localAddresses = this->GetMatchingLocalAddresses(protocolStr, localAddress->GetValue(), false);
+
+		} else if(localAddress->GetOperation() == OvalEnum::OPERATION_PATTERN_MATCH) {
+			localAddresses = this->GetMatchingLocalAddresses(protocolStr, localAddress->GetValue(), true);
+		}		
+
+	} else {
+
+		localAddresses = new StringVector();
+
+		// Get all names
+		StringVector allLocalAddresses;
+
+		if(localAddress->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			// in the case of equals simply loop through all the 
+			// variable values and add them to the set of all names
+			// if they exist on the system
+			VariableValueVector::iterator iterator;
+			for(iterator = localAddress->GetVarRef()->GetValues()->begin(); iterator != localAddress->GetVarRef()->GetValues()->end(); iterator++) {
+				
+				if(this->LocalAddressExists(protocolStr, (*iterator)->GetValue())) {
+					allLocalAddresses.push_back((*iterator)->GetValue());
+				}
+			}
+
+		} else {
+            this->GetMatchingLocalAddresses(protocolStr,".*", &allLocalAddresses);
+		}
+	
+		// loop through all names on the system
+		// only keep names that match operation and value and var check
+		ItemEntity* tmp = this->CreateItemEntity(localAddress);
+		StringVector::iterator it;
+		for(it = allLocalAddresses.begin(); it != allLocalAddresses.end(); it++) {
+			tmp->SetValue((*it));			
+			if(localAddress->Analyze(tmp) == OvalEnum::RESULT_TRUE) {
+				localAddresses->push_back((*it));
+			}
+		}
+	}
+
+	return localAddresses;
+}
+
+StringVector* InetListeningServersProbe::GetMatchingLocalAddresses(string protocolStr, string pattern, bool isRegex) {
+
+	StringVector* localAddresses = new StringVector();
+
+	// loop through the NetstatRecord Vector
+	NetstatRecordVector::iterator iterator;
+	for(iterator = this->nrv.begin(); iterator != this->nrv.end(); iterator++) {
+		NetstatRecord* nr = (NetstatRecord*)(*iterator);
+
+		if(protocolStr.compare(nr->protocol) == 0) {
+			if(this->IsMatch(pattern, nr->local_address, isRegex)) {
+
+				// make sure local addresses are unique
+				StringVector::iterator iterator2;
+				bool isUnique = true;
+				for(iterator2 = localAddresses->begin(); iterator2 != localAddresses->end(); iterator2++) {	
+					if((*iterator2).compare(nr->local_address) == 0) {
+						isUnique = false;
+						break;
+					}
+				}
+				if(isUnique) {
+					localAddresses->push_back(nr->local_address);
+				}
+			}
+		}
+	}
+	return localAddresses;
+}
+
+bool InetListeningServersProbe::LocalAddressExists(string protocolStr, string localAddress) {
+
+	bool exists = false;
+	// loop through the NetstatRecord Vector
+	NetstatRecordVector::iterator iterator;
+	for(iterator = this->nrv.begin(); iterator != this->nrv.end(); iterator++) {
+		NetstatRecord* nr = (NetstatRecord*)(*iterator);
+
+		if(protocolStr.compare(nr->protocol) == 0) {
+			if(localAddress.compare(nr->local_address) == 0) {
+				exists = true;
+				break;
+			}			
+		}
+	}
+	 
+	return exists;
+}
+
+StringVector* InetListeningServersProbe::GetLocalPorts(string protocolStr, string localAddressStr, ObjectEntity* localPort) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  Get the set of all protocols on the system that match the object
+	//
+	// -----------------------------------------------------------------------
+	StringVector* localPorts = NULL;
+
+	// does this name use variables?
+	if(localPort->GetVarRef() == NULL) {
+		
+		// proceed based on operation
+		if(localPort->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			localPorts = new StringVector();
+			// if the localPort exists add it to the list 
+			if(this->LocalPortExists(protocolStr, localAddressStr, localPort->GetValue())) {
+				localPorts->push_back(localPort->GetValue());
+			}
+
+		} else if(localPort->GetOperation() == OvalEnum::OPERATION_NOT_EQUAL) {
+			
+			localPorts = this->GetMatchingLocalPorts(protocolStr, localAddressStr, localPort->GetValue(), false);
+
+		} else if(localPort->GetOperation() == OvalEnum::OPERATION_PATTERN_MATCH) {
+			localPorts = this->GetMatchingLocalPorts(protocolStr, localAddressStr, localPort->GetValue(), true);
+		}		
+
+	} else {
+
+		localPorts = new StringVector();
+
+		// Get all names
+		StringVector allLocalPorts;
+
+		if(localPort->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			// in the case of equals simply loop through all the 
+			// variable values and add them to the set of all names
+			// if they exist on the system
+			VariableValueVector::iterator iterator;
+			for(iterator = localPort->GetVarRef()->GetValues()->begin(); iterator != localPort->GetVarRef()->GetValues()->end(); iterator++) {
+				
+				if(this->LocalPortExists(protocolStr, localAddressStr, (*iterator)->GetValue())) {
+					allLocalPorts.push_back((*iterator)->GetValue());
+				}
+			}
+
+		} else {
+            this->GetMatchingLocalPorts(protocolStr, localAddressStr, ".*", &allLocalPorts);
+		}
+	
+		// loop through all names on the system
+		// only keep names that match operation and value and var check
+		ItemEntity* tmp = this->CreateItemEntity(localPort);
+		StringVector::iterator it;
+		for(it = allLocalPorts.begin(); it != allLocalPorts.end(); it++) {
+			tmp->SetValue((*it));			
+			if(localPort->Analyze(tmp) == OvalEnum::RESULT_TRUE) {
+				localPorts->push_back((*it));
+			}
+		}
+	}
+
+	return localPorts;
+}
+
+StringVector* InetListeningServersProbe::GetMatchingLocalPorts(string protocolStr, string localAddressStr, string pattern, bool isRegex) {
+
+	StringVector* localPorts = new StringVector();
+
+	// loop through the NetstatRecord Vector
+	NetstatRecordVector::iterator iterator;
+	for(iterator = this->nrv.begin(); iterator != this->nrv.end(); iterator++) {
+		NetstatRecord* nr = (NetstatRecord*)(*iterator);
+
+		if(protocolStr.compare(nr->protocol) == 0) {
+			if(localAddressStr.compare(nr->local_address) == 0) {
+				if(this->IsMatch(pattern, nr->local_port, isRegex)) {
+					
+					// make sure local addresses are unique
+					StringVector::iterator iterator2;
+					bool isUnique = true;
+					for(iterator2 = localPorts->begin(); iterator2 != localPorts->end(); iterator2++) {	
+						if((*iterator2).compare(nr->local_port) == 0) {
+							isUnique = false;
+							break;
+						}
+					}
+					if(isUnique) {
+						localPorts->push_back(nr->local_port);
+					}
+				}
+			}
+		}
+	}
+	return localPorts;
+}
+
+bool InetListeningServersProbe::LocalPortExists(string protocolStr, string localAddressStr, string localPort) {
+
+	bool exists = false;
+	// loop through the NetstatRecord Vector
+	NetstatRecordVector::iterator iterator;
+	for(iterator = this->nrv.begin(); iterator != this->nrv.end(); iterator++) {
+		NetstatRecord* nr = (NetstatRecord*)(*iterator);
+
+		if(protocolStr.compare(nr->protocol) == 0) {
+			if(localAddressStr.compare(nr->local_address) == 0) {
+				if(localPort.compare(nr->local_port) == 0) {
+					exists = true;
+					break;
+				}
+			}
+		}
+	}
+	 
+	return exists;
+}
+
+Item* InetListeningServersProbe::GetNetstat(string protocol, string localAddress, string localPort) {
+  //------------------------------------------------------------------------------------//
+  //  ABSTRACT
+  //  
+  //  Gather the listening servers data that matches dataIn's program name
+  //  Add each match to the result vector with the test id from dataIn
+  //
+  //------------------------------------------------------------------------------------//
+
+	Item* item = NULL;
+	
+	// loop through the NetstatRecord Vector
+	NetstatRecordVector::iterator iterator;
+	for(iterator = this->nrv.begin(); iterator != this->nrv.end(); iterator++) {
+		NetstatRecord* nr = (NetstatRecord*)(*iterator);
+
+		if(protocol.compare(nr->protocol) == 0) {
+			if(localAddress.compare(nr->local_address) ==0) {
+				if(localPort.compare(nr->local_port) == 0) {
+					/* Put the data in a data object. */
+					item = this->CreateItem();
+					item->SetStatus(OvalEnum::STATUS_EXISTS);
+					item->AppendElement(new ItemEntity("protocol", nr->protocol, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+					item->AppendElement(new ItemEntity("local_address", nr->local_address, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+					item->AppendElement(new ItemEntity("local_port", nr->local_port, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+					item->AppendElement(new ItemEntity("local_full_address", nr->local_full_address, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+					item->AppendElement(new ItemEntity("program_name", nr->program_name, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));				
+					item->AppendElement(new ItemEntity("foreign_address", nr->foreign_address, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+					item->AppendElement(new ItemEntity("foreign_port", nr->foreign_port, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+					item->AppendElement(new ItemEntity("foreign_full_address", nr->foreign_full_address, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+					item->AppendElement(new ItemEntity("pid", Common::ToString(nr->pid), OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+					item->AppendElement(new ItemEntity("user_id", nr->user_id, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+				}
+			}
+		}
+	}
+
+	return item;
+}
+void InetListeningServersProbe::ExecNetstat() {
+
+	int fd1[2];
+	int fd2[2];
+	int pid = 0;
+	//char *buf = NULL;
+	//char *errbuf = NULL;
+
+	// Open communication pipes between processes
+	if (pipe(fd1) < 0 || pipe(fd2) < 0)
+		throw ProbeException("Error: (InetListeningServersProbe) Could not open pipe.");
+
+	if ((pid = fork()) < 0) {
+		throw ProbeException("Error: (InetListeningServersProbe) fork error before running netstat -tuwlnpe.");
+
+	// Child process
+	} else if (pid == 0) {
+
+		// Close unnecessary pipes
+		close (fd1[0]);
+		close (fd2[0]);  
+
+		ChildExecNetstat(fd1[1], fd2[1]);
+
+	// Parent process
+	} else {
+	
+		// Close unnecessary pipes
+		close (fd1[1]);
+		close (fd2[1]);
+
+		// Get the results of netstat
+		this->netstatResult = ParentGetChildResult(fd1[0], fd2[0], pid);
+	}  
+}
+
+void InetListeningServersProbe::ChildExecNetstat(int writeErrh, int writeh) {
+  //------------------------------------------------------------------------------------//
+  //  ABSTRACT
+  //  
+  //  Redirect stdout and stderr to the provided pipes (writeh, and writeErrh). 
+  //  Execute nestate with the correct options.
+  //
+  //------------------------------------------------------------------------------------//
+
+  // Point STDOUT and STDERR of child at pipe.  When exec program, output and
+  // all error messages will be sent down pipe instead of to screen.
+  if (writeh != STDOUT_FILENO) {
+    if (dup2(writeh, STDOUT_FILENO) != STDOUT_FILENO)
+      exit(-1);
+  }
+
+  if (writeErrh != STDERR_FILENO) {
+    if (dup2(writeErrh, STDERR_FILENO) != STDERR_FILENO)
+      exit(-1);
+  }
+
+  // Output redirected (duplicated), no longer need pipe
+  close (writeh);
+  close (writeErrh);
+
+  // Execute the command
+  execl("/bin/netstat", "netstat", "-tuwlnpe", NULL);
+
+  exit(0);
+} 
+
+NetstatResult* InetListeningServersProbe::ParentGetChildResult(int readErrh, int readh, int pid) { //, char* buf, char* errbuf) {
+  //------------------------------------------------------------------------------------//
+  //  ABSTRACT
+  //  
+  //  Read readErrh and readh until there is no more data to be read. Wait for the 
+  //  child process to complere. Return a NetstatResult object with the data from
+  //  netstat.
+  //
+  //------------------------------------------------------------------------------------//
+
+  NetstatResult *result = new NetstatResult("", "");
+  int bytes = 0;
+  int maxFDS = 0;
+  char *buf = NULL;
+  fd_set readfds;
+  bool errComplete = false;
+  bool stdComplete = false;
+
+  // Allocate memory for  buf
+  buf = (char*)malloc(sizeof(char*)*1024);
+  if(buf == NULL) {
+
+    // Wait for the child process to complete
+    waitpid (pid, NULL, 0);
+      
+    // Close the pipes
+    close (readh);
+    close (readErrh);
+
+    // Set an error message
+    result->errText.append("Error: unable to allocate memory to read netstat data into.");
+    
+    return result;
+  }
+
+  // Init the maxFDS value
+  if(readh >= readErrh) {
+    maxFDS = readh + 1;
+  }else {
+    maxFDS = readErrh + 1;
+  }
+
+  // Loop over the call to select without using a timmer
+  // Only stop looping when select fails. select will
+  // fail when the file descriptors are closed by the 
+  // child process.
+  while(!errComplete || !stdComplete) {
+
+    // Reset the fd_set
+    FD_ZERO(&readfds);
+    FD_SET(readErrh, &readfds);
+    FD_SET(readh, &readfds);
+
+    if(select(maxFDS, &readfds, NULL, NULL, NULL) != -1) {
+      if(FD_ISSET(readErrh, &readfds)) {
+	// Read some error output from command.  
+	memset(buf, '\0', 1024);
+	bytes = read(readErrh, buf, 1023);
+	result->errText.append(buf);
+
+	if(bytes == 0) 
+	  errComplete = true;
+      }
+
+      if(FD_ISSET(readh, &readfds)) { 
+	// Read allsome std output from command. 
+	memset(buf, '\0', 1024);
+	bytes = read(readh, buf, 1023);
+	result->text.append(buf);
+
+	if(bytes == 0)
+	  stdComplete = true;
+      }
+	  
+    }else {	    
+      break;
+    }
+  }
+  
+  // Wait for the child process to complete
+  if(waitpid (pid, NULL, 0) == -1) {
+    result->errText.append("Execution of netstat in child process failed.");
+    return result;
+  }
+
+  // Close the pipes
+  close (readh);
+  close (readErrh);
+
+  return result;
+}
+
+void InetListeningServersProbe::ParseNetstatResult() {
+		
+	// Walk through the netstat output lines, parsing them.
+	string tmpSTR;
+	string PIDandProgramName;
+
+	int curDelim;
+	int preDelim;
+	int curColon;
+	int preColon;
+	size_t curPos;
+	size_t tmpPos;
+
+	string Protocol;
+	string LocalFullAddress;
+	string LocalAddress;
+	string LocalPort;
+	string ForeignFullAddress;
+	string ForeignAddress;
+	string ForeignPort;
+	string UserID;
+	string PID;
+	string ProgramName;
+	bool skip;
+
+	// Toss out first two lines
+	curPos = this->netstatResult->text.find("\n") + 1;
+	curPos = this->netstatResult->text.find("\n", curPos) + 1;
+	
+	// Get the first line end 
+	tmpPos = this->netstatResult->text.find("\n", curPos);
+
+	// Parse the remaining lines.
+	while (tmpPos != string::npos) {
+		NetstatRecord *nr = new NetstatRecord();
+		
+		// Get the next string
+		tmpSTR = this->netstatResult->text.substr(curPos, (tmpPos - curPos));
+		curPos = tmpPos + 1;
+		
+		curDelim = 0;
+		preDelim = 0;
+
+		////////////////////////////////////////////
+		///// Protocol:  TCP or UDP ////////////////
+		////////////////////////////////////////////
+
+		// Find the first space and grab the characters between preDelim and that point
+		curDelim = tmpSTR.find(" ",preDelim);
+		nr->protocol = tmpSTR.substr(preDelim,(curDelim - preDelim));
+
+		// Now find the end of that whitespace
+		preDelim = tmpSTR.find_first_not_of(" ",curDelim);
+
+		////////////////////////////////////////////
+		///// Skip two fields //////////////////////
+		////////////////////////////////////////////
+		
+		// Find the next space and then skip past it
+		curDelim = tmpSTR.find(" ",preDelim);
+		preDelim = tmpSTR.find_first_not_of(" ",curDelim); 
+
+		// Do that again.
+		curDelim = tmpSTR.find(" ",preDelim);
+		preDelim = tmpSTR.find_first_not_of(" ",curDelim); 
+
+		////////////////////////////////////////////
+		///// LocalFullAddress //// ////////////////
+		////////////////////////////////////////////
+
+		curDelim = tmpSTR.find(" ",preDelim);
+		LocalFullAddress = tmpSTR.substr(preDelim,(curDelim - preDelim));
+		preDelim = tmpSTR.find_first_not_of(" ",curDelim);
+		nr->local_full_address = LocalFullAddress;
+
+		////////////////////////////////////////////
+		///// LocalAddress /////////////////////////
+		////////////////////////////////////////////
+
+		preColon = 0;
+		curColon = LocalFullAddress.find(":",preColon);
+		nr->local_address = LocalFullAddress.substr(preColon,(curColon - preColon));
+
+		////////////////////////////////////////////
+		///// LocalPort ////////////////////////////
+		////////////////////////////////////////////
+
+		preColon = curColon + 1;
+		curColon = LocalFullAddress.length();
+		nr->local_port = LocalFullAddress.substr(preColon,(curColon - preColon));
+	
+		////////////////////////////////////////////
+		///// ForeignFullAddress ///////////////////
+		////////////////////////////////////////////
+
+		curDelim = tmpSTR.find(" ",preDelim);
+		ForeignFullAddress = tmpSTR.substr(preDelim,(curDelim - preDelim));
+		preDelim = tmpSTR.find_first_not_of(" ",curDelim);
+		nr->foreign_full_address = ForeignFullAddress;
+
+		if((preDelim - curDelim) > 20)
+			skip = false;
+		else
+			skip = true;
+
+		////////////////////////////////////////////
+		///// ForeignAddress ///////////////////////
+		////////////////////////////////////////////
+
+		preColon = 0;
+		curColon = ForeignFullAddress.find(":",preColon);
+		nr->foreign_address = ForeignFullAddress.substr(preColon,(curColon - preColon));
+		
+
+		////////////////////////////////////////////
+		///// ForeignPort //////////////////////////
+		////////////////////////////////////////////
+
+		preColon = curColon + 1;
+		curColon = ForeignFullAddress.length();
+		nr->foreign_port = ForeignFullAddress.substr(preColon,(curColon - preColon));
+
+		///////////////////////////////////////////
+		///// Skip one field //////////////////////
+		///////////////////////////////////////////
+		if(skip) {
+			curDelim = tmpSTR.find(" ",preDelim);
+			preDelim = tmpSTR.find_first_not_of(" ",curDelim);
+		}
+		///////////////////////////////////////////
+		///// UserID //////////////////////////////
+		///////////////////////////////////////////
+
+		curDelim = tmpSTR.find(" ",preDelim);
+		nr->user_id = tmpSTR.substr(preDelim,(curDelim - preDelim));
+		preDelim = tmpSTR.find_first_not_of(" ",curDelim);
+
+		///////////////////////////////////////////
+		///// Skip one field //////////////////////
+		///////////////////////////////////////////
+
+		curDelim = tmpSTR.find(" ",preDelim);
+		preDelim = tmpSTR.find_first_not_of(" ",curDelim);
+
+		///////////////////////////////////////////
+		///// PID/ProgramName /////////////////////
+		///////////////////////////////////////////
+
+		curDelim = tmpSTR.find(" ",preDelim);
+		PIDandProgramName = tmpSTR.substr(preDelim,(curDelim - preDelim));
+		preDelim = tmpSTR.find_first_not_of(" ",curDelim);
+		
+		////////////////////////////////////////////
+		///// PID  /////////////////////////////////
+		////////////////////////////////////////////
+
+		preColon = 0;
+		curColon = PIDandProgramName.find("/",preColon);
+		PID = PIDandProgramName.substr(preColon,(curColon - preColon));
+		nr->pid = atoi(PID.c_str());
+			
+		////////////////////////////////////////////
+		///// ProgramName //////////////////////////
+		////////////////////////////////////////////
+
+		preColon = curColon + 1;
+		curColon = PIDandProgramName.length();
+		nr->program_name = PIDandProgramName.substr(preColon,(curColon - preColon));
+
+
+		nrv.push_back(nr);
+
+		// Get the next line end 
+		tmpPos = this->netstatResult->text.find("\n", curPos);  
+	}  
+}
+
+
+  


Property changes on: trunk/ovaldi/src/probes/linux/InetListeningServersProbe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/linux/InetListeningServersProbe.h
===================================================================
--- trunk/ovaldi/src/probes/linux/InetListeningServersProbe.h	                        (rev 0)
+++ trunk/ovaldi/src/probes/linux/InetListeningServersProbe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,191 @@
+//
+// $Id: InetListeningServersProbe.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef _INETLISTENINGSERVERPROBE_H_
+#define _INETLISTENINGSERVERPROBE_H_
+
+#include "AbsProbe.h"
+
+// Include the data class
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/termios.h>
+#include <sys/wait.h>
+#include <iostream>
+#include <string>
+
+/// 110 characters + 20 characters for the program name, it appears. 
+#define NETSTAT_BUFLEN 200
+
+using namespace std;
+
+/**
+	Store the results of a call to netstat.
+*/
+class NetstatResult {
+ public:
+	NetstatResult(string e, string t) : errText(e), text(t){};
+	string errText;
+	string text;
+};
+
+/**
+	Stor a single record from a call to netstat it its nicely parsed form
+*/
+class NetstatRecord {
+
+public: 
+	NetstatRecord(){};
+	NetstatRecord(string pr, string la, string lp, string lfa, string pn, string fa, string fp, string ffa, int p, string u) :
+	  protocol(pr), local_address(la), local_port(lp), local_full_address(lfa), program_name(pn), foreign_address(fa), foreign_port(fp),
+		  foreign_full_address(ffa), pid(p), user_id(u){};
+	~NetstatRecord(){};
+	
+	string protocol;
+	string local_address;
+	string local_port;
+	string local_full_address;
+	string program_name;
+	string foreign_address;
+	string foreign_port;
+	string foreign_full_address;
+	int pid;
+	string user_id;
+};
+
+/**
+	A vector for storing NetstatRecord objects.
+	All objects are stored by reference.
+*/
+typedef vector < NetstatRecord*, allocator<NetstatRecord*> > NetstatRecordVector;
+
+/**
+	Red Hat data collector for inetlisteningservers_test.
+*/
+class InetListeningServersProbe : public AbsProbe {
+public:
+	~InetListeningServersProbe();       
+
+	ItemVector* CollectItems(Object* object);
+	Item* CreateItem();
+
+	static AbsProbe* Instance();
+
+private:
+	InetListeningServersProbe();
+
+	/**
+		Get the set of all protocols on the system that match the object
+	*/
+	StringVector* GetProtocols(ObjectEntity* protocol);
+	/**
+		Get the set of all local addresses on the system that match the object
+	*/
+	StringVector* GetLocalAddresses(string protocolStr, ObjectEntity* localAddress);
+	/**
+		Get the set of all local ports on the system that match the object
+	*/
+	StringVector* GetLocalPorts(string protocolStr, string localAddressStr, ObjectEntity* localPort);
+
+	/**
+		Collect all information that matches the specified program name.
+		@param protocol a string the protocol
+		@param localAddress a string the local address
+		@param localPort a string the local port 
+		@param itesm a ItemVector* a vector of items that matched the specified protocol, port, and address
+	*/
+	Item* GetNetstat(string protocol, string localAddress, string localPort);
+
+	/**
+		Check that the specified protocol exists on the system.
+		@param protocol a string representing the program name to look for.
+		@result The result of searching for the specified program name.
+	*/
+	bool ProtocolExists(string protocol);
+
+	/**
+		Check that the specified local address exists on the system.
+	*/
+	bool LocalAddressExists(string protocolStr, string localAddress);
+
+	/**
+		Check that the specified local port exists on the system.
+	*/
+	bool LocalPortExists(string protocolStr, string localAddressStr, string localPort);
+
+	/**
+		Get all protocols on the system that match the specified pattern.
+		@param pattern a string used that protocols are compared against.
+		@param isRegex a bool that is indicates how system protocols should be compared against the specifed pattern
+		@return The set of matching protocols.
+	*/
+	StringVector* GetMatchingProtocols(string pattern, bool isRegex);
+
+	/**
+		Get all local addresses on the system that match the specified pattern.
+		@return The set of matching local addresses.
+	*/
+	StringVector* GetMatchingLocalAddresses(string protocolStr, string pattern, bool isRegex);
+
+	/**
+		Get all local ports on the system that match the specified pattern.
+		@return The set of matching local ports.
+	*/
+	StringVector* GetMatchingLocalPorts(string protocolStr, string localAddressStr, string pattern, bool isRegex);
+
+	/**
+		Start a child processand make a call to netstat.
+		Store all netstat results in a NetStat result object. 
+	*/
+	void ExecNetstat();
+
+	/**
+		Child process function to execute netstat.
+	*/
+	void ChildExecNetstat(int, int);
+
+	/**
+		Parent process function to to get the results fromt he child process.
+	*/
+	NetstatResult* ParentGetChildResult(int, int, int);//, char*, char*);
+
+	/** 
+		parse the netstat results in a vector of netstar records
+	*/
+	void ParseNetstatResult();
+
+	static InetListeningServersProbe *instance;
+
+	NetstatResult* netstatResult;
+	NetstatRecordVector nrv;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/probes/linux/InetListeningServersProbe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/linux/RPMInfoProbe.cpp
===================================================================
--- trunk/ovaldi/src/probes/linux/RPMInfoProbe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/probes/linux/RPMInfoProbe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,643 @@
+//
+// $Id: RPMInfoProbe.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "RPMInfoProbe.h"
+
+//****************************************************************************************//
+//								RPMInfoProbe Class										  //	
+//****************************************************************************************//
+RPMInfoProbe *RPMInfoProbe::instance = NULL;
+
+RPMInfoProbe::RPMInfoProbe() {
+
+}
+
+RPMInfoProbe::~RPMInfoProbe() {
+
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AbsProbe* RPMInfoProbe::Instance() {
+
+	// Use lazy initialization
+	if(instance == NULL) 
+		instance = new RPMInfoProbe();
+
+	return instance;	
+}
+
+ItemVector* RPMInfoProbe::CollectItems(Object* object) {
+
+	ItemVector *collectedItems = new ItemVector();
+
+	ObjectEntity* name = object->GetElementByName("name");
+
+	// check datatypes - only allow string
+	if(name->GetDatatype() != OvalEnum::DATATYPE_STRING) {
+		throw ProbeException("Error: invalid data type specified on name. Found: " + OvalEnum::DatatypeToString(name->GetDatatype()));
+	}
+
+	// check operation - only allow  equals, not equals and pattern match
+	if(name->GetOperation() != OvalEnum::OPERATION_EQUALS && name->GetOperation() != OvalEnum::OPERATION_PATTERN_MATCH && name->GetOperation() != OvalEnum::OPERATION_NOT_EQUAL) {
+		throw ProbeException("Error: invalid operation specified on name. Found: " + OvalEnum::OperationToString(name->GetOperation()));
+	}
+
+	StringVector* names = this->GetRPMNames(name);
+	if(names->size() > 0) {
+		StringVector::iterator iterator;
+		for(iterator = names->begin(); iterator != names->end(); iterator++) {		
+			this->GetRPMInfo((*iterator), collectedItems);
+		}
+	} else {
+
+		if(name->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+
+			if(name->GetVarRef() == NULL) {
+
+				Item* item = this->CreateItem();
+				item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+				item->AppendElement(new ItemEntity("name",  name->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+				collectedItems->push_back(item);
+
+			} else {
+
+				VariableValueVector::iterator iterator;
+				for(iterator = name->GetVarRef()->GetValues()->begin(); iterator != name->GetVarRef()->GetValues()->end(); iterator++) {
+
+					Item* item = this->CreateItem();
+					item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+					item->AppendElement(new ItemEntity("name",  (*iterator)->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+					collectedItems->push_back(item);
+				}
+			}
+		}
+	}
+	names->clear();
+	delete names;
+
+	return collectedItems;
+}  
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+Item* RPMInfoProbe::CreateItem() {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  Return a new Item created for storing file information
+	//
+	// -----------------------------------------------------------------------
+
+	Item* item = new Item(0, 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#linux", 
+						"linux-sc", 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#linux linux-system-characteristics-schema.xsd", 
+						OvalEnum::STATUS_ERROR, 
+						"rpminfo_item");
+
+	return item;
+}
+
+StringVector* RPMInfoProbe::GetRPMNames(ObjectEntity* name) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  Get the set of all rpm names on the system taht match the object
+	//
+	// -----------------------------------------------------------------------
+	StringVector* names = NULL;
+
+	// does this name use variables?
+	if(name->GetVarRef() == NULL) {
+		
+		// proceed based on operation
+		if(name->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			names = new StringVector();
+			// if the name exists add it to the list 
+			if(this->RPMExists(name->GetValue())) {
+				names->push_back(name->GetValue());
+			}
+
+		} else if(name->GetOperation() == OvalEnum::OPERATION_NOT_EQUAL) {
+			
+			names = this->GetMatchingRPMNames(name->GetValue(), false);
+
+		} else if(name->GetOperation() == OvalEnum::OPERATION_PATTERN_MATCH) {
+			names = this->GetMatchingRPMNames(name->GetValue(), true);
+		}		
+
+	} else {
+
+		names = new StringVector();
+
+		// Get all names
+		StringVector allNames;
+
+		if(name->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			// in the case of equals simply loop through all the 
+			// variable values and add them to the set of all names
+			// if they exist on the system
+			VariableValueVector::iterator iterator;
+			for(iterator = name->GetVarRef()->GetValues()->begin(); iterator != name->GetVarRef()->GetValues()->end(); iterator++) {
+				
+				if(this->RPMExists((*iterator)->GetValue())) {
+					allNames.push_back((*iterator)->GetValue());
+				}
+			}
+
+		} else {
+            this->GetMatchingRPMNames(".*", &allNames);
+		}
+	
+		// loop through all names on the system
+		// only keep names that match operation and value and var check
+		ItemEntity* tmp = this->CreateItemEntity(name);
+		StringVector::iterator it;
+		for(it = allNames.begin(); it != allNames.end(); it++) {
+			tmp->SetValue((*it));
+			
+			if(name->Analyze(tmp) == OvalEnum::RESULT_TRUE) {
+				names->push_back((*it));
+			}
+		}
+	}
+
+	return names;
+}
+
+StringVector* RPMInfoProbe::GetMatchingRPMNames(string pattern, bool isRegex) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  Get the set of all rpm names on the system that match the pattern
+	//
+	// -----------------------------------------------------------------------
+
+	StringVector* names = new StringVector();
+
+	/* Transaction sets are the modern way to read the RPM database. */
+	rpmts ts;
+	/* We use an iterator to walk the RPM database. */
+	rpmdbMatchIterator iterator;
+	/* Header object for the installed package. */
+	Header header;
+
+	string installed_rpm_name;
+
+	/* Read in the RPM config files */
+	if (rpmReadConfigFiles( (const char*) NULL, (const char*) NULL)) 
+		throw ProbeException("Error: (RPMInfoProbe) Could not read RPM config files, which is necessary to read the RPM database.");
+
+	/* Create an rpm database transaction set. */
+	ts = rpmtsCreate();
+
+	/* Create an iterator to walk the database. */	
+	iterator = rpmtsInitIterator(ts, RPMTAG_NAME, NULL, 0);
+	if (iterator == NULL)
+		throw ProbeException("Error: (RPMInfoProbe) Could not create an iterator to walk the RPM database.");
+	
+	/* Look at each installed package matching this name.  Generally, there is only one.*/
+	while ( (header = rpmdbNextIterator(iterator)) != NULL) {
+		/* Get the rpm_name value for comparision. */
+		installed_rpm_name = readHeaderString(header, RPMTAG_NAME);
+
+		/* Check to see if name found matches input pattern. */
+		if(this->IsMatch(pattern, installed_rpm_name, isRegex)) {
+			names->push_back(installed_rpm_name);
+		}
+	}
+
+	/* Free the iterator and transaction set data structures. */
+	rpmdbFreeIterator(iterator);
+	rpmtsFree(ts);
+
+	return names;
+}
+
+
+bool RPMInfoProbe::RPMExists(string name) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  return true if the specifeid rpm exists
+	//
+	// -----------------------------------------------------------------------
+	bool exists = false;
+
+	/* Transaction sets are the modern way to read the RPM database. */
+	rpmts ts;
+	/* We use an iterator to walk the RPM database. */
+	rpmdbMatchIterator iterator;
+	/* Header object for the installed package. */
+	Header header;
+
+	string installed_rpm_name;
+
+	/* Read in the RPM config files */
+	if (rpmReadConfigFiles( (const char*) NULL, (const char*) NULL)) 
+		throw ProbeException("Error: (RPMInfoProbe) Could not read RPM config files, which is necessary to read the RPM database.");
+
+	/* Create an rpm database transaction set. */
+	ts = rpmtsCreate();
+
+	/* Create an iterator to walk the database. */	
+	iterator = rpmtsInitIterator(ts, RPMTAG_NAME, NULL, 0);
+	if (iterator == NULL)
+		throw ProbeException("Error: (RPMInfoProbe) Could not create an iterator to walk the RPM database.");
+	
+	/* Look at each installed package matching this name.  Generally, there is only one.*/
+	while ( (header = rpmdbNextIterator(iterator)) != NULL) {
+		/* Get the rpm_name value for comparision. */
+		installed_rpm_name = readHeaderString(header, RPMTAG_NAME);
+
+		/* Check to see if name found matches input pattern. */
+		if(name.compare(installed_rpm_name) == 0) {
+			exists = true;
+			break;
+		}
+	}
+
+	/* Free the iterator and transaction set data structures. */
+	rpmdbFreeIterator(iterator);
+	rpmtsFree(ts);
+
+	return exists;
+}
+
+void RPMInfoProbe::GetRPMInfo(string name, ItemVector* items) {
+  //------------------------------------------------------------------------------------//
+  //
+  //  ABSTRACT
+  //
+  //  Get the data for all packages that have the name that matches rpm_name.  
+  //
+  //------------------------------------------------------------------------------------//
+
+  /* Get the rpm_name form the data object. */
+  const char *rpm_name = name.c_str();
+
+  /* Create a tmp data object reference. */
+  Item *item = NULL;
+  
+  /* Transaction sets are the modern way to read the RPM database. */
+  rpmts ts;
+  /* We use an iterator to walk the RPM database. */
+  rpmdbMatchIterator iterator;
+  /* Header object for the installed package. */
+  Header header;
+  /* Epoch, version, release and architecture data for output. */
+  string installed_epoch, installed_version, installed_release,installed_architecture, installed_evr, installed_signature_keyid;
+
+  /* Read in the RPM config files */
+  if (rpmReadConfigFiles( (const char*) NULL, (const char*) NULL)) 
+	  throw ProbeException("Error: (RPMInfoProbe) Could not read RPM config files, which is necessary to read the RPM database.");
+
+  /* Create an rpm database transaction set. */
+  ts = rpmtsCreate();
+
+  /* Create an iterator to walk the database. */	
+  iterator = rpmtsInitIterator(ts, RPMTAG_NAME, rpm_name, 0);
+  if (iterator == NULL)
+    throw ProbeException("Error: (RPMInfoProbe) Could not create an iterator to walk the RPM database.");
+
+  /* Look at each installed package matching this name.  Generally, there is only one.*/
+  while ( (header = rpmdbNextIterator(iterator)) != NULL) {
+
+    /* epoch is an int_32 -- we'll display a string to handle the None case well. */
+    char intermediate_string[11];
+    int_32 epoch = readHeaderInt32(header, RPMTAG_EPOCH);
+	string installedEpochEvr;
+	if (epoch == -1 ) {
+      installed_epoch = "(none)";
+		installedEpochEvr = "0";
+	} else {
+      snprintf(intermediate_string,11,"%d",epoch);
+      installed_epoch = intermediate_string;
+	  installedEpochEvr = installed_epoch;
+    }
+
+    /* the remaining arguments are all normal strings */
+    installed_version = this->readHeaderString(header, RPMTAG_VERSION);
+    installed_release = this->readHeaderString(header, RPMTAG_RELEASE);
+    installed_architecture = this->readHeaderString(header, RPMTAG_ARCH);
+	installed_evr = installedEpochEvr + ":" + installed_version + "-" + installed_release;
+
+	installed_signature_keyid = this->GetSigKeyId(name);  
+
+    /* Put the data in a data object. */
+    item = this->CreateItem();
+    item->SetStatus(OvalEnum::STATUS_EXISTS);
+	item->AppendElement(new ItemEntity("name",  name, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("arch",  installed_architecture, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("epoch",  installed_epoch, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("release",  installed_release, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("version",  installed_version, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("evr",  installed_evr, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("signature_keyid",  installed_signature_keyid, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+
+    /* add the new item to the vector. */
+    items->push_back(item);
+
+  }
+
+  /* Free the iterator and transaction set data structures. */
+  rpmdbFreeIterator(iterator);
+  rpmtsFree(ts);
+}
+
+char* RPMInfoProbe::readHeaderString(Header header, int_32 tag_id) {
+  // This function is from the Red Hat RPM Guide //
+  int_32 type;
+  void *pointer;
+  int_32 data_size;
+
+  int header_status = headerGetEntry(header,
+				     tag_id,
+				     &type,
+				     &pointer,
+				     &data_size);
+
+	
+  if (header_status) {
+    if (type == RPM_STRING_TYPE) {
+      return (char *) pointer;
+    }
+  }
+
+  return (NULL);
+}
+
+int_32 RPMInfoProbe::readHeaderInt32(Header header, int_32 tag_id) {
+  // This function is from the Red Hat RPM Guide //
+  int_32 type;
+  void *pointer;
+  int_32 data_size;
+
+  int header_status = headerGetEntry(header,
+				     tag_id,
+				     &type,
+				     (void **) &pointer,
+				     &data_size);
+	
+  if (header_status) {
+    if (type == RPM_INT32_TYPE) {
+      int_32 *p = (int_32 *) pointer;
+      return *p;
+    }
+  }
+  return( -1 );
+}
+
+void RPMInfoProbe::ChildGetSigKeyId(int writeErrh, int writeh, string rpmName) {
+  //------------------------------------------------------------------------------------//
+  //  ABSTRACT
+  //  
+  //  Redirect stdout and stderr to the provided pipes (writeh, and writeErrh). 
+  //  Execute rpm query with the correct options.
+  //  see: http://fedora.redhat.com/docs/drafts/rpm-guide-en/ch15s05.html
+  //
+  //------------------------------------------------------------------------------------//
+
+  // Point STDOUT and STDERR of child at pipe.  When exec program, output and
+  // all error messages will be sent down pipe instead of to screen.
+  if (writeh != STDOUT_FILENO) {
+    if (dup2(writeh, STDOUT_FILENO) != STDOUT_FILENO)
+      exit(-1);
+  }
+
+  if (writeErrh != STDERR_FILENO) {
+    if (dup2(writeErrh, STDERR_FILENO) != STDERR_FILENO)
+      exit(-1);
+  }
+
+  // Output redirected (duplicated), no longer need pipe
+  close (writeh);
+  close (writeErrh);
+
+  /////////////////////////////////////////////////////
+  ////////     Call the rpmcli query code  ////////////
+  /////////////////////////////////////////////////////
+
+  // recreate a set of command line args for rpmcli functions
+	int count = 4;
+	char* arg0 = "blah";
+	char* arg1 = "-q";
+	char* arg2 = "--queryformat=\"%{SIGGPG:pgpsig}\"";
+	char arg3[128] = "";
+	strcat(arg3, rpmName.c_str());
+	char* args[count];
+	args[0] = arg0;
+	args[1] = arg1;
+	args[2] = arg2;
+	args[3] = arg3;
+
+	/* Set up a table of options. */
+	struct poptOption optionsTable[] = {
+		{ NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmcliAllPoptTable, 0, "Common options for all rpm modes and executables:", NULL },
+        { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmQueryPoptTable, 0, "Query options (with -q or --query):", NULL },
+        POPT_AUTOALIAS
+        POPT_AUTOHELP
+        POPT_TABLEEND
+        };
+
+	poptContext context;
+	QVA_t qva = &rpmQVKArgs;	
+	rpmts ts;
+	int ec;
+	context = rpmcliInit(count, args, optionsTable);
+
+    if (context == NULL) {
+		/*poptPrintUsage(context, stderr, 0);
+        exit(EXIT_FAILURE);*/
+		cerr << "Error: rpmcliInit returned a null context." << endl; 
+    }
+
+    ts = rpmtsCreate();
+
+	/* Check for query mode. */
+    if (qva->qva_mode == 'q') {
+
+        /* Make sure there's something to do. */
+        if (qva->qva_source != RPMQV_ALL && !poptPeekArg(context)) {
+            fprintf(stderr, "no arguments given for --query");
+            exit(EXIT_FAILURE);
+		}
+        ec = rpmcliQuery(ts, qva, (const char **) poptGetArgs(context));
+
+	} else {
+		cerr << "Unable to get sig key id for rpm: " << rpmName << endl;        
+    }
+
+	ts = rpmtsFree(ts);
+    context = rpmcliFini(context);
+
+  /////////////////////////////////////////////////////
+  ////////////  end rpmcliquery code   ////////////////
+  /////////////////////////////////////////////////////
+
+	exit(0);
+} 
+
+string RPMInfoProbe::ParentGetSigKeyId(int readErrh, int readh, int pid) { 
+  //------------------------------------------------------------------------------------//
+  //  ABSTRACT
+  //  
+  //  Read readErrh and readh until there is no more data to be read. Wait for the 
+  //  child process to complere. Return a the result string with the data.
+  //
+  //------------------------------------------------------------------------------------//
+  int bytes = 0;
+  int maxFDS = 0;
+  char *buf = NULL;
+  fd_set readfds;
+  bool errComplete = false;
+  bool stdComplete = false;
+  string errText = "";
+  string text = "";
+
+  // Allocate memory for  buf
+  buf = (char*)malloc(sizeof(char*)*1024);
+  if(buf == NULL) {
+
+    // Wait for the child process to complete
+    waitpid (pid, NULL, 0);
+      
+    // Close the pipes
+    close (readh);
+    close (readErrh);
+
+    // Set an error message
+	throw ProbeException("Error: unable to allocate memory to read rpm query data into.");
+  }
+
+  // Init the maxFDS value
+  if(readh >= readErrh) {
+    maxFDS = readh + 1;
+  }else {
+    maxFDS = readErrh + 1;
+  }
+
+  // Loop over the call to select without using a timmer
+  // Only stop looping when select fails. select will
+  // fail when the file descriptors are closed by the 
+  // child process.
+  while(!errComplete || !stdComplete) {
+
+    // Reset the fd_set
+    FD_ZERO(&readfds);
+    FD_SET(readErrh, &readfds);
+    FD_SET(readh, &readfds);
+
+    if(select(maxFDS, &readfds, NULL, NULL, NULL) != -1) {
+      if(FD_ISSET(readErrh, &readfds)) {
+		// Read some error output from command.  
+		memset(buf, '\0', 1024);
+		bytes = read(readErrh, buf, 1023);
+		errText.append(buf);
+			if(bytes == 0) 
+				errComplete = true;
+	}
+
+      if(FD_ISSET(readh, &readfds)) { 
+	// Read allsome std output from command. 
+	memset(buf, '\0', 1024);
+	bytes = read(readh, buf, 1023);
+	text.append(buf);
+
+	if(bytes == 0)
+	  stdComplete = true;
+      }
+	  
+    }else {	    
+      break;
+    }
+  }
+  
+  // Wait for the child process to complete
+  if(waitpid (pid, NULL, 0) == -1) {
+    errText.append("Execution of rpm query in child process failed.");
+    throw ProbeException(errText);
+  }
+
+  // Close the pipes
+  close (readh);
+  close (readErrh);
+
+  if(errText.compare("") != 0) {
+	  throw ProbeException("Error running rpm query in child process: " + errText);
+  }
+  return text;
+}
+
+string RPMInfoProbe::GetSigKeyId(string rpmName) {
+
+	string sigKeyId = "";
+	int fd1[2];
+	int fd2[2];
+	int pid = 0;
+
+	// Open communication pipes between processes
+	if (pipe(fd1) < 0 || pipe(fd2) < 0)
+		throw ProbeException("Error: (RPMInfoProbe) Could not open pipe.");
+
+	if ((pid = fork()) < 0) {
+		throw ProbeException("Error: (RPMInfoProbe) fork error before running rpm query.");
+
+	// Child process
+	} else if (pid == 0) {
+
+		// Close unnecessary pipes
+		close (fd1[0]);
+		close (fd2[0]);  
+
+		this->ChildGetSigKeyId(fd1[1], fd2[1], rpmName);
+
+	// Parent process
+	} else {
+	
+		// Close unnecessary pipes
+		close (fd1[1]);
+		close (fd2[1]);
+
+		// Get the results of the rpm query
+		string text = this->ParentGetSigKeyId(fd1[0], fd2[0], pid);
+		// parse the string and get just the key id portion - just the last 16 chars minus the quotation mark
+		sigKeyId = text.substr(text.length()-17, 16);
+	}  
+	return sigKeyId;
+}


Property changes on: trunk/ovaldi/src/probes/linux/RPMInfoProbe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/linux/RPMInfoProbe.h
===================================================================
--- trunk/ovaldi/src/probes/linux/RPMInfoProbe.h	                        (rev 0)
+++ trunk/ovaldi/src/probes/linux/RPMInfoProbe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,115 @@
+//
+// $Id: RPMInfoProbe.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef RPMInfoProbe_H
+#define RPMInfoProbe_H
+
+#include "AbsProbe.h"
+
+#include <rpm/rpmlib.h>
+#include <rpm/rpmio.h>
+#include <rpm/rpmts.h>
+#include <rpm/rpmdb.h>
+#include <rpm/header.h>
+#include <rpm/rpmcli.h> // added for rpm query function
+#include <rpm/rpmds.h> // added for rpm query function
+#include <popt.h> // added for rpm query function
+
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/termios.h>
+#include <sys/wait.h>
+
+#include <fcntl.h>
+
+#include <iostream>
+#include <string>
+#include <vector>
+
+using namespace std;
+/**
+	Data collector for rpm info test.
+*/
+class RPMInfoProbe : public AbsProbe {
+public:
+	~RPMInfoProbe();       
+
+	ItemVector* CollectItems(Object* object);
+	Item* CreateItem();
+
+	/** Ensure that the RPMInfoProbe is a singleton. */
+	static AbsProbe* Instance();
+
+private:
+	RPMInfoProbe();
+
+	/**
+		Return the name of all rpms on the system that match the specirfied Object entity's criteria.
+		All names that are return have been checked and exist on the system.
+		@param name an ObjectEntity* that represents the objects to collect on the ssytem
+		@return The mathcing names
+	*/
+	StringVector* GetRPMNames(ObjectEntity* name);
+
+	/**
+		Get all rpm names on the system that match the specified pattern.
+		@param pattern a string used that rpm names are compared against.
+		@param isRegex a bool that is indicates how system rpm names should be compared against the specifed pattern
+		@return The set of matching names.
+	*/
+	StringVector* GetMatchingRPMNames(string pattern, bool isRegex);
+
+	/**
+		Return true if the specifeid rpm exists on the system.
+		@param name a string that hold the name of the rpm to check for.
+		@result The result of checking for the specifed rpm on the system.
+	*/
+	bool RPMExists(string name);
+
+	/**
+		Get all the information for the named rpm.
+		@param name a string representing the name of an rpm on the system.
+		@param items a vector of items that matched the rpm name.
+	*/
+	void GetRPMInfo(string name, ItemVector* items);
+
+	string ParentGetSigKeyId(int readErrh, int readh, int pid);
+	void ChildGetSigKeyId(int writeErrh, int writeh, string rpmName);
+	string GetSigKeyId(string rpmName);
+
+	string readHeaderBinary(Header header, int_32 tag_id);
+	char *readHeaderString(Header header, int_32 tag_id);
+	int_32 readHeaderInt32(Header header, int_32 tag_id);
+
+	static RPMInfoProbe *instance;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/probes/linux/RPMInfoProbe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/solaris/readme.txt
===================================================================
--- trunk/ovaldi/src/probes/solaris/readme.txt	                        (rev 0)
+++ trunk/ovaldi/src/probes/solaris/readme.txt	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1 @@
+put all solaris probes here.
\ No newline at end of file


Property changes on: trunk/ovaldi/src/probes/solaris/readme.txt
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/unix/FileProbe.cpp
===================================================================
--- trunk/ovaldi/src/probes/unix/FileProbe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/probes/unix/FileProbe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,366 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "FileProbe.h"
+
+//****************************************************************************************//
+//								FileProbe Class											  //	
+//****************************************************************************************//
+FileProbe* FileProbe::instance = NULL;
+
+FileProbe::FileProbe() {
+
+}
+
+FileProbe::~FileProbe() {
+
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AbsProbe* FileProbe::Instance() {
+
+	// Use lazy initialization
+	if(instance == NULL) 
+		instance = new FileProbe();
+
+	return instance;	
+}
+
+ItemVector* FileProbe::CollectItems(Object* object) {
+
+	ItemVector *collectedItems = new ItemVector();
+
+	// get the path and file name
+	ObjectEntity* path = object->GetElementByName("path");
+	ObjectEntity* fileName = object->GetElementByName("filename");
+
+	FileFinder fileFinder;
+	StringPairVector* filePaths = fileFinder.SearchFiles(path, fileName, object->GetBehaviors());
+
+	if(filePaths->size() > 0) {
+		// Loop through all file paths
+		StringPairVector::iterator iterator;
+		for(iterator = filePaths->begin(); iterator != filePaths->end(); iterator++) {
+
+			StringPair* fp = (*iterator);
+
+			if(fp->second.compare("") == 0) {
+
+				StringVector fileNames;
+				if(fileFinder.ReportFileNameDoesNotExist(fp->first, fileName, &fileNames)) {
+					StringVector::iterator iterator;
+					for(iterator = fileNames.begin(); iterator != fileNames.end(); iterator++) {
+
+						Item* item = this->CreateItem();
+						item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+						item->AppendElement(new ItemEntity("path", fp->first, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+						item->AppendElement(new ItemEntity("filename", (*iterator), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+						collectedItems->push_back(item);
+					}
+					
+				} else {
+
+					Item* item = this->GetFileAttributes(fp->first, "");
+					if(item != NULL) {
+						collectedItems->push_back(item);
+					}
+					item = NULL;
+
+				}				
+
+			} else {
+
+				Item* item = this->GetFileAttributes(fp->first, fp->second);
+				if(item != NULL) {
+					collectedItems->push_back(item);
+				}
+				item = NULL;
+
+			}
+
+			delete fp;
+		}
+
+	} else {
+		// if no filepaths check if the code should report that the path does not exist
+		StringVector paths;
+		if(fileFinder.ReportPathDoesNotExist(path, &paths)) {
+
+			Item* item = NULL;
+			StringVector::iterator iterator;
+			for(iterator = paths.begin(); iterator != paths.end(); iterator++) {
+
+				item = this->CreateItem();
+				item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+				item->AppendElement(new ItemEntity("path", (*iterator), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+				collectedItems->push_back(item);
+			}
+		}
+	}
+	delete filePaths;
+
+	return collectedItems;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+Item* FileProbe::CreateItem() {
+
+	Item* item = new Item(0, 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#unix", 
+						"unix-sc", 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#unix unix-system-characteristics-schema.xsd", 
+						OvalEnum::STATUS_ERROR, 
+						"file_item");
+
+	return item;
+}
+
+Item* FileProbe::GetFileAttributes(string path, string fileName) {
+
+	string errorMessage = "";
+
+	Item *item = NULL;
+
+	string filePath = path;
+	if(fileName.compare("") != 0) {
+		if(path[path.length()-1] != '/')
+			filePath.append(1, '/');
+
+		if(fileName[0] != '/') {
+			filePath.append(fileName);
+		} else {
+			filePath.append(fileName.substr(1, fileName.length()-2));
+		}
+	}
+
+	//////////////////////////////////////////////////////
+	/////////////////////  FileType  /////////////////////
+	//////////////////////////////////////////////////////
+
+	struct stat sbuf;
+	if (lstat(filePath.c_str(), &sbuf) != 0) {
+
+		// check error messages
+		if(errno == ENOTDIR) {
+			throw ProbeException("A component of the path prefix is not a directory.");
+		} else if(errno == ENAMETOOLONG) {
+			throw ProbeException("A component of a pathname exceeded {NAME_MAX} characters, or an entire path name exceeded {PATH_MAX} characters.");		
+		} else if(errno == EACCES) {
+			throw ProbeException("Search permission is denied for a component of the path prefix.");
+		} else if(errno == ELOOP) {
+			throw ProbeException("Too many symbolic links were encountered in translating the pathname.");
+		} else if(errno == EFAULT) {
+			throw ProbeException("Sb or name points to an invalid address.");
+		} else if(errno == EIO) {	
+			throw ProbeException("An I/O error occurred while reading from or writing to the file system.");
+		} else if(errno == ENOENT) {
+			return NULL;
+		}
+	}
+
+	// Set the status of the file to exists
+	item = this->CreateItem();
+	item->SetStatus(OvalEnum::STATUS_EXISTS);
+	item->AppendElement(new ItemEntity("path", path, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+	if(fileName.compare("") != 0) {
+		item->AppendElement(new ItemEntity("filename", fileName, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+	}
+
+	mode_t mode;
+	mode = sbuf.st_mode;
+	ItemEntity* type = new ItemEntity("type", "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS);
+
+	if ((mode & 0xF000) == S_IFIFO) type->SetValue("fifo");
+	else if ((mode & 0xF000) == S_IFCHR) type->SetValue("character");
+	else if ((mode & 0xF000) == S_IFDIR) type->SetValue("directory");
+	else if ((mode & 0xF000) == S_IFBLK) type->SetValue("block special");
+	else if ((mode & 0xF000) == S_IFREG) type->SetValue("regular");
+	else if ((mode & 0xF000) == S_IFLNK) type->SetValue("symbolic link");
+	else if ((mode & 0xF000) == S_IFSOCK) type->SetValue("socket");
+	item->AppendElement(type);
+
+	//////////////////////////////////////////////////////
+	/////////////////////// group_id /////////////////////
+	//////////////////////////////////////////////////////
+	char gidBuf[16];
+    snprintf(gidBuf, sizeof(gidBuf), "%u", sbuf.st_gid);
+	item->AppendElement(new ItemEntity("group_id", gidBuf, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+
+	//////////////////////////////////////////////////////
+	//////////////////////  user_id  /////////////////////
+	//////////////////////////////////////////////////////
+	char uidBuf[16];
+    snprintf(uidBuf, sizeof(uidBuf), "%u", sbuf.st_uid);
+	item->AppendElement(new ItemEntity("user_id", uidBuf, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+
+	//////////////////////////////////////////////////////
+	/////////////////////  a_time	 /////////////////////
+	//////////////////////////////////////////////////////
+	item->AppendElement(new ItemEntity("a_time", Common::ToString((long)sbuf.st_atime), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+
+	//////////////////////////////////////////////////////
+	/////////////////////  c_time	 /////////////////////
+	//////////////////////////////////////////////////////
+	item->AppendElement(new ItemEntity("c_time", Common::ToString((long)sbuf.st_ctime), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+
+	//////////////////////////////////////////////////////
+	/////////////////////  m_time	 /////////////////////
+	//////////////////////////////////////////////////////
+	item->AppendElement(new ItemEntity("m_time", Common::ToString((long)sbuf.st_mtime), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+
+	//////////////////////////////////////////////////////
+	//////////////////////  size     /////////////////////
+	//////////////////////////////////////////////////////
+	item->AppendElement(new ItemEntity("size", Common::ToString((long)sbuf.st_size), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+
+	// File permissions
+
+	//////////////////////////////////////////////////////
+	///////////////////////  SUID  ///////////////////////
+	//////////////////////////////////////////////////////
+	int suid = 0;
+	if (mode & S_ISUID)
+		suid = 1;
+
+	item->AppendElement(new ItemEntity("suid", Common::ToString(suid), OvalEnum::DATATYPE_BOOLEAN, true, OvalEnum::STATUS_EXISTS));
+
+	//////////////////////////////////////////////////////
+	///////////////////////  SGID  ///////////////////////
+	//////////////////////////////////////////////////////
+	int sgid = 0;
+	if (mode & S_ISGID)
+		sgid = 1;
+
+	item->AppendElement(new ItemEntity("sgid", Common::ToString(sgid), OvalEnum::DATATYPE_BOOLEAN, true, OvalEnum::STATUS_EXISTS));
+
+	//////////////////////////////////////////////////////
+	//////////////////////  STICKY  //////////////////////
+	//////////////////////////////////////////////////////
+	int sticky = 0;
+	if (mode & S_ISVTX)
+		sticky = 1;
+
+	item->AppendElement(new ItemEntity("sticky", Common::ToString(sticky), OvalEnum::DATATYPE_BOOLEAN, true, OvalEnum::STATUS_EXISTS));
+
+	//////////////////////////////////////////////////////
+	///////////////////////  UREAD  //////////////////////
+	//////////////////////////////////////////////////////
+	int uread = 0;
+	if (mode & S_IRUSR)
+		uread = 1;
+
+	item->AppendElement(new ItemEntity("uread", Common::ToString(uread), OvalEnum::DATATYPE_BOOLEAN, true, OvalEnum::STATUS_EXISTS));
+
+	//////////////////////////////////////////////////////
+	//////////////////////  UWRITE  //////////////////////
+	//////////////////////////////////////////////////////
+
+	int uwrite = 0;
+	if (mode & S_IWUSR)
+		uwrite = 1;
+
+	item->AppendElement(new ItemEntity("uwrite", Common::ToString(uwrite), OvalEnum::DATATYPE_BOOLEAN, true, OvalEnum::STATUS_EXISTS));
+
+	//////////////////////////////////////////////////////
+	///////////////////////  UEXEC  //////////////////////
+	//////////////////////////////////////////////////////
+
+	int uexec = 0;
+	if (mode & S_IXUSR)
+		uexec = 1;
+
+	item->AppendElement(new ItemEntity("uexec", Common::ToString(uexec), OvalEnum::DATATYPE_BOOLEAN, true, OvalEnum::STATUS_EXISTS));
+
+	//////////////////////////////////////////////////////
+	///////////////////////  GREAD  //////////////////////
+	//////////////////////////////////////////////////////
+
+	int gread = 0;
+	if (mode & S_IRGRP)
+		gread = 1;
+
+	item->AppendElement(new ItemEntity("gread", Common::ToString(gread), OvalEnum::DATATYPE_BOOLEAN, true, OvalEnum::STATUS_EXISTS));
+
+	//////////////////////////////////////////////////////
+	//////////////////////  GWRITE  //////////////////////
+	//////////////////////////////////////////////////////
+
+	int gwrite = 0;
+	if (mode & S_IWGRP)
+		gwrite = 1;
+
+	item->AppendElement(new ItemEntity("gwrite", Common::ToString(gwrite), OvalEnum::DATATYPE_BOOLEAN, true, OvalEnum::STATUS_EXISTS));
+
+	//////////////////////////////////////////////////////
+	///////////////////////  GEXEC  //////////////////////
+	//////////////////////////////////////////////////////
+
+	int gexec = 0;
+	if (mode & S_IXGRP)
+		gexec = 1;
+
+	item->AppendElement(new ItemEntity("gexec", Common::ToString(gexec), OvalEnum::DATATYPE_BOOLEAN, true, OvalEnum::STATUS_EXISTS));
+
+	//////////////////////////////////////////////////////
+	///////////////////////  OREAD  //////////////////////
+	//////////////////////////////////////////////////////
+
+	int oread = 0;
+	if (mode & S_IROTH)
+		oread = 1;
+
+	item->AppendElement(new ItemEntity("oread", Common::ToString(oread), OvalEnum::DATATYPE_BOOLEAN, true, OvalEnum::STATUS_EXISTS));
+
+	//////////////////////////////////////////////////////
+	//////////////////////  OWRITE  //////////////////////
+	//////////////////////////////////////////////////////
+
+	int owrite = 0;
+	if (mode & S_IWOTH)
+		owrite = 1;
+
+	item->AppendElement(new ItemEntity("owrite", Common::ToString(owrite), OvalEnum::DATATYPE_BOOLEAN, true, OvalEnum::STATUS_EXISTS));
+
+	//////////////////////////////////////////////////////
+	///////////////////////  OEXEC  //////////////////////
+	//////////////////////////////////////////////////////
+
+	int oexec = 0;
+	if (mode & S_IXOTH)
+		oexec = 1;
+
+	item->AppendElement(new ItemEntity("oexec", Common::ToString(oexec), OvalEnum::DATATYPE_BOOLEAN, true, OvalEnum::STATUS_EXISTS));
+
+	return item;
+}


Property changes on: trunk/ovaldi/src/probes/unix/FileProbe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/unix/FileProbe.h
===================================================================
--- trunk/ovaldi/src/probes/unix/FileProbe.h	                        (rev 0)
+++ trunk/ovaldi/src/probes/unix/FileProbe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,79 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+#ifndef FILEPROBE_H
+#define FILEPROBE_H
+
+#include "AbsProbe.h"
+
+#include "FileFinder.h"
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <time.h>
+#include <cerrno>
+
+#include <dirent.h>
+#include <limits.h>
+
+#include <iostream>
+#include <string>
+#include <vector>
+
+using namespace std;
+
+/**
+	This class is responsible for collecting file information for red hat file_objects.
+*/
+class FileProbe : public AbsProbe {
+
+public:
+	~FileProbe();
+	
+	/** Get all the files on the system that match the pattern and collect their attributes. */
+	ItemVector* CollectItems(Object* object);
+
+	/** Return a new Item created for storing file information */
+	Item* CreateItem();
+
+	/** Ensure that the FileProbe is a singleton. */
+	static AbsProbe* Instance();
+
+private:
+
+	FileProbe();
+
+	static FileProbe* instance;
+
+	/** Get all attributes for the file specified in fileIn. Return them in an Item. */
+	Item* GetFileAttributes(string path, string fileName);
+};
+
+#endif


Property changes on: trunk/ovaldi/src/probes/unix/FileProbe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/unix/ProcessProbe.cpp
===================================================================
--- trunk/ovaldi/src/probes/unix/ProcessProbe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/probes/unix/ProcessProbe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,583 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "ProcessProbe.h"
+
+//****************************************************************************************//
+//								ProcessProbe Class										  //	
+//****************************************************************************************//
+ProcessProbe *ProcessProbe::instance = NULL;
+
+ProcessProbe::ProcessProbe() {
+}
+
+ProcessProbe::~ProcessProbe() {
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AbsProbe* ProcessProbe::Instance() {
+
+	// Use lazy initialization
+	if(instance == NULL) 
+		instance = new ProcessProbe();
+
+	return instance;	
+}
+
+ItemVector* ProcessProbe::CollectItems(Object* object) {
+
+	ItemVector *collectedItems = new ItemVector();
+
+	ObjectEntity* command = object->GetElementByName("command");
+
+	// check datatypes - only allow string
+	if(command->GetDatatype() != OvalEnum::DATATYPE_STRING) {
+		throw ProbeException("Error: invalid data type specified on command. Found: " + OvalEnum::DatatypeToString(command->GetDatatype()));
+	}
+
+	// check operation - only allow  equals, not equals and pattern match
+	if(command->GetOperation() != OvalEnum::OPERATION_EQUALS && command->GetOperation() != OvalEnum::OPERATION_PATTERN_MATCH && command->GetOperation() != OvalEnum::OPERATION_NOT_EQUAL) {
+		throw ProbeException("Error: invalid operation specified on name. Found: " + OvalEnum::OperationToString(command->GetOperation()));
+	}
+
+	StringVector* commands = this->GetCommands(command);
+	if(commands->size() > 0) {
+		StringVector::iterator iterator;
+		for(iterator = commands->begin(); iterator != commands->end(); iterator++) {		
+			this->GetPSInfo((*iterator), collectedItems);
+		}
+	} else {
+
+		if(command->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+
+			if(command->GetVarRef() == NULL) {
+
+				Item* item = this->CreateItem();
+				item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+				item->AppendElement(new ItemEntity("command",  command->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+				collectedItems->push_back(item);
+
+			} else {
+
+				VariableValueVector::iterator iterator;
+				for(iterator = command->GetVarRef()->GetValues()->begin(); iterator != command->GetVarRef()->GetValues()->end(); iterator++) {
+
+					Item* item = this->CreateItem();
+					item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+					item->AppendElement(new ItemEntity("command",  (*iterator)->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+					collectedItems->push_back(item);
+				}
+			}
+		}
+	}
+
+	commands->clear();
+	delete commands;
+
+	return collectedItems;
+}  
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+Item* ProcessProbe::CreateItem() {
+
+	Item* item = new Item(0, 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#unix", 
+						"unix-sc", 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#unix unix-system-characteristics-schema.xsd", 
+						OvalEnum::STATUS_ERROR, 
+						"process_item");
+
+	return item;
+}
+
+StringVector* ProcessProbe::GetCommands(ObjectEntity* command) {
+
+	StringVector* commands = NULL;
+
+	// does this name use variables?
+	if(command->GetVarRef() == NULL) {
+		
+		// proceed based on operation
+		if(command->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			commands = new StringVector();
+			// if the command exists add it to the list 
+			if(this->CommandExists(command->GetValue())) {
+				commands->push_back(command->GetValue());
+			}
+
+		} else if(command->GetOperation() == OvalEnum::OPERATION_NOT_EQUAL) {
+			
+			commands = this->GetMatchingCommands(command->GetValue(), false);
+
+		} else if(command->GetOperation() == OvalEnum::OPERATION_PATTERN_MATCH) {
+			commands = this->GetMatchingCommands(command->GetValue(), true);
+		}		
+
+	} else {
+
+		commands = new StringVector();
+
+		// Get all names
+		StringVector allCommands;
+
+		if(command->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			// in the case of equals simply loop through all the 
+			// variable values and add them to the set of all names
+			// if they exist on the system
+			VariableValueVector::iterator iterator;
+			for(iterator = command->GetVarRef()->GetValues()->begin(); iterator != command->GetVarRef()->GetValues()->end(); iterator++) {
+				
+				if(this->CommandExists((*iterator)->GetValue())) {
+					allCommands.push_back((*iterator)->GetValue());
+				}
+			}
+
+		} else {
+            this->GetMatchingCommands(".*", &allCommands);
+		}
+	
+		// loop through all names on the system
+		// only keep names that match operation and value and var check
+		ItemEntity* tmp = this->CreateItemEntity(command);
+		StringVector::iterator it;
+		for(it = allCommands.begin(); it != allCommands.end(); it++) {
+			tmp->SetValue((*it));
+			
+			if(command->Analyze(tmp) == OvalEnum::RESULT_TRUE) {
+				commands->push_back((*it));
+			}
+		}
+	}
+
+	return commands;
+}
+
+void ProcessProbe::GetPSInfo(string command, ItemVector* items) {
+
+	string errMsg = "";
+
+	// Time parameters
+	time_t currentTime;
+	unsigned long adjustedStartTime, execTime = 0;
+
+	// TTY String
+	char ttyName[TTY_LEN + 1];
+
+	// Process Parameters
+	char cmdline[CMDLINE_LEN + 1];
+	char schedulingClass[SCHED_CLASS_LEN + 1];
+
+	int uid, pid, ppid;
+	long priority = 0;
+	unsigned long starttime = 0;
+
+	int status = 0;
+
+	// Grab the current time and uptime(Linux only) to calculate start and exec times later
+	currentTime = time(NULL);
+
+	unsigned long uptime = 0;
+	status = RetrieveUptime(&uptime, &errMsg);
+	if(status < 0) {
+		throw ProbeException(errMsg);
+    }
+
+	DIR *proc;
+	struct dirent *readProc;
+
+	// Step into the /proc directory
+	if((proc = opendir("/proc")) == NULL) {
+		errMsg.append("ProcessProbe: Could not open /proc");
+		throw ProbeException(errMsg);
+
+	} else {
+
+		// Loop through all of the files - we're only concerned with those that
+		// start with a digit
+		while((readProc = readdir(proc)) != NULL) {
+			if(isdigit(readProc->d_name[0])) {
+				// Clear the ps values
+				memset(cmdline, 0, CMDLINE_LEN + 1);
+				memset(schedulingClass, 0, SCHED_CLASS_LEN + 1);
+				memset(ttyName, 0, TTY_LEN + 1);
+				uid = pid = ppid = priority = starttime = 0;
+				adjustedStartTime = execTime = 0;
+				errMsg = "";
+
+				// Retrieve the command line with arguments
+				status = RetrieveCommandLine(readProc->d_name, cmdline, &errMsg);
+				if(status < 0) { 
+					throw ProbeException(errMsg);
+
+				// If the command line matches the input command line get the remaining 
+				// data and add a new data object to the items
+				} else if(status == 0 && command.compare(cmdline) == 0) {
+
+					Item* item = this->CreateItem();
+					item->SetStatus(OvalEnum::STATUS_EXISTS);
+					item->AppendElement(new ItemEntity("command",  command, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+
+					// Read the 'stat' file for the remaining process parameters
+					status = RetrieveStatFile(readProc->d_name, &uid, &pid, &ppid, &priority, &starttime, &errMsg);
+					if(status < 0) {
+						item->AppendMessage(new OvalMessage(errMsg));
+					} else {
+
+						// We can retrieve a value for the tty from the 'stat' file, but it's unclear
+						// how you convert that to a device name.  Therefore, we ignore that value
+						// and grab the device stdout(fd/0) is attached to.
+						RetrieveTTY(readProc->d_name, ttyName);
+
+						// The Linux start time is represented as the number of jiffies (1/100 sec)
+						// that the application was started after the last system reboot.  To get an
+						// actual timestamp, we have to do some gymnastics.  We then use the calculated
+						// start time to determine the exec time.
+						//
+						if(uptime > 0) {
+							adjustedStartTime = currentTime - (uptime - (starttime/100));
+							execTime = currentTime - adjustedStartTime;
+						}
+						string execTimeStr = this->FormatExecTime(execTime);
+						string adjustedStartTimeStr = this->FormatStartTime(adjustedStartTime);
+
+						// Add the data to a new data object and add th resultVector
+						item->SetStatus(OvalEnum::STATUS_EXISTS);
+						if(errMsg.compare("") != 0) {
+							item->AppendMessage(new OvalMessage(errMsg));
+						}
+
+						item->AppendElement(new ItemEntity("exec_time",  execTimeStr, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+						item->AppendElement(new ItemEntity("pid", Common::ToString(pid), OvalEnum::DATATYPE_INTEGER, false, OvalEnum::STATUS_EXISTS));
+						item->AppendElement(new ItemEntity("ppid", Common::ToString(ppid), OvalEnum::DATATYPE_INTEGER, false, OvalEnum::STATUS_EXISTS));
+						item->AppendElement(new ItemEntity("priority", Common::ToString(priority), OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+						item->AppendElement(new ItemEntity("scheduling_class",  "-", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+						item->AppendElement(new ItemEntity("start_time", adjustedStartTimeStr, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+						item->AppendElement(new ItemEntity("tty", ttyName, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+						item->AppendElement(new ItemEntity("user_id", Common::ToString(uid), OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+					}
+
+					items->push_back(item); 
+				}
+			}
+		} // else
+    closedir(proc);
+  }
+}
+
+bool ProcessProbe::CommandExists(string command) {
+	bool exists = false;
+	string errMsg = "";
+
+	// Process Parameters
+	char cmdline[CMDLINE_LEN + 1];
+
+	DIR *proc;
+	struct dirent *readProc;
+
+	// Step into the /proc directory
+	if((proc = opendir("/proc")) == NULL) {
+		errMsg.append("ProcessProbe: Could not open /proc");
+		throw ProbeException(errMsg);
+
+	} else {
+
+		// Loop through all of the files - we're only concerned with those that
+		// start with a digit
+		while((readProc = readdir(proc)) != NULL) {
+			if(isdigit(readProc->d_name[0])) {
+				// Clear the ps values
+				memset(cmdline, 0, CMDLINE_LEN + 1);
+				errMsg = "";
+
+				// Retrieve the command line with arguments
+				int status = RetrieveCommandLine(readProc->d_name, cmdline, &errMsg);
+				if(status < 0) { 
+					closedir(proc);
+					throw ProbeException(errMsg);
+
+				// If the command line matches the input command line return true
+				} else if(status == 0 && command.compare(cmdline) == 0) {
+					exists = true;
+					break;
+				}
+			}
+		} // else
+    closedir(proc);
+  }
+  return exists;
+}
+
+StringVector* ProcessProbe::GetMatchingCommands(string pattern, bool isRegex) {
+	StringVector* commands = new StringVector();
+	string errMsg = "";
+
+	// Process Parameters
+	char cmdline[CMDLINE_LEN + 1];
+
+	DIR *proc;
+	struct dirent *readProc;
+
+	// Step into the /proc directory
+	if((proc = opendir("/proc")) == NULL) {
+		errMsg.append("ProcessProbe: Could not open /proc");
+		throw ProbeException(errMsg);
+
+	} else {
+
+		// Loop through all of the files - we're only concerned with those that
+		// start with a digit
+		while((readProc = readdir(proc)) != NULL) {
+			if(isdigit(readProc->d_name[0])) {
+				// Clear the ps values
+				memset(cmdline, 0, CMDLINE_LEN + 1);
+				errMsg = "";
+
+				// Retrieve the command line with arguments
+				int status = RetrieveCommandLine(readProc->d_name, cmdline, &errMsg);
+				if(status < 0) { 
+					closedir(proc);
+					throw ProbeException(errMsg);
+
+				// If the command line matches the input command line store it
+				} else if(status == 0 && this->IsMatch(pattern, cmdline, isRegex)) {
+					commands->push_back(cmdline);
+				}
+			}
+		} // else
+    closedir(proc);
+  }
+  return commands;
+}
+
+int ProcessProbe::RetrieveCommandLine(char *process, char *cmdline, string *errMsg) {
+	int i = 0;
+	int bytes = 0;
+	FILE *cmdlineFile = NULL;
+
+	// Build the absolute path to the command line file
+	string cmdlinePath = "/proc/";
+	cmdlinePath.append(process);
+	cmdlinePath.append("/cmdline");
+
+	// Open the file for reading
+	if((cmdlineFile = fopen(cmdlinePath.c_str(), "r")) == NULL) {
+		errMsg->append("ProcessProbe: Unable to obtain command line for pid: ");
+		errMsg->append(process);
+		return(-1);
+
+	} else {
+    
+		// Read the contents of the file, and convert all of the NULL's
+		// separating the args to spaces.
+		//
+		bytes = fread(cmdline, sizeof(char), CMDLINE_LEN, cmdlineFile);
+	    
+		// Remember to leave the trailing NULL (bytes - 1).
+		for(i = 0; i < bytes - 1; i++) {
+			if(cmdline[i] == '\0') {
+				cmdline[i] = ' ';
+			}
+		}
+	}
+
+	fclose(cmdlineFile); 
+
+	return(0);
+}
+
+int ProcessProbe::RetrieveStatFile(char *process, int *uid, int *pid, int *ppid, long *priority, unsigned long *starttime, string *errMsg) {
+
+  // Stat File parameters.  While we're really only concerned with gathering the parameters
+  // that are passed in, these variables are good placeholders in case we decide to collect
+  // something else in the future.
+  //
+  int pgrp, session, tty, tpgid, exit_signal, processor = 0;
+  long cutime, cstime, nice, placeholder, itrealvalue, rss = 0;
+  unsigned long flags, minflt, cminflt, majflt, cmajflt, utime, stime, vsize, rlim = 0;
+  unsigned long startcode, endcode, startstack, kstkesp, kstkeip, signal, blocked, sigignore = 0;
+  unsigned long sigcatch, wchan, nswap, cnswap = 0;
+  char comm[PATH_MAX];
+  char state;
+
+  FILE *statFile = NULL;
+
+  // Generate the absolute path name for the 'stat' file
+  string statPath = "/proc/";
+  statPath.append(process);
+  statPath.append("/stat");
+
+  // While we're here, stat() the 'stat' file to get the uid for the process.  If
+  // we want to convert this to a user name, feed the uid to getpwuid().
+  //
+  struct stat statBuf;
+
+  if((stat(statPath.c_str(), &statBuf)) < 0) {
+    errMsg->append("ProcessProbe: Unable to obtain uid information for pid:  ");
+    errMsg->append(process);
+    return(-1);
+  } else {
+    *uid = statBuf.st_uid;
+  }
+    
+  // Open the 'stat' file and read the contents
+  if((statFile = fopen(statPath.c_str(), "r")) == NULL) {
+    errMsg->append("ProcessProbe: Unable to obtain process information for pid: ");
+    errMsg->append(process);
+    return(-1);
+
+  } else {
+
+    // Linux gives us a nicely formatted file for fscanf to pull in
+    fscanf(statFile, "%d %s %c %d %d %d %d %d %lu %lu %lu %lu %lu %lu %lu %ld %ld %ld %ld %ld %ld %lu %lu %ld %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %d %d", pid, comm, &state, ppid, &pgrp, &session, &tty, &tpgid, &flags, &minflt, &cminflt, &majflt, &cmajflt, &utime, &stime, &cutime, &cstime, priority, &nice, &placeholder, &itrealvalue, starttime, &vsize, &rss, &rlim, &startcode, &endcode, &startstack, &kstkesp, &kstkeip, &signal, &blocked, &sigignore, &sigcatch, &wchan, &nswap, &cnswap, &exit_signal, &processor);
+
+  }
+  fclose(statFile);
+
+  return(0);
+}
+
+void ProcessProbe::RetrieveTTY(char *process, char *ttyName) {
+  int bytes = 0;
+
+  // Generate the absolute path name for the stdout(0) file in 'fd'
+  string ttyPath = "/proc/";
+  ttyPath.append(process);
+  ttyPath.append("/fd/0");
+
+  // Attempt to read the name of the file linked to '0'
+  bytes = readlink(ttyPath.c_str(), ttyName, TTY_LEN);
+
+  // If there is an error, set the tty string to '?'
+  if(bytes < 0 || strncmp(ttyName, "/dev", 4) != 0) {
+    strncpy(ttyName, "?\0", 2);
+  }
+}
+
+int  ProcessProbe::RetrieveUptime(unsigned long *uptime, string *errMsg) {
+  // The second value in this file represents idle time - we're not concerned with this.
+  unsigned long idle = 0;
+  FILE *uptimeHandle = NULL;
+
+  // Open and parse the 'uptime' file
+  if((uptimeHandle = fopen("/proc/uptime", "r")) == NULL) {
+    errMsg->append("ProcessProbe: Could not open /proc/uptime");
+    uptime = 0;
+    return(-1);
+  } else {
+    fscanf(uptimeHandle, "%lu %lu", uptime, &idle);
+  }
+  fclose(uptimeHandle);
+
+  return(0);
+}
+
+string ProcessProbe::FormatExecTime(unsigned long execTime) {
+
+	/**
+		This is the cumulative CPU time, formatted in [DD-]HH:MM:SS where DD is the number of days when execution time is 24 hours or more.
+
+		Input is seconds 
+
+		Divide by 86400 to get days
+		Divide remainder of above division by 3600 to get hours
+		Divide remainder by 60 to get minutes, remainder is seconds
+	*/
+
+	string execTimeStr = "";
+	unsigned long days = execTime/86400;
+	if(days > 0) {
+		if(days > 9) execTimeStr = Common::ToString(days);
+		else execTimeStr = "0" + Common::ToString(days);
+
+		execTimeStr.append("-");
+	}	
+
+	unsigned long hours = (execTime%86400)/3600;
+	if(hours > 9) execTimeStr.append("" + Common::ToString(hours));
+	else execTimeStr.append("0" + Common::ToString(hours));
+
+	execTimeStr.append(":");
+
+	unsigned long minutes = ((execTime%86400)%3600)/60;
+	if(minutes > 9) execTimeStr.append("" + Common::ToString(minutes));
+	else execTimeStr.append("0" + Common::ToString(minutes));
+
+	execTimeStr.append(":");
+
+	unsigned long seconds = ((execTime%86400)%3600)%60;
+	if(seconds > 9) execTimeStr.append("" + Common::ToString(seconds));
+	else execTimeStr.append("0" + Common::ToString(seconds));
+
+	return execTimeStr;
+}
+
+string ProcessProbe::FormatStartTime(unsigned long startTime) {
+
+	/** 
+		This is the time of day the process started formatted in HH:MM:SS if the 
+		same day the process started or formatted as MMM_DD (Ex.: Feb_5) if 
+		process started the previous day or further in the past.
+
+		Input resolution is seconds.
+	*/
+
+	char formattedTime[16];
+
+	// current time info
+	time_t rawtime;
+	tm* timeinfo;
+	time(&rawtime);
+	timeinfo = localtime(&rawtime);
+	int currentDays = timeinfo->tm_yday;
+
+	string startTimeStr;
+	time_t sTime = startTime;
+	timeinfo = localtime(&sTime);
+
+	size_t size = 0;
+	if(timeinfo->tm_yday == currentDays) {
+		// no days so just format the hours, minutes, and seconds
+		size = strftime(formattedTime, 15, "%H:%M:%S", timeinfo);
+	} else {
+		size = strftime(formattedTime, 15, "%b_%d", timeinfo);		
+	}
+
+	if(size == 0) {
+		throw ProbeException("Insufficient memory allocated for process start time data. Unable to collect process information.");
+	} else {
+		startTimeStr.append(formattedTime);
+	}
+
+	return startTimeStr;
+}


Property changes on: trunk/ovaldi/src/probes/unix/ProcessProbe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/unix/ProcessProbe.h
===================================================================
--- trunk/ovaldi/src/probes/unix/ProcessProbe.h	                        (rev 0)
+++ trunk/ovaldi/src/probes/unix/ProcessProbe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,142 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef PROCESSPROBE_H
+#define PROCESSPROBE_H
+
+#include "AbsProbe.h"
+
+#include <strings.h>
+#include <dirent.h>
+#include <pwd.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include <iostream>
+#include <string>
+
+// Define some buffer lengths
+#define CMDLINE_LEN 1024
+#define SCHED_CLASS_LEN 128
+#define TTY_LEN PATH_MAX
+
+using namespace std;
+
+/**
+	Data collector for process test.
+
+	The following command produces process information sutable fro this probe.
+    ps -eo class,etime,pid,uid,start_time,tty,priority,cmd
+*/
+class ProcessProbe : public AbsProbe {
+public:
+	~ProcessProbe();
+    
+	ItemVector* CollectItems(Object* object);
+
+	/** Return a new Item created for storing process information. */
+	Item* CreateItem();
+
+	/** Ensure that the ProcessProbe is a singleton. */
+	static AbsProbe* Instance();
+	  
+private:
+	ProcessProbe();
+
+	/** 
+		Return the set of all process commands on the ssytem that match the specified object entities criteria.
+		All process command names that are return have been checked and exist on the syytem.
+		@param command an ObjectEntity* that represents the objects to collect on the ssytem
+		@return The matching commands
+	*/
+	StringVector* GetCommands(ObjectEntity* command);
+	
+	/**
+		Get all commands on the system that match the specified pattern.
+		@param pattern a string used that commands are compared against.
+		@param isRegex a bool that is indicates how system commands should be compared against the specifed pattern
+		@return The set of matching commands.
+	*/
+	StringVector* GetMatchingCommands(string pattern, bool isRegex);
+
+	/**
+		Return true if the specifeid command exists on the system.
+		@param command a string that hold the name of the rpm to check for.
+		@result The result of checking for the specifed rpm on the system.
+	*/
+	bool CommandExists(string command);
+
+	/**
+		Get all the information for the command.
+		@param command a string representing the command to collect information about.
+		@param items a vector of items that matched the command.
+	*/
+	void GetPSInfo(string command, ItemVector* items);
+
+	/**
+		Read /proc/<pid>/cmdline to gather the application name and startup arguments
+	*/
+	int RetrieveCommandLine(char *process, char *cmdline, string *errMsg);
+
+	/**
+		Read the stat file for a specific process
+	*/
+	int RetrieveStatFile(char *process, int *uid, int *pid, int *ppid, long *priority, unsigned long *starttime, string *errMsg);
+
+	/**
+		 Since there appears to be no simple way to convert the 'tty' value contained in
+		 '/proc/<pid>/stat' into a device name, we instead use '/proc/<pid>/fd/0', which is
+		 normally linked to a device.  Note, the 'fd' directory is set read-only user, so
+		 if this probe is not run as root, many of these reads will fail.  In that case, we
+		 return '?' as the tty value.		
+	*/
+	void RetrieveTTY(char *process, char *ttyName);
+
+	/**
+		Read the value contained in '/proc/uptime/' so that we can calculate
+		the start time and exec time of the running processes.
+	*/
+	int RetrieveUptime(unsigned long *uptime, string *errMsg);
+
+	/**
+		Convert the input seconds and conveert to a string format for exec time.
+    */
+	string FormatExecTime(unsigned long execTime);
+
+	/**
+		Convert the input seconds and convert to a string format for start time.
+    */
+	string FormatStartTime(unsigned long startTime);
+
+	static ProcessProbe *instance;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/probes/unix/ProcessProbe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/unix/UnameProbe.cpp
===================================================================
--- trunk/ovaldi/src/probes/unix/UnameProbe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/probes/unix/UnameProbe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,120 @@
+//
+// $Id: UnameProbe.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+#include "UnameProbe.h"
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  UnameProbe Class  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+UnameProbe* UnameProbe::instance = NULL;
+
+UnameProbe::UnameProbe() {
+
+}
+
+UnameProbe::~UnameProbe() {
+
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AbsProbe* UnameProbe::Instance() {
+
+	// Use lazy initialization
+	if(instance == NULL) 
+		instance = new UnameProbe();
+
+	return instance;	
+}
+
+ItemVector* UnameProbe::CollectItems(Object *object) {
+
+	ItemVector *collectedItems = NULL;
+
+	struct utsname tmpName;
+	
+	if (uname(&tmpName) > -1) {
+
+		collectedItems = new ItemVector();
+
+		// create a new uname item
+		Item* item = this->CreateItem();
+		item->SetStatus(OvalEnum::STATUS_EXISTS);
+		collectedItems->push_back(item);
+
+		item->AppendElement(new ItemEntity("machine_class",  tmpName.machine, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+		item->AppendElement(new ItemEntity("node_name",  tmpName.nodename, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+		item->AppendElement(new ItemEntity("os_name",  tmpName.sysname, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+		item->AppendElement(new ItemEntity("os_release",  tmpName.release, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+		item->AppendElement(new ItemEntity("os_version",  tmpName.version, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+		// These two appear to be the same on a Linux system
+		item->AppendElement(new ItemEntity("processor_type",  tmpName.machine, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+
+	} else {
+		throw ProbeException("Error: UnameProbe() unable to get uname information");
+	}
+
+	//I am laving this Solaris condition here for reference use
+	//When I have to write a Solaris uname probe. I will just use this probe as a template
+	/*#ifdef SUNOS
+
+	char buf[64];
+	
+	memset(buf, '\0', sizeof(buf));
+	if (sysinfo(SI_ARCHITECTURE, buf, sizeof(buf)) > -1) 
+	{
+		processorType = buf;
+	}
+	
+	memset(buf, '\0', sizeof(buf));
+	if (sysinfo(SI_PLATFORM, buf, sizeof(buf)) > -1) 
+	{
+		hardwarePlatform = buf;
+	}
+	#endif*/
+
+	return collectedItems;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+Item* UnameProbe::CreateItem() {
+
+	Item* item = new Item(0, 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#unix", 
+						"unix-sc", 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#unix unix-system-characteristics-schema.xsd", 
+						OvalEnum::STATUS_ERROR, 
+						"uname_item");
+
+	return item;
+}


Property changes on: trunk/ovaldi/src/probes/unix/UnameProbe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/unix/UnameProbe.h
===================================================================
--- trunk/ovaldi/src/probes/unix/UnameProbe.h	                        (rev 0)
+++ trunk/ovaldi/src/probes/unix/UnameProbe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,71 @@
+//
+// $Id: UnameProbe.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef UNAMEPROBE_H
+#define UNAMEPROBE_H
+
+#include "AbsProbe.h"
+
+#ifdef LINUX
+#include <sys/sysinfo.h>
+#endif
+
+#ifdef SUNOS
+#include <sys/systeminfo.h>
+#endif
+
+#include <sys/utsname.h>
+
+#include <iostream>
+#include <string>
+#include <vector>
+
+using namespace std;
+
+class UnameProbe : public AbsProbe {
+public:
+	~UnameProbe();
+	
+	ItemVector* CollectItems(Object* object);
+
+	/** Return a new Item created for storing uname information */
+	Item* CreateItem();
+		
+	/** Ensure that the UnameProbe is a singleton. */
+	static AbsProbe* Instance();
+
+private:
+	UnameProbe();
+
+	static UnameProbe *instance;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/probes/unix/UnameProbe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/windows/AccessTokenProbe.cpp
===================================================================
--- trunk/ovaldi/src/probes/windows/AccessTokenProbe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/probes/windows/AccessTokenProbe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,445 @@
+//
+// $Id: AccessTokenProbe.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "AccessTokenProbe.h"
+
+//****************************************************************************************//
+//								AccessTokenProbe Class									  //	
+//****************************************************************************************//
+AccessTokenProbe* AccessTokenProbe::instance = NULL;
+
+AccessTokenProbe::AccessTokenProbe() : AbsProbe() {
+
+}
+
+AccessTokenProbe::~AccessTokenProbe() {
+
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AbsProbe* AccessTokenProbe::Instance() {
+	// Use lazy initialization
+	if(instance == NULL) 
+		instance = new AccessTokenProbe();
+
+	return instance;	
+}
+
+ItemVector* AccessTokenProbe::CollectItems(Object *object) {
+
+	ItemVector *collectedItems = new ItemVector();
+
+	// get the security_principle from the provided object
+	ObjectEntity* securityPrinciple = object->GetElementByName("security_principle");
+
+	// check datatypes - only allow string
+	if(securityPrinciple->GetDatatype() != OvalEnum::DATATYPE_STRING) {
+		throw ProbeException("Error: invalid data type specified on security_principle. Found: " + OvalEnum::DatatypeToString(securityPrinciple->GetDatatype()));
+	}
+	
+	// check operation - only allow  equals, not equals and pattern match
+	if(securityPrinciple->GetOperation() != OvalEnum::OPERATION_EQUALS && securityPrinciple->GetOperation() != OvalEnum::OPERATION_PATTERN_MATCH && securityPrinciple->GetOperation() != OvalEnum::OPERATION_NOT_EQUAL) {
+		throw ProbeException("Error: invalid operation specified on security_principle. Found: securityPrinciple " + OvalEnum::OperationToString(securityPrinciple->GetOperation()));
+	}
+	
+	// support behaviors - init with defaults.
+	bool includeGroupBehavior = true;
+	bool resolveGroupBehavior = false;
+	if(object->GetBehaviors()->size() != 0) {
+		BehaviorVector* behaviors = object->GetBehaviors();
+		BehaviorVector::iterator iterator;
+		for(iterator = behaviors->begin(); iterator != behaviors->end(); iterator++) {
+			Behavior* behavior = (*iterator);
+			if(behavior->GetName().compare("include_group") == 0) {
+				if(behavior->GetValue().compare("false") == 0) {
+					includeGroupBehavior = false;
+				}
+			} else if(behavior->GetName().compare("resolve_group") == 0) {
+				if(behavior->GetValue().compare("true") == 0) {
+					resolveGroupBehavior = true;
+				}
+			} else {
+				Log::Info("Unsupported behavior found when collecting " + object->GetId() + " behavior: " + behavior->GetName());
+			}
+		}		
+	}
+
+	// get the data
+	if(securityPrinciple->GetVarRef() == NULL) {
+		if(securityPrinciple->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			this->GetAccountInformation(securityPrinciple->GetValue(), resolveGroupBehavior, includeGroupBehavior, collectedItems);
+		} else {
+
+			bool isRegex = false;
+			if(securityPrinciple->GetOperation() == OvalEnum::OPERATION_PATTERN_MATCH)
+				isRegex = true;
+
+			// Get all trustee_names on the system...
+			StringVector* allTrusteeNames = WindowsCommon::GetAllTrusteeNames();
+			
+			// Get the set of trustee names that match the ItemEntity.
+			StringVector::iterator iterator;
+			for(iterator = allTrusteeNames->begin(); iterator != allTrusteeNames->end(); iterator++) {
+				string curr = (*iterator);
+				if(this->IsMatch(securityPrinciple->GetValue(), (*iterator), isRegex)) {
+					this->GetAccountInformation((*iterator), resolveGroupBehavior, includeGroupBehavior, collectedItems);
+				}
+			}
+		}
+
+	} else {
+		// Get all trustee_names on the system...
+		StringVector* allTrusteeNames = WindowsCommon::GetAllTrusteeNames();
+
+		// loop through all trustee names on the system
+		// only keep those that match operation and value and var check
+		StringVector::iterator it;
+		ItemEntity* tmp = this->CreateItemEntity(securityPrinciple);
+		for(it = allTrusteeNames->begin(); it != allTrusteeNames->end(); it++) {
+			tmp->SetValue((*it));
+			if(securityPrinciple->Analyze(tmp) == OvalEnum::RESULT_TRUE) {
+				this->GetAccountInformation((*it), resolveGroupBehavior, includeGroupBehavior, collectedItems);
+			}
+		}
+	}
+
+	return collectedItems;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+Item* AccessTokenProbe::CreateItem() {
+
+	Item* item = new Item(0, 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows", 
+						"win-sc", 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows windows-system-characteristics-schema.xsd", 
+						OvalEnum::STATUS_ERROR, 
+						"accesstoken_item");
+
+	return item;
+}
+
+
+bool AccessTokenProbe::GetAccountInformation(string accountNameIn,  bool resolveGroupBehavior, bool includeGroupBehavior, ItemVector* items) {
+
+	bool isComplete = true;
+
+	// for the account name and behaviors create a set of account names to loop over and get account information for
+	StringVector* accountNames = new StringVector();
+
+	// is this a group
+	string domainStr = "";
+	string sidStr = "";
+	bool isGroup = WindowsCommon::LookUpTrusteeName(&accountNameIn, &sidStr, &domainStr);
+
+	if(isGroup && resolveGroupBehavior) {
+
+		if(includeGroupBehavior) {
+			accountNames->push_back(accountNameIn);
+		}
+
+		StringVector* groupMembers = new StringVector();
+		WindowsCommon::ExpandGroup(accountNameIn, groupMembers);
+		StringVector::iterator iterator;
+		for(iterator = groupMembers->begin(); iterator != groupMembers->end(); iterator++) {
+			accountNames->push_back((*iterator));
+		}
+	} else {
+		accountNames->push_back(accountNameIn);
+	}
+
+	NTSTATUS nts;
+
+	// Get a handle to the policy object.
+	LSA_HANDLE polHandle;
+	LSA_OBJECT_ATTRIBUTES ObjectAttributes;
+	ZeroMemory(&ObjectAttributes, sizeof(ObjectAttributes));
+
+	nts = LsaOpenPolicy(NULL, &ObjectAttributes, POLICY_LOOKUP_NAMES, &polHandle);
+	if (nts != ERROR_SUCCESS) {
+		LsaClose(polHandle);
+		throw ProbeException("Error: (AccessTokenProbe) Unable to open a handle to the Policy object.");		
+	}
+
+	if(accountNames->size() > 0) {
+		StringVector::iterator it;
+		for(it = accountNames->begin(); it != accountNames->end(); it++) {
+			string currentAccountName = (*it);
+
+			// Get the SID.
+			PSID psid = WindowsCommon::GetSIDForTrusteeName(currentAccountName);
+
+			// Enumerate Access Rights
+			PLSA_UNICODE_STRING userRights = NULL;
+			ULONG CountOfRights = 0;
+
+			nts = LsaEnumerateAccountRights(polHandle, psid, &userRights, &CountOfRights);
+			if (nts != ERROR_SUCCESS) {
+				CountOfRights = 0;
+			}
+
+			// Create the item
+			Item* item = this->CreateItem();
+			item->SetStatus(OvalEnum::STATUS_EXISTS);
+			item->AppendElement(new ItemEntity("security_principle", currentAccountName, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+			items->push_back(item);
+
+			// init all the rights
+			ItemEntity* seassignprimarytokenprivilege = new ItemEntity("seassignprimarytokenprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(seassignprimarytokenprivilege);
+			ItemEntity* seauditprivilege = new ItemEntity("seauditprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(seauditprivilege);
+			ItemEntity* sebackupprivilege = new ItemEntity("sebackupprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(sebackupprivilege);
+			ItemEntity* sechangenotifyprivilege = new ItemEntity("sechangenotifyprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(sechangenotifyprivilege);
+			ItemEntity* secreateglobalprivilege = new ItemEntity("secreateglobalprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(secreateglobalprivilege);
+			ItemEntity* secreatepagefileprivilege = new ItemEntity("secreatepagefileprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(secreatepagefileprivilege);
+			ItemEntity* secreatepermanentprivilege = new ItemEntity("secreatepermanentprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(secreatepermanentprivilege);
+			ItemEntity* secreatesymboliclinkprivilege = new ItemEntity("secreatesymboliclinkprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(secreatesymboliclinkprivilege);
+			ItemEntity* secreatetokenprivilege = new ItemEntity("secreatetokenprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(secreatetokenprivilege);
+			ItemEntity* sedebugprivilege = new ItemEntity("sedebugprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(sedebugprivilege);
+			ItemEntity* seenabledelegationprivilege = new ItemEntity("seenabledelegationprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(seenabledelegationprivilege);
+			ItemEntity* seimpersonateprivilege = new ItemEntity("seimpersonateprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(seimpersonateprivilege);
+			ItemEntity* seincreasebasepriorityprivilege = new ItemEntity("seincreasebasepriorityprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(seincreasebasepriorityprivilege);
+			ItemEntity* seincreasequotaprivilege = new ItemEntity("seincreasequotaprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(seincreasequotaprivilege);
+			ItemEntity* seincreaseworkingsetprivilege = new ItemEntity("seincreaseworkingsetprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(seincreaseworkingsetprivilege);
+			ItemEntity* seloaddriverprivilege = new ItemEntity("seloaddriverprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(seloaddriverprivilege);
+			ItemEntity* selockmemoryprivilege = new ItemEntity("selockmemoryprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(selockmemoryprivilege);
+			ItemEntity* semachineaccountprivilege = new ItemEntity("semachineaccountprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(semachineaccountprivilege);
+			ItemEntity* semanagevolumeprivilege = new ItemEntity("semanagevolumeprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(semanagevolumeprivilege);
+			ItemEntity* seprofilesingleprocessprivilege = new ItemEntity("seprofilesingleprocessprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(seprofilesingleprocessprivilege);
+			ItemEntity* serelabelprivilege = new ItemEntity("serelabelprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(serelabelprivilege);
+			ItemEntity* seremoteshutdownprivilege = new ItemEntity("seremoteshutdownprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(seremoteshutdownprivilege);
+			ItemEntity* serestoreprivilege = new ItemEntity("serestoreprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(serestoreprivilege);
+			ItemEntity* sesecurityprivilege = new ItemEntity("sesecurityprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(sesecurityprivilege);
+			ItemEntity* seshutdownprivilege = new ItemEntity("seshutdownprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(seshutdownprivilege);
+			ItemEntity* sesyncagentprivilege = new ItemEntity("sesyncagentprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(sesyncagentprivilege);
+			ItemEntity* sesystemenvironmentprivilege = new ItemEntity("sesystemenvironmentprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(sesystemenvironmentprivilege);
+			ItemEntity* sesystemprofileprivilege = new ItemEntity("sesystemprofileprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(sesystemprofileprivilege);
+			ItemEntity* sesystemtimeprivilege = new ItemEntity("sesystemtimeprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(sesystemtimeprivilege);
+			ItemEntity* setakeownershipprivilege = new ItemEntity("setakeownershipprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(setakeownershipprivilege);
+			ItemEntity* setcbprivilege = new ItemEntity("setcbprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(setcbprivilege);
+			ItemEntity* setimezoneprivilege = new ItemEntity("setimezoneprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(setimezoneprivilege);
+			ItemEntity* seundockprivilege = new ItemEntity("seundockprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(seundockprivilege);
+			ItemEntity* seunsolicitedinputprivilege = new ItemEntity("seunsolicitedinputprivilege", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(seunsolicitedinputprivilege);
+			ItemEntity* sebatchlogonright = new ItemEntity("sebatchlogonright", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(sebatchlogonright);
+			ItemEntity* seinteractivelogonright = new ItemEntity("seinteractivelogonright", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(seinteractivelogonright);
+			ItemEntity* senetworklogonright = new ItemEntity("senetworklogonright", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(senetworklogonright);
+			ItemEntity* seremoteinteractivelogonright = new ItemEntity("seremoteinteractivelogonright", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(seremoteinteractivelogonright);
+			ItemEntity* seservicelogonright = new ItemEntity("seservicelogonright", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(seservicelogonright);
+			ItemEntity* sedenybatchLogonright = new ItemEntity("sedenybatchLogonright", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(sedenybatchLogonright);
+			ItemEntity* sedenyinteractivelogonright = new ItemEntity("sedenyinteractivelogonright", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(sedenyinteractivelogonright);
+			ItemEntity* sedenynetworklogonright = new ItemEntity("sedenynetworklogonright", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(sedenynetworklogonright);
+			ItemEntity* sedenyremoteInteractivelogonright = new ItemEntity("sedenyremoteInteractivelogonright", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(sedenyremoteInteractivelogonright);
+			ItemEntity* sedenyservicelogonright = new ItemEntity("sedenyservicelogonright", "0", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(sedenyservicelogonright);
+
+			// Alter the access mask to show the correct rights.
+			char tmpPrivBuf[128];
+			for (ULONG i=0; i<CountOfRights; i++) {
+				ZeroMemory(tmpPrivBuf, 128);
+
+				WideCharToMultiByte(CP_ACP,							// code page
+									0,								// performance and mapping flags
+									userRights[i].Buffer,			// wide-character string
+									wcslen(userRights[i].Buffer),	// number of chars in string
+									tmpPrivBuf,						// buffer for new string
+									128,							// size of buffer
+									NULL,							// default for unmappable chars
+									NULL);							// set when default char used
+
+				if (_strnicmp(tmpPrivBuf, "SeAssignPrimaryTokenPrivilege", 29) == 0)
+					seassignprimarytokenprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeAuditPrivilege", 16) == 0)
+					seauditprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeBackupPrivilege", 17) == 0)
+					sebackupprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeChangeNotifyPrivilege", 23) == 0)
+					sechangenotifyprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeCreateGlobalPrivilege", 23) == 0)
+					secreateglobalprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeCreatePagefilePrivilege", 25) == 0)
+					secreatepagefileprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeCreatePermanentPrivilege", 26) == 0)
+					secreatepermanentprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeCreateTokenPrivilege", 22) == 0)
+					secreatetokenprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeDebugPrivilege", 16) == 0)
+					sedebugprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeEnableDelegationPrivilege", 27) == 0)
+					seenabledelegationprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeImpersonatePrivilege", 22) == 0)
+					seimpersonateprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeIncreaseBasePriorityPrivilege", 31) == 0)
+					seincreasebasepriorityprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeIncreaseQuotaPrivilege", 24) == 0)
+					seincreasequotaprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeLoadDriverPrivilege", 21) == 0)
+					seloaddriverprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeLockMemoryPrivilege", 21) == 0)
+					selockmemoryprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeMachineAccountPrivilege", 25) == 0)
+					semachineaccountprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeManageVolumePrivilege", 23) == 0)
+					semanagevolumeprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeProfileSingleProcessPrivilege", 31) == 0)
+					seprofilesingleprocessprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeRemoteShutdownPrivilege", 25) == 0)
+					seremoteshutdownprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeRestorePrivilege", 18) == 0)
+					serestoreprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeSecurityPrivilege", 19) == 0)
+					sesecurityprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeShutdownPrivilege", 19) == 0)
+					seshutdownprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeSyncAgentPrivilege", 20) == 0)
+					sesyncagentprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeSystemEnvironmentPrivilege", 28) == 0)
+					sesystemenvironmentprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeSystemProfilePrivilege", 24) == 0)
+					sesystemprofileprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeSystemtimePrivilege", 21) == 0)
+					sesystemtimeprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeTakeOwnershipPrivilege", 24) == 0)
+					setakeownershipprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeTcbPrivilege", 14) == 0)
+					setcbprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeUndockPrivilege", 17) == 0)
+					seundockprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeUnsolicitedInputPrivilege", 27) == 0)
+					seunsolicitedinputprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeBatchLogonRight", 17) == 0)
+					sebatchlogonright->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeDenyBatchLogonRight", 21) == 0)
+					sedenybatchLogonright->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeDenyInteractiveLogonRight", 27) == 0)
+					sedenyinteractivelogonright->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeDenyNetworkLogonRight", 23) == 0)
+					sedenynetworklogonright->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeDenyServiceLogonRight", 23) == 0)
+					sedenyservicelogonright->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeDenyRemoteInteractiveLogonRight", 33) == 0)
+					sedenyremoteInteractivelogonright->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeInteractiveLogonRight", 23) == 0)
+					seinteractivelogonright->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeNetworkLogonRight", 19) == 0)
+					senetworklogonright->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeRemoteInteractiveLogonRight", 29) == 0)
+					seremoteinteractivelogonright->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeServiceLogonRight", 19) == 0)
+					seservicelogonright->SetValue("1");
+				// new in 5.3
+				else if (_strnicmp(tmpPrivBuf, "SeTimeZonePrivilege", 19) == 0)
+					setimezoneprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeCreateSymbolicLinkPrivilege", 29) == 0)
+					secreatesymboliclinkprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeIncreaseWorkingSetPrivilege", 29) == 0)
+					seincreaseworkingsetprivilege->SetValue("1");
+				else if (_strnicmp(tmpPrivBuf, "SeRelabelPrivilege", 18) == 0)
+					serelabelprivilege->SetValue("1");
+				else { 
+					/*
+					 I commented this code out because the probe should not fail to collect an object simply 
+					 because there are additional priveleges. Instead just log the additional privelages with messages
+					 on the item.
+					delete item;
+					LsaFreeMemory(userRights);
+					LsaClose(polHandle);
+					string errMsg = "Unknown account privilege: ";
+					errMsg.append(tmpPrivBuf);
+					throw ProbeException(errMsg);*/
+					string msgStr = "Unknown account privilege: ";
+					msgStr.append(tmpPrivBuf); 
+					item->AppendMessage(new OvalMessage(msgStr));
+				}
+			}
+
+			// Free memory.
+			LsaFreeMemory(userRights);		
+		}
+	} else {
+
+		Item* item = this->CreateItem();
+		item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+		item->AppendElement(new ItemEntity("security_principle", accountNameIn, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+		items->push_back(item);
+
+	}
+
+	// close handle
+	LsaClose(polHandle);
+
+	return isComplete;
+}


Property changes on: trunk/ovaldi/src/probes/windows/AccessTokenProbe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/windows/AccessTokenProbe.h
===================================================================
--- trunk/ovaldi/src/probes/windows/AccessTokenProbe.h	                        (rev 0)
+++ trunk/ovaldi/src/probes/windows/AccessTokenProbe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,85 @@
+//
+// $Id: AccessTokenProbe.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+#ifndef ACCESSTOKENPROBE_H
+#define ACCESSTOKENPROBE_H
+
+#pragma warning(disable:4786)
+
+#include "AbsProbe.h"
+#include "WindowsCommon.h"
+
+#include <aclapi.h>
+#include <lm.h>
+#include <Ntsecapi.h>
+
+using namespace std;
+
+/**
+	This class is responsbile for collecting registry information for windows registry_objects.
+*/
+class AccessTokenProbe : public AbsProbe {
+public:
+	~AccessTokenProbe();
+
+	/** Run the access token probe. 
+		Return a vector of Items. 
+
+		Behaviors:
+		The following behaviors are supported when collecting Access Token objects:
+		 - include_group: should be paired with the "resolve_group" behavior.
+		   When true, include the group in the set of sids. When false, do not
+		   include the group in the set of sids.
+	
+		 - resolve_group: when true, if the trustee name specifies a group 
+		   then return all users in the group. When false just return sid 
+		   for the group.
+	
+	*/
+	ItemVector* CollectItems(Object* object);
+	/** Return a new Item created for storing accesstoken information. */
+	Item* CreateItem();
+
+	/** Ensure that the AccessTokenProbe is a singleton. */
+	static AbsProbe* Instance();
+	
+
+private:
+	AccessTokenProbe();
+
+	static AccessTokenProbe* instance;
+
+	/** Given an account name, gather information about it. 
+		Currently always returns true.
+	*/
+	bool GetAccountInformation(string accountNameIn,  bool resolveGroupBehavior, bool includeGroupBehavior, ItemVector* items);
+};
+
+#endif


Property changes on: trunk/ovaldi/src/probes/windows/AccessTokenProbe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/windows/AuditEventPolicyProbe.cpp
===================================================================
--- trunk/ovaldi/src/probes/windows/AuditEventPolicyProbe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/probes/windows/AuditEventPolicyProbe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,275 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+#include "AuditEventPolicyProbe.h"
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  AuditEventPolicyProbe Class  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AuditEventPolicyProbe* AuditEventPolicyProbe::instance = NULL;
+
+AuditEventPolicyProbe::AuditEventPolicyProbe() {
+
+}
+
+AuditEventPolicyProbe::~AuditEventPolicyProbe() {
+
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AbsProbe* AuditEventPolicyProbe::Instance() {
+
+	// Use lazy initialization
+	if(instance == NULL) 
+		instance = new AuditEventPolicyProbe();
+
+	return instance;	
+}
+
+ItemVector* AuditEventPolicyProbe::CollectItems(Object *object) {
+
+	ItemVector *collectedItems = NULL;
+
+	Item* item = NULL;	
+
+	//
+	// First open a handle to a policy object.
+	// msdn link on Opening a Policy Object Handle
+	// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secmgmt/security/opening_a_policy_object_handle.asp
+	//
+
+	LSA_OBJECT_ATTRIBUTES ObjectAttributes;
+	NTSTATUS ntsResult;
+	LSA_HANDLE lsahPolicyHandle;
+
+	// Object attributes are reserved, so initialize to zeroes.
+	ZeroMemory(&ObjectAttributes, sizeof(ObjectAttributes));
+
+	// Get a handle to the Policy object.
+	ntsResult = LsaOpenPolicy(
+				NULL,    //Name of the target system. NULL opens localhost
+				&ObjectAttributes, //Object attributes.
+				POLICY_VIEW_AUDIT_INFORMATION , //Desired access permissions. POLICY_ALL_ACCESS
+				&lsahPolicyHandle  // Receives the policy handle.
+				);
+
+	if (ntsResult != ERROR_SUCCESS) {
+		DWORD errorCode = LsaNtStatusToWinError(ntsResult);
+		if(errorCode == ERROR_MR_MID_NOT_FOUND) {
+			throw ProbeException("Error obtaining audit event policy information - (win32) " + LsaNtStatusToWinError(ntsResult));
+		} else {
+			throw ProbeException("Error obtaining audit event policy information - (win32) " + WindowsCommon::GetErrorMessage(errorCode));
+		}
+	} 
+
+	//
+	// Second use the policy handle to get the audit event data.
+	// msdn link on getting audit event data:
+	// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthn/security/lsaqueryinformationpolicy.asp
+	// The call below will retrieve a POLICY_AUDIT_EVENTS_INFO structure. 
+	// msdn link on the above strucutre:
+	// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secmgmt/security/policy_audit_events_info.asp
+	// if auditing is turned on loop through the array of POLICY_AUDIT_EVENT_OPTIONS
+	// msdn link on the above structure
+	// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secmgmt/security/policy_audit_event_type.asp
+	// 
+
+	ntsResult = ERROR_SUCCESS;
+	PPOLICY_AUDIT_EVENTS_INFO pPAEInfo = NULL;
+	PWCHAR name = NULL;
+
+	ntsResult = LsaQueryInformationPolicy(
+				lsahPolicyHandle,                // Open handle to a Policy object.
+				PolicyAuditEventsInformation,	 // The information to get.
+				(PVOID *)&pPAEInfo               // Storage for the information.
+				);
+
+	if (ntsResult == ERROR_SUCCESS) {  
+
+		item = this->CreateItem();
+		item->SetStatus(OvalEnum::STATUS_EXISTS);
+		collectedItems = new ItemVector();
+		collectedItems->push_back(item);
+
+		// if auditing is turned on loop through the auditing options
+		if(pPAEInfo->AuditingMode) {
+
+			// initialize the item with all of its fields
+			ItemEntity *accountLogonItem = new ItemEntity("account_logon",  "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR);
+			item->AppendElement(accountLogonItem);
+			ItemEntity *accountManagementItem = new ItemEntity("account_management",  "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR);
+			item->AppendElement(accountManagementItem);
+			ItemEntity *detailedTrackingItem = new ItemEntity("detailed_tracking",  "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR);
+			item->AppendElement(detailedTrackingItem);
+			ItemEntity *directoryServiceAccessItem = new ItemEntity("directory_service_access",  "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR);
+			item->AppendElement(directoryServiceAccessItem);
+			ItemEntity *logonItem = new ItemEntity("logon",  "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR);
+			item->AppendElement(logonItem);
+			ItemEntity *objectAccessItem = new ItemEntity("object_access",  "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR);
+			item->AppendElement(objectAccessItem);
+			ItemEntity *policyChangeItem = new ItemEntity("policy_change",  "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR);
+			item->AppendElement(policyChangeItem);
+			ItemEntity *privilegeUseItem = new ItemEntity("privilege_use",  "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR);
+			item->AppendElement(privilegeUseItem);
+			ItemEntity *systemItem = new ItemEntity("system",  "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR);
+			item->AppendElement(systemItem);
+
+			
+			ULONG i = 0;
+			ULONG current = 0;
+			while(i < pPAEInfo->MaximumAuditEventCount) {
+				current = pPAEInfo->EventAuditingOptions[i];
+
+				switch (i) {
+					case AuditCategorySystem:
+						this->ReadAuditOptions(item, systemItem, current); 
+						break;
+					case AuditCategoryLogon:
+						this->ReadAuditOptions(item, logonItem, current); 
+						break;
+					case AuditCategoryObjectAccess:
+						this->ReadAuditOptions(item, objectAccessItem, current); 
+						break;
+					case AuditCategoryPrivilegeUse:
+						this->ReadAuditOptions(item, privilegeUseItem, current); 
+						break;
+					case AuditCategoryDetailedTracking:
+						this->ReadAuditOptions(item, detailedTrackingItem, current); 
+						break;
+					case AuditCategoryPolicyChange:
+						this->ReadAuditOptions(item, policyChangeItem, current); 
+						break;
+					case AuditCategoryAccountManagement:
+						this->ReadAuditOptions(item, accountManagementItem, current); 
+						break;
+					case AuditCategoryDirectoryServiceAccess:
+						this->ReadAuditOptions(item, directoryServiceAccessItem, current); 
+						break;
+					case AuditCategoryAccountLogon:
+						this->ReadAuditOptions(item, accountLogonItem, current); 
+						break;
+					default:
+						Log::Info("Unknown POLICY_AUDIT_EVENT_TYPE. ");
+						break;
+				}
+				i++;
+			}
+
+		} else {
+			// auditing is off so set all items to no auditing
+			item->AppendElement(new ItemEntity("account_logon",  "AUDIT_NONE", OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+			item->AppendElement(new ItemEntity("account_management",  "AUDIT_NONE", OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+			item->AppendElement(new ItemEntity("detailed_tracking",  "AUDIT_NONE", OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+			item->AppendElement(new ItemEntity("directory_service_access",  "AUDIT_NONE", OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+			item->AppendElement(new ItemEntity("logon",  "AUDIT_NONE", OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+			item->AppendElement(new ItemEntity("object_access",  "AUDIT_NONE", OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+			item->AppendElement(new ItemEntity("policy_change",  "AUDIT_NONE", OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+			item->AppendElement(new ItemEntity("privilege_use",  "AUDIT_NONE", OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+			item->AppendElement(new ItemEntity("system",  "AUDIT_NONE", OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+		}
+	} else {
+
+		DWORD errorCode = LsaNtStatusToWinError(ntsResult);
+		if(errorCode == ERROR_MR_MID_NOT_FOUND) {
+			throw ProbeException("Error obtaining audit event policy information - (win32) " + LsaNtStatusToWinError(ntsResult));
+		} else {
+			throw ProbeException("Error obtaining audit event policy information - (win32) " + WindowsCommon::GetErrorMessage(errorCode));
+		}
+	}
+
+	LsaFreeMemory(pPAEInfo);
+	
+	
+	// close policy handle
+	ntsResult = LsaClose(lsahPolicyHandle);
+
+	return collectedItems;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+Item* AuditEventPolicyProbe::CreateItem() {
+
+	Item* item = new Item(0, 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows", 
+						"win-sc", 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows windows-system-characteristics-schema.xsd", 
+						OvalEnum::STATUS_ERROR, 
+						"auditeventpolicy_item");
+
+	return item;
+}
+
+void AuditEventPolicyProbe::ReadAuditOptions(Item* item, ItemEntity* itemEntity, ULONG auditPolicy) {
+
+	if(auditPolicy & POLICY_AUDIT_EVENT_NONE) {
+        itemEntity->SetValue("AUDIT_NONE");
+		itemEntity->SetStatus(OvalEnum::STATUS_EXISTS);
+	} else if(auditPolicy & POLICY_AUDIT_EVENT_FAILURE && auditPolicy & POLICY_AUDIT_EVENT_SUCCESS) {
+		itemEntity->SetValue("AUDIT_SUCCESS_FAILURE");
+		itemEntity->SetStatus(OvalEnum::STATUS_EXISTS);
+	} else if(auditPolicy & POLICY_AUDIT_EVENT_FAILURE) {
+		itemEntity->SetValue("AUDIT_FAILURE");
+		itemEntity->SetStatus(OvalEnum::STATUS_EXISTS);
+	} else if(auditPolicy & POLICY_AUDIT_EVENT_SUCCESS) {
+		itemEntity->SetValue("AUDIT_SUCCESS");
+		itemEntity->SetStatus(OvalEnum::STATUS_EXISTS);
+	} else if (auditPolicy == POLICY_AUDIT_EVENT_UNCHANGED){
+		// Originally I thought that I should not get here. 
+		// These are my original notes on this:
+		// For some reason we seem to hit this condition 
+		// when looking at the permissions for AuditCategoryDetailedTracking
+		// As documented at the link below i would not expect to get this value 
+		// after doing a query. The value should only be used when doing a set.
+		// Reference url:
+		// http://msdn2.microsoft.com/en-us/library/ms721901.aspx
+
+		// I have now looked into this a bit more. This appears to be the value
+		// we get when the the auditing option is not set in the gui. I verified 
+		// this through testing. I have not been able to verify it through the 
+		// Microsoft API documentation. For now i think it is safe to assume that 
+		// this value can be treated as AUDIT_NONE.
+		//
+
+		itemEntity->SetValue("AUDIT_NONE");
+		itemEntity->SetStatus(OvalEnum::STATUS_EXISTS);
+
+		/*Log::Debug("Unexpected POLICY_AUDIT_EVENT_TYPE found: POLICY_AUDIT_EVENT_UNCHANGED.");
+		item->AppendMessage(new OvalMessage(itemEntity->GetName() + " policy - Unexpected POLICY_AUDIT_EVENT_TYPE found: POLICY_AUDIT_EVENT_UNCHANGED.", OvalEnum::LEVEL_WARNING));
+		itemEntity->SetStatus(OvalEnum::STATUS_ERROR);*/
+	} else {
+		// should never get here
+		Log::Debug("Unexpected POLICY_AUDIT_EVENT_TYPE found.");
+		item->AppendMessage(new OvalMessage(itemEntity->GetName() + " policy - Unexpected POLICY_AUDIT_EVENT_TYPE found.", OvalEnum::LEVEL_WARNING));
+		itemEntity->SetStatus(OvalEnum::STATUS_ERROR);
+	} 
+}


Property changes on: trunk/ovaldi/src/probes/windows/AuditEventPolicyProbe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/windows/AuditEventPolicyProbe.h
===================================================================
--- trunk/ovaldi/src/probes/windows/AuditEventPolicyProbe.h	                        (rev 0)
+++ trunk/ovaldi/src/probes/windows/AuditEventPolicyProbe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,70 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef AUDITEVENTPOLICYPROBE_H
+#define AUDITEVENTPOLICYPROBE_H
+
+#pragma warning(disable:4786)
+
+#include "AbsProbe.h"
+#include "WindowsCommon.h"
+
+#include <Ntsecapi.h>
+#include <windows.h>
+
+using namespace std;
+
+class AuditEventPolicyProbe : public AbsProbe {
+public:
+	~AuditEventPolicyProbe();
+	
+	/** Run the AuditEventPolicyProbe */
+	ItemVector* CollectItems(Object* object);
+
+	/** Return a new Item created for storing audit event policy information. */
+	Item* CreateItem();
+		
+	/** Ensure that the AuditEventPolicyProbe is a singleton. */
+	static AbsProbe* Instance();
+
+private:
+	AuditEventPolicyProbe();
+
+	/** Read the Audit options and set the value of the ItemEntity.
+		LSA Policy defines a mask for the valid event auditing options. 
+		The POLICY_AUDIT_EVENT_MASK mask evaluates to TRUE if it is set 
+		equal to any of the preceding event auditing options.
+	*/
+	void ReadAuditOptions(Item* item, ItemEntity* itemElm, ULONG auditPolicy);
+
+	static AuditEventPolicyProbe *instance;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/probes/windows/AuditEventPolicyProbe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/windows/FileEffectiveRightsProbe.cpp
===================================================================
--- trunk/ovaldi/src/probes/windows/FileEffectiveRightsProbe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/probes/windows/FileEffectiveRightsProbe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,554 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "FileEffectiveRightsProbe.h"
+
+
+//****************************************************************************************//
+//								FileEffectiveRightsProbe Class							  //	
+//****************************************************************************************//
+FileEffectiveRightsProbe* FileEffectiveRightsProbe::instance = NULL;
+
+FileEffectiveRightsProbe::FileEffectiveRightsProbe() {
+
+}
+
+FileEffectiveRightsProbe::~FileEffectiveRightsProbe() {
+
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AbsProbe* FileEffectiveRightsProbe::Instance() {
+
+	// Use lazy initialization
+	if(instance == NULL) 
+		instance = new FileEffectiveRightsProbe();
+
+	return instance;	
+}
+
+ItemVector* FileEffectiveRightsProbe::CollectItems(Object* object) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//	Get all the files on the system that match the pattern reusing the FileFinder.
+	//	This probe operates a bit differently than the others. After locating matching
+	//	files as the other file related probes do the trustee name is handled as follows:
+	//
+	//	if not using Variables 
+	//	 - if operation == equals
+	//		- call GetEffectiveRights method
+	//
+	//	 - operation == not equal || operation == pattern match
+	//		- Get all trustee names on the system. Reuse the logic in SidProbe::GetAllTrusteeNames() 
+	//		- Get the set of matching trustee names
+	//
+	//	- if using variables
+	//		- Get all trustee names on the system. Reuse the logic in SidProbe::GetAllTrusteeNames() 
+	//		- Get the set of matching trustee names
+	//		- call GetEffectiveRights method
+	//
+	// -----------------------------------------------------------------------
+
+	ItemVector *collectedItems = new ItemVector();
+
+	// get the path and file name
+	ObjectEntity* path = object->GetElementByName("path");
+	ObjectEntity* fileName = object->GetElementByName("filename");
+	ObjectEntity* trusteeName = object->GetElementByName("trustee_name");
+
+	// check trustee datatypes - only allow string
+	if(trusteeName->GetDatatype() != OvalEnum::DATATYPE_STRING) {
+		throw ProbeException("Error: invalid data type specified on trustee_name. Found: " + OvalEnum::DatatypeToString(trusteeName->GetDatatype()));
+	}
+
+	// check trustee operation - only allow  equals, not equals and pattern match
+	if(trusteeName->GetOperation() != OvalEnum::OPERATION_EQUALS 
+		&& trusteeName->GetOperation() != OvalEnum::OPERATION_PATTERN_MATCH 
+		&& trusteeName->GetOperation() != OvalEnum::OPERATION_NOT_EQUAL) {
+		throw ProbeException("Error: invalid operation specified on trustee_name. Found: " + OvalEnum::OperationToString(trusteeName->GetOperation()));
+	}
+
+	// support behaviors - init with defaults.
+	bool includeGroupBehavior = true;
+	bool resolveGroupBehavior = false;
+	if(object->GetBehaviors()->size() != 0) {
+		BehaviorVector* behaviors = object->GetBehaviors();
+		BehaviorVector::iterator iterator;
+		for(iterator = behaviors->begin(); iterator != behaviors->end(); iterator++) {
+			Behavior* behavior = (*iterator);
+			if(behavior->GetName().compare("include_group") == 0 && behavior->GetValue().compare("false") == 0) {
+				includeGroupBehavior = false;
+			} else if(behavior->GetName().compare("resolve_group") == 0 && behavior->GetValue().compare("true") == 0) {
+				resolveGroupBehavior = true;
+			} else {
+				Log::Info("Unsupported behavior found when collecting " + object->GetId());
+			}
+		}		
+	}
+
+	FileFinder fileFinder;
+	StringPairVector* filePaths = fileFinder.SearchFiles(path, fileName, object->GetBehaviors());
+
+	if(filePaths->size() > 0) {
+		// Loop through all file paths
+		StringPairVector::iterator iterator;
+		for(iterator = filePaths->begin(); iterator != filePaths->end(); iterator++) {
+
+			StringPair* fp = (*iterator);
+
+			if(fp->second.compare("") == 0) {
+
+				Item* item = NULL;
+
+				// check if the code should report that the filename does not exist.
+				StringVector fileNames;
+				if(fileFinder.ReportFileNameDoesNotExist(fp->first, fileName, &fileNames)) {
+					StringVector::iterator iterator;
+					for(iterator = fileNames.begin(); iterator != fileNames.end(); iterator++) {
+
+						item = this->CreateItem();
+						item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+						item->AppendElement(new ItemEntity("path", fp->first, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+						item->AppendElement(new ItemEntity("filename", (*iterator), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+						collectedItems->push_back(item);
+					}
+					
+				} else {
+
+					item = this->CreateItem();
+					item->SetStatus(OvalEnum::STATUS_EXISTS);
+					item->AppendElement(new ItemEntity("path", fp->first, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+					collectedItems->push_back(item);
+
+				}
+
+			} else {
+
+				try {
+
+					//
+					// The file exists so lets get the trustees to then examine effective rights
+					//
+					StringSet* trusteeNames = this->GetTrusteeNames(fp->first, fp->second, trusteeName, resolveGroupBehavior, includeGroupBehavior);
+					if(!trusteeNames->empty()) {
+						StringSet::iterator iterator;
+						for(iterator = trusteeNames->begin(); iterator != trusteeNames->end(); iterator++) {
+							try {
+								Item* item = this->GetEffectiveRights(fp->first, fp->second, (*iterator));
+								if(item != NULL) {
+									collectedItems->push_back(item);
+								}
+							} catch (ProbeException ex) {
+								Log::Debug(ex.GetErrorMessage());
+							} catch (Exception ex) {
+								Log::Debug("Unknown error while getting effective rights for file. Path: " + fp->first + " Name: " + fp->second + " " + ex.GetErrorMessage());
+							}
+						}
+						delete trusteeNames;
+
+					} else {
+
+						StringVector* trusteeNames = NULL;
+						if(this->ReportTrusteeNameDoesNotExist(trusteeName, trusteeNames)) {
+
+							StringVector::iterator iterator;
+							for(iterator = trusteeNames->begin(); iterator != trusteeNames->end(); iterator++) {
+
+								Item* item = this->CreateItem();
+								item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+								item->AppendElement(new ItemEntity("path", fp->first, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+								item->AppendElement(new ItemEntity("filename", fp->second, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+								item->AppendElement(new ItemEntity("trustee_name", (*iterator), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+								collectedItems->push_back(item);
+							}
+						}
+					}
+
+				} catch (ProbeException ex) {
+					Log::Debug(ex.GetErrorMessage());
+				} catch (...) {
+					Log::Debug("Unknown error.");
+				}
+			}
+
+			delete fp;
+		}
+
+	} else {
+		// if no filepaths check if the code should report that the path does not exist
+		StringVector paths;
+		if(fileFinder.ReportPathDoesNotExist(path, &paths)) {
+
+			Item* item = NULL;
+			StringVector::iterator iterator;
+			for(iterator = paths.begin(); iterator != paths.end(); iterator++) {
+
+				item = this->CreateItem();
+				item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+				item->AppendElement(new ItemEntity("path", (*iterator), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+				collectedItems->push_back(item);
+			}
+		}
+	}
+	delete filePaths;
+
+	return collectedItems;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+Item* FileEffectiveRightsProbe::CreateItem() {
+
+	Item* item = new Item(0, 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows", 
+						"win-sc", 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows windows-system-characteristics-schema.xsd", 
+						OvalEnum::STATUS_ERROR, 
+						"fileeffectiverights_item");
+
+	return item;
+}
+
+StringSet* FileEffectiveRightsProbe::GetTrusteeNames(string path, string fileName, ObjectEntity* trusteeName,  bool resolveGroupBehavior, bool includeGroupBehavior) {
+
+	StringSet* trusteeNames = new StringSet();
+	
+	// load the set of all Trustee names
+	StringVector* allTrusteeNames = WindowsCommon::GetAllTrusteeNames();
+
+	// does this trusteeName use variables?
+	if(trusteeName->GetVarRef() == NULL) {
+		
+		// proceed based on operation
+		if(trusteeName->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			
+			// check that the trustee name exists
+			if(this->TrusteeNameExists(trusteeName->GetValue(), allTrusteeNames)) {
+				trusteeNames->insert(trusteeName->GetValue());
+			}
+
+		} else if(trusteeName->GetOperation() == OvalEnum::OPERATION_NOT_EQUAL) {
+			this->GetMatchingTrusteeNames(trusteeName->GetValue(), allTrusteeNames, trusteeNames, false);
+		} else if(trusteeName->GetOperation() == OvalEnum::OPERATION_PATTERN_MATCH) {
+			this->GetMatchingTrusteeNames(trusteeName->GetValue(), allTrusteeNames, trusteeNames, true);
+		}		
+
+	} else {
+	
+		// loop through all trustee names on the system
+		// only keep those that match operation and value and var check
+		StringVector::iterator it;
+		ItemEntity* tmp = this->CreateItemEntity(trusteeName);
+		for(it = allTrusteeNames->begin(); it != allTrusteeNames->end(); it++) {
+			tmp->SetValue((*it));
+			if(trusteeName->Analyze(tmp) == OvalEnum::RESULT_TRUE) {
+				trusteeNames->insert((*it));
+			}
+		}
+	}
+
+	// using common code to get these do not delete they are cached.
+	//delete allTrusteeNames;
+
+	// apply the behaviors
+	StringSet* trusteeNamesSet = new StringSet();
+	if(!trusteeNames->empty()) {
+		
+		StringVector::iterator iterator;
+		StringSet::iterator it;
+		string domainStr = "";
+		string sidStr = "";
+		bool isGroup;
+
+		for(it = trusteeNames->begin(); it != trusteeNames->end(); it++) {
+			// is this a group
+			isGroup = WindowsCommon::LookUpTrusteeName(&(*it), &sidStr, &domainStr);
+
+			if(isGroup && resolveGroupBehavior) {
+
+				if(includeGroupBehavior) {
+					trusteeNamesSet->insert((*it));
+				}
+
+				// get the group members and add them to the set
+				StringVector* groupMembers = new StringVector();
+				WindowsCommon::ExpandGroup((*it), groupMembers);
+				for(iterator = groupMembers->begin(); iterator != groupMembers->end(); iterator++) {
+					trusteeNamesSet->insert((*iterator));
+				}
+				delete groupMembers;
+
+			} else {
+				trusteeNamesSet->insert((*it));
+			}
+		}
+	}
+
+	return trusteeNamesSet;
+}
+
+void FileEffectiveRightsProbe::GetMatchingTrusteeNames(string trusteeNamePattern, StringVector* allTrusteeNames, StringSet* trusteeNames, bool isRegex) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//	Select all Trustees for the specified file that match the specified
+	//	trusteeNamePattern. matching is done via regex or != depending on the
+	//	isRegex boolean flag. All matches are added to the trusteeNames vector.
+	// -----------------------------------------------------------------------
+
+	StringVector::iterator iterator;
+	for(iterator = allTrusteeNames->begin(); iterator != allTrusteeNames->end(); iterator++) {
+		if(this->IsMatch(trusteeNamePattern, (*iterator), isRegex)) {
+			trusteeNames->insert((*iterator));
+		}
+	}
+}
+
+bool FileEffectiveRightsProbe::TrusteeNameExists(string trusteeName, StringVector* trusteeNames) {
+
+	bool exists = false;
+
+	StringVector::iterator iterator;
+	for(iterator = trusteeNames->begin(); iterator != trusteeNames->end(); iterator++) {
+		if(trusteeName.compare((*iterator)) == 0) {
+			exists = true;
+		}
+	}			
+
+	return exists;
+}
+
+Item* FileEffectiveRightsProbe::GetEffectiveRights(string path, string fileName, string trusteeName) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//	Return a populated item for the specified trustees on the specified file.
+	//
+	//	- Call GetNamedSecurityInfo to get a DACL Security Descriptor for the file
+	//	  http://msdn2.microsoft.com/en-us/library/aa446645.aspx
+	//	- Use provided trustee name and call LsaLookupNames to get the sid
+	//	  http://msdn2.microsoft.com/en-us/library/ms721797.aspx
+	//	- Then call GetEffectiveRightsFromAcl with the dacl and the sid found in the earlier calls
+	//	  http://msdn2.microsoft.com/en-us/library/aa446637.aspx
+	// -----------------------------------------------------------------------
+	
+
+	Item* item = NULL;
+
+	// build the path
+	string filePath = path;
+	if(fileName.compare("") != 0) {
+		// Verify that the path that was passed into this function ends with a slash.  If
+		// it doesn't, then add one.
+		if (path[path.length()-1] != Common::fileSeperator)
+			filePath.append(1, Common::fileSeperator);
+
+		filePath.append(fileName);
+	}
+
+	string baseErrMsg = "Error unable to get effective rights for trustee: " + trusteeName + " from dacl for file: " + filePath;
+
+	DWORD res;
+	PACL pdacl;
+	PSECURITY_DESCRIPTOR pSD;
+
+	res = GetNamedSecurityInfo(const_cast<char*>(filePath.c_str()),	// object name
+							   SE_FILE_OBJECT,						// object type
+							   DACL_SECURITY_INFORMATION |			// information type
+							   PROTECTED_DACL_SECURITY_INFORMATION |
+							   UNPROTECTED_DACL_SECURITY_INFORMATION, 			
+							   NULL,								// owner SID
+							   NULL,								// primary group SID
+							   &pdacl,								// DACL
+							   NULL,								// SACL
+							   &pSD);								// Security Descriptor
+
+	if (res != ERROR_SUCCESS) {
+		if (res == ERROR_FILE_NOT_FOUND) {
+			// should never get here. 
+			// before calling this function the file should already have been checked for existence.
+			throw ProbeException( baseErrMsg + " Unable locate the specified file."); 
+		} else {
+			throw ProbeException(baseErrMsg + " Unable to retrieve a copy of the security descriptor. System error message: " + WindowsCommon::GetErrorMessage(res)); 
+		}
+	} 
+
+	// Check to see if a valid security descriptor was returned.  
+    if ((IsValidSecurityDescriptor(pSD) == 0) || (IsValidAcl(pdacl) == 0)) {
+		LocalFree(pSD);
+		throw ProbeException(baseErrMsg + " Invalid data returned from call to GetNamedSecurityInfo().");
+
+		//item->SetStatus(OvalEnum::STATUS_ERROR);
+		//item->AppendMessage(new OvalMessage(baseErrMsg + " Invalid data returned from call to GetNamedSecurityInfo().", OvalEnum::LEVEL_ERROR));
+		//Log::Debug(baseErrMsg + " Invalid data returned from call to GetNamedSecurityInfo().");
+		//return item;
+	}
+
+	// the file exists so we can create the new item now.
+	item = this->CreateItem();
+	item->SetStatus(OvalEnum::STATUS_EXISTS);
+	item->AppendElement(new ItemEntity("path", path, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("filename", fileName, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("trustee_name", trusteeName, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+
+
+	// Get the sid for the trustee name
+	PSID pSid = WindowsCommon::GetSIDForTrusteeName(trusteeName);
+
+	// check the sid
+	if(!IsValidSid(pSid)) {
+		LocalFree(pSD);
+		throw ProbeException(baseErrMsg + " Invalid sid found.");
+
+		//item->SetStatus(OvalEnum::STATUS_ERROR);
+		//item->AppendMessage(new OvalMessage(baseErrMsg + " Invalid sid found.", OvalEnum::LEVEL_ERROR));
+		//Log::Debug(baseErrMsg + " Invalid sid found.");
+		//return item;
+	}
+
+	// build the trustee structure
+	TRUSTEE trustee = {0};
+	BuildTrusteeWithSid(&trustee, pSid);
+
+	// get the rights
+	PACCESS_MASK accessRights = NULL;
+	accessRights = reinterpret_cast<PACCESS_MASK>(::LocalAlloc(LPTR, sizeof(PACCESS_MASK) + sizeof(ACCESS_MASK)));
+	if(accessRights == NULL) {
+		throw ProbeException(baseErrMsg + " Out of memory! Unable to allocate memory for access rights.");
+
+		//item->SetStatus(OvalEnum::STATUS_ERROR);
+		//item->AppendMessage(new OvalMessage(baseErrMsg + " Out of memory! Unable to allocate memory for access rights.", OvalEnum::LEVEL_ERROR));
+		//Log::Debug(baseErrMsg + " Out of memory! Unable to allocate memory for access rights.");
+		//return item;
+	}
+
+	res = GetEffectiveRightsFromAcl(pdacl,
+									&trustee,
+									accessRights);
+	if (res != ERROR_SUCCESS) {
+		
+		string errMsg = WindowsCommon::GetErrorMessage(res);		
+
+		LocalFree(pSD);
+		LocalFree(accessRights);
+		
+		//item->SetStatus(OvalEnum::STATUS_ERROR);
+		//item->AppendMessage(new OvalMessage(baseErrMsg + " System error message: " + errMsg, OvalEnum::LEVEL_ERROR));
+		//Log::Debug(baseErrMsg + " System error message: " + errMsg);
+		//return item;
+
+		throw ProbeException(baseErrMsg + " System error message: " + errMsg); 		
+	} 
+		
+	// Convert access mask to binary.
+	// http://msdn2.microsoft.com/en-us/library/aa374896.aspx
+	char mask[33];
+	ZeroMemory(&mask, 33);
+
+	for (int j = 0; j < 32; j++) {
+		if ((*accessRights) & (1 << j))
+			mask[j] = '1';
+		else
+			mask[j] = '0';
+	}
+
+	// need to seperatly determine if the generic bit should be set.
+	// the access mask that is returned never has the generic bits set. 
+	// Those bits can be determined by rolling up the object specific access bits
+	if((*accessRights) & FILE_GENERIC_READ)
+		mask[31] = '1';
+	if((*accessRights) & FILE_GENERIC_WRITE)
+		mask[30] = '1';
+	if((*accessRights) & FILE_GENERIC_EXECUTE)
+		mask[29] = '1';
+	if((*accessRights) & FILE_ALL_ACCESS)
+		mask[28] = '1';
+
+	// read values in the access_mask
+	item->AppendElement(new ItemEntity("standard_delete", Common::ToString(mask[16]), OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("standard_read_control", Common::ToString(mask[17]), OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("standard_write_dac", Common::ToString(mask[18]), OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("standard_write_owner", Common::ToString(mask[19]), OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("standard_synchronize", Common::ToString(mask[20]), OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("access_system_security", Common::ToString(mask[24]), OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("generic_read", Common::ToString(mask[31]), OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("generic_write", Common::ToString(mask[30]), OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("generic_execute", Common::ToString(mask[29]), OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("generic_all", Common::ToString(mask[28]), OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("file_read_data", Common::ToString(mask[0]), OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("file_write_data", Common::ToString(mask[1]), OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("file_append_data", Common::ToString(mask[2]), OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("file_read_ea", Common::ToString(mask[3]), OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("file_write_ea", Common::ToString(mask[4]), OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("file_execute", Common::ToString(mask[5]), OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("file_delete_child", Common::ToString(mask[6]), OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("file_read_attributes", Common::ToString(mask[7]), OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS));
+	item->AppendElement(new ItemEntity("file_write_attributes", Common::ToString(mask[8]), OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS));
+
+	LocalFree(pSD);
+	LocalFree(accessRights);
+
+	return item;
+}
+
+bool FileEffectiveRightsProbe::ReportTrusteeNameDoesNotExist(ObjectEntity *trusteeName, StringVector* trusteeNames) {
+	
+	bool result = false;
+	
+	if(trusteeName->GetOperation() == OvalEnum::OPERATION_EQUALS && !trusteeName->GetNil()) {		
+		
+		if(trusteeName->GetVarRef() == NULL) {
+			if(this->TrusteeNameExists(trusteeName->GetValue(), WindowsCommon::GetAllTrusteeNames())) {
+				trusteeNames = new StringVector();
+				trusteeNames->push_back(trusteeName->GetValue());
+				result = true;
+			}
+		} else {
+
+			trusteeNames = new StringVector();
+			VariableValueVector::iterator iterator;
+			for(iterator = trusteeName->GetVarRef()->GetValues()->begin(); iterator != trusteeName->GetVarRef()->GetValues()->end(); iterator++) {
+				if(this->TrusteeNameExists((*iterator)->GetValue(), WindowsCommon::GetAllTrusteeNames())) {
+					trusteeNames->push_back((*iterator)->GetValue());
+					result = true;
+				}
+			}
+		}
+	}
+
+	return  result;
+}


Property changes on: trunk/ovaldi/src/probes/windows/FileEffectiveRightsProbe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/windows/FileEffectiveRightsProbe.h
===================================================================
--- trunk/ovaldi/src/probes/windows/FileEffectiveRightsProbe.h	                        (rev 0)
+++ trunk/ovaldi/src/probes/windows/FileEffectiveRightsProbe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,101 @@
+//
+// $Id: FileEffectiveRightsProbe.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef FILEEFFECTIVRIGHTSPROBE_H
+#define FILEEFFECTIVRIGHTSPROBE_H
+
+#pragma warning(disable:4786)
+
+#include "FileFinder.h"
+#include "AbsProbe.h"
+#include "WindowsCommon.h"
+
+#include <aclapi.h>
+#include <windows.h>
+
+using namespace std;
+
+
+/**
+	This class is responsible for collecting file information for windows fileeffictiverights_objects.
+*/
+class FileEffectiveRightsProbe : public AbsProbe {
+
+public:
+	~FileEffectiveRightsProbe();
+	
+	ItemVector* CollectItems(Object* object);
+
+	/** Return a new Item created for storing file information */
+	Item* CreateItem();
+
+	/** Ensure that the FileEffectiveRightsProbe is a singleton. */
+	static AbsProbe* Instance();
+
+private:
+	FileEffectiveRightsProbe();
+
+	static FileEffectiveRightsProbe* instance;
+
+	/** Get the effective rights for a named trustee for the specified file. */
+	Item* GetEffectiveRights(string path, string fileName, string trusteeName);
+
+	/** Identify all trustee names for the specified trusteeName ObjectEntity. */ 
+	StringSet* GetTrusteeNames(string path, string fileName, ObjectEntity* trusteeName,  bool resolveGroupBehavior, bool includeGroupBehavior);
+
+	/** Search all trustee names on the the specifed file and return the set of names the match the specifeid criteria. */
+	void GetMatchingTrusteeNames(string trusteeNamePattern, StringVector* allTrusteeNames, StringSet* trusteeNames, bool isRegex = true);
+
+	/** Return ture if the specfied trustee name exists in the set of trustee names */
+	bool TrusteeNameExists(string trusteeName, StringVector* trusteeNames);
+
+	/** Get the account name, domain, and sid string for the specified SID. */
+	//void GetTrusteeInfoForSid(PSID psid, string* trusteeName, string* trusteeDomain, string* trusteeSid);
+
+	// 8/28/2006
+	//PSID GetSIDForTrusteeName(string trusteeName);
+
+	Item* GetEffectiveRightsForSID(string path, string fileName, PSID psid);
+
+	/** Return true if the calling probe should report that the trustee name does not exist.
+		If a trustee name's operator is set to OPERATOR_EQUALS and the trustee name does not exist
+		at the specified path the caller should report that the trustee name was not found. When 
+		getting the value of the trustee name to check existence need to look for either a simple 
+		element value or a variable with one or more values. If the return value is true the trusteeNames 
+		StringVector* paremeter contains the set of trustee names to report as not existing. 
+		Otherwise the the trusteeNames paramter is NULL. The caller is responsible for making sure
+		that any memory allocated for the trusteeNames parameter is cleaned up. The trusteeNames paramter
+		should be input as NULL when the function is called.
+	*/
+	bool ReportTrusteeNameDoesNotExist(ObjectEntity* trusteeName, StringVector* trusteeNames);
+};
+
+#endif


Property changes on: trunk/ovaldi/src/probes/windows/FileEffectiveRightsProbe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/windows/FileProbe.cpp
===================================================================
--- trunk/ovaldi/src/probes/windows/FileProbe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/probes/windows/FileProbe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,1127 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "FileProbe.h"
+
+//****************************************************************************************//
+//								FileProbe Class											  //	
+//****************************************************************************************//
+FileProbe* FileProbe::instance = NULL;
+
+FileProbe::FileProbe() {
+
+}
+
+FileProbe::~FileProbe() {
+
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AbsProbe* FileProbe::Instance() {
+
+	// Use lazy initialization
+	if(instance == NULL) 
+		instance = new FileProbe();
+
+	return instance;	
+}
+
+ItemVector* FileProbe::CollectItems(Object* object) {
+
+	ItemVector *collectedItems = new ItemVector();
+
+	// get the path and file name
+	ObjectEntity* path = object->GetElementByName("path");
+	ObjectEntity* fileName = object->GetElementByName("filename");
+
+	FileFinder fileFinder;
+	StringPairVector* filePaths = fileFinder.SearchFiles(path, fileName, object->GetBehaviors());
+
+	if(filePaths->size() > 0) {
+		// Loop through all file paths
+		StringPairVector::iterator iterator;
+		for(iterator = filePaths->begin(); iterator != filePaths->end(); iterator++) {
+
+			StringPair* fp = (*iterator);
+
+			if(fp->second.compare("") == 0) {
+
+				Item* item = NULL;
+
+				// check if the code should report that the filename does not exist.
+				StringVector fileNames;
+				if(fileFinder.ReportFileNameDoesNotExist(fp->first, fileName, &fileNames)) {
+
+					StringVector::iterator iterator;
+					for(iterator = fileNames.begin(); iterator != fileNames.end(); iterator++) {
+
+						item = this->CreateItem();
+						item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+						item->AppendElement(new ItemEntity("path", fp->first, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+						item->AppendElement(new ItemEntity("filename", (*iterator), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+						collectedItems->push_back(item);
+					}
+					
+				} else {
+
+					item = this->CreateItem();
+					item->SetStatus(OvalEnum::STATUS_EXISTS);
+					item->AppendElement(new ItemEntity("path", fp->first, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+					collectedItems->push_back(item);
+
+				}
+
+			} else {
+				Item* item = this->GetFileAttributes(fp->first, fp->second);
+				if(item != NULL) {
+					collectedItems->push_back(item);
+				}
+				item = NULL;
+			}
+			delete fp;
+		}
+	} else {
+		// if no filepaths check if the code should report that the path does not exist
+		StringVector paths;
+		if(fileFinder.ReportPathDoesNotExist(path, &paths)) {
+
+			Item* item = NULL;
+			StringVector::iterator iterator;
+			for(iterator = paths.begin(); iterator != paths.end(); iterator++) {
+
+				item = this->CreateItem();
+				item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+				item->AppendElement(new ItemEntity("path", (*iterator), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+				collectedItems->push_back(item);
+			}
+		}
+	}
+	delete filePaths;
+
+	return collectedItems;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+Item* FileProbe::CreateItem() {
+
+	Item* item = new Item(0, 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows", 
+						"win-sc", 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows windows-system-characteristics-schema.xsd", 
+						OvalEnum::STATUS_ERROR, 
+						"file_item");
+
+	return item;
+}
+
+Item* FileProbe::GetFileAttributes(string path, string fileName) {
+
+	HANDLE hFile;
+	DWORD res;
+	char buf[512];
+
+	Item *item = NULL;
+
+	string filePath = path;
+	if(path[path.length()-1] != Common::fileSeperator)
+		filePath.append(1, Common::fileSeperator);
+
+	if(fileName[0] != Common::fileSeperator) {
+		filePath.append(fileName);
+	} else {
+		filePath.append(fileName.substr(1, fileName.length()-2));
+	}
+
+
+	try {
+
+		//////////////////////////////////////////////////////
+		//////////////////////  Owner  ///////////////////////
+		//////////////////////////////////////////////////////
+
+		// Get the handle of the object.
+		//
+		// SMC-AUDIT: ISSUE: should probably verify that this is a regular file before opening,
+		// instead of a virtual memory file!
+		
+		hFile = CreateFile(filePath.c_str(),			// file name
+							GENERIC_READ,				// access mode
+							FILE_SHARE_READ,			// share mode
+							NULL,						// SD
+							OPEN_EXISTING,				// how to create
+							FILE_ATTRIBUTE_NORMAL,		// file attributes
+							NULL);						// handle to template file
+
+		if (hFile == INVALID_HANDLE_VALUE) {
+
+			DWORD errorNum = GetLastError();
+			string sysErrMsg = WindowsCommon::GetErrorMessage(errorNum);
+
+			if(errorNum == ERROR_FILE_NOT_FOUND || errorNum == ERROR_PATH_NOT_FOUND) {
+				
+				string errorMessage = "";
+				errorMessage.append("(FileProbe) Unable to open a handle to the file: '");
+				errorMessage.append(filePath);
+				errorMessage.append("'. This error should never occur since the file has already be confirmed to exist on the system. " + sysErrMsg);
+				throw ProbeException(errorMessage);
+				
+			} else if(errorNum == ERROR_PATH_NOT_FOUND) {
+
+				string errorMessage = "";
+				errorMessage.append("(FileProbe) Unable to open a handle to the file: '");
+				errorMessage.append(filePath);
+				errorMessage.append("'. This error should never occur since the file has already be confirmed to exist on the system. " + sysErrMsg);
+				throw ProbeException(errorMessage);
+
+			} else {
+
+				string errorMessage = "";
+				errorMessage.append("(FileProbe) Unable to open a handle to the file: '");
+				errorMessage.append(filePath);
+				errorMessage.append("'.  " + sysErrMsg);
+				throw ProbeException(errorMessage);
+			}
+		}
+
+		// add the path and file name
+		item = this->CreateItem();
+		item->SetStatus(OvalEnum::STATUS_EXISTS);
+		item->AppendElement(new ItemEntity("path", path, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+		item->AppendElement(new ItemEntity("filename", fileName, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+		ItemEntity* owner = new ItemEntity("owner", "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR);
+		item->AppendElement(owner);
+
+		//////////////////////////////////////////////////////
+		/////////////////////   Owner    /////////////////////
+		//////////////////////////////////////////////////////
+		try {
+
+			PSID owner_sid;
+			PSECURITY_DESCRIPTOR p_sd;
+
+			// Get the owner SID of the file.
+			res = GetSecurityInfo(hFile,						// handle to object
+								  SE_FILE_OBJECT,				// object type
+								  OWNER_SECURITY_INFORMATION,	// information type
+								  &owner_sid,					// owner SID
+								  NULL,							// primary group SID
+								  NULL,							// DACL
+								  NULL,							// SACL
+								  &p_sd);						// SD
+
+			if (res != ERROR_SUCCESS) {
+
+				string errorMessage = "";
+				errorMessage.append("(FileProbe) Unable to get the security descriptor for the file: '");
+				errorMessage.append(filePath);
+				errorMessage.append("'.");
+				throw ProbeException(errorMessage, ERROR_NOTICE);
+			}
+
+			// First call to LookupAccountSid to get the buffer sizes.
+			LPTSTR aname = NULL;
+			LPTSTR dname = NULL;
+			DWORD dwaname = 0;
+			DWORD dwdname = 0;
+			SID_NAME_USE eUse;
+
+			res = LookupAccountSid(NULL,					// name of local or remote computer
+								   owner_sid,				// security identifier
+								   aname,					// account name buffer
+								   (LPDWORD)&dwaname,		// size of account name buffer
+								   dname,					// domain name
+								   (LPDWORD)&dwdname,		// size of domain name buffer
+								   &eUse);					// SID type
+
+			// Reallocate memory for the buffers.
+			aname = (LPTSTR) malloc(dwaname);
+			if (aname == NULL) {
+
+				string errorMessage = "";
+				errorMessage.append("(FileProbe) Could not allocate space for the owner name for file: '");
+				errorMessage.append(filePath);
+				errorMessage.append("'.");
+				throw ProbeException(errorMessage);
+			}
+
+			dname = (LPTSTR) malloc(dwdname);
+			if (dname == NULL) {
+
+				free(aname);
+
+				string errorMessage = "";
+				errorMessage.append("(FileProbe) Could not allocate space for the domain name for the file: '");
+				errorMessage.append(filePath);
+				errorMessage.append("'.");
+				throw ProbeException(errorMessage);
+			}
+
+			// Second call to LookupAccountSid to get the account name.
+			res = LookupAccountSid(NULL,					// name of local or remote computer
+								   owner_sid,				// security identifier
+								   aname,					// account name buffer
+								   (LPDWORD)&dwaname,		// size of account name buffer
+								   dname,					// domain name
+								   (LPDWORD)&dwdname,		// size of domain name buffer
+								   &eUse);					// SID type
+
+			if (res == FALSE) {
+
+				free(aname);
+				free(dname);
+
+				string errorMessage = "";
+				errorMessage.append("(FileProbe) Unable to get the name of the account ");
+				errorMessage.append("for this SID for the file: '");
+				errorMessage.append(filePath);
+				errorMessage.append("'.");
+				throw ProbeException(errorMessage);
+			}
+			
+			//	Set owner 
+			owner->SetValue(aname);
+			owner->SetStatus(OvalEnum::STATUS_EXISTS);
+			free(aname);
+			free(dname);
+
+		} catch(ProbeException ex) {	
+			item->AppendMessage(new OvalMessage("Message: " + ex.GetErrorMessage()));
+			owner->SetValue("");
+			owner->SetStatus(OvalEnum::STATUS_ERROR);
+
+		} catch(...) {
+			
+			string errorMessage = "";
+			errorMessage.append("(FileProbe) Unknown error attempting to get the owner of the file '");
+			errorMessage.append(filePath);
+			errorMessage.append("' ");
+			item->AppendMessage(new OvalMessage(errorMessage));
+			owner->SetValue("");
+			owner->SetStatus(OvalEnum::STATUS_ERROR);
+		}
+
+		//////////////////////////////////////////////////////
+		/////////////////////  FileSize  /////////////////////
+		//////////////////////////////////////////////////////
+
+		struct _stat statusBuffer;
+		int result;
+ 
+		// Get status information associated with the file.
+		result = _stat(filePath.c_str(), &statusBuffer);
+		if (result < 0) {
+			string errorMessage = "";
+			errorMessage.append("(FileProbe) Unable to get status information ");
+			errorMessage.append("associated with the file: '");
+			errorMessage.append(filePath);
+			errorMessage.append("'.");
+			
+			item->AppendElement(new ItemEntity("size", "", OvalEnum::DATATYPE_INTEGER, false, OvalEnum::STATUS_ERROR));
+			item->AppendMessage(new OvalMessage(errorMessage));
+			
+		} else {
+
+			// Add file size.
+			ZeroMemory(buf, sizeof(buf));
+			_snprintf(buf, sizeof(buf)-1, "%ld", statusBuffer.st_size);
+			buf[sizeof(buf)-1] = '\0';
+			item->AppendElement(new ItemEntity("size", buf, OvalEnum::DATATYPE_INTEGER, false, OvalEnum::STATUS_EXISTS));
+		}
+
+
+		//////////////////////////////////////////////////////
+		/////////////////////  File Times  ///////////////////
+		//////////////////////////////////////////////////////
+		FILETIME creationTime;
+		FILETIME lastAccessTime;
+		FILETIME writeTime;
+
+		BOOL timeRes = GetFileTime(	hFile,
+									&creationTime,
+									&lastAccessTime,
+									&writeTime);
+
+		if(!timeRes) {
+
+			ItemEntity* aTime = new ItemEntity("a_time",  "", OvalEnum::DATATYPE_INTEGER, false, OvalEnum::STATUS_ERROR);
+			ItemEntity* cTime = new ItemEntity("c_time",  "", OvalEnum::DATATYPE_INTEGER, false, OvalEnum::STATUS_ERROR);
+			ItemEntity* mTime = new ItemEntity("m_time",  "", OvalEnum::DATATYPE_INTEGER, false, OvalEnum::STATUS_ERROR);
+			string lastError = WindowsCommon::GetErrorMessage(GetLastError());
+			item->AppendMessage(new OvalMessage("Unable to file times for file. " + lastError, OvalEnum::LEVEL_ERROR));
+
+		} else {
+
+			//////////////////////////////////////////////////////
+			/////////////////////  Accessed  /////////////////////
+			//////////////////////////////////////////////////////
+			ItemEntity* aTime = new ItemEntity("a_time", WindowsCommon::ToString(creationTime), OvalEnum::DATATYPE_INTEGER, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(aTime);
+
+			//////////////////////////////////////////////////////
+			/////////////////////  Created  /////////////////////
+			//////////////////////////////////////////////////////
+			ItemEntity* cTime = new ItemEntity("c_time", WindowsCommon::ToString(lastAccessTime), OvalEnum::DATATYPE_INTEGER, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(cTime);
+
+			//////////////////////////////////////////////////////
+			/////////////////////  Modified  /////////////////////
+			//////////////////////////////////////////////////////
+			ItemEntity* mTime = new ItemEntity("m_time", WindowsCommon::ToString(writeTime), OvalEnum::DATATYPE_INTEGER, false, OvalEnum::STATUS_EXISTS);
+			item->AppendElement(mTime);
+
+		}
+
+		//////////////////////////////////////////////////////
+		////////////////////  MSChecksum  ////////////////////
+		//////////////////////////////////////////////////////
+
+		DWORD headersum;  
+		DWORD checksum;
+
+		res = MapFileAndCheckSum(const_cast<char*>(filePath.c_str()), &headersum, &checksum);
+		if (res != CHECKSUM_SUCCESS) {
+			string errorMessage = "";
+			errorMessage.append("(FileProbe) Unable to get ms_checksum information for the file: '");
+			errorMessage.append(filePath);
+			errorMessage.append("'");
+			item->AppendElement(new ItemEntity("ms_checksum", "", OvalEnum::DATATYPE_INTEGER, false, OvalEnum::STATUS_ERROR));
+			item->AppendMessage(new OvalMessage(errorMessage));
+
+		} else {
+			ZeroMemory(buf, sizeof(buf));
+			_snprintf(buf, sizeof(buf)-1, "%d", checksum);
+			buf[sizeof(buf)-1] = '\0';
+			item->AppendElement(new ItemEntity("ms_checksum", buf, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+		}
+
+		// initialize remaining version information entities...
+		ItemEntity* version = new ItemEntity("version", "", OvalEnum::DATATYPE_VERSION, false, OvalEnum::STATUS_ERROR);
+		item->AppendElement(version);
+		ItemEntity* type = new ItemEntity("type", "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR);
+		item->AppendElement(type);
+		ItemEntity* devClass = new ItemEntity("development_class", "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR);
+		item->AppendElement(devClass);
+		ItemEntity* company = new ItemEntity("company", "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR);	
+		item->AppendElement(company);
+		ItemEntity* internalName = new ItemEntity("internal_name", "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR);
+		item->AppendElement(internalName);
+		ItemEntity* language = new ItemEntity("language", "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR);
+		item->AppendElement(language);
+		ItemEntity* originalFilename = new ItemEntity("original_filename", "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR);
+		item->AppendElement(originalFilename);
+		ItemEntity* productName = new ItemEntity("product_name", "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR);
+		item->AppendElement(productName);
+		ItemEntity* productVersion = new ItemEntity("product_version", "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR);
+		item->AppendElement(productVersion);
+		
+		DWORD junk;
+		DWORD versionsize;
+		LPVOID versionbuf;
+
+		// Get the required size of the version info buffer.
+		versionsize = GetFileVersionInfoSize(filePath.c_str(), &junk);
+		if (versionsize > 0) {
+
+			versionbuf = (LPVOID)malloc(versionsize);
+			if (GetFileVersionInfo(filePath.c_str(), 0, versionsize, versionbuf) == TRUE) {
+
+				//////////////////////////////////////////////////////
+				////////////////////    version    ///////////////////
+				//////////////////////////////////////////////////////
+
+				this->GetVersion(versionbuf, filePath, item, version);			
+
+				//////////////////////////////////////////////////////
+				///////////////  development_class  //////////////////
+				//////////////////////////////////////////////////////
+
+				this->GetDevelopementClass(versionbuf, filePath, item, devClass);
+
+				//////////////////////////////////////////////////////
+				///////////////       company       //////////////////
+				//////////////////////////////////////////////////////
+
+				this->GetCompany(versionbuf, filePath, item, company);
+
+				//////////////////////////////////////////////////////
+				///////////////    internal_name    //////////////////
+				//////////////////////////////////////////////////////
+
+				this->GetInternalName(versionbuf, filePath, item, internalName);
+
+				//////////////////////////////////////////////////////
+				///////////////       language      //////////////////
+				//////////////////////////////////////////////////////
+
+				this->GetLanguage(versionbuf, filePath, item, language);
+
+				//////////////////////////////////////////////////////
+				///////////////  original_filename  //////////////////
+				//////////////////////////////////////////////////////
+
+				this->GetOriginalFilename(versionbuf, filePath, item, originalFilename);
+
+				//////////////////////////////////////////////////////
+				///////////////     product_name    //////////////////
+				//////////////////////////////////////////////////////
+
+				this->GetProductName(versionbuf, filePath, item, productName);
+
+				//////////////////////////////////////////////////////
+				///////////////   product_version   //////////////////
+				//////////////////////////////////////////////////////
+
+				this->GetProductVersion(versionbuf, filePath, item, productVersion);
+
+			} else {
+				string errorMessage = "";
+				errorMessage.append("(FileProbe) Unable to get version info for the file: '");
+				errorMessage.append(filePath);
+				errorMessage.append("'");
+				item->AppendMessage(new OvalMessage(errorMessage));
+			}
+
+			free(versionbuf);
+
+		} else {
+
+			string errorMessage = "";
+			errorMessage.append("(FileProbe) No version information available for the file: '");
+			errorMessage.append(filePath);
+			errorMessage.append("'");
+			item->AppendMessage(new OvalMessage(errorMessage));
+		}
+
+		//////////////////////////////////////////////////////
+		/////////////////////  FileType  /////////////////////
+		//////////////////////////////////////////////////////
+
+		this->GetType(hFile, filePath, item, type);
+
+		//////////////////////////////////////////////////////
+		//////////////////////////////////////////////////////
+	} catch(ProbeException ex) {	
+	
+		Log::Debug(ex.GetErrorMessage());
+
+	} catch(...) {	
+	
+		string errMsg = "";
+		errMsg.append("(FileProbe) Unknown error attempting to get file attribute information for the file: '");
+		errMsg.append(filePath);
+		errMsg.append("'");
+		Log::Debug(errMsg);
+		
+	}
+
+	return item;
+}
+
+void FileProbe::GetVersion(LPVOID versionbuf, string filePath, Item *item, ItemEntity* version) {
+
+	VS_FIXEDFILEINFO* pFFI = NULL;
+	UINT vdatalen;
+
+	//	Get The major, minor, private and build numbers for the file
+	if (VerQueryValue(versionbuf, "\\", (void**)&pFFI, &vdatalen) == FALSE) {
+
+		string errorMessage = "";
+		errorMessage.append("(FileProbe) Unable to get version information for the file '");
+		errorMessage.append(filePath);
+		errorMessage.append("'");
+		item->AppendMessage(new OvalMessage(errorMessage));
+
+	} else if (pFFI == NULL) {
+
+		string errorMessage = "";
+		errorMessage.append("(FileProbe) No version information available for the file: '");
+		errorMessage.append(filePath);
+		errorMessage.append("'");
+		version->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+		item->AppendMessage(new OvalMessage(errorMessage));
+
+	} else {
+
+		char ver1[16];
+		char ver2[16];
+		char ver3[16];
+		char ver4[16];
+
+		// get the file version data 
+		ZeroMemory(ver1, sizeof(ver1));
+		ZeroMemory(ver2, sizeof(ver2));
+		ZeroMemory(ver3, sizeof(ver3));
+		ZeroMemory(ver4, sizeof(ver4));
+
+		_snprintf(ver1, sizeof(ver1)-1, "%d", (HIWORD(pFFI->dwFileVersionMS)));
+		_snprintf(ver2, sizeof(ver2)-1, "%d", (LOWORD(pFFI->dwFileVersionMS)));
+		_snprintf(ver3, sizeof(ver3)-1, "%d", (HIWORD(pFFI->dwFileVersionLS)));
+		_snprintf(ver4, sizeof(ver4)-1, "%d", (LOWORD(pFFI->dwFileVersionLS)));
+
+		string versionStr = "";
+		versionStr.append(ver1);
+		versionStr.append(".");
+		versionStr.append(ver2);
+		versionStr.append(".");
+		versionStr.append(ver3);
+		versionStr.append(".");
+		versionStr.append(ver4);
+		version->SetValue(versionStr);
+		version->SetStatus(OvalEnum::STATUS_EXISTS);
+	}
+}
+
+void FileProbe::GetType(HANDLE hFile, string filePath, Item *item, ItemEntity* type) {
+
+	DWORD res = GetFileType(hFile);
+
+	BOOL gfaRes;
+	WIN32_FILE_ATTRIBUTE_DATA lpFileInformation;
+
+	switch (res) {
+
+		case FILE_TYPE_DISK:
+
+			gfaRes = GetFileAttributesEx(filePath.c_str(),				// file or directory name
+										 GetFileExInfoStandard,			// attribute class
+										 (LPVOID)&lpFileInformation);	// attribute information 
+
+			if (lpFileInformation.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY)
+				type->SetValue("FILE_ATTRIBUTE_DIRECTORY");
+			else
+					type->SetValue("FILE_TYPE_DISK");
+
+			type->SetStatus(OvalEnum::STATUS_EXISTS);
+
+			break;
+
+		case FILE_TYPE_CHAR:
+
+			type->SetValue("FILE_TYPE_CHAR");
+			type->SetStatus(OvalEnum::STATUS_EXISTS);
+			break;
+
+		case FILE_TYPE_PIPE:
+
+			type->SetValue("FILE_TYPE_PIPE");
+			type->SetStatus(OvalEnum::STATUS_EXISTS);
+			break;
+
+		case FILE_TYPE_UNKNOWN:
+			{
+				string errorMessage = "";
+				errorMessage.append("(FileProbe) No file type information available for the file: '");
+				errorMessage.append(filePath);
+				errorMessage.append("'");
+				item->AppendMessage(new OvalMessage(errorMessage));
+				type->SetStatus(OvalEnum::STATUS_ERROR);
+			}
+			
+			break;
+
+		default:
+			{
+				string errorMessage = "";
+				errorMessage.append("(FileProbe) Unable to get file type information for the file: '");
+				errorMessage.append(filePath);
+				errorMessage.append("'");
+				item->AppendMessage(new OvalMessage(errorMessage));
+				type->SetStatus(OvalEnum::STATUS_ERROR);
+			}
+			
+			break;
+	}
+}
+
+void FileProbe::GetDevelopementClass(LPVOID versionbuf, string filePath, Item *item, ItemEntity* devClass) {
+
+	//	Get the language-code page and construct the string for file version request
+	UINT vdatalen;
+	DWORD *lpTransArray;
+	TCHAR szSubblock[80];
+	TCHAR szSubblockHeader[25];
+	int retVal = VerQueryValue(versionbuf,  
+				  TEXT("\\VarFileInfo\\Translation"),
+				  (LPVOID*)&lpTransArray,
+				  &vdatalen);
+
+	if(retVal != 0) {
+		
+		//	Convert the code page info into a zero-terminated
+		//	string specifying which version-information value to retrieve
+		_stprintf(szSubblockHeader, TEXT("\\StringFileInfo\\%04X%04X"), LOWORD(lpTransArray[0]), HIWORD(lpTransArray[0]));					
+		_stprintf(szSubblock, TEXT("%s\\%s"), szSubblockHeader, TEXT("FileVersion"));
+
+		//	Get the file's developement class
+		LPTSTR lpszValue;
+		retVal = VerQueryValue(versionbuf,
+								szSubblock, 
+								(LPVOID *)&lpszValue, 
+								&vdatalen);
+					  
+		if(retVal != 0) {
+
+			//	Check to see if the version string has a developement path string in it
+			string verStr = lpszValue;
+			REGEX verMatcher;
+			if(verMatcher.IsMatch(".+\\([^\\)].+\\)", verStr.c_str())) {
+
+				//	Parse the version string
+				verStr = verStr.substr(verStr.find("(") + 1);
+				devClass->SetValue(verStr.substr(0, verStr.find(".")));
+				devClass->SetStatus(OvalEnum::STATUS_EXISTS);
+				
+			} else {
+				
+				devClass->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+			}
+
+		} else if(vdatalen == 0) {
+
+			string errorMessage = "";
+			errorMessage.append("(FileProbe) Unable to get development_class. No value is available for the specified version-information name, \"szSubblock,\" for file: ");
+			errorMessage.append(filePath);
+			errorMessage.append("'");
+			item->AppendMessage(new OvalMessage(errorMessage));
+			devClass->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+
+		} else if(retVal == 0) {
+
+			string errorMessage = "";
+			errorMessage.append("(FileProbe) Unable to get development_class. Either specified name, \"szSubblock,\" does not exist or the specified resource is not valid for file: ");
+			errorMessage.append(filePath);
+			errorMessage.append("'");
+			item->AppendMessage(new OvalMessage(errorMessage));
+			devClass->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+		}
+
+	} else if(vdatalen == 0) {
+
+		string errorMessage = "";
+		errorMessage.append("(FileProbe) Unable to get development_class. No value is available for the specified version-information name, \"szSubblock,\" for file: ");
+		errorMessage.append(filePath);
+		errorMessage.append("'");
+		item->AppendMessage(new OvalMessage(errorMessage));
+		devClass->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+
+	} else if(retVal == 0) {
+
+		string errorMessage = "";
+		errorMessage.append("(FileProbe) Unable to get development_class. Either specified name, \"szSubblock,\" does not exist or the specified resource is not valid for file: ");
+		errorMessage.append(filePath);
+		errorMessage.append("'");
+		item->AppendMessage(new OvalMessage(errorMessage));
+		devClass->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+	}
+}
+
+void FileProbe::GetCompany(LPVOID versionbuf, string filePath, Item *item, ItemEntity* company) {
+
+	//	Get the language-code page and construct the string for file version request
+	UINT vdatalen;
+	DWORD *lpTransArray;
+	TCHAR szSubblock[80];
+	TCHAR szSubblockHeader[25];
+	int retVal = VerQueryValue(versionbuf,  
+				  TEXT("\\VarFileInfo\\Translation"),
+				  (LPVOID*)&lpTransArray,
+				  &vdatalen);
+
+	if(retVal != 0) {
+		
+		//	Convert the code page info into a zero-terminated
+		//	string specifying which version-information value to retrieve
+		_stprintf(szSubblockHeader, TEXT("\\StringFileInfo\\%04X%04X"), LOWORD(lpTransArray[0]), HIWORD(lpTransArray[0]));					
+		_stprintf(szSubblock, TEXT("%s\\%s"), szSubblockHeader, TEXT("CompanyName"));
+
+		//	Get the file's developement class
+		LPTSTR lpszValue;
+		retVal = VerQueryValue(versionbuf,
+								szSubblock, 
+								(LPVOID *)&lpszValue, 
+								&vdatalen);
+					  
+		if(retVal != 0) {
+
+			string companyNameStr = lpszValue;
+			if(companyNameStr.compare("") != 0) {
+				company->SetValue(companyNameStr);
+				company->SetStatus(OvalEnum::STATUS_EXISTS);
+			} else {
+				company->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+			}
+
+		} else if(vdatalen == 0) {
+
+			string errorMessage = "";
+			errorMessage.append("(FileProbe) Unable to get company. No value is available for the specified version-information name, \"szSubblock,\" for file: ");
+			errorMessage.append(filePath);
+			errorMessage.append("'");
+			item->AppendMessage(new OvalMessage(errorMessage));
+			company->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+
+		} else if(retVal == 0) {
+
+			string errorMessage = "";
+			errorMessage.append("(FileProbe) Unable to get company. Either specified name, \"szSubblock,\" does not exist or the specified resource is not valid for file: ");
+			errorMessage.append(filePath);
+			errorMessage.append("'");
+			item->AppendMessage(new OvalMessage(errorMessage));
+			company->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+		}
+
+	} else if(vdatalen == 0) {
+
+		string errorMessage = "";
+		errorMessage.append("(FileProbe) Unable to get company. No value is available for the specified version-information name, \"szSubblock,\" for file: ");
+		errorMessage.append(filePath);
+		errorMessage.append("'");
+		item->AppendMessage(new OvalMessage(errorMessage));
+		company->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+
+	} else if(retVal == 0) {
+
+		string errorMessage = "";
+		errorMessage.append("(FileProbe) Unable to get company. Either specified name, \"szSubblock,\" does not exist or the specified resource is not valid for file: ");
+		errorMessage.append(filePath);
+		errorMessage.append("'");
+		item->AppendMessage(new OvalMessage(errorMessage));
+		company->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+	}
+}
+
+void FileProbe::GetInternalName(LPVOID versionbuf, string filePath, Item *item, ItemEntity* internalName) {
+
+	//	Get the language-code page and construct the string for file version request
+	UINT vdatalen;
+	DWORD *lpTransArray;
+	TCHAR szSubblock[80];
+	TCHAR szSubblockHeader[25];
+	int retVal = VerQueryValue(versionbuf,  
+				  TEXT("\\VarFileInfo\\Translation"),
+				  (LPVOID*)&lpTransArray,
+				  &vdatalen);
+
+	if(retVal != 0) {
+		
+		//	Convert the code page info into a zero-terminated
+		//	string specifying which version-information value to retrieve
+		_stprintf(szSubblockHeader, TEXT("\\StringFileInfo\\%04X%04X"), LOWORD(lpTransArray[0]), HIWORD(lpTransArray[0]));					
+		_stprintf(szSubblock, TEXT("%s\\%s"), szSubblockHeader, TEXT("InternalName"));
+
+		//	Get the file's developement class
+		LPTSTR lpszValue;
+		retVal = VerQueryValue(versionbuf,
+								szSubblock, 
+								(LPVOID *)&lpszValue, 
+								&vdatalen);
+					  
+		if(retVal != 0) {
+
+			string internalNameStr = lpszValue;
+			if(internalNameStr.compare("") != 0) {
+				internalName->SetValue(internalNameStr);
+				internalName->SetStatus(OvalEnum::STATUS_EXISTS);
+			} else {
+				internalName->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+			}
+
+		} else if(vdatalen == 0) {
+
+			string errorMessage = "";
+			errorMessage.append("(FileProbe) Unable to get internal_name. No value is available for the specified version-information name, \"szSubblock,\" for file: ");
+			errorMessage.append(filePath);
+			errorMessage.append("'");
+			item->AppendMessage(new OvalMessage(errorMessage));
+			internalName->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+
+		} else if(retVal == 0) {
+
+			string errorMessage = "";
+			errorMessage.append("(FileProbe) Unable to get internal_name. Either specified name, \"szSubblock,\" does not exist or the specified resource is not valid for file: ");
+			errorMessage.append(filePath);
+			errorMessage.append("'");
+			item->AppendMessage(new OvalMessage(errorMessage));
+			internalName->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+		}
+
+	} else if(vdatalen == 0) {
+
+		string errorMessage = "";
+		errorMessage.append("(FileProbe) Unable to get internal_name. No value is available for the specified version-information name, \"szSubblock,\" for file: ");
+		errorMessage.append(filePath);
+		errorMessage.append("'");
+		item->AppendMessage(new OvalMessage(errorMessage));
+		internalName->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+
+	} else if(retVal == 0) {
+
+		string errorMessage = "";
+		errorMessage.append("(FileProbe) Unable to get internal_name. Either specified name, \"szSubblock,\" does not exist or the specified resource is not valid for file: ");
+		errorMessage.append(filePath);
+		errorMessage.append("'");
+		item->AppendMessage(new OvalMessage(errorMessage));
+		internalName->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+	}
+}
+
+void FileProbe::GetLanguage(LPVOID versionbuf, string filePath, Item *item, ItemEntity* language) {
+
+	language->SetStatus(OvalEnum::STATUS_NOT_COLLECTED);
+}
+
+void FileProbe::GetOriginalFilename(LPVOID versionbuf, string filePath, Item *item, ItemEntity* originalFilename) {
+
+	//	Get the language-code page and construct the string for file version request
+	UINT vdatalen;
+	DWORD *lpTransArray;
+	TCHAR szSubblock[80];
+	TCHAR szSubblockHeader[25];
+	int retVal = VerQueryValue(versionbuf,  
+				  TEXT("\\VarFileInfo\\Translation"),
+				  (LPVOID*)&lpTransArray,
+				  &vdatalen);
+
+	if(retVal != 0) {
+		
+		//	Convert the code page info into a zero-terminated
+		//	string specifying which version-information value to retrieve
+		_stprintf(szSubblockHeader, TEXT("\\StringFileInfo\\%04X%04X"), LOWORD(lpTransArray[0]), HIWORD(lpTransArray[0]));					
+		_stprintf(szSubblock, TEXT("%s\\%s"), szSubblockHeader, TEXT("OriginalFilename"));
+
+		//	Get the file's developement class
+		LPTSTR lpszValue;
+		retVal = VerQueryValue(versionbuf,
+								szSubblock, 
+								(LPVOID *)&lpszValue, 
+								&vdatalen);
+					  
+		if(retVal != 0) {
+
+			string originalFilenameStr = lpszValue;
+			if(originalFilenameStr.compare("") != 0) {
+				originalFilename->SetValue(originalFilenameStr);
+				originalFilename->SetStatus(OvalEnum::STATUS_EXISTS);
+			} else {
+				originalFilename->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+			}
+
+		} else if(vdatalen == 0) {
+
+			string errorMessage = "";
+			errorMessage.append("(FileProbe) Unable to get original_filename. No value is available for the specified version-information name, \"szSubblock,\" for file: ");
+			errorMessage.append(filePath);
+			errorMessage.append("'");
+			item->AppendMessage(new OvalMessage(errorMessage));
+			originalFilename->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+
+		} else if(retVal == 0) {
+
+			string errorMessage = "";
+			errorMessage.append("(FileProbe) Unable to get original_filename. Either specified name, \"szSubblock,\" does not exist or the specified resource is not valid for file: ");
+			errorMessage.append(filePath);
+			errorMessage.append("'");
+			item->AppendMessage(new OvalMessage(errorMessage));
+			originalFilename->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+		}
+
+	} else if(vdatalen == 0) {
+
+		string errorMessage = "";
+		errorMessage.append("(FileProbe) Unable to get original_filename. No value is available for the specified version-information name, \"szSubblock,\" for file: ");
+		errorMessage.append(filePath);
+		errorMessage.append("'");
+		item->AppendMessage(new OvalMessage(errorMessage));
+		originalFilename->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+
+	} else if(retVal == 0) {
+
+		string errorMessage = "";
+		errorMessage.append("(FileProbe) Unable to get original_filename. Either specified name, \"szSubblock,\" does not exist or the specified resource is not valid for file: ");
+		errorMessage.append(filePath);
+		errorMessage.append("'");
+		item->AppendMessage(new OvalMessage(errorMessage));
+		originalFilename->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+	}
+}
+
+void FileProbe::GetProductName(LPVOID versionbuf, string filePath, Item *item, ItemEntity* productName) {
+
+	//	Get the language-code page and construct the string for file version request
+	UINT vdatalen;
+	DWORD *lpTransArray;
+	TCHAR szSubblock[80];
+	TCHAR szSubblockHeader[25];
+	int retVal = VerQueryValue(versionbuf,  
+				  TEXT("\\VarFileInfo\\Translation"),
+				  (LPVOID*)&lpTransArray,
+				  &vdatalen);
+
+	if(retVal != 0) {
+		
+		//	Convert the code page info into a zero-terminated
+		//	string specifying which version-information value to retrieve
+		_stprintf(szSubblockHeader, TEXT("\\StringFileInfo\\%04X%04X"), LOWORD(lpTransArray[0]), HIWORD(lpTransArray[0]));					
+		_stprintf(szSubblock, TEXT("%s\\%s"), szSubblockHeader, TEXT("ProductName"));
+
+		//	Get the file's developement class
+		LPTSTR lpszValue;
+		retVal = VerQueryValue(versionbuf,
+								szSubblock, 
+								(LPVOID *)&lpszValue, 
+								&vdatalen);
+					  
+		if(retVal != 0) {
+
+			string productNameStr = lpszValue;
+			if(productNameStr.compare("") != 0) {
+				productName->SetValue(productNameStr);
+				productName->SetStatus(OvalEnum::STATUS_EXISTS);
+			} else {
+				productName->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+			}
+
+		} else if(vdatalen == 0) {
+
+			string errorMessage = "";
+			errorMessage.append("(FileProbe) Unable to get product_name. No value is available for the specified version-information name, \"szSubblock,\" for file: ");
+			errorMessage.append(filePath);
+			errorMessage.append("'");
+			item->AppendMessage(new OvalMessage(errorMessage));
+			productName->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+
+		} else if(retVal == 0) {
+
+			string errorMessage = "";
+			errorMessage.append("(FileProbe) Unable to get product_name. Either specified name, \"szSubblock,\" does not exist or the specified resource is not valid for file: ");
+			errorMessage.append(filePath);
+			errorMessage.append("'");
+			item->AppendMessage(new OvalMessage(errorMessage));
+			productName->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+		}
+
+	} else if(vdatalen == 0) {
+
+		string errorMessage = "";
+		errorMessage.append("(FileProbe) Unable to get product_name. No value is available for the specified version-information name, \"szSubblock,\" for file: ");
+		errorMessage.append(filePath);
+		errorMessage.append("'");
+		item->AppendMessage(new OvalMessage(errorMessage));
+		productName->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+
+	} else if(retVal == 0) {
+
+		string errorMessage = "";
+		errorMessage.append("(FileProbe) Unable to get product_name. Either specified name, \"szSubblock,\" does not exist or the specified resource is not valid for file: ");
+		errorMessage.append(filePath);
+		errorMessage.append("'");
+		item->AppendMessage(new OvalMessage(errorMessage));
+		productName->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+	}
+}
+
+void FileProbe::GetProductVersion(LPVOID versionbuf, string filePath, Item *item, ItemEntity* productVersion) {
+
+	//	Get the language-code page and construct the string for file version request
+	UINT vdatalen;
+	DWORD *lpTransArray;
+	TCHAR szSubblock[80];
+	TCHAR szSubblockHeader[25];
+	int retVal = VerQueryValue(versionbuf,  
+				  TEXT("\\VarFileInfo\\Translation"),
+				  (LPVOID*)&lpTransArray,
+				  &vdatalen);
+
+	if(retVal != 0) {
+		
+		//	Convert the code page info into a zero-terminated
+		//	string specifying which version-information value to retrieve
+		_stprintf(szSubblockHeader, TEXT("\\StringFileInfo\\%04X%04X"), LOWORD(lpTransArray[0]), HIWORD(lpTransArray[0]));					
+		_stprintf(szSubblock, TEXT("%s\\%s"), szSubblockHeader, TEXT("ProductVersion"));
+
+		//	Get the file's developement class
+		LPTSTR lpszValue;
+		retVal = VerQueryValue(versionbuf,
+								szSubblock, 
+								(LPVOID *)&lpszValue, 
+								&vdatalen);
+					  
+		if(retVal != 0) {
+
+			string productVersionStr = lpszValue;
+			if(productVersionStr.compare("") != 0) {
+				productVersion->SetValue(productVersionStr);
+				productVersion->SetStatus(OvalEnum::STATUS_EXISTS);
+			} else {
+				productVersion->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+			}
+
+		} else if(vdatalen == 0) {
+
+			string errorMessage = "";
+			errorMessage.append("(FileProbe) Unable to get product_version. No value is available for the specified version-information name, \"szSubblock,\" for file: ");
+			errorMessage.append(filePath);
+			errorMessage.append("'");
+			item->AppendMessage(new OvalMessage(errorMessage));
+			productVersion->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+
+		} else if(retVal == 0) {
+
+			string errorMessage = "";
+			errorMessage.append("(FileProbe) Unable to get product_version. Either specified name, \"szSubblock,\" does not exist or the specified resource is not valid for file: ");
+			errorMessage.append(filePath);
+			errorMessage.append("'");
+			item->AppendMessage(new OvalMessage(errorMessage));
+			productVersion->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+		}
+
+	} else if(vdatalen == 0) {
+
+		string errorMessage = "";
+		errorMessage.append("(FileProbe) Unable to get product_version. No value is available for the specified version-information name, \"szSubblock,\" for file: ");
+		errorMessage.append(filePath);
+		errorMessage.append("'");
+		item->AppendMessage(new OvalMessage(errorMessage));
+		productVersion->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+
+	} else if(retVal == 0) {
+
+		string errorMessage = "";
+		errorMessage.append("(FileProbe) Unable to get product_version. Either specified name, \"szSubblock,\" does not exist or the specified resource is not valid for file: ");
+		errorMessage.append(filePath);
+		errorMessage.append("'");
+		item->AppendMessage(new OvalMessage(errorMessage));
+		productVersion->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+	}
+}


Property changes on: trunk/ovaldi/src/probes/windows/FileProbe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/windows/FileProbe.h
===================================================================
--- trunk/ovaldi/src/probes/windows/FileProbe.h	                        (rev 0)
+++ trunk/ovaldi/src/probes/windows/FileProbe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,97 @@
+//
+// $Id: FileProbe.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef FILEPROBE_H
+#define FILEPROBE_H
+
+#pragma warning(disable:4786)
+
+#include "FileFinder.h"
+#include "AbsProbe.h"
+#include "WindowsCommon.h"
+
+#include <TCHAR.H>
+#include <aclapi.h>
+#include <imagehlp.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <time.h>
+#include <windows.h>
+
+using namespace std;
+
+/**
+	This class is responsible for collecting file information for windows file_objects.
+*/
+class FileProbe : public AbsProbe {
+
+public:
+	~FileProbe();
+	
+	/** Get all the files on the system that match the pattern. */
+	ItemVector* CollectItems(Object* object);
+
+	/** Return a new Item created for storing file information */
+	Item* CreateItem();
+
+	/** Gets single instance of the FileProbe. Uses lazy initialization. */
+	static AbsProbe* Instance();
+
+private:
+	FileProbe();
+
+	/** The static Singleton instance of the FileProbe. */
+	static FileProbe* instance;
+
+	/** Collectect all file attributes for the specified file on the specified path. */
+	Item* GetFileAttributes(string path, string fileName);
+
+	/** Get the version of the file. */
+	void GetVersion(LPVOID versionbuf, string filePath, Item *item, ItemEntity* version);
+	/** Get the type of the file. */
+	void GetType(HANDLE hFile, string filePath, Item *item, ItemEntity* type);
+	/** Get the developement class of the file. */
+	void GetDevelopementClass(LPVOID versionbuf, string filePath, Item *item, ItemEntity* devClass);
+	/** Get the company of the file. */
+	void GetCompany(LPVOID versionbuf, string filePath, Item *item, ItemEntity* company);
+	/** Get the internal name of the file. */
+	void GetInternalName(LPVOID versionbuf, string filePath, Item *item, ItemEntity* internalName);
+	/** Get the language of the file. NOT YET SUPPORTED */
+	void GetLanguage(LPVOID versionbuf, string filePath, Item *item, ItemEntity* language);
+	/** Get the original file name of the file. */
+	void GetOriginalFilename(LPVOID versionbuf, string filePath, Item *item, ItemEntity* originalFilename);
+	/** Get the product name of the file. */
+	void GetProductName(LPVOID versionbuf, string filePath, Item *item, ItemEntity* productName);
+	/** Get the product version of the file. */
+	void GetProductVersion(LPVOID versionbuf, string filePath, Item *item, ItemEntity* productVersion);	
+};
+
+#endif


Property changes on: trunk/ovaldi/src/probes/windows/FileProbe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/windows/GroupProbe.cpp
===================================================================
--- trunk/ovaldi/src/probes/windows/GroupProbe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/probes/windows/GroupProbe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,179 @@
+//
+// $Id: GroupProbe.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "GroupProbe.h"
+
+//****************************************************************************************//
+//								GroupProbe Class											  //	
+//****************************************************************************************//
+GroupProbe* GroupProbe::instance = NULL;
+
+GroupProbe::GroupProbe() : AbsProbe() {
+}
+
+GroupProbe::~GroupProbe() {
+
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AbsProbe* GroupProbe::Instance() {
+
+	// Use lazy initialization
+	if(instance == NULL) 
+		instance = new GroupProbe();
+
+	return instance;	
+}
+
+ItemVector* GroupProbe::CollectItems(Object *object) {
+	
+	ItemVector *collectedItems = new ItemVector();
+
+	// get the trustee_name from the provided object
+	ObjectEntity* group = object->GetElementByName("group");
+
+	// check datatypes - only allow string
+	if(group->GetDatatype() != OvalEnum::DATATYPE_STRING) {
+		throw ProbeException("Error: invalid data type specified on group. Found: " + OvalEnum::DatatypeToString(group->GetDatatype()));
+	}	
+
+	// check operation - only allow  equals, not equals and pattern match
+	if(group->GetOperation() != OvalEnum::OPERATION_EQUALS && group->GetOperation() != OvalEnum::OPERATION_PATTERN_MATCH && group->GetOperation() != OvalEnum::OPERATION_NOT_EQUAL) {
+		throw ProbeException("Error: invalid operation specified on group. Found: " + OvalEnum::OperationToString(group->GetOperation()));
+	}
+
+	// behaviors are not allowed on groups
+	if(object->GetBehaviors()->size() != 0) {
+		throw ProbeException("Error group_objects do not support behaviors.");		
+	}
+
+	// get the group data
+	if(group->GetVarRef() == NULL) {
+		if(group->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			// simply get the members of the group if it exists
+			Item* item =  this->GetGroupMembers(group->GetValue());
+			if(item != NULL) {
+				collectedItems->push_back(item);
+			}
+		} else {
+
+			bool isRegex = false;
+			if(group->GetOperation() == OvalEnum::OPERATION_PATTERN_MATCH)
+				isRegex = true;
+
+			// Get all groups on the system...
+			StringVector* allGroups = WindowsCommon::GetAllGroups();
+			
+			// Get the set of groups that match the ItemEntity.
+			StringVector::iterator iterator;
+			for(iterator = allGroups->begin(); iterator != allGroups->end(); iterator++) {
+				string curr = (*iterator);
+				if(this->IsMatch(group->GetValue(), (*iterator), isRegex)) {
+					Item* item =  this->GetGroupMembers((*iterator));
+					if(item != NULL) {
+						collectedItems->push_back(item);
+					}
+				}
+			}
+		}
+
+	} else {
+		// Get all groups on the system...
+		StringVector* allGroups = WindowsCommon::GetAllGroups();
+
+		// loop through all groups on the system
+		// only keep those that match operation and value and var check
+		StringVector::iterator it;
+		ItemEntity* tmp = this->CreateItemEntity(group);
+		for(it = allGroups->begin(); it != allGroups->end(); it++) {
+			tmp->SetValue((*it));
+			if(group->Analyze(tmp) == OvalEnum::RESULT_TRUE) {
+				Item* item = this->GetGroupMembers((*it));
+				if(item != NULL) {
+					collectedItems->push_back(item);
+				}
+			}
+		}
+	}
+
+	return collectedItems;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+Item* GroupProbe::CreateItem() {
+
+	Item* item = new Item(0, 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows", 
+						"win-sc", 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows windows-system-characteristics-schema.xsd", 
+						OvalEnum::STATUS_ERROR, 
+						"group_item");
+
+	return item;
+}
+
+Item* GroupProbe::GetGroupMembers(string groupName) {
+	Item* item = NULL;
+
+	StringVector* members = new StringVector();
+	bool groupExists = WindowsCommon::ExpandGroup(groupName, members);
+
+	if(groupExists) {
+		item = this->CreateItem();
+		item->SetStatus(OvalEnum::STATUS_EXISTS);
+		item->AppendElement(new ItemEntity("group", groupName, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+
+		StringVector::iterator iterator;
+		if(members->size() > 0) {
+			for(iterator = members->begin(); iterator != members->end(); iterator++) {
+				item->AppendElement(new ItemEntity("user", (*iterator), OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+			}
+		} else {
+			item->AppendElement(new ItemEntity("user", "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_DOES_NOT_EXIST));
+		}
+
+	} else {
+
+		// create an item to report that a group was looked up 
+		// and it did not exist
+		item = this->CreateItem();
+		item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+		item->AppendElement(new ItemEntity("group", groupName, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+	}
+
+	delete members;
+
+	return item;
+}


Property changes on: trunk/ovaldi/src/probes/windows/GroupProbe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/windows/GroupProbe.h
===================================================================
--- trunk/ovaldi/src/probes/windows/GroupProbe.h	                        (rev 0)
+++ trunk/ovaldi/src/probes/windows/GroupProbe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,71 @@
+//
+// $Id: GroupProbe.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+#ifndef GROUPPROBE_H
+#define GROUPPROBE_H
+
+#pragma warning(disable:4786)
+
+#include "AbsProbe.h"
+#include "WindowsCommon.h"
+
+using namespace std;
+
+
+/**
+	This class is responsible for collecting information for windows group_objects.
+*/
+class GroupProbe : public AbsProbe {
+public:
+	~GroupProbe();
+	
+	/** Run the group probe. Return a vector of Items
+		Relies on the WindowsCommon class for searching for and enumerating
+		Groups. 
+	 */
+	ItemVector* CollectItems(Object* object);
+
+	/** Return a new Item created for storing group information */
+	Item* CreateItem();
+
+	/** Ensure that the GroupProbe is a singleton. */
+	static AbsProbe* Instance();
+
+private:
+	GroupProbe();
+
+	static GroupProbe* instance;
+
+	/** Return a populated Item if the group exists and has any members. */
+	Item* GetGroupMembers(string groupName);
+
+};
+
+#endif


Property changes on: trunk/ovaldi/src/probes/windows/GroupProbe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/windows/LockoutPolicyProbe.cpp
===================================================================
--- trunk/ovaldi/src/probes/windows/LockoutPolicyProbe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/probes/windows/LockoutPolicyProbe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,166 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+#include "LockoutPolicyProbe.h"
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  LockoutPolicyProbe Class  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+LockoutPolicyProbe* LockoutPolicyProbe::instance = NULL;
+
+LockoutPolicyProbe::LockoutPolicyProbe() {
+
+}
+
+LockoutPolicyProbe::~LockoutPolicyProbe() {
+
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AbsProbe* LockoutPolicyProbe::Instance() {
+
+	// Use lazy initialization
+	if(instance == NULL) 
+		instance = new LockoutPolicyProbe();
+
+	return instance;	
+}
+
+ItemVector* LockoutPolicyProbe::CollectItems(Object *object) {
+
+	ItemVector *collectedItems = NULL;
+
+	Item* item = NULL;
+
+	//
+	// Get the force_logoff value
+	//
+	DWORD dwLevel = 0;
+	USER_MODALS_INFO_0 *pBufM0 = NULL;
+	NET_API_STATUS nStatus;
+	LPCWSTR pszServerName = NULL;
+
+	nStatus = NetUserModalsGet(pszServerName,
+                              dwLevel,
+                              (LPBYTE *)&pBufM0);
+
+	if (nStatus == NERR_Success) {
+		if (pBufM0 != NULL) {
+			string forceLogoff = WindowsCommon::ToString(pBufM0->usrmod0_force_logoff);
+
+			// create a new passwordpolicy item
+			item = this->CreateItem();
+			item->SetStatus(OvalEnum::STATUS_EXISTS);
+			collectedItems = new ItemVector();
+			collectedItems->push_back(item);
+
+			item->AppendElement(new ItemEntity("force_logoff",  forceLogoff, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+
+			// Free the allocated memory.
+			NetApiBufferFree(pBufM0);
+		}
+
+	} else if(nStatus == ERROR_ACCESS_DENIED) {
+		// Free the allocated memory.
+		if (pBufM0 != NULL)
+			NetApiBufferFree(pBufM0);
+		throw ProbeException ("Error: The user does not have access to the requested lockout policy information.");
+	} else if(nStatus == NERR_InvalidComputer) {
+		// Free the allocated memory.
+		if (pBufM0 != NULL)
+			NetApiBufferFree(pBufM0);
+		throw ProbeException ("Error: The computer name is invalid for requesting lockout policy information.");
+	}	
+
+	//
+	// Get the remaining lockout policy data
+	//
+	dwLevel = 3;
+	USER_MODALS_INFO_3 *pBufM3 = NULL;
+
+	nStatus = NetUserModalsGet(pszServerName,
+                              dwLevel,
+                              (LPBYTE *)&pBufM3);
+
+	if (nStatus == NERR_Success) {
+		if (pBufM3 != NULL) {
+
+			string lockoutDuration = WindowsCommon::ToString(pBufM3->usrmod3_lockout_duration);
+			string lockoutObservation = WindowsCommon::ToString(pBufM3->usrmod3_lockout_observation_window);
+			string lockoutThreshold = WindowsCommon::ToString(pBufM3->usrmod3_lockout_threshold);
+
+
+			// create a new passwordpolicy item
+			if(item == NULL) 
+				item = this->CreateItem();
+
+			item->SetStatus(OvalEnum::STATUS_EXISTS);
+			collectedItems = new ItemVector();
+			collectedItems->push_back(item);
+
+			item->AppendElement(new ItemEntity("lockout_duration",  lockoutDuration, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+			item->AppendElement(new ItemEntity("lockout_observation_window",  lockoutObservation, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+			item->AppendElement(new ItemEntity("lockout_threshold",  lockoutThreshold, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+
+			// Free the allocated memory.
+			NetApiBufferFree(pBufM3);
+		}
+
+	} else if(nStatus == ERROR_ACCESS_DENIED) {
+		// Free the allocated memory.
+		if (pBufM3 != NULL)
+			NetApiBufferFree(pBufM3);
+		throw ProbeException ("Error: The user does not have access to the requested lockout policy information.");
+	} else if(nStatus == NERR_InvalidComputer) {
+		// Free the allocated memory.
+		if (pBufM3 != NULL)
+			NetApiBufferFree(pBufM3);
+		throw ProbeException ("Error: The computer name is invalid for requesting lockout policy information.");
+	}
+
+	return collectedItems;
+}
+
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+Item* LockoutPolicyProbe::CreateItem() {
+
+	Item* item = new Item(0, 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows", 
+						"win-sc", 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows windows-system-characteristics-schema.xsd", 
+						OvalEnum::STATUS_ERROR, 
+						"lockoutpolicy_item");
+
+	return item;
+}
\ No newline at end of file


Property changes on: trunk/ovaldi/src/probes/windows/LockoutPolicyProbe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/windows/LockoutPolicyProbe.h
===================================================================
--- trunk/ovaldi/src/probes/windows/LockoutPolicyProbe.h	                        (rev 0)
+++ trunk/ovaldi/src/probes/windows/LockoutPolicyProbe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,63 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef LOCKOUTPOLICYPROBE_H
+#define LOCKOUTPOLICYPROBE_H
+
+#pragma warning(disable:4786)
+
+#include "AbsProbe.h"
+#include "WindowsCommon.h"
+
+#include <aclapi.h>
+#include <windows.h>
+#include <lm.h>
+
+using namespace std;
+
+class LockoutPolicyProbe : public AbsProbe {
+public:
+	~LockoutPolicyProbe();
+	
+	/** Run the LockoutPolicyProbe */
+	ItemVector* CollectItems(Object* object);
+	/** Return a new Item created for storing lockout policy information */
+	Item* CreateItem();
+		
+	/** Ensure that the LockoutPolicyProbe is a singleton. */
+	static AbsProbe* Instance();
+
+private:
+	LockoutPolicyProbe();
+
+	static LockoutPolicyProbe *instance;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/probes/windows/LockoutPolicyProbe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/windows/PasswordPolicyProbe.cpp
===================================================================
--- trunk/ovaldi/src/probes/windows/PasswordPolicyProbe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/probes/windows/PasswordPolicyProbe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,130 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+#include "PasswordPolicyProbe.h"
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  PasswordPolicyProbe Class  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+PasswordPolicyProbe* PasswordPolicyProbe::instance = NULL;
+
+PasswordPolicyProbe::PasswordPolicyProbe() {
+}
+
+PasswordPolicyProbe::~PasswordPolicyProbe() {
+
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AbsProbe* PasswordPolicyProbe::Instance() {
+
+	// Use lazy initialization
+	if(instance == NULL) 
+		instance = new PasswordPolicyProbe();
+
+	return instance;	
+}
+
+ItemVector* PasswordPolicyProbe::CollectItems(Object *object) {
+
+	ItemVector *collectedItems = NULL;
+	
+	DWORD dwLevel = 0;
+	USER_MODALS_INFO_0 *pBuf = NULL;
+	NET_API_STATUS nStatus;
+	LPCWSTR pszServerName = NULL;
+
+	nStatus = NetUserModalsGet(pszServerName,
+                              dwLevel,
+                              (LPBYTE *)&pBuf);
+
+	if (nStatus == NERR_Success) {
+		if (pBuf != NULL) {
+			string minPasswordLen = WindowsCommon::ToString(pBuf->usrmod0_min_passwd_len);
+
+			string maxPasswordAge = "-1";
+			if(pBuf->usrmod0_max_passwd_age == TIMEQ_FOREVER) {
+				maxPasswordAge = "-1";
+			} else {
+				maxPasswordAge = WindowsCommon::ToString(pBuf->usrmod0_max_passwd_age);
+			}
+
+			string minPasswordAge = WindowsCommon::ToString(pBuf->usrmod0_min_passwd_age);
+
+			string passwordHistoryLen = WindowsCommon::ToString(pBuf->usrmod0_password_hist_len);
+
+			// create a new passwordpolicy item
+			Item* item = this->CreateItem();
+			item->SetStatus(OvalEnum::STATUS_EXISTS);
+			collectedItems = new ItemVector();
+			collectedItems->push_back(item);
+
+			item->AppendElement(new ItemEntity("max_passwd_age",  maxPasswordAge, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+			item->AppendElement(new ItemEntity("min_passwd_age",  minPasswordAge, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+			item->AppendElement(new ItemEntity("min_passwd_len",  minPasswordLen, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+			item->AppendElement(new ItemEntity("password_hist_len",  passwordHistoryLen, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+			item->AppendElement(new ItemEntity("password_complexity",  "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_NOT_COLLECTED));
+			item->AppendElement(new ItemEntity("reversible_encryption",  "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_NOT_COLLECTED));
+			item->AppendMessage(new OvalMessage("At this time it is not clear how to obtain password_complexity or reversible_encryption."));
+
+			// Free the allocated memory.
+			NetApiBufferFree(pBuf);
+		}
+
+	} else if(nStatus == ERROR_ACCESS_DENIED) {
+		// Free the allocated memory.
+		if (pBuf != NULL)
+			NetApiBufferFree(pBuf);
+		throw ProbeException ("Error: The user does not have access to the requested password policy information.");
+	} else if(nStatus == NERR_InvalidComputer) {
+		// Free the allocated memory.
+		if (pBuf != NULL)
+			NetApiBufferFree(pBuf);
+		throw ProbeException ("Error: The computer name is invalid for requesting password policy information.");
+	}	
+
+	return collectedItems;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+Item* PasswordPolicyProbe::CreateItem() {
+
+	Item* item = new Item(0, 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows", 
+						"win-sc", 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows windows-system-characteristics-schema.xsd", 
+						OvalEnum::STATUS_ERROR, 
+						"passwordpolicy_item");
+
+	return item;
+}


Property changes on: trunk/ovaldi/src/probes/windows/PasswordPolicyProbe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/windows/PasswordPolicyProbe.h
===================================================================
--- trunk/ovaldi/src/probes/windows/PasswordPolicyProbe.h	                        (rev 0)
+++ trunk/ovaldi/src/probes/windows/PasswordPolicyProbe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,64 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef PASSWORDPOLICYPROBE_H
+#define PASSWORDPOLICYPROBE_H
+
+#pragma warning(disable:4786)
+
+#include "AbsProbe.h"
+#include "WindowsCommon.h"
+
+#include <aclapi.h>
+#include <windows.h>
+#include <lm.h>
+
+using namespace std;
+
+class PasswordPolicyProbe : public AbsProbe {
+public:
+	~PasswordPolicyProbe();
+	
+	/** Run the probe. */
+	ItemVector* CollectItems(Object* object);
+
+	/** Return a new Item created for storing password policy information. */
+	Item* CreateItem();
+		
+	/** Ensure that the PasswordPolicyProbe is a singleton. */
+	static AbsProbe* Instance();
+
+private:
+	PasswordPolicyProbe();
+
+	static PasswordPolicyProbe *instance;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/probes/windows/PasswordPolicyProbe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/windows/RegistryProbe.cpp
===================================================================
--- trunk/ovaldi/src/probes/windows/RegistryProbe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/probes/windows/RegistryProbe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,1060 @@
+//
+// $Id: $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "RegistryProbe.h"
+
+//****************************************************************************************//
+//								RegistryProbe Class										  //	
+//****************************************************************************************//
+RegistryProbe* RegistryProbe::instance = NULL;
+
+RegistryProbe::RegistryProbe() : AbsProbe() {
+
+}
+
+RegistryProbe::~RegistryProbe() {
+
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AbsProbe* RegistryProbe::Instance() {
+
+	// Use lazy initialization
+	if(instance == NULL) 
+		instance = new RegistryProbe();
+
+	return instance;	
+}
+
+ItemVector* RegistryProbe::CollectItems(Object *object) {
+
+
+	//	If in verbose logging mode write out a record for each match found 
+	//	even if a later refinement excludes that match. For example, if
+	//	a key pattern match is specified of .* all keys will match. Now a name
+	//	of 'foo' under the key has been specified. In verbose mode a record for 
+	//	all keys that matched will be printed and any key that doesn't have 
+	//	a name of 'foo under it will have a message stating that the name was 
+	//	not found. If not in verbose mode only keys that have a matching name 
+	//	are printed.
+
+
+	ItemVector *collectedItems = new ItemVector();
+
+	// get the hive, key, and name from the provided object
+	ObjectEntity* hive = object->GetElementByName("hive");
+	ObjectEntity* key = object->GetElementByName("key");
+	ObjectEntity* name = object->GetElementByName("name");
+
+	// check datatypes - only allow string
+	if(hive->GetDatatype() != OvalEnum::DATATYPE_STRING) {
+		throw ProbeException("Error: invalid data type specified on hive. Found: " + OvalEnum::DatatypeToString(hive->GetDatatype()));
+	}
+	if(key->GetDatatype() != OvalEnum::DATATYPE_STRING) {
+		throw ProbeException("Error: invalid data type specified on key. Found: " + OvalEnum::DatatypeToString(key->GetDatatype()));
+	}
+	if(name->GetDatatype() != OvalEnum::DATATYPE_STRING) {
+		throw ProbeException("Error: invalid data type specified on name. Found: " + OvalEnum::DatatypeToString(name->GetDatatype()));
+	}
+
+	// check operation - only allow  equals, not equals and pattern match
+	if(hive->GetOperation() != OvalEnum::OPERATION_EQUALS && hive->GetOperation() != OvalEnum::OPERATION_PATTERN_MATCH && hive->GetOperation() != OvalEnum::OPERATION_NOT_EQUAL) {
+		throw ProbeException("Error: invalid operation specified on hive. Found: " + OvalEnum::OperationToString(hive->GetOperation()));
+	}
+	if(key->GetOperation() != OvalEnum::OPERATION_EQUALS && key->GetOperation() != OvalEnum::OPERATION_PATTERN_MATCH && key->GetOperation() != OvalEnum::OPERATION_NOT_EQUAL) {
+		throw ProbeException("Error: invalid operation specified on key. Found: " + OvalEnum::OperationToString(key->GetOperation()));
+	}
+	if(name->GetOperation() != OvalEnum::OPERATION_EQUALS && name->GetOperation() != OvalEnum::OPERATION_PATTERN_MATCH && name->GetOperation() != OvalEnum::OPERATION_NOT_EQUAL) {
+		throw ProbeException("Error: invalid operation specified on name. Found: " + OvalEnum::OperationToString(name->GetOperation()));
+	}
+
+	// TODO - determine how to support behaviors.
+	if(object->GetBehaviors()->size() != 0) {
+		throw ProbeException("Error: (RegistryProbe) Behaviors are not supported."); 
+	}
+
+	// get all the hives
+	ItemEntityVector* hives = this->GetHives(hive);
+	ItemEntityVector::iterator hiveIt;
+	for(hiveIt = hives->begin(); hiveIt != hives->end(); hiveIt++) {
+		
+		// get all keys for the hive if the key is not nil
+		if(key->GetNil()) {
+			// get the registry item.
+			Item* item = this->GetRegistryKey((*hiveIt), NULL, NULL);
+			if(item != NULL) {
+				collectedItems->push_back(item);
+			}
+		} else {
+
+			ItemEntityVector* keys = this->GetKeys(key, (*hiveIt));
+			ItemEntityVector::iterator keyIt;
+			for(keyIt = keys->begin(); keyIt != keys->end(); keyIt++) {
+
+				// get all names for the hive and key if the name is not nil
+				if(name->GetNil()) {
+						// get the registry item.
+						Item* item = this->GetRegistryKey((*hiveIt), (*keyIt), NULL);
+						if(item != NULL) {
+							collectedItems->push_back(item);
+						}
+				} else {
+					ItemEntityVector* names = this->GetNames(name, (*hiveIt), (*keyIt));
+					ItemEntityVector::iterator nameIt;
+					for(nameIt = names->begin(); nameIt != names->end(); nameIt++) {
+
+						// get the registry item.
+						Item* item = this->GetRegistryKey((*hiveIt), (*keyIt), (*nameIt));
+						if(item != NULL) {
+							collectedItems->push_back(item);
+						}
+					}
+					delete names;
+				}
+			}
+			delete keys;
+		}
+	}
+	delete hives;
+
+	return collectedItems;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+Item* RegistryProbe::CreateItem() {
+
+	Item* item = new Item(0, 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows", 
+						"win-sc", 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows windows-system-characteristics-schema.xsd", 
+						OvalEnum::STATUS_ERROR, 
+						"registry_item");
+
+	return item;
+}
+
+void RegistryProbe::GetMatchingHives(string pattern, ItemEntityVector* hives, bool isRegex) {
+
+	try {
+		if(this->IsMatch(pattern, "HKEY_CLASSES_ROOT", isRegex)) {
+			ItemEntity* entity = this->CreateItemEntity(NULL);
+			entity->SetName("hive");
+			entity->SetValue("HKEY_CLASSES_ROOT");
+			hives->push_back(entity);
+		}
+
+		if(this->IsMatch(pattern, "HKEY_CURRENT_CONFIG", isRegex)) {
+			ItemEntity* entity = this->CreateItemEntity(NULL);
+			entity->SetName("hive");
+			entity->SetValue("HKEY_CURRENT_CONFIG");
+			hives->push_back(entity);
+		}
+
+		if(this->IsMatch(pattern, "HKEY_CURRENT_USER", isRegex)) {
+			ItemEntity* entity = this->CreateItemEntity(NULL);
+			entity->SetName("hive");
+			entity->SetValue("HKEY_CURRENT_USER");
+			hives->push_back(entity);
+		}
+
+		if(this->IsMatch(pattern, "HKEY_LOCAL_MACHINE", isRegex)) {
+			ItemEntity* entity = this->CreateItemEntity(NULL);
+			entity->SetName("hive");
+			entity->SetValue("HKEY_LOCAL_MACHINE");
+			hives->push_back(entity);
+		}
+
+		if(this->IsMatch(pattern, "HKEY_USERS", isRegex)) {
+			ItemEntity* entity = this->CreateItemEntity(NULL);
+			entity->SetName("hive");
+			entity->SetValue("HKEY_USERS");
+			hives->push_back(entity);
+		}
+		
+	} catch(REGEXException ex) {
+		if(ex.GetSeverity() == ERROR_WARN) {
+			string pcreMsg = "";
+			pcreMsg.append("Registry Keys Probe Warning - while searching for matching hives:\n");
+			pcreMsg.append("-----------------------------\n");
+			pcreMsg.append(ex.GetErrorMessage());
+			Log::Debug(pcreMsg);
+		}
+		
+		throw;
+	}
+}
+
+void RegistryProbe::GetMatchingKeys(string hiveIn, string keyIn, string pattern, ItemEntityVector* keys, bool isRegex) {
+
+	HKEY hkey;								//	pointer to the key that will be opened
+	LONG res;								//	result from enumerating the subkeys
+	LONG openRes;							//	result from opening the key
+	LPTSTR lpName = (LPTSTR)malloc(1024);	//	buffer to store the subkey name
+	DWORD dwName = 1024;					//	number of chars in the subkey
+	DWORD dwIndex = 0;						//	index of subkey to enumerate
+	FILETIME ftLastWriteTime;				//	time the cur subkey was last written to
+	string workingKey = "";					//	The name of the keyIn and the subkey concatenated
+	string errorMessage = "";				//	
+
+	/////////////////////////////////////////////////////////////////
+	//	Open the specified key
+	/////////////////////////////////////////////////////////////////
+	HKEY rootKey = GetRootKey(hiveIn);
+	if(rootKey == NULL) {
+		errorMessage.append("(RegistryProbe) The registry hive '");
+		errorMessage.append(hiveIn);
+		errorMessage.append("' does not exist.");
+		throw ProbeException(errorMessage);
+	}
+			
+
+	openRes = RegOpenKeyEx(	rootKey,		// handle to open hive
+							keyIn.c_str(),	// subkey name
+							0,				// reserved
+							KEY_READ,		// security access mask
+							&hkey);			// pointer to open key
+
+	/////////////////////////////////////////////////////////////////
+	//	Check attempt to open key
+	/////////////////////////////////////////////////////////////////
+	if (openRes == ERROR_SUCCESS) {
+
+		for (dwIndex = 0, res = ERROR_SUCCESS; res == ERROR_SUCCESS; dwIndex++) {
+			//	Get the working key as a string
+			workingKey = keyIn;
+			if(workingKey.compare("") != 0) {
+
+				if(workingKey.at(workingKey.length()-1) != '\\') {
+					workingKey.append("\\");
+				}
+			}
+
+			//	Reset the buffer and the buffer size
+			dwName = 1024;
+			ZeroMemory(lpName, dwName);
+						
+			res = RegEnumKeyEx(	hkey,				// handle to key to enumerate
+								dwIndex,			// subkey index
+								lpName,				// subkey name
+								&dwName,			// size of subkey buffer
+								NULL,				// reserved
+								NULL,				// class string buffer
+								NULL,				// size of class string buffer
+								&ftLastWriteTime);	// last write time
+
+			//	Check results
+			if(res == ERROR_SUCCESS) {
+
+				//	Add the subkey to the working key
+				workingKey.append(lpName);
+
+				//	Make recursive call
+				this->GetMatchingKeys(hiveIn, workingKey, pattern, keys);
+
+				//	If a match add the new key to the keys vector
+				if(this->IsMatch(pattern, workingKey, isRegex)) {
+					ItemEntity* entity = this->CreateItemEntity(NULL);
+					entity->SetName("key");
+					entity->SetValue(workingKey);
+					keys->push_back(entity);
+				}
+			}
+		}
+	}
+	
+	RegCloseKey(hkey);	
+}
+
+void RegistryProbe::GetMatchingNames(string hiveIn, string keyIn, string pattern, ItemEntityVector* names, bool isRegex) {
+
+	HKEY hkey;								//	pointer to the key that will be opened
+	LONG res;								//	result from enumerating the subkeys
+	LONG openRes;							//	result from opening the key
+	LPTSTR lpName = (LPTSTR)malloc(1024);	//	buffer to store the subkey name
+	DWORD dwName = 1024;					//	number of chars in the subkey
+	DWORD dwIndex = 0;						//	index of subkey to enumerate
+	string name = "";						//	The name of the keyIn and the subkey concatenated
+	string errorMessage = "";				//
+
+	/////////////////////////////////////////////////////////////////
+	//	Open the specified key
+	/////////////////////////////////////////////////////////////////
+	HKEY rootKey = GetRootKey(hiveIn);
+	if(rootKey == NULL) {
+
+		errorMessage.append("(RegistryProbe) The registry hive '");
+		errorMessage.append(hiveIn);
+		errorMessage.append("' does not exist.");
+		throw ProbeException(errorMessage);
+	}
+			
+
+	openRes = RegOpenKeyEx(	rootKey,		// handle to open hive
+							keyIn.c_str(),	// subkey name
+							0,				// reserved
+							KEY_QUERY_VALUE,// security access mask
+							&hkey);			// pointer to open key
+
+	/////////////////////////////////////////////////////////////////
+	//	Check attempt to open key
+	/////////////////////////////////////////////////////////////////
+	if (openRes == ERROR_SUCCESS) {
+
+		try {
+			myMatcher->Reset();
+			for (dwIndex = 0, res = ERROR_SUCCESS; res == ERROR_SUCCESS; dwIndex++) {
+
+				//	Reset the buffer and the buffer size
+				dwName = 1024;
+				ZeroMemory(lpName, dwName);
+						
+				res = RegEnumValue(	hkey,		// handle to key to query
+									dwIndex,	// index of value to query
+									lpName,		// value buffer
+									&dwName,	// size of value buffer
+									NULL,		// reserved
+									NULL,		// type buffer
+									NULL,		// data buffer
+									NULL);		// size of data buffer
+
+				//	Check results
+				if(res == ERROR_SUCCESS) {
+
+					//	Get the name
+					name = "";
+					name.append(lpName);
+
+					//	If a match add the new name to the names vector
+					if(this->IsMatch(pattern, name, isRegex)) {
+						ItemEntity* entity = this->CreateItemEntity(NULL);
+						entity->SetName("name");
+						entity->SetValue(name);
+						names->push_back(entity);
+					}
+				}
+			}
+		} catch(REGEXException ex) {
+			if(ex.GetSeverity() == ERROR_WARN) {
+
+				string pcreMsg = "";
+				pcreMsg.append("Registry Keys Probe Warning - when searching for matching names:\n");
+				pcreMsg.append("-----------------------------\n");
+				pcreMsg.append(ex.GetErrorMessage());
+				Log::Debug(pcreMsg);
+			} else {
+				throw;
+			}
+		}
+	}
+	
+	RegCloseKey(hkey);	
+}
+
+Item* RegistryProbe::GetRegistryKey(ItemEntity* hive, ItemEntity* key, ItemEntity* name) {
+
+    HKEY hkey;
+	DWORD parse_depth = 0;
+	LONG res;
+	Item* item = NULL;
+
+	// Check hive
+	HKEY rootKey = this->GetRootKey(hive->GetValue());		
+	if(rootKey == NULL) {
+	
+		item->AppendElement(new ItemEntity("hive", hive->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+		item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+		return item;
+
+	} else {
+
+		item = this->CreateItem();
+		item->AppendElement(new ItemEntity("hive", hive->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+
+		// check and get key if key is not nil
+		if(key == NULL) {
+			item->SetStatus(OvalEnum::STATUS_EXISTS);
+		} else {
+			res = RegOpenKeyEx(rootKey,					// handle to open hive
+							key->GetValue().c_str(),	// subkey name
+							0,							// reserved
+							KEY_READ,					// security access mask
+							&hkey);						// pointer to open key
+
+			if (res != ERROR_SUCCESS) {
+				if (res == ERROR_FILE_NOT_FOUND || res == ERROR_BAD_PATHNAME) {
+
+					item->AppendElement(new ItemEntity("key", key->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+					item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+
+				} else if (res == ERROR_INVALID_HANDLE) {
+
+					string errorMessage = "";
+					errorMessage.append("(RegistryProbe) The handle for the registry key '");
+					errorMessage.append(key->GetValue());
+					errorMessage.append("' is not valid.");
+							
+					item->AppendMessage(new OvalMessage(errorMessage, OvalEnum::LEVEL_ERROR));
+					item->AppendElement(new ItemEntity("key", key->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_ERROR));
+					item->SetStatus(OvalEnum::STATUS_ERROR);
+					// I chose to make this an item returned with an error because at a minimum the 
+					// hive was found. Note that the other option is to throw and exception which 
+					// would result in an error on the collected object.
+
+				} else {
+					
+					string systemErrMsg = WindowsCommon::GetErrorMessage(res);
+
+					char errorCodeBuffer[20];
+					_ltoa(res, errorCodeBuffer, 20);
+
+					string errorMessage = "";
+					errorMessage.append("(RegistryProbe) Unable to get values for registry key '");
+					errorMessage.append(key->GetValue());
+					errorMessage.append("'.  Error Code - ");
+					errorMessage.append(errorCodeBuffer);
+					errorMessage.append(" - " + systemErrMsg);
+					
+					item->AppendMessage(new OvalMessage(errorMessage, OvalEnum::LEVEL_ERROR));
+					item->AppendElement(new ItemEntity("key", key->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_ERROR));
+					item->SetStatus(OvalEnum::STATUS_ERROR);
+					// I chose to make this an item returned with an error because at a minimum the 
+					// hive was found. Note that the other option is to throw and exception which 
+					// would result in an error on the collected object. 
+					
+				}		
+
+			} else {
+
+				// add the key to the result item
+				item->AppendElement(new ItemEntity("key", key->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+
+				// if name not nil get the name
+				if(name == NULL) {
+					item->SetStatus(OvalEnum::STATUS_EXISTS);
+				} else {
+				
+					DWORD type = 0;
+					DWORD valuelen = 0;
+
+					// Determine how big the buffer must be to store the data.  By specifying NULL for the
+					// buffer size parameter, the function returns the value ERROR_MORE_DATA, and stores
+					// the required buffer size, in bytes, into valuelen.
+					res = RegQueryValueEx(hkey,						// handle to key
+										name->GetValue().c_str(),	// value name
+										NULL,						// reserved
+										NULL,						// type buffer
+										NULL,						// data buffer
+										&valuelen);					// size of data buffer
+
+					// Allocate space for the buffer.
+					LPBYTE value = (LPBYTE) malloc(valuelen);
+
+					// Retrieve the type and value for the specified name associated with an open registry
+					// key.
+					res = RegQueryValueEx(hkey,						// handle to key
+										name->GetValue().c_str(),	// value name
+										NULL,						// reserved
+										&type,						// type buffer
+										value,						// data buffer
+										&valuelen);					// size of data buffer
+
+					if (res == ERROR_FILE_NOT_FOUND || res == ERROR_BAD_PATHNAME) {
+						
+						item->AppendElement(new ItemEntity("name", name->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+						item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+
+					} else if (res != ERROR_SUCCESS) {
+
+						string systemErrMsg = WindowsCommon::GetErrorMessage(res);
+
+						char errorCodeBuffer[20];
+						_ltoa(res, errorCodeBuffer, 20);
+						
+						string errorMessage = "";
+						errorMessage.append("Unable to get type and value for the specified name: '");
+						errorMessage.append(name->GetValue());
+						errorMessage.append("'.  Error Code - ");
+						errorMessage.append(errorCodeBuffer);
+						errorMessage.append(" - " + systemErrMsg);
+						
+						item->AppendMessage(new OvalMessage(errorMessage, OvalEnum::LEVEL_ERROR));
+						item->AppendElement(new ItemEntity("name", name->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+						item->AppendElement(new ItemEntity("type",  "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR));
+						item->AppendElement(new ItemEntity("value",  "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR));
+						item->SetStatus(OvalEnum::STATUS_ERROR);
+
+					//	Only call RetrieveInfo() if res == ERROR_SUCCESS
+					} else {
+
+						// now add the name entity.
+						item->AppendElement(new ItemEntity("name", name->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+						item->SetStatus(OvalEnum::STATUS_EXISTS);
+						// We now have all the info we need.
+						this->RetrieveInfo(hive->GetValue(), key->GetValue(), name->GetValue(), type, value, valuelen, item);
+					}
+
+					free(value);
+				}
+				RegCloseKey(hkey);
+			}
+		} 
+	}
+
+	return item;
+}
+
+HKEY RegistryProbe::GetRootKey(string hiveIn) {
+
+	if (hiveIn.compare("HKEY_LOCAL_MACHINE") == 0) {
+        return HKEY_LOCAL_MACHINE;
+    } else if (hiveIn.compare("HKEY_USERS") == 0) {
+        return HKEY_USERS;
+    } else if (hiveIn.compare("HKEY_CURRENT_USER") == 0) {
+        return HKEY_CURRENT_USER;
+    } else if (hiveIn.compare("HKEY_CURRENT_CONFIG") == 0) {
+        return HKEY_CURRENT_CONFIG;
+    } else if (hiveIn.compare("HKEY_CLASSES_ROOT") == 0) {
+        return HKEY_CLASSES_ROOT;
+    } else {
+		return NULL;
+    }
+}
+
+void RegistryProbe::KeyPatternMatch(ItemEntity* hive, string pattern, ItemEntityVector* keys, bool isRegex) {
+
+	string patternOut= "";
+	string constantPortionOut= "";
+	this->myMatcher->GetConstantPortion(pattern, "\\", &patternOut, &constantPortionOut);
+	// Remove extra slashes
+	constantPortionOut = myMatcher->RemoveExtraSlashes(constantPortionOut);
+
+	if(patternOut.compare("") != 0) {
+		try {
+			myMatcher->Reset();
+
+			//	Call search function with
+			//	the constant portion found as the key and
+			//	the entire pattern as the pattern
+			this->GetMatchingKeys(hive->GetValue(), constantPortionOut, pattern, keys, isRegex);
+
+		} catch(REGEXException ex) {
+
+			if(ex.GetSeverity() == ERROR_WARN) {
+				string pcreMsg = "";
+				pcreMsg.append("Registry Keys Probe Warning - while searching for matching keys:\n");
+				pcreMsg.append("\t" + ex.GetErrorMessage());
+				Log::Debug(pcreMsg);
+			} else {
+				throw;
+			}
+		}
+
+	} else {
+
+		//	There are no pattern matching chars treat this as a normal path 
+		//	after removing the double '\'
+		pattern = myMatcher->RemoveExtraSlashes(pattern);
+		if(this->KeyExists(hive->GetValue(), pattern)) {
+			ItemEntity* entity = this->CreateItemEntity(NULL);
+			entity->SetName("key");
+			entity->SetValue(pattern);
+			keys->push_back(entity);
+		}
+	}
+}
+
+void RegistryProbe::RetrieveInfo(string hiveIn, string keyIn, string nameIn, 
+									  DWORD typeIn, LPBYTE valueIn, DWORD valuelenIn, Item* item) {
+
+	switch (typeIn) {
+
+		case REG_BINARY:
+				{
+				item->AppendElement(new ItemEntity("type",  "reg_binary", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+
+				// The buffer must be three bytes long, two bytes for each hex charater in the
+				// binary data, and one byte for the terminating NULL character.
+				char binaryBuf[3];
+
+				// Loop through each hex character.  Make sure the buffer is NULL terminated.
+				// Also make sure 0 is in the form 00, and 1 is 01, etc.
+				string value = "";
+				for (DWORD x=0; x<valuelenIn; x++) {
+
+					ZeroMemory(binaryBuf, sizeof(binaryBuf));
+					_snprintf(binaryBuf, sizeof(binaryBuf)-1, "%x", valueIn[x]);
+					binaryBuf[sizeof(binaryBuf)-1] = '\0';
+					if (strlen(binaryBuf) == 1) 
+						value.append("0");
+					value.append(binaryBuf);
+
+					// add a space only if not at the end of the string
+					if(x < (valuelenIn - 1)) {
+						value.append(" ");
+					}
+				}
+				item->AppendElement(new ItemEntity("value",  value, OvalEnum::DATATYPE_BINARY, false, OvalEnum::STATUS_EXISTS));
+
+				break;
+			}
+
+		case REG_DWORD:
+			{
+				item->AppendElement(new ItemEntity("type",  "reg_dword", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+
+				// The dwordBuf is 12 bytes since the max DWORD (2,147,483,647) is 10 characters
+				// long.  Also add a byte for a possible negative sign and a byte for the
+				// terminating NULL character.
+				char dwordBuf[12];
+
+				ZeroMemory(dwordBuf, sizeof(dwordBuf));
+				_snprintf(dwordBuf, sizeof(dwordBuf)-1, "%d", *((DWORD *)valueIn));
+				dwordBuf[sizeof(dwordBuf)-1] = '\0';
+				item->AppendElement(new ItemEntity("value",  dwordBuf, OvalEnum::DATATYPE_INTEGER, false, OvalEnum::STATUS_EXISTS));
+
+				break;
+			}
+
+		case REG_EXPAND_SZ:
+			{
+				item->AppendElement(new ItemEntity("type",  "reg_expand_sz", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+
+				char expandBuf[3];
+				string strValue = "";
+				for (DWORD x=0; x<(valuelenIn); x++) {
+
+					ZeroMemory(expandBuf, sizeof(expandBuf));
+					_snprintf(expandBuf, sizeof(expandBuf)-1, "%C", valueIn[x]);
+					expandBuf[sizeof(expandBuf)-1] = '\0';
+					strValue.append(expandBuf);
+				}
+				item->AppendElement(new ItemEntity("value",  strValue, OvalEnum::DATATYPE_INTEGER, false, OvalEnum::STATUS_EXISTS));
+
+				break;
+			}
+
+		case REG_MULTI_SZ:
+			{
+				item->AppendElement(new ItemEntity("type",  "reg_multi_sz", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+
+				char multiszBuf[3];
+
+				// Loop through each character.  Make sure the buffer is NULL terminated.
+				// MULTISZ data is an array of null-terminated strings, terminated by two null
+				// characters.  Therefore, the loop goes to (valuelenIn - 2) since we can skip
+				// the last two characters.  This keeps an extra bar from beeing added to the
+				// end of the valueString.  A terminating NULL charater and will be
+				// automatically replaced during the append method.
+
+				// NOTE: valuelenIn can be less than 2.  When this is the case, (valuelenIn-2)
+				// becomes a very high DWORD.  This is because there are no negative numbers
+				// for DWORDS.  Make sure we guard against this by setting valuelenIn = 2 so
+				// (valuelenIn-2) = 0 and the loop never runs.
+
+				if (valuelenIn < 2) 
+					valuelenIn = 2;
+
+				string strValue = "";
+				bool addedValue = false;
+				for (DWORD x=0; x<=(valuelenIn-2); x++) {
+
+					ZeroMemory(multiszBuf, sizeof(multiszBuf));
+					_snprintf(multiszBuf, sizeof(multiszBuf)-1, "%C", valueIn[x]);
+					multiszBuf[sizeof(multiszBuf)-1] = '\0';
+					if (multiszBuf[0] == '\0') {
+						item->AppendElement(new ItemEntity("value",  strValue, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+						strValue = "";
+						addedValue = true;
+					} else {
+						strValue.append(multiszBuf);
+					}
+				}
+
+				if(!addedValue) {
+					item->AppendElement(new ItemEntity("value",  "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+				}
+
+				break;
+			}
+
+		case REG_SZ:
+			{
+				item->AppendElement(new ItemEntity("type",  "reg_sz", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+
+				/*
+				if the string is empty, sometimes the valuelenIn returned by RegQueryValueEx
+				when used to get the data size returns 3 for an empty string, where valueIn[2]
+				is a ? mark. 
+				*/
+
+				if (valuelenIn > 2) {
+					if ((valueIn[0] == 0x0) && (valueIn[1] == 0x0)) {
+						for (DWORD x=2; x<(valuelenIn); x++) valueIn[x] = 0x0;
+					}
+				}
+
+				char strBuf[3];
+				string strValue = "";
+				for (DWORD x=0; x<(valuelenIn); x++) {
+
+					ZeroMemory(strBuf, sizeof(strBuf));
+					_snprintf(strBuf, sizeof(strBuf)-1, "%C", valueIn[x]);
+					strBuf[sizeof(strBuf)-1] = '\0';
+					strValue.append(strBuf);
+				}
+				item->AppendElement(new ItemEntity("value",  strValue, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+
+				break;
+			}
+
+		default:
+			{
+				item->AppendMessage(new OvalMessage("Error: Unable to determine the type and value of the registry key.", OvalEnum::LEVEL_ERROR));
+				item->AppendElement(new ItemEntity("type",  "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR));
+				item->AppendElement(new ItemEntity("value",  "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR));
+				
+				break;
+			}
+	}
+}
+
+ItemEntityVector* RegistryProbe::GetHives(ObjectEntity* hive) {
+
+	ItemEntityVector* hives = new ItemEntityVector();
+
+	// does this hive use variables?
+	if(hive->GetVarRef() == NULL) {
+		
+		// proceed based on operation
+		if(hive->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			ItemEntity* tmp = this->CreateItemEntity(hive);
+			tmp->SetValue(hive->GetValue());
+			hives->push_back(tmp);
+
+		} else if(hive->GetOperation() == OvalEnum::OPERATION_NOT_EQUAL) {
+			// turn the provided hive value into a negative pattern match
+			// then get all that match the pattern
+			this->GetMatchingHives(hive->GetValue(), hives, false);
+
+		} else if(hive->GetOperation() == OvalEnum::OPERATION_PATTERN_MATCH) {
+			this->GetMatchingHives(hive->GetValue(), hives);
+		}		
+
+	} else {
+
+		// Get all hives
+		ItemEntityVector allHives;
+		this->GetMatchingHives(".*", &allHives);
+
+		// loop through all hives on the system
+		// only keep hives that match operation and value and var check
+		ItemEntityVector::iterator iterator;
+		for(iterator = allHives.begin(); iterator != allHives.end(); iterator++) {
+			
+			if(hive->Analyze((*iterator)) == OvalEnum::RESULT_TRUE) {
+				hives->push_back((*iterator));
+			}
+		}
+	}
+
+	return hives;
+}
+
+ItemEntityVector* RegistryProbe::GetKeys(ObjectEntity* key, ItemEntity* hive) {
+
+	ItemEntityVector* keys = new ItemEntityVector();
+
+	// does this key use variables?
+	if(key->GetVarRef() == NULL) {
+		
+		// proceed based on operation
+		if(key->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			ItemEntity* tmp = this->CreateItemEntity(key);
+			tmp->SetValue(key->GetValue());
+			keys->push_back(tmp);
+
+		} else if(key->GetOperation() == OvalEnum::OPERATION_NOT_EQUAL) {
+			// turn the provided key value into a negative pattern match
+			// then get all that match the pattern
+			this->GetMatchingKeys(hive->GetValue(), "", key->GetValue(), keys, false);
+
+		} else if(key->GetOperation() == OvalEnum::OPERATION_PATTERN_MATCH) {
+			this->KeyPatternMatch(hive, key->GetValue(), keys);
+		}		
+
+	} else {
+
+		// Get all keys
+		ItemEntityVector allKeys;
+
+		if(key->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			// in the case of equals simply loop through all the 
+			// variable values and add them to the set of all keys
+			// if they exist on the system
+			VariableValueVector::iterator iterator;
+			for(iterator = key->GetVarRef()->GetValues()->begin(); iterator != key->GetVarRef()->GetValues()->end(); iterator++) {
+				
+				if(this->KeyExists(hive->GetValue(),(*iterator)->GetValue())) {
+					ItemEntity* tmp = this->CreateItemEntity(key);
+					tmp->SetValue((*iterator)->GetValue());
+					allKeys.push_back(tmp);
+				}
+			}
+
+		} else {
+            this->KeyPatternMatch(hive, ".*", &allKeys);
+		}
+	
+		// loop through all keys on the system
+		// only keep keys that match operation and value and var check
+		ItemEntityVector::iterator it;
+		for(it = allKeys.begin(); it != allKeys.end(); it++) {
+			
+			if(key->Analyze((*it)) == OvalEnum::RESULT_TRUE) {
+				keys->push_back((*it));
+			}
+		}
+	}
+
+	return keys;
+}
+
+ItemEntityVector* RegistryProbe::GetNames(ObjectEntity* name, ItemEntity* hive, ItemEntity* key) {
+
+	ItemEntityVector* names = new ItemEntityVector();
+
+	// does this name use variables?
+	if(name->GetVarRef() == NULL) {
+		
+		// proceed based on operation
+		if(name->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			ItemEntity* tmp = this->CreateItemEntity(name);
+			tmp->SetValue(name->GetValue());
+			names->push_back(tmp);
+
+		} else if(name->GetOperation() == OvalEnum::OPERATION_NOT_EQUAL) {
+			// turn the provided key value into a negative pattern match
+			// then get all that match the pattern
+			this->GetMatchingNames(hive->GetValue(), key->GetValue(), name->GetValue(), names, false);
+
+		} else if(name->GetOperation() == OvalEnum::OPERATION_PATTERN_MATCH) {
+			this->GetMatchingNames(hive->GetValue(), key->GetValue(), name->GetValue(), names);
+		}		
+
+	} else {
+
+		// Get all keys
+		ItemEntityVector allNames;
+
+		if(name->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			// in the case of equals simply loop through all the 
+			// variable values and add them to the set of all names
+			// if they exist on the system
+			VariableValueVector::iterator iterator;
+			for(iterator = name->GetVarRef()->GetValues()->begin(); iterator != name->GetVarRef()->GetValues()->end(); iterator++) {
+				
+				if(this->NameExists(hive->GetValue(), key->GetValue(), (*iterator)->GetValue())) {
+					ItemEntity* tmp = this->CreateItemEntity(name);
+					tmp->SetValue((*iterator)->GetValue());
+					allNames.push_back(tmp);
+				}
+			}
+
+		} else {
+			this->GetMatchingNames(hive->GetValue(), key->GetValue(), ".*", &allNames);
+		}
+	
+		// loop through all hives on the system
+		// only keep hives that match operation and value and var check
+		ItemEntityVector::iterator it;
+		for(it = allNames.begin(); it != allNames.end(); it++) {
+			
+			if(name->Analyze((*it)) == OvalEnum::RESULT_TRUE) {
+				names->push_back((*it));
+			}
+		}
+	}
+
+	return names;
+}
+
+bool RegistryProbe::KeyExists(string hive, string key) {
+
+	bool exists = false;
+	HKEY hkey;
+	DWORD parse_depth = 0;
+	LONG res;
+
+	// Check hive
+	HKEY rootKey = this->GetRootKey(hive);		
+	if(rootKey != NULL) {
+		res = RegOpenKeyEx(rootKey,					// handle to open hive
+						key.c_str(),				// subkey name
+						0,							// reserved
+						KEY_READ,					// security access mask
+						&hkey);						// pointer to open key
+
+		if (res != ERROR_SUCCESS) {
+			if (res == ERROR_FILE_NOT_FOUND) {
+				exists = false;
+
+			} else if (res == ERROR_INVALID_HANDLE) {
+
+				string errorMessage = "";
+				errorMessage.append("(RegistryProbe) The handle for the registry key '");
+				errorMessage.append(key);
+				errorMessage.append("' is not valid.");							
+				throw ProbeException(errorMessage);
+
+			} else {
+				
+				string systemErrMsg = WindowsCommon::GetErrorMessage(res);
+				char errorCodeBuffer[20];
+				_ltoa(res, errorCodeBuffer, 20);
+				string errorMessage = "";
+				errorMessage.append("Error: Unable to check existence of registry key '");
+				errorMessage.append(key);
+				errorMessage.append("'.  Error Code - ");
+				errorMessage.append(errorCodeBuffer);
+				errorMessage.append(" - " + systemErrMsg);
+				throw ProbeException(errorMessage);
+			}		
+		} else {
+			RegCloseKey(hkey);
+			exists = true;				
+		}			
+	}
+
+	return exists;
+}
+
+bool RegistryProbe::NameExists(string hive, string key, string name) {
+
+	bool exists = false;
+	HKEY hkey;
+	DWORD parse_depth = 0;
+	LONG res;
+
+	// Check hive
+	HKEY rootKey = this->GetRootKey(hive);		
+	if(rootKey != NULL) {
+
+			res = RegOpenKeyEx(rootKey,					// handle to open hive
+							key.c_str(),				// subkey name
+							0,							// reserved
+							KEY_READ,					// security access mask
+							&hkey);						// pointer to open key
+
+			if (res != ERROR_SUCCESS) {
+				if (res == ERROR_FILE_NOT_FOUND) {
+				exists = false;
+
+			} else if (res == ERROR_INVALID_HANDLE) {
+
+				string errorMessage = "";
+				errorMessage.append("(RegistryProbe) The handle for the registry key '");
+				errorMessage.append(key);
+				errorMessage.append("' is not valid.");							
+				throw ProbeException(errorMessage);
+
+			} else {
+				
+				string systemErrMsg = WindowsCommon::GetErrorMessage(res);
+				char errorCodeBuffer[20];
+				_ltoa(res, errorCodeBuffer, 20);
+				string errorMessage = "";
+				errorMessage.append("Error: Unable to check existence of registry key '");
+				errorMessage.append(key);
+				errorMessage.append("'.  Error Code - ");
+				errorMessage.append(errorCodeBuffer);
+				errorMessage.append(" - " + systemErrMsg);
+				throw ProbeException(errorMessage);
+			}	
+
+		} else {
+			
+			DWORD type = 0;
+			DWORD valuelen = 0;
+
+			// Determine how big the buffer must be to store the data.  By specifying NULL for the
+			// buffer size parameter, the function returns the value ERROR_MORE_DATA, and stores
+			// the required buffer size, in bytes, into valuelen.
+			res = RegQueryValueEx(hkey,						// handle to key
+								name.c_str(),				// value name
+								NULL,						// reserved
+								NULL,						// type buffer
+								NULL,						// data buffer
+								&valuelen);					// size of data buffer
+
+			// Allocate space for the buffer.
+			LPBYTE value = (LPBYTE) malloc(valuelen);
+
+			// Retrieve the type and value for the specified name associated with an open registry
+			// key.
+			res = RegQueryValueEx(hkey,						// handle to key
+								name.c_str(),				// value name
+								NULL,						// reserved
+								&type,						// type buffer
+								value,						// data buffer
+								&valuelen);					// size of data buffer
+
+			if (res == ERROR_FILE_NOT_FOUND) {
+
+				exists = false;
+
+			} else if (res != ERROR_SUCCESS) {
+
+				string systemErrMsg = WindowsCommon::GetErrorMessage(res);
+				char errorCodeBuffer[20];
+				_ltoa(res, errorCodeBuffer, 20);
+				string errorMessage = "";
+				errorMessage.append("Unable to get values for the specified name: '");
+				errorMessage.append(name);
+				errorMessage.append("'.  Error Code - ");
+				errorMessage.append(errorCodeBuffer);
+				errorMessage.append(" - " + systemErrMsg);
+				throw ProbeException(errorMessage);
+
+			} else {
+				exists = true;
+			}
+
+			free(value);
+			RegCloseKey(hkey);
+		}
+	}
+
+	return exists;
+}


Property changes on: trunk/ovaldi/src/probes/windows/RegistryProbe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/windows/RegistryProbe.h
===================================================================
--- trunk/ovaldi/src/probes/windows/RegistryProbe.h	                        (rev 0)
+++ trunk/ovaldi/src/probes/windows/RegistryProbe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,128 @@
+//
+// $Id: RegistryProbe.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+#ifndef REGISTRYPROBE_H
+#define REGISTRYPROBE_H
+
+#pragma warning(disable:4786)
+
+#include "AbsProbe.h"
+#include "WindowsCommon.h"
+
+#include <windows.h>
+
+using namespace std;
+
+/**
+	This class is responsbile for collecting registry information for windows registry_objects.
+*/
+class RegistryProbe : public AbsProbe {
+public:
+	~RegistryProbe();
+	
+	/** Run the registry probe. Return a vector of Items. */
+	ItemVector* CollectItems(Object* object);
+
+	/** Return a new Item created for storing registry information. */
+	Item* CreateItem();
+
+	/** Ensure that the RegistryProbe is a singleton. */
+	static AbsProbe* Instance();
+	
+
+private:
+	RegistryProbe();
+
+	static RegistryProbe* instance;
+
+	/** Return the set of hives to be collected. 
+	    If the operation is set to equals simply return the hive as an ItemEntity.
+	*/
+	ItemEntityVector* GetHives(ObjectEntity* hive);
+	/** Return the set of keys to be collected. 
+		If the operation is set to equals simply return the key as an ItemEntity.
+	*/
+	ItemEntityVector* GetKeys(ObjectEntity* key, ItemEntity* hive);
+	/** Return the set of names to be collected. 
+		If the operation is set to equals simply return the name as an ItemEntity.
+	*/
+	ItemEntityVector* GetNames(ObjectEntity* name, ItemEntity* hive, ItemEntity* key);
+	
+	/** Gather new data and put in a Item object.
+		Return NULL if the key is not found.
+	*/
+	Item* GetRegistryKey(ItemEntity*, ItemEntity*, ItemEntity*);
+	/** Return a handle to a predefined root key on the system.
+		An application must open a key before it can add data to the registry. To open a
+		key, an application must supply a handle to another key in the registry that is
+		already open. The system defines predefined keys that are always open.  Determine
+		if one of these predefined keys can be used, and if so, return it.
+	
+		NOTE: We have used _strnicmp() instead of the string compare() function as we need
+		to do a compare without regard to case.
+	*/
+	HKEY GetRootKey(string);
+	/** Return a vector of hives as DefinitionEntities that match the pattern 
+		Supported hives:
+		"HKEY_CLASSES_ROOT"
+		"HKEY_CURRENT_CONFIG"
+		"HKEY_CURRENT_USER"
+		"HKEY_LOCAL_MACHINE"
+		"HKEY_USERS"
+		May throw REGEXException if the pattern is invalid.
+	*/
+	void GetMatchingHives(string, ItemEntityVector*, bool isRegex = true);
+	/** Search the registry for keys under the designated hive and input key 
+		that match the pattern. Add all matches to the keys vector. For every sub key
+		found make recursive call. Stop when all subkeys have been searched.
+	*/
+	void GetMatchingKeys(string hiveIn, string keyIn, string pattern, ItemEntityVector* keys, bool isRegex = true);
+	/** Search the registry for names under the designated hive and input key 
+		that match the pattern. Add all matches to the names vector. 
+		Stop when all names have been searched
+	*/
+	void GetMatchingNames(string hiveIn, string keyIn, string pattern, ItemEntityVector* names, bool isRegex = true);
+	/** Get keys foir the specifed regex.
+		Attempt to locate any constant portion of the registry key. If a constant
+		portion can be found then start the pattern matching search from the end of the 
+		constant portion to save time. This cuts the time to 1/20th of the old time, nad
+		reduces the memory usage of this probe to 1/30th of the old memory usage.
+	*/
+	void KeyPatternMatch(ItemEntity* hive, string pattern, ItemEntityVector* keys, bool isRegex = true);
+	/** Convert the registry data to string representations and add to the provided Item. */
+	void RetrieveInfo(string, string, string, DWORD, LPBYTE, DWORD, Item*);
+
+	/** Return true if the specified key exists under the specified hive. */
+	bool KeyExists(string hive, string key);
+	/** Return true if the specified name exists under the specified hive and key. */
+	bool NameExists(string hive, string key, string name);
+};
+
+#endif


Property changes on: trunk/ovaldi/src/probes/windows/RegistryProbe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/windows/SidProbe.cpp
===================================================================
--- trunk/ovaldi/src/probes/windows/SidProbe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/probes/windows/SidProbe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,273 @@
+//
+// $Id: SidProbe.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "SidProbe.h"
+
+//****************************************************************************************//
+//								SidProbe Class											  //	
+//****************************************************************************************//
+SidProbe* SidProbe::instance = NULL;
+
+SidProbe::SidProbe() : AbsProbe() {
+
+}
+
+SidProbe::~SidProbe() {
+
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AbsProbe* SidProbe::Instance() {
+
+	// Use lazy initialization
+	if(instance == NULL) 
+		instance = new SidProbe();
+
+	return instance;	
+}
+
+ItemVector* SidProbe::CollectItems(Object *object) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  Run the sid probe. Return a vector of Items
+	//
+	//	if not using variables
+	//		if operation == equals
+	//			- call LookupAccountName and return collected item
+	//				http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/lookupaccountname.asp
+	//
+	//		if operation == not equals || operation == pattern match
+	//			- get all sids see note below...
+	//			- determine set of sids that match the specified criteria
+	//			- for each match call LookupAccountName and return collected item
+	//				http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/lookupaccountname.asp
+	//
+	//	Behaviors:
+	//	The following behaviors are supported when collecting sid objects:
+	//	 - include_group: should be paired with the "resolve_group" behavior.
+	//	   When true, include the group in the set of sids. When false, do not
+	//	   include the group in the set of sids.
+	//
+	//	 - resolve_group: when true, if the trustee name specifies a group 
+	//	   then return all users in the group. When false just return sid 
+	//	   for the group.
+	//	
+	//
+	//
+	//	NOTE:
+	//	I have not yet found a way to get all the SIDs on a system. To handle this
+	//	for now I am getting all the sids of the local users, local groups, and
+	//	global groups. Then expanding all the groups found above to get all of their
+	//	members. Additionally I look up all well known trustee names by their sid string
+	//	to ensure all well know sids are captured. For now this will have to suffice as
+	//	the set of all SIDs on a system. 
+	//
+	//	NOTE: 
+	//	Trustee name is expected to be a fully qualified name like:
+	//		domain_name\user_name
+	//	or a well known account name like:
+	//		Administrators, or SYSTEM, or Administrator, or Users
+	//
+	//	TODO:
+	//	Ensure that a given account is only looked up once
+	//		
+	//	Get All Local users with:
+	//	http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netmgmt/netmgmt/netuserenum.asp
+	//	
+	//	Get all global groups with:
+	//	http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netmgmt/netmgmt/netgroupenum.asp
+	//	Get global group members with:
+	//	http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netmgmt/netmgmt/netgroupgetusers.asp
+	//
+	//	Get all local groups with:
+	//	http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netmgmt/netmgmt/netlocalgroupenum.asp
+	//	Get local group members with:
+	//	http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netmgmt/netmgmt/netlocalgroupgetmembers.asp
+	//
+	// -----------------------------------------------------------------------
+	
+	ItemVector *collectedItems = new ItemVector();
+
+	// get the trustee_name from the provided object
+	ObjectEntity* trusteeName = object->GetElementByName("trustee_name");
+
+	// check datatypes - only allow string
+	if(trusteeName->GetDatatype() != OvalEnum::DATATYPE_STRING) {
+		throw ProbeException("Error: invalid data type specified on trustee_name. Found: " + OvalEnum::DatatypeToString(trusteeName->GetDatatype()));
+	}	
+
+	// check operation - only allow  equals, not equals and pattern match
+	if(trusteeName->GetOperation() != OvalEnum::OPERATION_EQUALS && trusteeName->GetOperation() != OvalEnum::OPERATION_PATTERN_MATCH && trusteeName->GetOperation() != OvalEnum::OPERATION_NOT_EQUAL) {
+		throw ProbeException("Error: invalid operation specified on trustee_name. Found: " + OvalEnum::OperationToString(trusteeName->GetOperation()));
+	}
+
+	// support behaviors - init with defaults.
+	bool includeGroupBehavior = true;
+	bool resolveGroupBehavior = false;
+	if(object->GetBehaviors()->size() != 0) {
+		BehaviorVector* behaviors = object->GetBehaviors();
+		BehaviorVector::iterator iterator;
+		for(iterator = behaviors->begin(); iterator != behaviors->end(); iterator++) {
+			Behavior* behavior = (*iterator);
+			if(behavior->GetName().compare("include_group") == 0 && behavior->GetValue().compare("false") == 0) {
+				includeGroupBehavior = false;
+			} else if(behavior->GetName().compare("resolve_group") == 0 && behavior->GetValue().compare("true") == 0) {
+				resolveGroupBehavior = true;
+			} else {
+				Log::Info("Unsupported behavior found when collecting " + object->GetId());
+			}
+		}		
+	}
+
+	// get the SID data
+	if(trusteeName->GetVarRef() == NULL) {
+		if(trusteeName->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			this->GetAccountInformation(trusteeName->GetValue(), resolveGroupBehavior, includeGroupBehavior, collectedItems);
+		} else {
+
+			bool isRegex = false;
+			if(trusteeName->GetOperation() == OvalEnum::OPERATION_PATTERN_MATCH)
+				isRegex = true;
+
+			// Get all trustee_names on the system...
+			StringVector* allTrusteeNames = WindowsCommon::GetAllTrusteeNames();
+			
+			// Get the set of trustee names that match the ItemEntity.
+			StringVector::iterator iterator;
+			for(iterator = allTrusteeNames->begin(); iterator != allTrusteeNames->end(); iterator++) {
+				string curr = (*iterator);
+				if(this->IsMatch(trusteeName->GetValue(), (*iterator), isRegex)) {
+					this->GetAccountInformation((*iterator), resolveGroupBehavior, includeGroupBehavior, collectedItems);
+				}
+			}
+		}
+
+	} else {
+		// Get all trustee_names on the system...
+		StringVector* allTrusteeNames = WindowsCommon::GetAllTrusteeNames();
+
+		// loop through all trustee names on the system
+		// only keep those that match operation and value and var check
+		StringVector::iterator it;
+		ItemEntity* tmp = this->CreateItemEntity(trusteeName);
+		for(it = allTrusteeNames->begin(); it != allTrusteeNames->end(); it++) {
+			tmp->SetValue((*it));
+			if(trusteeName->Analyze(tmp) == OvalEnum::RESULT_TRUE) {
+				this->GetAccountInformation((*it), resolveGroupBehavior, includeGroupBehavior, collectedItems);
+			}
+		}
+	}
+
+	return collectedItems;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+Item* SidProbe::CreateItem() {
+
+	Item* item = new Item(0, 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows", 
+						"win-sc", 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows windows-system-characteristics-schema.xsd", 
+						OvalEnum::STATUS_ERROR, 
+						"sid_item");
+
+	return item;
+}
+
+bool SidProbe::GetAccountInformation(string accountName,  bool resolveGroupBehavior, bool includeGroupBehavior, ItemVector* items) {
+
+	bool isComplete = true;
+
+	// lookup the trustee name
+	try {
+		string domainStr = "";
+		string sidStr = "";
+		bool isGroup = WindowsCommon::LookUpTrusteeName(&accountName, &sidStr, &domainStr);
+		
+		// if a group
+		// handle behaviors
+		if(isGroup && resolveGroupBehavior) {
+
+			if(includeGroupBehavior) {
+				Item* item = this->CreateItem();
+				item->SetStatus(OvalEnum::STATUS_EXISTS);
+				item->AppendElement(new ItemEntity("trustee_name", accountName, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+				item->AppendElement(new ItemEntity("trustee_sid", sidStr, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+				item->AppendElement(new ItemEntity("trustee_domain", domainStr, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+				items->push_back(item);
+			} 
+			
+			// Get all the accounts in the group
+			StringVector* groupMembers = new StringVector();
+			WindowsCommon::ExpandGroup(accountName, groupMembers);
+			StringVector::iterator iterator;
+			for(iterator = groupMembers->begin(); iterator != groupMembers->end(); iterator++) {
+				// make recursive call...
+				try {
+					isComplete = this->GetAccountInformation((*iterator), resolveGroupBehavior, includeGroupBehavior, items);
+				} catch (Exception ex) {
+					isComplete = false;
+					Log::Debug(ex.GetErrorMessage());
+				}
+			}
+			delete groupMembers;
+
+		} else {
+			Item* item = this->CreateItem();
+			item->SetStatus(OvalEnum::STATUS_EXISTS);
+			item->AppendElement(new ItemEntity("trustee_name", accountName, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+			item->AppendElement(new ItemEntity("trustee_sid", sidStr, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+			item->AppendElement(new ItemEntity("trustee_domain", domainStr, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+			items->push_back(item);
+		}
+
+	} catch(ProbeException ex) {
+		// only way to have a notice level exception thrown here 
+		// is for the account to not be found. In that case return an 
+		// item with a status of does not exist.
+		if(ex.GetSeverity() == ERROR_NOTICE) {
+			Item* item = this->CreateItem();
+			item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+			item->AppendElement(new ItemEntity("trustee_name", accountName, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+			items->push_back(item);
+		} else {
+			throw ex;
+		}
+	}
+
+	return isComplete;
+}


Property changes on: trunk/ovaldi/src/probes/windows/SidProbe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/windows/SidProbe.h
===================================================================
--- trunk/ovaldi/src/probes/windows/SidProbe.h	                        (rev 0)
+++ trunk/ovaldi/src/probes/windows/SidProbe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,78 @@
+//
+// $Id: SidProbe.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+#ifndef SIDPROBE_H
+#define SIDPROBE_H
+
+#pragma warning(disable:4786)
+
+#include "AbsProbe.h"
+#include "WindowsCommon.h"
+
+using namespace std;
+
+
+/**
+	This class is responsible for collecting information for windows sid_objects.
+*/
+class SidProbe : public AbsProbe {
+public:
+	~SidProbe();
+	
+	ItemVector* CollectItems(Object* object);
+	/** Return a new Item created for storing sid information. */
+	Item* CreateItem();
+
+	/** Ensure that the SidProbe is a singleton. */
+	static AbsProbe* Instance();
+
+private:
+	SidProbe();
+
+	static SidProbe* instance;
+
+	/** Get account information for the specified account name.
+		Support behaviors. Resulting Items are pushed on to the 
+		items vector.
+		Return false if the set of items in not complete.
+
+		TODO: how can I set the colleced object flag correctly?
+	*/
+	bool GetAccountInformation(string accountName,  bool resolveGroupBehavior, bool includeGroupBehavior, ItemVector* items);
+
+	/** Look up the specified trustee name. 
+		Get the domain and the SID string.
+		Return true if the account is a group.
+	*/
+	bool LookUpTrusteeName(string* accountNameStr, string* sidStr, string* domainStr);
+
+};
+
+#endif


Property changes on: trunk/ovaldi/src/probes/windows/SidProbe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/windows/UserProbe.cpp
===================================================================
--- trunk/ovaldi/src/probes/windows/UserProbe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/probes/windows/UserProbe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,425 @@
+//
+// $Id: UserProbe.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "UserProbe.h"
+
+//****************************************************************************************//
+//								UserProbe Class											  //	
+//****************************************************************************************//
+UserProbe* UserProbe::instance = NULL;
+
+UserProbe::UserProbe() : AbsProbe() {
+	
+}
+
+UserProbe::~UserProbe() {
+
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AbsProbe* UserProbe::Instance() {
+
+	// Use lazy initialization
+	if(instance == NULL) 
+		instance = new UserProbe();
+
+	return instance;	
+}
+
+ItemVector* UserProbe::CollectItems(Object *object) {
+	
+	ItemVector *collectedItems = new ItemVector();
+
+	// get the trustee_name from the provided object
+	ObjectEntity* user = object->GetElementByName("user");
+
+	// check datatypes - only allow string
+	if(user->GetDatatype() != OvalEnum::DATATYPE_STRING) {
+		throw ProbeException("Error: invalid data type specified on user. Found: " + OvalEnum::DatatypeToString(user->GetDatatype()));
+	}	
+
+	// check operation - only allow  equals, not equals and pattern match
+	if(user->GetOperation() != OvalEnum::OPERATION_EQUALS && user->GetOperation() != OvalEnum::OPERATION_PATTERN_MATCH && user->GetOperation() != OvalEnum::OPERATION_NOT_EQUAL) {
+		throw ProbeException("Error: invalid operation specified on user. Found: " + OvalEnum::OperationToString(user->GetOperation()));
+	}
+
+	// behaviors are not allowed on users
+
+	if(object->GetBehaviors()->size() != 0) {
+		throw ProbeException("Error user_objects do not support behaviors.");		
+	}
+
+	// get the user data
+	if(user->GetVarRef() == NULL) {
+		if(user->GetOperation() == OvalEnum::OPERATION_EQUALS) {
+			// simply get user if it exists
+			Item* item=  this->GetUserInfo(user->GetValue());
+			if(item != NULL) {
+				collectedItems->push_back(item);
+			} 
+		} else {
+
+			bool isRegex = false;
+			if(user->GetOperation() == OvalEnum::OPERATION_PATTERN_MATCH)
+				isRegex = true;
+
+			// Get all users on the system...
+			StringVector* allUsers = this->GetAllUsers();
+			
+			// Get the set of users that match the ItemEntity.
+			StringVector::iterator iterator;
+			for(iterator = allUsers->begin(); iterator != allUsers->end(); iterator++) {
+				string curr = (*iterator);
+				if(this->IsMatch(user->GetValue(), (*iterator), isRegex)) {
+					Item* item =  this->GetUserInfo((*iterator));
+					if(item != NULL) {
+						collectedItems->push_back(item);
+					}
+				}
+			}
+		}
+
+	} else {
+		// Get all users on the system...
+		StringVector* allUsers = this->GetAllUsers();
+
+		// loop through all users on the system
+		// only keep those that match operation and value and var check
+		StringVector::iterator it;
+		ItemEntity* tmp = this->CreateItemEntity(user);
+		for(it = allUsers->begin(); it != allUsers->end(); it++) {
+			tmp->SetValue((*it));
+			if(user->Analyze(tmp) == OvalEnum::RESULT_TRUE) {
+				Item* item = this->GetUserInfo((*it));
+				if(item != NULL) {
+					collectedItems->push_back(item);
+				}
+			}
+		}
+	}
+
+	return collectedItems;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+Item* UserProbe::CreateItem() {
+
+	Item* item = new Item(0, 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows", 
+						"win-sc", 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows windows-system-characteristics-schema.xsd", 
+						OvalEnum::STATUS_ERROR, 
+						"user_item");
+
+	return item;
+}
+
+Item* UserProbe::GetUserInfo(string userName) {
+
+	Item* item = NULL;
+
+
+	// get the groups
+	StringVector* groups = new StringVector();
+	bool userExists = this->GetGroupsForUser(userName, groups);
+	if(userExists) {
+		item = this->CreateItem();
+		item->SetStatus(OvalEnum::STATUS_EXISTS);
+		item->AppendElement(new ItemEntity("user", userName, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+
+		// get the enabled flag
+		try {
+			bool enabled = this->GetEnabledFlag(userName);
+			item->AppendElement(new ItemEntity("enabled", Common::ToString(enabled), OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_EXISTS));
+		} catch (Exception ex) {
+			item->AppendElement(new ItemEntity("enabled", "", OvalEnum::DATATYPE_BOOLEAN, false, OvalEnum::STATUS_ERROR));
+			item->AppendMessage(new OvalMessage(ex.GetErrorMessage(), OvalEnum::LEVEL_ERROR));
+		}
+
+		StringVector::iterator iterator;
+		if(groups->size() > 0) {
+			for(iterator = groups->begin(); iterator != groups->end(); iterator++) {
+				item->AppendElement(new ItemEntity("group", (*iterator), OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+			}
+		} else {
+			item->AppendElement(new ItemEntity("group", "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_DOES_NOT_EXIST));
+		}
+		delete groups;
+	} else {
+		item = this->CreateItem();
+		item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
+		item->AppendElement(new ItemEntity("user", userName, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
+	}
+
+	return item;
+}
+
+bool UserProbe::GetGroupsForUser(string userName, StringVector* groups) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  Return a the set of groups this user is a member of.
+	//
+	// -----------------------------------------------------------------------
+
+	bool userExists = false;
+	UniqueStringVector* usv = new UniqueStringVector(groups);
+
+	LPCWSTR userNameApi;
+	// convert groupName for api use
+	wchar_t* wUserName = NULL;
+	size_t size = mbstowcs(NULL, userName.c_str(), userName.length()) + 1;
+	wUserName = new wchar_t[size];
+	mbstowcs(wUserName, userName.c_str(), userName.size() + 1 );
+	userNameApi = wUserName;
+
+	// get the global groups
+	LPGROUP_USERS_INFO_0 pBuf = NULL;
+	DWORD dwLevel = 0;
+	DWORD dwPrefMaxLen = MAX_PREFERRED_LENGTH;
+	DWORD dwEntriesRead = 0;
+	DWORD dwTotalEntries = 0;
+	NET_API_STATUS nStatus;
+	
+	// Call the NetUserGetGroups function, specifying level 0.
+	nStatus = NetUserGetGroups(NULL,
+								userNameApi,
+								dwLevel,
+								(LPBYTE*)&pBuf,
+								dwPrefMaxLen,
+								&dwEntriesRead,
+								&dwTotalEntries);
+	// If the call succeeds,
+	if (nStatus == NERR_Success) {
+		userExists = true;
+
+		LPGROUP_USERS_INFO_0 pTmpBuf;
+		DWORD i;
+		DWORD dwTotalCount = 0;
+		char tmpGroupName[512];
+
+		if ((pTmpBuf = pBuf) != NULL) {
+
+			// Loop through the entries; 
+			//  print the name of the global groups 
+			//  to which the user belongs.
+			for (i = 0; i < dwEntriesRead; i++) {
+				
+				if (pTmpBuf == NULL) {
+					// Free the allocated buffer.
+					if (pBuf != NULL)
+						NetApiBufferFree(pBuf);
+					throw ProbeException("An access violation has occurred while getting groups for user: " + userName);
+				}
+
+				ZeroMemory(tmpGroupName, 21);
+				_snprintf(tmpGroupName, sizeof(tmpGroupName) - 1, "%S", pTmpBuf->grui0_name);
+				tmpGroupName[sizeof(tmpGroupName)-1] = '\0';
+				usv->Append(tmpGroupName);
+
+				pTmpBuf++;
+				dwTotalCount++;
+			}
+		}
+
+		// report an error if all groups are not listed.
+		if (dwEntriesRead < dwTotalEntries) {
+			// Free the allocated buffer.
+			if (pBuf != NULL)
+				NetApiBufferFree(pBuf);
+			throw ProbeException("Unable to get all global groups for user: " + userName);
+		}
+	
+	} else if(nStatus == NERR_UserNotFound) {
+		userExists = false;
+	} else {
+		throw ProbeException("A system error has occurred unable to get all global groups for user: " + userName);
+	}
+
+	// Free the allocated buffer.
+	if (pBuf != NULL)
+		NetApiBufferFree(pBuf);
+
+
+	// only proceed if the user exists
+	if(userExists) {
+
+		//
+		// get the local groups for the user
+		//
+		LPLOCALGROUP_USERS_INFO_0 pLocalBuf = NULL;
+		dwLevel = 0;
+		DWORD dwFlags = LG_INCLUDE_INDIRECT ;
+		dwPrefMaxLen = MAX_PREFERRED_LENGTH;
+		dwEntriesRead = 0;
+		dwTotalEntries = 0;
+
+		//  Call the NetUserGetLocalGroups function 
+		//  specifying information level 0.
+		//
+		//   The LG_INCLUDE_INDIRECT flag specifies that the 
+		//   function should also return the names of the local 
+		//   groups in which the user is indirectly a member.
+		nStatus = NetUserGetLocalGroups(NULL,
+										userNameApi,
+										dwLevel,
+										dwFlags,
+										(LPBYTE *) &pLocalBuf,
+										dwPrefMaxLen,
+										&dwEntriesRead,
+										&dwTotalEntries);
+		// If the call succeeds
+		if (nStatus == NERR_Success) {
+			LPLOCALGROUP_USERS_INFO_0 pLocalTmpBuf;
+			DWORD i;
+			DWORD dwTotalCount = 0;
+			char tmpGroupName[512];
+
+			if ((pLocalTmpBuf = pLocalBuf) != NULL) {
+
+				//  Loop through the entries and 
+				//  print the names of the local groups 
+				//  to which the user belongs. 
+				for (i = 0; i < dwEntriesRead; i++) {
+
+					if (pLocalTmpBuf == NULL) {
+						// Free the allocated memory.
+						if (pLocalBuf != NULL)
+							NetApiBufferFree(pLocalBuf);
+						throw ProbeException("An access violation has occurred while getting local groups for user: " + userName);
+					}
+
+					ZeroMemory(tmpGroupName, 21);
+					_snprintf(tmpGroupName, sizeof(tmpGroupName) - 1, "%S", pLocalTmpBuf->lgrui0_name);
+					tmpGroupName[sizeof(tmpGroupName)-1] = '\0';
+					usv->Append(tmpGroupName);
+
+					pLocalTmpBuf++;
+					dwTotalCount++;
+				}
+			}
+
+			// report an error if all groups are not listed
+			if (dwEntriesRead < dwTotalEntries) {
+				// Free the allocated memory.
+				if (pLocalBuf != NULL)
+					NetApiBufferFree(pLocalBuf);
+				throw ProbeException("Unable to get all local groups for user: " + userName);
+			}
+
+		} else if (nStatus == NERR_UserNotFound){
+			// do nothing
+		} else {
+			throw ProbeException("A system error has occurred unable to get all local groups for user: " + userName);
+		}
+
+		// Free the allocated memory.
+		if (pLocalBuf != NULL)
+			NetApiBufferFree(pLocalBuf);
+	}
+
+	delete usv;
+
+	return userExists;
+}
+
+bool UserProbe::GetEnabledFlag(string userName) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  Return the enabled flag for this user.
+	//
+	// -----------------------------------------------------------------------
+
+	bool enabled = true;
+
+	LPCWSTR userNameApi;
+	// convert groupName for api use
+	wchar_t* wUserName = NULL;
+	size_t size = mbstowcs(NULL, userName.c_str(), userName.length()) + 1;
+	wUserName = new wchar_t[size];
+	mbstowcs(wUserName, userName.c_str(), userName.size() + 1 );
+	userNameApi = wUserName;
+
+	DWORD dwLevel = 23; // need USER_INFO_23  to get enabled flag
+	LPUSER_INFO_23  pBuf = NULL;
+	NET_API_STATUS nStatus;
+
+	// Call the NetUserGetInfo function
+	nStatus = NetUserGetInfo(NULL,
+							userNameApi,
+							dwLevel,
+							(LPBYTE *)&pBuf);
+
+	// If the call succeeds, print the user information.
+	if (nStatus == NERR_Success) {
+		if (pBuf != NULL) {			
+			// now read the flags
+			if(pBuf->usri23_flags & UF_ACCOUNTDISABLE) {
+				enabled = false;
+			}
+		}
+	} else {
+		throw ProbeException("A system error has occurred while getting user enabmed flag.");
+	}
+	
+	// Free the allocated memory.
+	if (pBuf != NULL)
+		NetApiBufferFree(pBuf);
+
+    return enabled;
+}
+
+StringVector* UserProbe::GetAllUsers() {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  Return a the set of users on the local host
+	//
+	//	Do we need to get users other than local users?
+	// -----------------------------------------------------------------------
+
+	StringVector* users = new StringVector();
+	UniqueStringVector* allUsers = new UniqueStringVector(users);
+
+	// just call windows common method to get local users.
+	WindowsCommon::GetAllLocalUsers(allUsers);
+
+
+	return allUsers->GetUniqueStrings();
+}
\ No newline at end of file


Property changes on: trunk/ovaldi/src/probes/windows/UserProbe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/windows/UserProbe.h
===================================================================
--- trunk/ovaldi/src/probes/windows/UserProbe.h	                        (rev 0)
+++ trunk/ovaldi/src/probes/windows/UserProbe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,81 @@
+//
+// $Id: UserProbe.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+#ifndef USERPROBE_H
+#define USERPROBE_H
+
+#pragma warning(disable:4786)
+
+#include "AbsProbe.h"
+#include "WindowsCommon.h"
+
+using namespace std;
+
+/**
+	This class is responsible for collecting information for windows group_objects.
+*/
+class UserProbe : public AbsProbe {
+public:
+	~UserProbe();
+	
+	/** Run the user probe. 
+	    Return a vector of Items
+		Relies on the WindowsCommon class to search for and enumerate users.
+     */
+	ItemVector* CollectItems(Object* object);
+
+	/** Return a new Item created for storing user information */
+	Item* CreateItem();
+
+	/** Ensure that the UserProbe is a singleton. */
+	static AbsProbe* Instance();
+
+private:
+	UserProbe();
+
+	static UserProbe* instance;
+
+	/** Return an item for the specified user name. 
+	    If the user is not found return and item withthe status set to does not exist
+	 */
+	Item* GetUserInfo(string userName);
+
+	/** Return false if the user does not exist. Get the set of groups that the specified user is a memeber of. */
+	bool GetGroupsForUser(string userName, StringVector* groups);
+
+	/** Return the set of users on the local host. */
+	StringVector* GetAllUsers();
+
+	/** Return the enabled flag for this user name. */
+	bool GetEnabledFlag(string userName);
+
+};
+
+#endif


Property changes on: trunk/ovaldi/src/probes/windows/UserProbe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/windows/WMIProbe.cpp
===================================================================
--- trunk/ovaldi/src/probes/windows/WMIProbe.cpp	                        (rev 0)
+++ trunk/ovaldi/src/probes/windows/WMIProbe.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,471 @@
+//
+// $Id: WMIProbe.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "WMIProbe.h"
+
+//****************************************************************************************//
+//								WMIProbe Class											  //	
+//****************************************************************************************//
+
+WMIProbe* WMIProbe::instance = NULL;
+
+WMIProbe::WMIProbe() {
+
+}
+
+WMIProbe::~WMIProbe() {
+
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+AbsProbe* WMIProbe::Instance() {
+
+	// Use lazy initialization
+	if(instance == NULL) 
+		instance = new WMIProbe();
+
+	return instance;	
+}
+
+ItemVector* WMIProbe::CollectItems(Object* object) {
+
+	ItemVector* collectedItems = new ItemVector();
+
+	// get the namespace and wql query
+	ObjectEntity* wmi_namespace = object->GetElementByName("namespace");
+	ObjectEntity* wmi_wql = object->GetElementByName("wql");
+
+	// check datatypes - only allow string
+	if(wmi_namespace->GetDatatype() != OvalEnum::DATATYPE_STRING) {
+		throw ProbeException("Error: invalid data type specified on namespace. Found: " + OvalEnum::DatatypeToString(wmi_namespace->GetDatatype()));
+	}
+	if(wmi_wql->GetDatatype() != OvalEnum::DATATYPE_STRING) {
+		throw ProbeException("Error: invalid data type specified on wql. Found: " + OvalEnum::DatatypeToString(wmi_wql->GetDatatype()));
+	}
+
+	// check operation - only allow equals
+	if(wmi_namespace->GetOperation() != OvalEnum::OPERATION_EQUALS) {
+		throw ProbeException("Error: invalid operation specified on namespace. Found: " + OvalEnum::OperationToString(wmi_namespace->GetOperation()));
+	}
+	if(wmi_wql->GetOperation() != OvalEnum::OPERATION_EQUALS) {
+		throw ProbeException("Error: invalid operation specified on wql. Found: " + OvalEnum::OperationToString(wmi_wql->GetOperation()));
+	}
+
+	// get all the namespaces
+	ItemEntityVector* namespaces = this->GetNamespaces(wmi_namespace);
+	ItemEntityVector::iterator namespaceIt;
+	for(namespaceIt=namespaces->begin(); namespaceIt!=namespaces->end(); namespaceIt++) {
+		
+			// get all the wql queries
+			ItemEntityVector* wqls = this->GetWQLs(wmi_wql, (*namespaceIt));
+			ItemEntityVector::iterator wqlIt;
+			for(wqlIt=wqls->begin(); wqlIt!=wqls->end(); wqlIt++) {
+
+				// run the wmi queries and push the results on the collectedItems
+				// return vector.
+				Item* item = this->GetWMI((*namespaceIt), (*wqlIt));
+				if(item != NULL) {
+					collectedItems->push_back(item);
+				}
+			}
+			delete wqls;
+	}
+	delete namespaces;
+
+	return collectedItems;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+
+Item* WMIProbe::CreateItem() {
+
+	Item* item = new Item(0, 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows", 
+						"win-sc", 
+						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows windows-system-characteristics-schema.xsd", 
+						OvalEnum::STATUS_ERROR, 
+						"wmi_item");
+
+	return item;
+}
+
+ItemEntityVector* WMIProbe::GetNamespaces(ObjectEntity* wmi_namespace) {
+
+	ItemEntityVector* namespaces = new ItemEntityVector();
+
+	// does the namespace entity use variables?
+	if(wmi_namespace->GetVarRef() == NULL) {
+		
+		ItemEntity* tmp = this->CreateItemEntity(wmi_namespace);
+		tmp->SetValue(wmi_namespace->GetValue());
+		namespaces->push_back(tmp);
+
+	} else {
+
+		// retrieve all the variable values that match the supplied var_ref.
+		VariableValueVector* vars = wmi_namespace->GetVariableValues();
+
+		// we may need to add a check to see if the namespace exists here?
+
+		// loop through all values
+		VariableValueVector::iterator iterator;
+		for(iterator = vars->begin(); iterator != vars->end(); iterator++) {
+
+			ItemEntity* tmp = this->CreateItemEntity(wmi_namespace);
+			tmp->SetValue((*iterator)->GetValue());
+			namespaces->push_back(tmp);
+		}
+	}
+
+	return namespaces;
+}
+
+ItemEntityVector* WMIProbe::GetWQLs(ObjectEntity* wmi_wql, ItemEntity* wmi_namespace) {
+
+	ItemEntityVector* wqls = new ItemEntityVector();
+
+	// does this key use variables?
+	if(wmi_wql->GetVarRef() == NULL) {
+		
+		ItemEntity* tmp = this->CreateItemEntity(wmi_wql);
+		tmp->SetValue(wmi_wql->GetValue());
+		wqls->push_back(tmp);
+	
+	} else {
+
+		// retrieve all the variable values that match the supplied var_ref.
+		VariableValueVector* vars = wmi_wql->GetVariableValues();
+
+		// loop through all values
+		VariableValueVector::iterator iterator;
+		for(iterator = vars->begin(); iterator != vars->end(); iterator++) {
+
+			ItemEntity* tmp = this->CreateItemEntity(wmi_wql);
+			tmp->SetValue((*iterator)->GetValue());
+			wqls->push_back(tmp);
+		}
+	}
+
+	return wqls;
+}
+
+Item* WMIProbe::GetWMI(ItemEntity* wmi_namespace, ItemEntity* wmi_wql) {
+
+	IWbemLocator *pLoc = NULL;
+	IWbemServices *pSvc = NULL;
+	IEnumWbemClassObject* pEnumerator = NULL;
+
+	Item* item = NULL;
+
+	try {
+		HRESULT hres;
+
+		// establish COM connection
+		hres = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); 
+		if (FAILED(hres)) {
+			string errorMessage = _com_error(hres).ErrorMessage();
+			throw ProbeException("(WMIProbe) Failed to initialize COM library.  " + errorMessage, ERROR_FATAL);
+		}
+
+		// set security of COM connection to the default
+		hres =  CoInitializeSecurity(NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_DEFAULT, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL);
+		if (FAILED(hres)) {
+			string errorMessage = _com_error(hres).ErrorMessage();
+			throw ProbeException("(WMIProbe) Failed to initialize COM security.  " + errorMessage, ERROR_FATAL);
+		}
+
+		// find the WMI Locator
+		hres = CoCreateInstance(CLSID_WbemLocator, NULL, CLSCTX_INPROC_SERVER, IID_IWbemLocator, (LPVOID *) &pLoc);
+		if (FAILED(hres)) {
+			string errorMessage = _com_error(hres).ErrorMessage();
+			throw ProbeException("(WMIProbe) Failed to create IWbemLocator object.  " + errorMessage, ERROR_FATAL);
+		}
+
+		// Connect to the specified namespace with the current user.
+		hres = pLoc->ConnectServer(_bstr_t(wmi_namespace->GetValue().c_str()), NULL, NULL, 0, NULL, 0, 0, &pSvc);
+		if (FAILED(hres)) {
+			string errorMessage = _com_error(hres).ErrorMessage();
+			throw ProbeException("(WMIProbe) Unable to connect to the '" + wmi_namespace->GetValue() + "' namespace.  " + errorMessage, ERROR_FATAL);
+		}
+
+		// At this point we are connected to WMI.  Now set the security levels
+		// of the WMI connection.
+		hres = CoSetProxyBlanket(pSvc, RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, NULL, RPC_C_AUTHN_LEVEL_CALL, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE);
+		if (FAILED(hres)) {
+			string errorMessage = _com_error(hres).ErrorMessage();   
+ 			throw ProbeException("(WMIProbe) Unable to set the WMI proxy blanket.  " + errorMessage, ERROR_FATAL);
+		}
+
+		// run the query.  The results will be stored in pEnumerator.
+		hres = pSvc->ExecQuery(_bstr_t(L"WQL"), _bstr_t(wmi_wql->GetValue().c_str()), WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY, NULL, &pEnumerator);
+		if (FAILED(hres)) {
+			throw ProbeException("(WMIProbe) Wmi query failed. ('" + wmi_wql->GetValue() + "')", ERROR_FATAL);
+		}
+
+		HRESULT enumhRes = WBEM_S_NO_ERROR;
+		IWbemClassObject *pclsObj[1];
+		ULONG uReturn = 0;
+
+		// iterate through each instance returned
+		while (enumhRes == WBEM_S_NO_ERROR) {
+
+			enumhRes = pEnumerator->Next(WBEM_INFINITE, 1, pclsObj, &uReturn);
+
+			// We have finished looping through the enumeration.  If no results
+			// were returned, ie pEnumerator is empty, then we will break out of the
+			// while loop. Must create an item .  This will cause the wmi
+			// probe to return an empty item vector which will mean the collected
+			// object in the sc file will have a does not exist flag.
+
+			if((uReturn == 0) || (enumhRes == WBEM_S_FALSE)) {
+
+				item = this->CreateItem();
+				item->AppendElement(new ItemEntity("namespace", wmi_namespace->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+				item->AppendElement(new ItemEntity("wql", wmi_wql->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+				item->SetStatus(OvalEnum::STATUS_EXISTS);
+				item->AppendElement(new ItemEntity("result", "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_DOES_NOT_EXIST));
+
+				break;
+
+			} else {
+				// We have a result.  Create an ItemEntity for it and add it to the
+				// item.
+
+				// If the item hasn't been created, create it.  This peice of code
+				// allows the while loop to break out without having created an
+				// item for the case where the enumeration was empty.
+
+				if (item == NULL) {
+					item = this->CreateItem();
+					item->AppendElement(new ItemEntity("namespace", wmi_namespace->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+					item->AppendElement(new ItemEntity("wql", wmi_wql->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
+					item->SetStatus(OvalEnum::STATUS_EXISTS);
+				}
+
+				if ((enumhRes == WBEM_E_INVALID_PARAMETER) ||
+					(enumhRes == WBEM_E_OUT_OF_MEMORY) ||
+					(enumhRes == WBEM_E_UNEXPECTED) ||
+					(enumhRes == WBEM_E_TRANSPORT_FAILURE) ||
+					(enumhRes == WBEM_S_TIMEDOUT)) {
+
+					string errorMessage = "";
+					errorMessage.append("(WMIProbe) There was an error retrieving one of the results.");
+
+					item->AppendMessage(new OvalMessage(errorMessage, OvalEnum::LEVEL_ERROR));
+					item->AppendElement(new ItemEntity("result", "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR));
+
+				} else {
+
+					VARIANT vtProp;
+					VariantInit(&vtProp);
+					CIMTYPE* pvtType = NULL;
+
+					// Get the name of the property.  We need to parse the SELECT
+					// statment to determine the name.
+					
+					string fieldName = "unknown error";
+					if (this->GetWqlField(wmi_wql->GetValue(), &fieldName) == true) {
+						// Once the name has been retrieved, use it to get the value
+						// associated with it.
+
+						// get the data associated with the name
+						//hres = pclsObj[0]->Get(bstr_t(fieldName.c_str()), 0, &vtProp, pvtType, 0);
+						hres = pclsObj[0]->Get(bstr_t(fieldName.c_str()), 0, &vtProp, 0, 0);
+						string errorMsg = "";
+						if(hres == WBEM_E_NOT_FOUND) {
+							errorMsg = "WBEM_E_NOT_FOUND for wql: " + wmi_wql->GetValue();
+                        } else if(hres == WBEM_E_OUT_OF_MEMORY) {
+							errorMsg = "WBEM_E_OUT_OF_MEMORY for wql: " + wmi_wql->GetValue();
+						} else if(hres == WBEM_E_INVALID_PARAMETER) {
+							errorMsg = "WBEM_E_INVALID_PARAMETER for wql: " + wmi_wql->GetValue();
+						} else if(hres == WBEM_E_FAILED) {
+							errorMsg = "WBEM_E_FAILED for wql: " + wmi_wql->GetValue();
+						} else if(hres == WBEM_S_NO_ERROR) {
+
+							string strFieldValue = "";
+
+							// based on the type of data get the value of the field
+							if ((V_VT(&vtProp) == VT_BSTR)) {
+
+								char* szChar = NULL;
+								size_t size = 0;
+								if((size = wcstombs(0, vtProp.bstrVal, 0)) != -1) {
+									szChar = new char[size + 1];
+									szChar[size] = NULL;
+									wcstombs(szChar, vtProp.bstrVal, size);
+									strFieldValue = szChar;
+									item->AppendElement(new ItemEntity("result", strFieldValue, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+								} else {
+									item->AppendElement(new ItemEntity("result", strFieldValue, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR));
+								}
+
+							} else if ((V_VT(&vtProp) == VT_UINT)) {
+								int value = V_INT(&vtProp);
+								strFieldValue = Common::ToString(value);
+								item->AppendElement(new ItemEntity("result", strFieldValue, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+							} else if ((V_VT(&vtProp) == VT_BOOL)) {
+								errorMsg = "Unsupported datatype VT_BOOL found.";
+							} else if ((V_VT(&vtProp) == VT_DATE)) {
+								errorMsg = "Unsupported datatype VT_DATE found.";
+							} else if ((V_VT(&vtProp) == VT_DECIMAL)) {
+								errorMsg = "Unsupported datatype VT_DECIMAL found.";
+							} else if ((V_VT(&vtProp) == VT_FILETIME)) {
+								errorMsg = "Unsupported datatype VT_DATE found.";
+							} else if ((V_VT(&vtProp) == VT_INT)) {
+								int value = V_INT(&vtProp);
+								strFieldValue = Common::ToString(value);
+								item->AppendElement(new ItemEntity("result", strFieldValue, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+							} else if ((V_VT(&vtProp) == VT_I1)) {
+								char value = V_I1(&vtProp);
+								strFieldValue += value;
+								item->AppendElement(new ItemEntity("result", strFieldValue, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+							} else if ((V_VT(&vtProp) == VT_I2)) {
+								int value = V_I2(&vtProp);
+								strFieldValue = Common::ToString(value);
+								item->AppendElement(new ItemEntity("result", strFieldValue, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+							} else if ((V_VT(&vtProp) == VT_I4)) {
+								long value = V_I4(&vtProp);
+								strFieldValue = Common::ToString(value);
+								item->AppendElement(new ItemEntity("result", strFieldValue, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+							} else if ((V_VT(&vtProp) == VT_I8)) {
+								errorMsg = "Unsupported datatype VT_I8 found.";
+							} else if ((V_VT(&vtProp) == VT_NULL)) {
+								item->AppendElement(new ItemEntity("result", strFieldValue, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
+							} else {
+								errorMsg = "Unsupported datatype found.";
+							}
+
+							if(errorMsg.compare("") != 0) {
+								item->AppendMessage(new OvalMessage(errorMsg, OvalEnum::LEVEL_ERROR));
+								item->SetStatus(OvalEnum::STATUS_ERROR);
+								Log::Debug("WMI Probe error: " + errorMsg);
+							}
+						}
+					} else {
+						
+						// record error.  Should never get here as an invalid WQL statement
+						// shouldn't run.
+						string errorMessage = "";
+						errorMessage.append("(WMIProbe) A result exists, but couldn't obtain the ");
+						errorMessage.append("name of the property needed to get the result.  ");
+						errorMessage.append("ERROR MESSAGE - " + fieldName);
+
+						item->AppendMessage(new OvalMessage(errorMessage, OvalEnum::LEVEL_ERROR));
+						item->AppendElement(new ItemEntity("result", "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR));
+					}
+
+					VariantClear(&vtProp);
+					 
+				} 
+
+				for (ULONG n=0; n<uReturn; n++) pclsObj[n]->Release();
+			}
+		}
+	} catch (ProbeException ex) {
+		// Make sure we clean up if there is an error, otherwise we will get an COM
+		// security error when we try to run the wmi probe again.
+
+		if (pEnumerator != NULL) pEnumerator->Release();
+		if (pSvc != NULL) pSvc->Release();
+		if (pLoc != NULL) pLoc->Release();
+
+		CoUninitialize();
+
+		// re-throw the error so it can be caught higher up.
+
+		throw ex;
+	} catch (...) {
+		// Make sure we clean up if there is an error, otherwise we will get an COM
+		// security error when we try to run the wmi probe again.
+
+		if (pEnumerator != NULL) pEnumerator->Release();
+		if (pSvc != NULL) pSvc->Release();
+		if (pLoc != NULL) pLoc->Release();
+
+		CoUninitialize();
+
+		// re-throw the error so it can be caught higher up.
+
+		throw ProbeException("An unknown error occured while executing a wql.");
+	}
+
+	// clean-up
+	if (pEnumerator != NULL) pEnumerator->Release();
+	if (pSvc != NULL) pSvc->Release();
+	if (pLoc != NULL) pLoc->Release();
+
+	// Close the COM library on the current thread
+	CoUninitialize();
+
+	return item;
+}
+
+bool WMIProbe::GetWqlField(string wqlIn, string* fieldName) {
+	int endSelect, startFrom;
+
+	// Create a copy of the WQL string in upper case.  This way we can find the opening
+	// SELECT and FROM words which are not case sensitive.
+
+	string wqlUpperCase = wqlIn;
+	for(unsigned int i=0;i<wqlIn.length();i++) {
+		wqlUpperCase[i] = toupper(wqlIn[i]);
+	}
+
+	// Find the opening SELECT statement
+
+	endSelect = wqlUpperCase.find("SELECT ",0);
+	if (endSelect == -1) {
+		*fieldName = "While searching for the fieldname, couldn't find the opening SELECT.";
+		return false;
+	}
+	endSelect = endSelect + 7;
+
+	// Find the FROM statement.
+
+	startFrom = wqlUpperCase.find(" FROM", endSelect);
+	if (startFrom == -1) {
+		*fieldName = "While searching for the fieldname, couldn't find the FROM statement.";
+		return false;
+	}
+
+	*fieldName = wqlIn.substr(endSelect, startFrom-endSelect);
+
+	// make sure the field name is not *
+	if((*fieldName).compare("*") == 0) {
+		throw ProbeException("Found field name of '*'. Only a single named field is allowed");
+	}
+
+	return true;
+}
\ No newline at end of file


Property changes on: trunk/ovaldi/src/probes/windows/WMIProbe.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/probes/windows/WMIProbe.h
===================================================================
--- trunk/ovaldi/src/probes/windows/WMIProbe.h	                        (rev 0)
+++ trunk/ovaldi/src/probes/windows/WMIProbe.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,114 @@
+//
+// $Id: WMIProbe.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef WMIPROBE_H
+#define WMIPROBE_H
+
+#pragma warning(disable:4786)
+
+#include "AbsProbe.h"
+#include "WindowsCommon.h"
+
+/***********************************************************************/
+// The comdef.h include statment is needed for the code in this probe to
+// work. However, comdef.h includes comdefsp.h which utilizes a DOMDocument.
+// This application uses Xerces for xml parsing. Xerces defines a DOMDocument
+// This application also uses windows apis which include references to MsXml.h
+// MsXml.h defines a DOMDocument as well. Either Microsoft or Xerces is not 
+// correctly qualifying thier classes. this causes the following error message:
+/*
+c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\comdefsp.h(1305) : error C2872: 'DOMDocument' : ambiguous symbol
+        could be 'c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\MsXml.h(161) : DOMDocument'
+        or       'c:\xerces-c_2_6_0-windows_nt-msvc_60\include\xercesc\dom\DOMDocument.hpp(63) : xercesc_2_6::DOMDocument'
+*/
+// One solution would be to edit comdefsp.h by simply commenting out line
+// 1305 allowing you to compile and run the aplication.  The line to
+// comment looks like:
+//   _COM_SMARTPTR_TYPEDEF(DOMDocument, __uuidof(DOMDocument));
+//
+// Jean-François Dubé pointed out that a better solution is to add a
+// #undef to undefine DOMDocument.  Thanks!
+//
+/***********************************************************************/
+
+#undef __DOMDocument_FWD_DEFINED__
+#include <comdef.h>
+#include <Dsgetdc.h>
+#include <Lm.h>
+#include <Wbemidl.h>
+#include <windows.h>
+
+using namespace std;
+
+/**
+	This class is responsible for collecting information from WMI.
+*/
+class WMIProbe : public AbsProbe {
+
+public:
+	~WMIProbe();
+
+	/** Run the probe.
+	    Get the namespace and wql query to run.  Note that niether entity
+	    allows a pattern match so you don't have to worry about resolving
+	    regular expressions.
+	*/
+	ItemVector* CollectItems(Object* object);
+
+	/**  Return a new Item created for storing wmi information */
+	Item* CreateItem();
+
+	/** Ensure that the WMIProbe is a singleton. */
+	static AbsProbe* Instance();
+
+private:
+	WMIProbe();
+
+	static WMIProbe* instance;
+
+	/** Query WMI for data. */
+	Item* GetWMI(ItemEntity*, ItemEntity*);
+
+	/** Return the set of namespaces to be collected */
+	ItemEntityVector* GetNamespaces(ObjectEntity*);
+
+	/** Return the set of wql queries to be run */
+	ItemEntityVector* GetWQLs(ObjectEntity*, ItemEntity*);
+
+	/** Parse the WQL and extract the field in the select statement.  
+	    If we get the field, return true and fieldName is set to the
+		name of the field.  If we cannot get the field, return false
+		and fieldName is set to an error message.
+	*/
+	bool GetWqlField(string wqlIn, string* fieldName);
+};
+
+#endif


Property changes on: trunk/ovaldi/src/probes/windows/WMIProbe.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/solaris/DataCollector.cpp
===================================================================
--- trunk/ovaldi/src/solaris/DataCollector.cpp	                        (rev 0)
+++ trunk/ovaldi/src/solaris/DataCollector.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,95 @@
+//
+// $Id: DataCollector.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+//SOLARIS PORT NOTICE:
+
+//This code is copied from the linux version of this file. I assume that in this case there
+//are is no need to change this code to run on solaris os. When a port to solaris is provided 
+//this code needs to be tested.
+
+#include "DataCollector.h"
+
+//****************************************************************************************//
+//								DataCollector Class										  //	
+//****************************************************************************************//
+DataCollector::DataCollector() : AbsDataCollector() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//
+	// -----------------------------------------------------------------------
+}
+
+DataCollector::~DataCollector() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Nothing for now
+	// -----------------------------------------------------------------------
+}
+
+// ***************************************************************************************	//
+//								Static Public members										//
+// ***************************************************************************************	//
+void DataCollector::Init() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a new instance of the data collector
+	//	Set the oval and sc document references
+	//	Add the System info for this platform
+	//
+	// -----------------------------------------------------------------------
+
+	AbsDataCollector* odc = new DataCollector();
+	odc->InitBase(new ObjectCollector());
+	
+	AbsDataCollector::instance = odc;
+}
+
+
+void DataCollector::WriteSystemInfo() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Create a new instance of the data collector
+	//	Set the oval and sc document references
+	//	Add the System info for this platform
+	//
+	// -----------------------------------------------------------------------
+
+	SystemInfo* systemInfo = SystemInfoCollector::CollectSystemInfo();
+	systemInfo->Write(DocumentManager::GetSystemCharacterisitcsDocument());
+}
+
+
+
+


Property changes on: trunk/ovaldi/src/solaris/DataCollector.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/solaris/DataCollector.h
===================================================================
--- trunk/ovaldi/src/solaris/DataCollector.h	                        (rev 0)
+++ trunk/ovaldi/src/solaris/DataCollector.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,62 @@
+//
+// $Id: DataCollector.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+//SOLARIS PORT NOTICE:
+
+//This code is copied from the linux version of this file. I assume that in this case there
+//are is no need to change this code to run on solaris os. When a port to solaris is provided 
+//this code needs to be tested.
+
+#ifndef DATACOLLECTOR_H
+#define DATACOLLECTOR_H
+
+#include "AbsDataCollector.h"
+#include "ObjectCollector.h"
+#include "SystemInfo.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	The red hat specific data collector
+*/
+class DataCollector : public AbsDataCollector {
+public:
+	~DataCollector();
+
+	static void Init();
+
+protected:
+	DataCollector();
+	void WriteSystemInfo();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/solaris/DataCollector.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/solaris/FileFinder.cpp
===================================================================
--- trunk/ovaldi/src/solaris/FileFinder.cpp	                        (rev 0)
+++ trunk/ovaldi/src/solaris/FileFinder.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,353 @@
+//
+// $Id: FileFinder.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+//SOLARIS PORT NOTICE:
+
+//This code is copied from the linux version of this file. I assume that in this case there
+//are is no need to change this code to run on solaris os. When a port to solaris is provided 
+//this code needs to be tested.
+
+#include "FileFinder.h"
+
+FileFinder::FileFinder() {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	// -----------------------------------------------------------------------
+
+}
+
+FileFinder::~FileFinder() {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//	Do nothing for now
+	// -----------------------------------------------------------------------
+
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+void FileFinder::FindPaths(string regex, StringVector* paths, bool isRegex) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//	Search the file system for paths that match the provided regex.
+	//	Attempt to break off a constant portion of the path to spead up searching
+	// -----------------------------------------------------------------------
+
+	string fileName = "";
+
+	string patternOut= "";
+	string constPortion= "";
+	string fileSeperatorStr = "";
+	fileSeperatorStr+=Common::fileSeperator;
+	this->fileMatcher->GetConstantPortion(regex, fileSeperatorStr, &patternOut, &constPortion);
+	// Remove extra slashes
+	constPortion = this->fileMatcher->RemoveExtraSlashes(constPortion);
+
+	// Found a constant portion
+	if(constPortion.compare("") != 0 && patternOut.compare("") != 0) {
+
+		//	Call search function
+		this->GetPathsForPattern(constPortion, regex, paths, isRegex);
+
+	//	No constant portion.
+	} else if(constPortion.compare("") == 0) { 
+		
+		try  {
+
+			this->GetPathsForPattern(fileSeperatorStr, regex, paths, isRegex);
+
+		} catch(REGEXException ex) {
+			if(ex.GetSeverity() == ERROR_WARN) {
+				string pcreMsg = "";
+				pcreMsg.append("Filefinder Warning - while searching for matching files:\n");
+				pcreMsg.append("-----------------------------------------------------------------------\n");
+				pcreMsg.append(ex.GetErrorMessage());
+				Log::Debug(pcreMsg);
+			} else {
+				throw;
+			}		
+		}
+
+	} else if(patternOut.compare("") == 0) {
+
+		//	There are no pattern matching chars treat this as a normal path 
+		if(this->PathExists(constPortion)) {
+			paths->push_back(constPortion);
+		}
+	}
+
+}
+
+void FileFinder::GetPathsForPattern(string dirIn, string pattern, StringVector *pathVector, bool isRegex) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  This function gets all paths that match a given pattern.
+	//	This does call itself recursively as it must search all sub directories of dirIn.
+	//	If a match is found the path is pushed on to a vector of strings.
+	//
+	// -----------------------------------------------------------------------
+
+	try {
+
+		struct stat statbuf;
+		struct dirent *dirp;
+		DIR *dp;
+		string tmp = "";
+
+		//	Call stat 
+		if(lstat(dirIn.c_str(), &statbuf) < 0) {
+			//if(errno == ENOTDIR) {
+			//	throw ProbeException("A component of the path prefix is not a directory.");
+			//} else if(errno == ENAMETOOLONG) {
+			//	throw ProbeException("A component of a pathname exceeded {NAME_MAX} characters, or an entire path name exceeded {PATH_MAX} characters.");		
+			//} else if(errno == EACCES) {
+			//	throw ProbeException("Search permission is denied for a component of the path prefix.");
+			//} else if(errno == ELOOP) {
+			//	throw ProbeException("Too many symbolic links were encountered in translating the pathname.");
+			//} else if(errno == EFAULT) {
+			//	throw ProbeException("Sb or name points to an invalid address.");
+			//} else if(errno == EIO) {	
+			//	throw ProbeException("An I/O error occurred while reading from or writing to the file system.");
+			//} else if(errno == ENOENT) {
+			//	// does not exist
+			//}
+
+			return; 
+		}
+
+		// only consider dirs
+		if(S_ISDIR(statbuf.st_mode) == 1) {
+
+			// record it if it matches the regex.
+			if(this->IsMatch(pattern.c_str(), dirIn.c_str(), isRegex))
+				pathVector->push_back(dirIn);
+
+			//	Append a '/'
+			if(dirIn.at(dirIn.length()-1) != Common::fileSeperator)
+				dirIn.append("/");
+
+			//	Open the directory
+			dp = opendir(dirIn.c_str());
+			if(dp == NULL) {
+				//	Error opening directory
+				//	not sure this error matters
+				// cout << "Failed to open the directory" << endl;
+				return;
+			}
+
+			//	Loop through all names in the directory and make recursive call
+			while((dirp = readdir(dp)) != NULL) {
+				//	Ignore dot and dot-dot
+				if(strcmp(dirp->d_name, ".") == 0 || strcmp(dirp->d_name, "..") == 0)
+					continue;
+
+				//	append the name after the "/"
+				tmp = dirIn;
+				tmp.append(dirp->d_name);
+
+				// Nake recursive call
+				GetPathsForPattern(tmp, pattern, pathVector, isRegex);
+			}
+
+
+			//	Close the directory
+			if(closedir(dp) < 0) {
+				//	Error closing the directory
+				//	not sure this error matters
+				// cout << "Failed to close the directory" << endl;
+				return;
+			}
+		}
+
+	//	Just need to ensure that all exceptions have a nice message. 
+	//	So rethrow the exceptions I created catch the others and format them.
+	} catch(Exception ex) {
+		throw;
+	} catch(...) {
+
+		string errorMessage = "";
+		errorMessage.append("Error: ");
+		errorMessage.append("An unspecified error was encountered while trying to search for matching paths. \n\tDirectory: ");
+		errorMessage.append(dirIn);
+		errorMessage.append("\n\tPattern: ");
+		errorMessage.append(pattern);
+		throw FileFinderException(errorMessage);
+	}
+}
+
+void FileFinder::GetFilesForPattern(string path, string pattern, BehaviorVector* behaviors, StringVector* fileNames, bool isRegex) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  This function gets all file names that match a given pattern on the spaecified path.
+	//	If a match is found the filename is pushed on to a vector of strings.
+	//
+	// -----------------------------------------------------------------------
+
+	try {
+
+		// Verify that the path that was passed into this function ends with a slash.  If
+		// it doesn't, then add one.
+		if (path[path.length()-1] != Common::fileSeperator)
+			path.append(1, Common::fileSeperator);
+
+		//	Open the directory
+		DIR *dp = opendir(path.c_str());
+		if(dp == NULL) {
+			string errorMessage = "Error opening directory. Directory: " + path;
+			throw FileFinderException(errorMessage);
+		}
+
+		//	Loop through all names in the directory
+		struct dirent *dirp;
+		while((dirp = readdir(dp)) != NULL) {
+			//	Ignore dot and dot-dot
+			if(strcmp(dirp->d_name, ".") == 0 || strcmp(dirp->d_name, "..") == 0)
+				continue;
+
+			//	Call stat 
+			struct stat statbuf;
+			string filepath = path;
+			filepath.append(dirp->d_name);
+			if(lstat(filepath.c_str(), &statbuf) < 0) {
+				//if(errno == ENOTDIR) {
+				//	throw ProbeException("A component of the path prefix is not a directory.");
+				//} else if(errno == ENAMETOOLONG) {
+				//	throw ProbeException("A component of a pathname exceeded {NAME_MAX} characters, or an entire path name exceeded {PATH_MAX} characters.");		
+				//} else if(errno == EACCES) {
+				//	throw ProbeException("Search permission is denied for a component of the path prefix.");
+				//} else if(errno == ELOOP) {
+				//	throw ProbeException("Too many symbolic links were encountered in translating the pathname.");
+				//} else if(errno == EFAULT) {
+				//	throw ProbeException("Sb or name points to an invalid address.");
+				//} else if(errno == EIO) {	
+				//	throw ProbeException("An I/O error occurred while reading from or writing to the file system.");
+				//} else if(errno == ENOENT) {
+				//	throw ProbeException("Does not exist");
+				//}
+				// no errors to report
+			}
+
+			//	If not a directory check if a match
+			if(S_ISREG(statbuf.st_mode) == 0) {
+				string fileName = dirp->d_name;
+				if(this->IsMatch(pattern, fileName, isRegex))
+					fileNames->push_back(fileName);
+			}
+		}
+
+		//	Close the directory
+		if(closedir(dp) < 0) {
+			//	Error closing the directory
+			//	not sure this error matters
+			// cout << "Failed to close the directory" << endl;
+			return;
+		}
+
+	//	Just need to ensure that all exceptions have a nice message. 
+	//	So rethrow the exceptions I created catch the others and format them.
+	} catch(Exception ex) {
+
+		throw;
+
+	} catch(...) {
+
+		string errorMessage = "";
+		errorMessage.append("Error: ");
+		errorMessage.append("An unspecified error was encountered while trying to search for matching paths. \n\tDirectory: ");
+		errorMessage.append(path);
+		errorMessage.append("\n\tPattern: ");
+		errorMessage.append(pattern);
+		throw FileFinderException(errorMessage);
+	}
+}
+
+bool FileFinder::PathExists(string path) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  Return true if the specified path exists.
+	//
+	// -----------------------------------------------------------------------
+
+	bool exists = false;
+
+	// Verify that the path that was passed into this function ends with a slash.  If
+	// it doesn't, then add one.
+	if (path[path.length()-1] != Common::fileSeperator)
+		path.append(1, Common::fileSeperator);
+
+	//	Open the directory
+	DIR *dp = opendir(path.c_str());
+	if(dp != NULL) {
+		exists = true;
+		closedir(dp);	
+	}
+
+	return exists;
+}
+
+bool FileFinder::FileNameExists(string path, string fileName) {
+	// -----------------------------------------------------------------------
+	//
+	//  ABSTRACT
+	//
+	//  Return true if the specified file exists on the specifeid path.
+	//
+	// -----------------------------------------------------------------------
+
+	bool exists = false;
+
+	// Verify that the path that was passed into this function ends with a slash.  If
+	// it doesn't, then add one.
+	if (path[path.length()-1] != Common::fileSeperator)
+		path.append(1, Common::fileSeperator);
+
+	//	Call stat 
+	struct stat statbuf;
+	string filepath = path + fileName;
+	if(stat(filepath.c_str(), &statbuf) == 0) {
+		exists = true;
+	}
+
+	return exists;
+}


Property changes on: trunk/ovaldi/src/solaris/FileFinder.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/solaris/FileFinder.h
===================================================================
--- trunk/ovaldi/src/solaris/FileFinder.h	                        (rev 0)
+++ trunk/ovaldi/src/solaris/FileFinder.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,69 @@
+//
+// $Id: FileFinder.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+//SOLARIS PORT NOTICE:
+
+//This code is copied from the linux version of this file. I assume that in this case there
+//are is no need to change this code to run on solaris os. When a port to solaris is provided 
+//this code needs to be tested.
+
+#ifndef FILEFINDER_H
+#define FILEFINDER_H
+
+#include "AbsFileFinder.h"
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <time.h>
+
+#include <dirent.h>
+#include <limits.h>
+
+using namespace std;
+
+/**
+	This class is the solaris file searching implmentation used by this application
+*/
+class FileFinder : public AbsFileFinder {
+public:
+	FileFinder();
+	~FileFinder();
+
+protected:
+	bool PathExists(string path);
+	bool FileNameExists(string path, string fileName);
+	void FindPaths(string regex, StringVector* paths, bool isRegex = true);
+	void GetFilesForPattern(string path, string pattern, BehaviorVector* behaviors, StringVector* fileNames, bool isRegex = true);
+	void GetPathsForPattern(string dirIn, string pattern, StringVector* pathVector, bool isRegex = true);	
+};
+
+#endif


Property changes on: trunk/ovaldi/src/solaris/FileFinder.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/solaris/ObjectCollector.cpp
===================================================================
--- trunk/ovaldi/src/solaris/ObjectCollector.cpp	                        (rev 0)
+++ trunk/ovaldi/src/solaris/ObjectCollector.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,114 @@
+//
+// $Id: ObjectCollector.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+//SOLARIS PORT NOTICE:
+
+//This code is copied from the linux version of this file. A minor edit was made to the IsApplicable
+//function to support solaris. When a port to solaris is provided this code needs to be tested.
+
+#include "ObjectCollector.h"
+
+//****************************************************************************************//
+//								DataCollector Class										  //	
+//****************************************************************************************//
+
+ObjectCollector::ObjectCollector() : AbsObjectCollector() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Initialize the instance of the oval object collector
+	// -----------------------------------------------------------------------
+	
+	AbsObjectCollector::instance = this;
+}
+
+ObjectCollector::~ObjectCollector() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Nothing for now
+	// -----------------------------------------------------------------------
+
+	ProbeFactory::Shutdown();
+}
+
+// ***************************************************************************************	//
+//								Public members												//
+// ***************************************************************************************	//
+bool ObjectCollector::IsApplicable(AbsObject* object) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return true if the specified object is applicable to this object 
+	//	collector. All objects defined in the solaris, unix, or independent schemas
+	//	are applicable
+	// -----------------------------------------------------------------------
+
+	bool isApplicable = false;
+
+	if(object->GetXmlns().find("solaris") != string::npos) {
+		isApplicable = true;
+	} else if(object->GetXmlns().find("unix") != string::npos) {
+		isApplicable = true;
+	} else if(object->GetXmlns().find("independent") != string::npos) {
+		isApplicable = true;
+	}
+
+	return isApplicable;
+}
+
+bool ObjectCollector::IsSupported(AbsObject* object) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return true if the specified object is supported by this object 
+	//	collector. 
+	// -----------------------------------------------------------------------
+
+	bool isSupported = false;
+
+	if(ProbeFactory::GetProbe(object->GetName()) != NULL) {
+		isSupported = true;
+	}
+
+	return isSupported;
+}
+
+AbsProbe* ObjectCollector::GetProbe(Object* object) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Return true if the specified object is supported to this object 
+	//	collector
+	// -----------------------------------------------------------------------
+
+	return ProbeFactory::GetProbe(object->GetName());
+}


Property changes on: trunk/ovaldi/src/solaris/ObjectCollector.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/solaris/ObjectCollector.h
===================================================================
--- trunk/ovaldi/src/solaris/ObjectCollector.h	                        (rev 0)
+++ trunk/ovaldi/src/solaris/ObjectCollector.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,64 @@
+//
+// $Id: ObjectCollector.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+//SOLARIS PORT NOTICE:
+
+//This code is copied from the linux version of this file. I assume that in this case there
+//are is no need to change this code to run on solaris os. When a port to solaris is provided 
+//this code needs to be tested.
+
+#ifndef OBJECTCOLLECTOR_H
+#define OBJECTCOLLECTOR_H
+
+//	include the parent class.
+#include "AbsObjectCollector.h"
+#include "ProbeFactory.h"
+
+//	namespaces
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	The object collector for linux definitions.
+*/
+class ObjectCollector : public AbsObjectCollector {
+public:
+
+	ObjectCollector();
+	~ObjectCollector();
+
+protected:
+	bool IsApplicable(AbsObject* object);
+	bool IsSupported(AbsObject* object);
+	AbsProbe* GetProbe(Object* object);
+};
+
+#endif


Property changes on: trunk/ovaldi/src/solaris/ObjectCollector.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/solaris/ProbeFactory.cpp
===================================================================
--- trunk/ovaldi/src/solaris/ProbeFactory.cpp	                        (rev 0)
+++ trunk/ovaldi/src/solaris/ProbeFactory.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,151 @@
+//
+// $Id: ProbeFactory.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+//SOLARIS PORT NOTICE:
+
+//This code is copied from the linux version of this file. This code currently provides stubs for
+// inserting the probes that might be needed by a solaris port of the interpreter. When a port to solaris
+//is provide this code needs to be both completed and tested.
+
+#include "ProbeFactory.h"
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+AbsProbe* ProbeFactory::GetProbe(string objectName) {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Based on the provided object return the appropriate probe.
+	//	If a Probe is not found return null
+	// -----------------------------------------------------------------------
+
+// SOLARIS PORT NOTICE: Add other probes here to support collection of solaris specific objects.
+
+	AbsProbe* probe = NULL;
+
+// here are the objects defined in the independent schema
+	if(objectName.compare("family_object") == 0) {
+		probe = FamilyProbe::Instance();
+	} else if(objectName.compare("filemd5_object") == 0) {
+		// SOLARIS PORT NOTICE: This probe was written for linux and windows systems and needs to be tested on solaris systems
+		probe = FileMd5Probe::Instance();
+	} else if(objectName.compare("filehash_object") == 0) {
+		// SOLARIS PORT NOTICE: This probe was written for linux and windows systems and needs to be tested on solaris systems
+		probe = FileHashProbe::Instance();
+	} else if(objectName.compare("environmentvariable_object") == 0) {
+		// SOLARIS PORT NOTICE: This probe was written for linux and windows systems and needs to be tested on solaris systems
+		probe = EnvironmentVariableProbe::Instance();
+	} else if(objectName.compare("variable_object") == 0) {
+		// SOLARIS PORT NOTICE: This probe was written for linux and windows systems and needs to be tested on solaris systems
+		probe = VariableProbe::Instance();
+	} else if(objectName.compare("textfilecontent_object") == 0) {
+		// SOLARIS PORT NOTICE: This probe was written for linux and windows systems and needs to be tested on solaris systems
+		probe = TextFileContentProbe::Instance();
+	} else if(objectName.compare("xmlfilecontent_object") == 0) {
+		// SOLARIS PORT NOTICE: This probe was written for linux and windows systems and needs to be tested on solaris systems
+		probe = XmlFileContentProbe::Instance();
+
+// here are the objects defined in the unix schema
+	} else if(objectName.compare("file_object") == 0) {
+		// SOLARIS PORT NOTICE: This probe was written for linux systems and needs to be tested on solaris systems
+		probe = FileProbe::Instance();	
+	} else if(objectName.compare("inetd_object") == 0) {
+		// Not currently implemented for any unix systems
+	} else if(objectName.compare("interface_object") == 0) {
+		// Not currently implemented for any unix systems
+	} else if(objectName.compare("password_object") == 0) {
+		// Not currently implemented for any unix systems
+	} else if(objectName.compare("process_object") == 0) {
+		// SOLARIS PORT NOTICE: This probe was written for linux systems and needs to be tested on solaris systems
+		probe = ProcessProbe::Instance();
+	} else if(objectName.compare("runlevel_object") == 0) {
+		// Not currently implemented for any unix systems
+	} else if(objectName.compare("sccs_object") == 0) {
+		// Not currently implemented for any unix systems
+	} else if(objectName.compare("shadow_object") == 0) {
+		// Not currently implemented for any unix systems
+	} else if(objectName.compare("uname_object") == 0) {
+		// SOLARIS PORT NOTICE: This probe was written for linux systems and needs to be tested on solaris systems
+		probe = UnameProbe::Instance();
+
+// here are the solaris specific objects
+	} else if(objectName.compare("isainfo_object") == 0) {
+		// SOLARIS PORT NOTICE: get an instance of the probe for this object
+	} else if(objectName.compare("package_object") == 0) {
+		// SOLARIS PORT NOTICE: get an instance of the probe for this object
+	} else if(objectName.compare("patch_object") == 0) {
+		// SOLARIS PORT NOTICE: get an instance of the probe for this object
+	}
+
+	return probe;
+}
+
+void ProbeFactory::Shutdown() {
+	// -----------------------------------------------------------------------
+	//	Abstract
+	//
+	//	Shutdown all probes
+	// -----------------------------------------------------------------------
+
+	// SOLARIS PORT NOTICE: Make sure any new probes are deleted here after using them.
+	AbsProbe* probe = NULL;
+
+	probe = FileProbe::Instance();
+	delete probe;
+
+	probe = UnameProbe::Instance();
+	delete probe;
+
+	probe = ProcessProbe::Instance();
+	delete probe;
+
+	probe = FamilyProbe::Instance();
+	delete probe;
+
+	probe = EnvironmentVariableProbe::Instance();
+	delete probe;
+
+	probe = VariableProbe::Instance();
+	delete probe;
+
+	probe = XmlFileContentProbe::Instance();
+	delete probe;
+
+	probe = TextFileContentProbe::Instance();
+	delete probe;
+
+	probe = FileHashProbe::Instance();
+	delete probe;
+
+	probe = FileMd5Probe::Instance();
+	delete probe;
+}


Property changes on: trunk/ovaldi/src/solaris/ProbeFactory.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/solaris/ProbeFactory.h
===================================================================
--- trunk/ovaldi/src/solaris/ProbeFactory.h	                        (rev 0)
+++ trunk/ovaldi/src/solaris/ProbeFactory.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,90 @@
+//
+// $Id: ProbeFactory.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+//SOLARIS PORT NOTICE:
+
+//This code is copied from the linux version of this file. Need to add in includes for all 
+//solaris probes taht are created. When a port to solaris is provided this code needs to be tested.
+
+#ifndef PROBEFACTORY_H
+#define PROBEFACTORY_H
+
+#include <string>
+#include <vector>
+#include <iostream>
+#include <stdlib.h>
+
+#include "AbsDataCollector.h"
+
+
+//	include the probe classes
+#include "FileMd5Probe.h"
+#include "FileHashProbe.h"
+#include "FamilyProbe.h"
+#include "UnameProbe.h"
+#include "ProcessProbe.h"
+#include "EnvironmentVariableProbe.h"
+#include "TextFileContentProbe.h"
+#include "XmlFileContentProbe.h"
+#include "VariableProbe.h"
+// SOLARIS PORT NOTICE: Add other probes here to support collection of solaris specific objects.
+
+using namespace std;
+
+class AbsProbe;
+
+/**
+	This class is a Factory class for getting probes for an object in an oval definitions file. 
+	Each object defined in the oval definition schema has a corresponding probe for data collection. 
+	This class provides uniform access to all probes in the application, and is responsible for determining
+	which probe to associate with a given object.
+
+	Each supported platform should implement its own ProbeFactory that manages the probes for that platform.
+
+	All Probes are singlestons.
+*/
+class ProbeFactory {
+
+public:
+	/**
+		Factory method. Based on the specifed object name return the appropriate probe.
+		@param objectName a string taht corresponds to the name of an object in the oval definition schema.
+		@return The probe for the specifed object or NULL.
+	*/
+	static AbsProbe* GetProbe(string objectName);
+
+	/** 
+		Shutdown the ProbeFactory.
+	*/
+	static void Shutdown();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/solaris/ProbeFactory.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/solaris/SystemInfo.cpp
===================================================================
--- trunk/ovaldi/src/solaris/SystemInfo.cpp	                        (rev 0)
+++ trunk/ovaldi/src/solaris/SystemInfo.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,386 @@
+//
+// $Id: SystemInfo.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "SystemInfo.h"
+
+//SOLARIS PORT NOTICE:
+
+//This code is copied from the linux version of this file. I assume that in this case there
+//are is no need to change this code to run on solaris os. When a port to solaris is provided 
+//this code needs to be tested.
+
+
+
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~		Class SystemInfo		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+
+SystemInfo::SystemInfo() {
+	// -----------------------------------------------------------------------
+	//	ABSTRACT
+	//
+	//	Initialize data memebres
+	//
+	// -----------------------------------------------------------------------
+
+	os_name = "";
+	os_version = "";
+	architecture = "";
+	primary_host_name = "";
+}
+
+SystemInfo::~SystemInfo() {
+	// -----------------------------------------------------------------------
+	//	ABSTRACT
+	//
+	//	Delete all objects in the interfaces vector.
+	//
+	// -----------------------------------------------------------------------
+
+	IfData *tmp	= NULL;
+	while(interfaces.size() !=0) {
+
+		tmp = interfaces[interfaces.size()-1];
+		interfaces.pop_back();
+		delete tmp;
+		tmp = NULL;
+	}
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+
+void SystemInfo::Write(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *scDoc)
+{
+	//------------------------------------------------------------------------------------//
+	//
+	//  ABSTRACT
+	//
+	//	Write the system_info node to the sc file.
+	//------------------------------------------------------------------------------------//
+
+	//	Find the system_info node
+	DOMElement* sysInfoNode = XmlCommon::FindElement(scDoc, "system_info");
+
+	DOMElement* tmpElm = XmlCommon::CreateElement(scDoc, "os_name", os_name);
+	sysInfoNode->appendChild(tmpElm);
+
+	tmpElm = XmlCommon::CreateElement(scDoc, "os_version", os_version);
+	sysInfoNode->appendChild(tmpElm);
+
+	tmpElm = XmlCommon::CreateElement(scDoc, "architecture", architecture);
+	sysInfoNode->appendChild(tmpElm);
+
+	tmpElm = XmlCommon::CreateElement(scDoc, "primary_host_name", primary_host_name);
+	sysInfoNode->appendChild(tmpElm);
+
+	// Add the interfaces element and its children
+	DOMElement* interfacesElm = XmlCommon::CreateElement(scDoc, "interfaces");
+	sysInfoNode->appendChild(interfacesElm);
+
+	// Loop through contents of the interfaces vector and write each IfData objet
+	IfDataVector::iterator iterator;
+	for (iterator=interfaces.begin(); iterator!=interfaces.end(); iterator++) {
+
+		// Create a new interface element
+		DOMElement* interfaceElm = XmlCommon::CreateElement(scDoc, "interface");
+		interfacesElm->appendChild(interfaceElm);
+
+		// Add the childer to the inerface element
+		tmpElm = XmlCommon::CreateElement(scDoc, "interface_name", (*iterator)->ifName);
+		interfaceElm->appendChild(tmpElm);
+		
+		tmpElm = XmlCommon::CreateElement(scDoc, "ip_address", (*iterator)->ipAddress);
+		interfaceElm->appendChild(tmpElm);
+
+		tmpElm = XmlCommon::CreateElement(scDoc, "mac_address", (*iterator)->macAddress);
+		interfaceElm->appendChild(tmpElm);
+	}
+}
+
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~		 Class SystemInfoCollector		~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+
+SystemInfo* SystemInfoCollector::CollectSystemInfo() {
+	//------------------------------------------------------------------------------------//
+	//
+	//  ABSTRACT
+	//
+	//  Run the system info collector. Return a SystemInfo object. 
+	//
+	//------------------------------------------------------------------------------------//
+
+	SystemInfo *sysInfo = new SystemInfo();
+	SystemInfoCollector::GetOSInfo(sysInfo);
+	sysInfo->interfaces = SystemInfoCollector::GetInterfaces();
+
+	return sysInfo;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+#define MAXHOSTNAMELENGTH 256
+void SystemInfoCollector::GetOSInfo(SystemInfo *sysInfo) {
+	//------------------------------------------------------------------------------------//
+	//
+	//  ABSTRACT
+	//
+	//  Get the OS name and version, the architecture, and the primary host name
+	//	for the system.
+	//
+	//------------------------------------------------------------------------------------/
+
+	struct utsname tmpName;
+	
+	if (uname(&tmpName) > -1) {
+		sysInfo->os_name = tmpName.sysname;
+		sysInfo->os_version = tmpName.version;
+		sysInfo->architecture = tmpName.machine;
+	} else {
+		// error
+		throw SystemInfoException("Error: Unable to get uname information.");
+	}
+
+	//////////////////////////////////////////////////////////
+	////////// Get fully qulaified host name     /////////////
+	//////////////////////////////////////////////////////////
+
+	// First make a call to gethostname()
+	string strHostName = "";
+	char *chHostName = (char*)malloc(sizeof(char*)*MAXHOSTNAMELENGTH);
+	int res = 0;
+	res = gethostname(chHostName, MAXHOSTNAMELENGTH);
+
+	if(res != 0)
+		throw SystemInfoException("Error: Unable to determine the host name.");
+
+	strHostName = chHostName;
+	// Next get the fqdn with a call to gethostbyname
+	struct hostent *hostData = NULL;
+	hostData = gethostbyname((const char*)chHostName); 
+	if(hostData == NULL)
+	  throw SystemInfoException("Error: Unable to get the fully qualified domain name.");
+	
+	// Process the hostData structure
+	sysInfo->primary_host_name = hostData->h_name;
+}
+
+IfDataVector SystemInfoCollector::GetInterfaces() {
+	//------------------------------------------------------------------------------------//
+	//
+	//  ABSTRACT
+	//
+	//  Create a vector of IfData objects that will represent all the available
+	//	interfaces on the system.
+	//
+	//	Must get interface_name, ip_address, and mac_address for each interface
+	//------------------------------------------------------------------------------------//
+
+	IfDataVector interfaces;
+	/*
+	struct ifconf conf;
+	struct sockaddr_in *s_in;
+	struct  sockaddr_in *hwAddr;
+	int sock, count;
+
+	// Open dummy socket
+	if((sock = socket(PF_INET, SOCK_DGRAM, 0)) == -1) {
+	  throw SystemInfoException("Error: Unable to open socket.");
+	}
+
+	// Get the list of devices - only gets 20
+	memset(&conf, 0, sizeof(conf));
+	conf.ifc_len = sizeof(struct ifreq) * 20;
+	conf.ifc_buf = (char*)malloc(conf.ifc_len);
+
+	if(ioctl(sock, SIOCGIFCONF, &conf) == -1) {
+	  throw SystemInfoException("Error: Unable to get a device list.");
+	}
+
+	count = conf.ifc_len/sizeof(struct ifreq);
+	for(int i = 0; i < count; i++) {
+	  IfData *tmpIfData = new IfData();
+	  s_in = (struct sockaddr_in*)&conf.ifc_req[i].ifr_addr;
+	  tmpIfData->ifName = conf.ifc_req[i].ifr_name;
+	  tmpIfData->ipAddress = inet_ntoa(s_in->sin_addr);
+
+	  hwAddr = (struct sockaddr_in*)&conf.ifc_req[i].ifr_hwaddr;
+	  tmpIfData->macAddress = inet_ntoa(hwAddr->sin_addr);
+
+	  tmpIfData->macAddress = " UNKNOWN ";
+	  
+	  interfaces.push_back(tmpIfData);
+	}
+
+	free(conf.ifc_buf);	  
+*/
+
+	/* here is the test sample code i found on the net
+	*/
+
+	unsigned char      *u;
+	int                sockfd, size  = 1;
+	struct ifreq       *ifr;
+	struct ifconf      ifc;
+	struct sockaddr_in sa;
+
+	if (0 > (sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP))) {
+	  throw SystemInfoException("Error: Unable to open socket.");
+	}	
+
+	ifc.ifc_len = IFRSIZE;
+	ifc.ifc_req = NULL;
+
+	do {
+	++size;
+	/* realloc buffer size until no overflow occurs  */
+
+		if (NULL == (ifc.ifc_req = (ifreq*)realloc(ifc.ifc_req, IFRSIZE))) {
+		  throw SystemInfoException("Error: Unable to allocate mememory.");
+		}
+		ifc.ifc_len = IFRSIZE;
+		if (ioctl(sockfd, SIOCGIFCONF, &ifc)) {
+		  throw SystemInfoException("Error: ioctl SIOCFIFCONF.");
+		}
+	} while  (IFRSIZE <= ifc.ifc_len);
+
+	ifr = ifc.ifc_req;
+
+	for (;(char *) ifr < (char *) ifc.ifc_req + ifc.ifc_len; ++ifr) {
+
+		if (ifr->ifr_addr.sa_data == (ifr+1)->ifr_addr.sa_data) {
+		  continue;  // duplicate, skip it
+		}
+
+		if (ioctl(sockfd, SIOCGIFFLAGS, ifr)) {
+		  continue;  // failed to get flags, skip it
+		}
+
+		//printf("Interface:  %s\n", ifr->ifr_name);
+		//printf("IP Address: %s\n", inet_ntoa(inaddrr(ifr_addr.sa_data)));
+		IfData *tmpIfData = new IfData();
+		tmpIfData->ifName = ifr->ifr_name;
+		tmpIfData->ipAddress = inet_ntoa(inaddrr(ifr_addr.sa_data));
+
+		if (0 == ioctl(sockfd, SIOCGIFHWADDR, ifr)) {
+
+			/* Select which  hardware types to process.
+			*
+			*    See list in system include file included from
+			*    /usr/include/net/if_arp.h  (For example, on
+			*    Linux see file /usr/include/linux/if_arp.h to
+			*    get the list.)
+			*/
+		  /* No used 
+			switch (ifr->ifr_hwaddr.sa_family) {
+
+				default:
+					printf("\n");
+					continue;
+				case  ARPHRD_NETROM:  case  ARPHRD_ETHER:  case  ARPHRD_PPP:
+				case  ARPHRD_EETHER:  case  ARPHRD_IEEE802: break;
+			}
+		  */
+
+		  
+			u = (unsigned char *) &ifr->ifr_addr.sa_data;
+			char *macStr = (char*)malloc(sizeof(char*)*128);
+			memset(macStr, 0, 128);
+			if (u[0] + u[1] + u[2] + u[3] + u[4] + u[5]) {
+			  //printf("HW Address: %2.2x.%2.2x.%2.2x.%2.2x.%2.2x.%2.2x\n", u[0], u[1], u[2], u[3], u[4], u[5]);
+			  sprintf(macStr, "%2.2x.%2.2x.%2.2x.%2.2x.%2.2x.%2.2x", u[0], u[1], u[2], u[3], u[4], u[5]); 
+			  tmpIfData->macAddress = macStr;
+			}
+			free(macStr);
+
+			interfaces.push_back(tmpIfData);
+		}
+
+		/* netmask 
+		if (0 == ioctl(sockfd, SIOCGIFNETMASK, ifr) && strcmp("255.255.255.255", inet_ntoa(inaddrr(ifr_addr.sa_data)))) {
+
+			printf("Netmask:    %s\n", inet_ntoa(inaddrr(ifr_addr.sa_data)));
+		}
+		*/
+
+		/* broadcast
+		if (ifr->ifr_flags & IFF_BROADCAST) {
+
+			if (0 == ioctl(sockfd, SIOCGIFBRDADDR, ifr) && strcmp("0.0.0.0", inet_ntoa(inaddrr(ifr_addr.sa_data)))) {
+				printf("Broadcast:  %s\n", inet_ntoa(inaddrr(ifr_addr.sa_data)));
+			}
+		}
+		*/
+		
+		/* MTU
+		if (0 == ioctl(sockfd, SIOCGIFMTU, ifr)) {
+
+			printf("MTU:        %u\n",  ifr->ifr_mtu);
+		}
+		*/
+
+		/* Metric
+		if (0 == ioctl(sockfd, SIOCGIFMETRIC, ifr)) {
+			printf("Metric:     %u\n",  ifr->ifr_metric);
+		}
+		printf("\n");
+		*/
+	}
+
+	close(sockfd);
+
+	/* end sample code from the net
+	*/
+
+	return interfaces;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~  Class SystemInfoException  ~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+SystemInfoException::SystemInfoException(string errMsgIn, int severity, Exception* ex) : Exception(errMsgIn, severity, ex) {
+	// Set the error message and then set the severity to ERROR_FATAL. This is done with
+	// the explicit call to the Exception class constructor that takes a single string
+	// param.
+}
+
+SystemInfoException::~SystemInfoException() {
+	// Do nothing for now
+}


Property changes on: trunk/ovaldi/src/solaris/SystemInfo.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/solaris/SystemInfo.h
===================================================================
--- trunk/ovaldi/src/solaris/SystemInfo.h	                        (rev 0)
+++ trunk/ovaldi/src/solaris/SystemInfo.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,156 @@
+//
+// $Id: SystemInfo.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+
+//SOLARIS PORT NOTICE:
+
+//This code is copied from the linux version of this file. I assume that in this case there
+//are is no need to change this code to run on solaris os. When a port to solaris is provided 
+//this code needs to be tested.
+
+
+#ifndef SYSTEMINFO_H
+#define SYSTEMINFO_H
+
+//	required xerces includes
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/DOMAttr.hpp>
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xercesc/dom/DOMNodeList.hpp>
+#include <xercesc/util/XMLString.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/parsers/AbstractDOMParser.hpp>
+
+#include "XmlCommon.h"
+#include "Common.h"
+#include "Exception.h"
+#include "Log.h"
+
+#ifdef LINUX
+#include <sys/sysinfo.h>
+#endif
+
+#ifdef SUNOS
+#include <sys/systeminfo.h>
+#endif
+
+#include <sys/utsname.h>
+
+#include <unistd.h>
+
+#include <netdb.h>
+#include <sys/ioctl.h>
+#include <net/if.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+/* from net */
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
+#include <net/if_arp.h>
+#include <arpa/inet.h>
+
+#define inaddrr(x) (*(struct in_addr *) &ifr->x[sizeof sa.sin_port])
+#define IFRSIZE   ((int)(size * sizeof (struct ifreq)))
+/* end from net */
+
+#include <iostream>
+#include <string>
+#include <vector>
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	This class stores interface infocmetion as strings.
+	the interface name, mac address and ip address are stored.
+*/
+class IfData {
+public:
+	IfData(){};
+	~IfData(){};
+	IfData(string ifn, string ipAddr, string macAddr) : ifName(ifn), ipAddress(ipAddr), macAddress(macAddr) {}
+
+	string ifName;
+	string ipAddress;
+	string macAddress;
+};
+
+/**	
+	A vector for storing interface data dobjects. 
+	Stores only pointers to the objects. 
+*/
+typedef vector < IfData*, allocator<IfData*> > IfDataVector;
+
+/**
+	This class stores system info as defined in the oval system characteristics schema.
+	A write method is provide for writing out the system infor element as defined in the oval 
+	system characteristics schema.
+*/
+class SystemInfo {
+
+public:
+	SystemInfo();
+	~SystemInfo();
+	void Write(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *scDoc);
+		
+	string os_name;
+	string os_version;
+	string architecture;
+	string primary_host_name;
+	IfDataVector interfaces;
+};
+
+/**
+	This class is responsible for collecting system information.
+*/
+class SystemInfoCollector {
+	public:
+		static SystemInfo* CollectSystemInfo();
+		
+	private:
+		static void GetOSInfo(SystemInfo*);
+		static IfDataVector GetInterfaces();
+};
+
+/** 
+	This class represents an Exception that occured while collecting system info.
+*/
+class SystemInfoException : public Exception {
+	public:
+		SystemInfoException(string errMsgIn = "", int severity = ERROR_FATAL, Exception* ex = NULL);
+		~SystemInfoException();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/solaris/SystemInfo.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/updateversion.pl
===================================================================
--- trunk/ovaldi/src/updateversion.pl	                        (rev 0)
+++ trunk/ovaldi/src/updateversion.pl	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,64 @@
+#!/usr/bin/perl
+# $Id: updateversion.pl 3659 2007-01-09 17:43:02Z bakerj $
+#
+#****************************************************************************************//
+# Copyright (c) 2002-2007, The MITRE Corporation
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification, are
+# permitted provided that the following conditions are met:
+#
+#     * Redistributions of source code must retain the above copyright notice, this list
+#       of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright notice, this
+#       list of conditions and the following disclaimer in the documentation and/or other
+#       materials provided with the distribution.
+#     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+#       used to endorse or promote products derived from this software without specific
+#       prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+# SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#****************************************************************************************//
+# Simple perl script called by Makefile which updates the build number
+# for each build.
+#
+
+# Save a copy of the old version file - just in case.
+
+use File::Copy;
+
+
+$datafile = "./Version.dat";
+$source = "./Version.cpp";
+
+
+open SOURCE, $source;
+open DATAFILE, ">$datafile";
+
+while(<SOURCE>) {
+
+    # Update the build number
+    if(/^\#define BUILD [0-9].*$/) {
+	($define, $build, $value) = split / /,$_;
+	$value += 1;
+	print DATAFILE "\#define BUILD $value\n";
+
+    } else {
+	print DATAFILE $_;
+    }
+
+}
+
+close(SOURCE);
+close(DATAFILE);
+
+copy($datafile, $source);


Property changes on: trunk/ovaldi/src/updateversion.pl
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/windows/DataCollector.cpp
===================================================================
--- trunk/ovaldi/src/windows/DataCollector.cpp	                        (rev 0)
+++ trunk/ovaldi/src/windows/DataCollector.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,60 @@
+//
+// $Id: DataCollector.cpp 4595 2008-01-03 16:41:17Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "DataCollector.h"
+
+//****************************************************************************************//
+//								DataCollector Class										  //	
+//****************************************************************************************//
+DataCollector::DataCollector() : AbsDataCollector() {
+
+}
+
+DataCollector::~DataCollector() {
+
+}
+
+// ***************************************************************************************	//
+//								Static Public members										//
+// ***************************************************************************************	//
+void DataCollector::Init() {
+
+	AbsDataCollector* odc = new DataCollector();
+	odc->InitBase(new ObjectCollector());
+	
+	AbsDataCollector::instance = odc;
+}
+
+void DataCollector::WriteSystemInfo() {
+
+	SystemInfo* systemInfo = SystemInfoCollector::CollectSystemInfo();
+	systemInfo->Write(DocumentManager::GetSystemCharacterisitcsDocument());
+}


Property changes on: trunk/ovaldi/src/windows/DataCollector.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/windows/DataCollector.h
===================================================================
--- trunk/ovaldi/src/windows/DataCollector.h	                        (rev 0)
+++ trunk/ovaldi/src/windows/DataCollector.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,68 @@
+//
+// $Id: DataCollector.h 4595 2008-01-03 16:41:17Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef DATACOLLECTOR_H
+#define DATACOLLECTOR_H
+
+#include <windows.h>
+#include <iphlpapi.h>
+#include <vector>
+
+#include "AbsDataCollector.h"
+#include "ObjectCollector.h"
+#include "SystemInfo.h"
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	The windows specific data collector
+*/
+class DataCollector : public AbsDataCollector {
+public:
+
+	~DataCollector();
+
+	/** Initialize the concrete DataCollector
+		Set the value of the instance variable in the AbsDataCollector.
+		Setup the sc document and add the System info for this platform 
+	*/
+	static void Init();
+
+protected:
+	DataCollector();
+
+	/** Write the system_info element for the sc docuemnet.
+	*/
+	void WriteSystemInfo();
+};
+
+#endif
\ No newline at end of file


Property changes on: trunk/ovaldi/src/windows/DataCollector.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/windows/FileFinder.cpp
===================================================================
--- trunk/ovaldi/src/windows/FileFinder.cpp	                        (rev 0)
+++ trunk/ovaldi/src/windows/FileFinder.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,611 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "FileFinder.h"
+
+FileFinder::FileFinder() {
+
+}
+
+FileFinder::~FileFinder() {
+
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+
+StringVector* FileFinder::ProcessPathBehaviors(StringVector* paths, BehaviorVector* behaviors) {
+	
+	// Process the behaviors to identify any additional paths.
+	// initialize these default values based on the defaults 
+	// set in the oval definitions schema
+	string recurseDirection = Behavior::GetBehaviorValue(behaviors, "recurse_direction");
+	if(recurseDirection.compare("") == 0) {
+		recurseDirection = "none";
+	}
+
+	string maxDepthStr = Behavior::GetBehaviorValue(behaviors, "max_depth");
+	int maxDepth = -1;
+	if(maxDepthStr.compare("") != 0) {
+		maxDepth = atoi(maxDepthStr.c_str());
+		if(maxDepth < -1) 
+			maxDepth = -1;
+	}
+
+	// only need to address recurseDirection up & down if maxDepth is not 0
+	StringVector* behaviorPaths = new StringVector();
+	if(recurseDirection.compare("up") == 0 && maxDepth != 0) {
+		StringVector::iterator path;
+		for(path = paths->begin(); path != paths->end(); path++) {
+			this->UpwardPathRecursion(behaviorPaths, (*path), maxDepth);
+		}
+
+	} else if(recurseDirection.compare("down") == 0 && maxDepth != 0) {
+		StringVector::iterator path;
+		for(path = paths->begin(); path != paths->end(); path++) {
+			this->DownwardPathRecursion(behaviorPaths, (*path), maxDepth);
+		}
+	}
+
+	return behaviorPaths;
+}
+
+void FileFinder::FindPaths(string regex, StringVector* paths, bool isRegex) {
+
+	StringVector* drives;
+	string fileName = "";
+
+	string patternOut= "";
+	string constPortion= "";
+	string fileSeperatorStr = "";
+	fileSeperatorStr+=Common::fileSeperator;
+	this->fileMatcher->GetConstantPortion(regex, fileSeperatorStr, &patternOut, &constPortion);
+	// Remove extra slashes
+	constPortion = this->fileMatcher->RemoveExtraSlashes(constPortion);
+
+	// Found a constant portion
+	if(constPortion.compare("") != 0 && patternOut.compare("") != 0) {
+
+		//	Call search function
+		this->GetPathsForPattern(constPortion, regex, paths);
+
+	//	No constant portion.
+	} else if(constPortion.compare("") == 0) { 
+		
+		//	Must start searching for matches on each drive.
+		drives = this->GetDrives();
+
+		StringVector::iterator drive;
+		for (drive=drives->begin(); drive!=drives->end(); drive++) {
+			//	Call search function
+			try  {
+
+				this->GetPathsForPattern((*drive), regex, paths, isRegex);
+
+			} catch(REGEXException ex) {
+				if(ex.GetSeverity() == ERROR_WARN) {
+					string pcreMsg = "";
+					pcreMsg.append("Filefinder Warning - while searching for matching files:\n");
+					pcreMsg.append("-----------------------------------------------------------------------\n");
+					pcreMsg.append(ex.GetErrorMessage());
+					Log::Debug(pcreMsg);
+				} else {
+					throw;
+				}		
+			}
+		}
+		delete drives;
+
+	} else if(patternOut.compare("") == 0) {
+
+		//	There are no pattern matching chars treat this as a normal path 
+		if(this->PathExists(constPortion)) {
+			paths->push_back(constPortion);
+		}
+	}
+}
+
+StringVector* FileFinder::GetDrives() {
+
+	StringVector* drives = new StringVector();	
+	unsigned int index	= 0;
+	string tmp			= "";
+	string drive		= "";
+	string errMsg		= "";
+	DWORD nBufferLength = 0;
+	DWORD dwResult		= 0;
+	LPTSTR lpBuffer		= new char[0];
+
+	//	Get the required buffer size
+	dwResult = GetLogicalDriveStrings(	nBufferLength,	// size of buffer
+										lpBuffer);		// drive strings buffer
+
+	if(dwResult > nBufferLength) {
+		//	Call the function again with the correct buffer size
+		delete [] (lpBuffer); 
+		lpBuffer = new char[dwResult]; 
+		nBufferLength = dwResult;
+		dwResult = GetLogicalDriveStrings(	nBufferLength,	// size of buffer
+											lpBuffer);		// drive strings buffer
+	
+	} else if(dwResult == 0) {
+		//	Error check GetLastError 
+		char strErrorCode[33];
+		_itoa(GetLastError(), strErrorCode, 10);
+		errMsg.append("Error: Unable to enumerate the drives on the system. Error code: ");
+		errMsg.append(strErrorCode);
+		errMsg.append("\n");
+		throw FileFinderException(errMsg);
+
+	} else {
+		//	Unknown Error
+		errMsg.append("Error: Unable to enumerate the drives on the system. (Unknown error)\n");
+		throw FileFinderException(errMsg);
+	}
+
+	
+	if(dwResult == 0) {
+
+		//	Error check GetLastError 
+		char strErrorCode[33];
+		_itoa(GetLastError(), strErrorCode, 10);
+		errMsg.append("Error: Unable to enumerate the drives on the system. Error code: ");
+		errMsg.append(strErrorCode);
+		errMsg.append("\n");
+		throw FileFinderException(errMsg);
+
+	//	Process the list of drives
+	} else {
+		while(index < dwResult) {
+
+			tmp = lpBuffer[index];
+			index += 4;
+			drive.append(tmp);
+			drive.append(":\\");
+			
+			//	Only fixed drives
+			if(GetDriveType(drive.c_str()) == DRIVE_FIXED)
+				drives->push_back(drive);
+
+			drive = "";			
+		}	
+	}
+
+	return drives;
+}
+
+void FileFinder::GetPathsForPattern(string dirIn, string pattern, StringVector *pathVector, bool isRegex) {
+
+	try {
+
+		//	Stop is a Null Dir
+		if ((dirIn.empty() == true) || (dirIn == ""))
+			return;
+
+		// Verify that the path that was passed into this function ends with a slash.  If
+		// it doesn't, then add one.
+		if (dirIn[dirIn.length()-1] != Common::fileSeperator)
+			dirIn.append(1, Common::fileSeperator);
+		
+		// Append a '*' to the end of the path to signify that we want to find all files
+		// in given directory.
+		string findDir;
+		findDir = dirIn + "*";
+
+		// Find the first file in the directory.  If this fails, then there is no reason
+		// to continue.
+		WIN32_FIND_DATA FindFileData;
+		HANDLE hFind = INVALID_HANDLE_VALUE;
+
+		hFind = FindFirstFile(findDir.c_str(), &FindFileData);
+		if (hFind == INVALID_HANDLE_VALUE) {
+
+			DWORD errorNum = GetLastError();
+
+			if(errorNum == ERROR_FILE_NOT_FOUND || errorNum == ERROR_PATH_NOT_FOUND) {
+
+				// if the file is not found just return no need to report an error
+				return;
+
+			} else {
+				
+				// report other errors that might occure
+				string msg = WindowsCommon::GetErrorMessage(errorNum);
+				string errorMessage = "";
+				errorMessage.append("Error while seaching for matching file paths. " + msg);
+				errorMessage.append(" Directory: ");
+				errorMessage.append(dirIn);
+				errorMessage.append(" Pattern: ");
+				errorMessage.append(pattern);
+				throw FileFinderException(errorMessage);
+			}
+		}
+
+		//	Loop through each file in the directory.  
+		//	If a sub-directory is found, make a recursive call to GetFilePathsForPattern to search its contents.
+		//	If a file is found get the file path and check it against the pattern
+
+		do {
+
+			// Skip ., .., and System Volume 
+			if ((strncmp(FindFileData.cFileName, ".", 1) == 0) ||
+				(strncmp(FindFileData.cFileName, "..", 2) == 0) ||
+				(strncmp(FindFileData.cFileName, "System Volume Information", 25) == 0))
+			{
+			
+			// Found a dir
+			} else if (FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
+
+				string dirToSearch = dirIn;					
+				dirToSearch.append(FindFileData.cFileName);
+
+				if(this->IsMatch(pattern, dirToSearch, isRegex))
+					pathVector->push_back(dirToSearch);
+
+				GetPathsForPattern(dirToSearch, pattern, pathVector);
+			
+			}
+		} while (FindNextFile(hFind, &FindFileData));
+
+		//	Close the handle to the file search object.
+		if(!FindClose(hFind)) {
+
+			DWORD errorNum = GetLastError();
+			string msg = WindowsCommon::GetErrorMessage(errorNum);
+			string errorMessage = "";
+			errorMessage.append("Error: Unable to close search handle while trying to search for matching paths. " + msg);
+			errorMessage.append(" Directory: ");
+			errorMessage.append(dirIn);
+			errorMessage.append(" Pattern: ");
+			errorMessage.append(pattern);
+			throw FileFinderException(errorMessage);	
+		}
+
+	//	Just need to ensure that all exceptions have a nice message. 
+	//	So rethrow the exceptions I created catch the others and format them.
+	} catch(Exception ex) {
+
+		throw;
+
+	} catch(...) {
+
+		string errorMessage = "";
+		errorMessage.append("Error: ");
+		errorMessage.append("An unspecified error was encountered while trying to search for matching paths. Directory: ");
+		errorMessage.append(dirIn);
+		errorMessage.append(" Pattern: ");
+		errorMessage.append(pattern);
+		throw FileFinderException(errorMessage);
+	}
+}
+
+void FileFinder::GetFilesForPattern(string path, string pattern, StringVector* fileNames, bool isRegex) {
+
+	try {
+
+		// Verify that the path that was passed into this function ends with a slash.  If
+		// it doesn't, then add one.
+		if (path[path.length()-1] != Common::fileSeperator)
+			path.append(1, Common::fileSeperator);
+		
+		// Append a '*' to the end of the path to signify that we want to find all files
+		// in given directory.
+		string findDir;
+		findDir = path + "*";
+
+		// Find the first file in the directory.  If this fails, then there is no reason
+		// to continue.
+		WIN32_FIND_DATA FindFileData;
+		HANDLE hFind = INVALID_HANDLE_VALUE;
+
+		hFind = FindFirstFile(findDir.c_str(), &FindFileData);
+		if (hFind == INVALID_HANDLE_VALUE) {
+
+			DWORD errorNum = GetLastError();
+
+			if(errorNum == ERROR_FILE_NOT_FOUND || errorNum == ERROR_PATH_NOT_FOUND) {
+
+				// if the file is not found just return no need to report an error
+				return;
+
+			} else {
+				
+				// report other errors that might occure
+				string msg = WindowsCommon::GetErrorMessage(errorNum);
+				string errorMessage = "";
+				errorMessage.append("Error while seaching for matching files. " + msg);
+				errorMessage.append(" Directory: ");
+				errorMessage.append(path);
+				errorMessage.append(" Pattern: ");
+				errorMessage.append(pattern);
+				throw FileFinderException(errorMessage);
+			}
+		}
+
+		//	Loop through each file in the directory.  
+		//	If a file is found get the file path and check it against the pattern
+		do {
+
+			// Skip ., .., and System Volume 
+			if ((strncmp(FindFileData.cFileName, ".", 1) == 0) ||
+				(strncmp(FindFileData.cFileName, "..", 2) == 0) ||
+				(strncmp(FindFileData.cFileName, "System Volume Information", 25) == 0))
+			{
+			
+			// Found a dir
+			} else if (FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
+
+				// skip
+			
+			} else {
+			
+				string fileName = FindFileData.cFileName;
+	
+				//	Check pattern
+				if(this->IsMatch(pattern, fileName, isRegex))
+					fileNames->push_back(fileName);
+			}
+		} while (FindNextFile(hFind, &FindFileData));
+
+		//	Close the handle to the file search object.
+		if(!FindClose(hFind)) {
+
+			DWORD errorNum = GetLastError();
+			string msg = WindowsCommon::GetErrorMessage(errorNum);
+			string errorMessage = "";
+			errorMessage.append("Error: Unable to close search handle while trying to search for matching files. " + msg);
+			errorMessage.append(" Directory: ");
+			errorMessage.append(path);
+			errorMessage.append(" Pattern: ");
+			errorMessage.append(pattern);
+			throw FileFinderException(errorMessage);
+		}
+
+	//	Just need to ensure that all exceptions have a nice message. 
+	//	So rethrow the exceptions I created catch the others and format them.
+	} catch(Exception ex) {
+
+		throw;
+
+	} catch(...) {
+
+		string errorMessage = "";
+		errorMessage.append("Error: ");
+		errorMessage.append("An unspecified error was encountered while trying to search for matching paths. \n\tDirectory: ");
+		errorMessage.append(path);
+		errorMessage.append("\n\tPattern: ");
+		errorMessage.append(pattern);
+		throw FileFinderException(errorMessage);
+	}
+}
+
+bool FileFinder::PathExists(string path) {
+
+	bool exists = false;
+
+	if (path[path.length()-1] != Common::fileSeperator)
+		path.append(1, Common::fileSeperator);
+
+
+	HANDLE hFile = INVALID_HANDLE_VALUE;
+
+	try {
+		hFile = CreateFile(path.c_str(),					// DirName
+								GENERIC_READ,				// access mode
+								FILE_SHARE_READ,			// share mode
+								NULL,						// SD
+								OPEN_EXISTING,				// how to create
+								FILE_FLAG_BACKUP_SEMANTICS,	// file attributes
+								NULL);						// handle to template file
+
+
+		if (hFile == INVALID_HANDLE_VALUE) {
+
+			DWORD errorNum = GetLastError();
+
+			if(errorNum == ERROR_FILE_NOT_FOUND) {
+				// skip this not looking for a file
+				
+			} else if(errorNum == ERROR_PATH_NOT_FOUND) {
+
+				// skip this the path does not exist
+
+			} else {
+				char errorCodeBuffer[33];
+				_ltoa(errorNum, errorCodeBuffer, 10);
+
+				string errorMessage = "";
+				errorMessage.append("(FileProbe) Unable to open a handle to the file '");
+				errorMessage.append(path);
+				errorMessage.append("'.  Error Code - ");
+				errorMessage.append(errorCodeBuffer);
+				throw FileFinderException(errorMessage);
+			}
+		} else {
+			exists = true;
+		}
+		CloseHandle(hFile); 
+
+	} catch(Exception ex) {
+
+		CloseHandle(hFile); 
+		throw;
+
+	} catch(...) {
+
+		CloseHandle(hFile); 
+		string errorMessage = "";
+		errorMessage.append("Error: ");
+		errorMessage.append("An unspecified error was encountered while trying to search for matching paths. \n\tDirectory: ");
+		errorMessage.append(path);
+		throw FileFinderException(errorMessage);
+	}
+
+	return exists;
+}
+
+bool FileFinder::FileNameExists(string path, string fileName) {
+
+
+	bool exists = false;
+
+	if (path[path.length()-1] != Common::fileSeperator)
+		path.append(1, Common::fileSeperator);
+
+	string filePath = path + fileName;
+
+	HANDLE hFile = INVALID_HANDLE_VALUE;
+
+	try {
+		hFile = CreateFile(filePath.c_str(),				// file name
+								GENERIC_READ,				// access mode
+								FILE_SHARE_READ,			// share mode
+								NULL,						// SD
+								OPEN_EXISTING,				// how to create
+								FILE_ATTRIBUTE_NORMAL,		// file attributes
+								NULL);						// handle to template file
+
+		if (hFile == INVALID_HANDLE_VALUE) {
+
+			DWORD errorNum = GetLastError();
+
+			if(errorNum == ERROR_FILE_NOT_FOUND) {
+				// skip this the file does not exist
+				
+			} else if(errorNum == ERROR_PATH_NOT_FOUND) {
+
+				// skip this since if the path is not found the file can't exist
+
+			} else {
+				char errorCodeBuffer[33];
+				_ltoa(errorNum, errorCodeBuffer, 10);
+
+				string errorMessage = "";
+				errorMessage.append("(FileProbe) Unable to open a handle to the file '");
+				errorMessage.append(filePath);
+				errorMessage.append("'.  Error Code - ");
+				errorMessage.append(errorCodeBuffer);
+				throw FileFinderException(errorMessage);
+			}
+		} else {
+			exists = true;
+		}
+		CloseHandle(hFile); 
+
+	} catch(Exception ex) {
+		CloseHandle(hFile); 
+		throw;
+
+	} catch(...) {
+		CloseHandle(hFile); 
+		string errorMessage = "";
+		errorMessage.append("Error: ");
+		errorMessage.append("An unspecified error was encountered while trying to search for matching paths. \n\tDirectory: ");
+		errorMessage.append(path);
+		throw FileFinderException(errorMessage);
+	}
+
+	return exists;
+}
+
+StringVector* FileFinder::GetChildDirectories(string path) {
+
+	StringVector* childDirs = new StringVector();
+	try {
+
+
+		// Verify that the path that was passed into this function ends with a slash.  If
+		// it doesn't, then add one.
+		if (path[path.length()-1] != Common::fileSeperator)
+			path.append(1, Common::fileSeperator);
+		
+		// Append a '*' to the end of the path to signify that we want to find all files
+		// in given directory.
+		string findDir;
+		findDir = path + "*";
+
+		// Find the first file in the directory.  If this fails, then there is no reason
+		// to continue.
+		WIN32_FIND_DATA FindFileData;
+		HANDLE hFind = INVALID_HANDLE_VALUE;
+
+		hFind = FindFirstFile(findDir.c_str(), &FindFileData);
+		if (hFind == INVALID_HANDLE_VALUE) {
+
+			string errorMessage = "";
+			errorMessage.append("Error: Unable to get a valid handle in GetChildDirectories(). Directory: ");
+			errorMessage.append(path);
+			throw FileFinderException(errorMessage);
+		}
+
+		//	Loop through each file in the directory.  
+		//	If a sub-directory is found store it on the set of childDirs string vector
+		do {
+
+			// Skip ., .., and System Volume 
+			if ((strncmp(FindFileData.cFileName, ".", 1) == 0) ||
+				(strncmp(FindFileData.cFileName, "..", 2) == 0) ||
+				(strncmp(FindFileData.cFileName, "System Volume Information", 25) == 0)) {
+			
+			// Found a dir
+			} else if (FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
+
+				string childDir = path;					
+				childDir.append(FindFileData.cFileName);
+				
+				childDirs->push_back(childDir);			
+			}
+		} while (FindNextFile(hFind, &FindFileData));
+
+		//	Close the handle to the file search object.
+		if(!FindClose(hFind)) {
+			string errorMessage = "";
+			errorMessage.append("Error: Unable to close search handle while trying to get child directories. Parent directory: ");
+			errorMessage.append(path);
+			throw FileFinderException(errorMessage);	
+		}
+
+	//	Just need to ensure that all exceptions have a nice message. 
+	//	So rethrow the exceptions I created catch the others and format them.
+	} catch(Exception ex) {
+
+		throw;
+
+	} catch(...) {
+
+		string errorMessage = "";
+		errorMessage.append("Error: An unspecified error was encountered while trying to get child directories. Parent Directory: ");
+		errorMessage.append(path);
+		throw FileFinderException(errorMessage);
+	}
+
+	return childDirs;
+}
\ No newline at end of file


Property changes on: trunk/ovaldi/src/windows/FileFinder.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/windows/FileFinder.h
===================================================================
--- trunk/ovaldi/src/windows/FileFinder.h	                        (rev 0)
+++ trunk/ovaldi/src/windows/FileFinder.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,97 @@
+//
+// $Id: FileFinder.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef FILEFINDER_H
+#define FILEFINDER_H
+
+#pragma warning(disable:4786)
+
+#include "AbsFileFinder.h"
+#include "WindowsCommon.h"
+
+#include <iostream>
+
+using namespace std;
+
+class  AbsFileFinder;
+
+/**
+	This class is the windows file searching implmentation used by this application
+*/
+class FileFinder : public AbsFileFinder {
+public:
+	FileFinder();
+	~FileFinder();
+
+private:
+
+	/** Return the set of matching paths after applying behaviors.
+	    Currently the only defined behaviors on windows are:
+		recurse_direction and max_depth
+		Both of these are implemented.
+	*/
+	StringVector* ProcessPathBehaviors(StringVector* paths, BehaviorVector* behaviors);
+
+	/** Return true if the specified path exists. */
+	bool PathExists(string path);
+
+	/** Return true if the specified file exists on the specifeid path. */
+	bool FileNameExists(string path, string fileName);
+
+	/** This function gets all file names that match a given pattern on the spaecified path.
+	    If a match is found the filename is pushed on to a vector of strings.
+	*/
+	void GetFilesForPattern(string path, string pattern, StringVector* fileNames, bool isRegex = true);
+
+	/** Search the file system for paths that match the provided regex.
+	    Attempt to break off a constant portion of the path to spead up searching. 
+	*/
+	void FindPaths(string regex, StringVector* paths, bool isRegex = true);
+
+	/** Get all fixed drives on the system. Return them in a string vector. */
+	StringVector* GetDrives();
+
+	/** This function gets all paths that match a given pattern.
+	  	It will not attempt to match any directory that starts with a period or
+	  	is named "System Volume Information". This is to avoid doing anything to the "." 
+	  	and ".." files or accessing restricted direcoties.  
+	  	This does call itself recursively as it must search all sub directories of dirIn.
+	  	If a match is found the path is pushed on to a vector of strings.
+	*/
+	void GetPathsForPattern(string dirIn, string pattern, StringVector* pathVector, bool isRegex = true);
+
+	/** Get the full path of all child directories as a StringVector. 
+	    The caller is responsible for deleting the StringVector* of child paths.
+	*/
+	StringVector* GetChildDirectories(string path);
+};
+
+#endif
\ No newline at end of file


Property changes on: trunk/ovaldi/src/windows/FileFinder.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/windows/ObjectCollector.cpp
===================================================================
--- trunk/ovaldi/src/windows/ObjectCollector.cpp	                        (rev 0)
+++ trunk/ovaldi/src/windows/ObjectCollector.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,78 @@
+//
+// $Id: ObjectCollector.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "ObjectCollector.h"
+
+//****************************************************************************************//
+//								DataCollector Class										  //	
+//****************************************************************************************//
+
+ObjectCollector::ObjectCollector() : AbsObjectCollector() {
+
+	AbsObjectCollector::instance = this;
+}
+
+ObjectCollector::~ObjectCollector() {
+
+	ProbeFactory::Shutdown();
+}
+
+// ***************************************************************************************	//
+//								Public members												//
+// ***************************************************************************************	//
+bool ObjectCollector::IsApplicable(AbsObject* object) {
+
+	bool isApplicable = false;
+
+	if(object->GetXmlns().find("windows") != string::npos) {
+		isApplicable = true;
+	} else if(object->GetXmlns().find("independent") != string::npos) {
+		isApplicable = true;
+	}
+
+	return isApplicable;
+}
+
+bool ObjectCollector::IsSupported(AbsObject* object) {
+	
+	bool isSupported = false;
+
+	if(ProbeFactory::GetProbe(object->GetName()) != NULL) {
+		isSupported = true;
+	}
+
+	return isSupported;
+}
+
+AbsProbe* ObjectCollector::GetProbe(Object* object) {
+
+	return ProbeFactory::GetProbe(object->GetName());
+}
\ No newline at end of file


Property changes on: trunk/ovaldi/src/windows/ObjectCollector.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/windows/ObjectCollector.h
===================================================================
--- trunk/ovaldi/src/windows/ObjectCollector.h	                        (rev 0)
+++ trunk/ovaldi/src/windows/ObjectCollector.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,77 @@
+//
+// $Id: ObjectCollector.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef OBJECTCOLLECTOR_H
+#define OBJECTCOLLECTOR_H
+
+#include <windows.h>
+#include <iphlpapi.h>
+#include <vector>
+
+//	include the parent class.
+#include "AbsObjectCollector.h"
+#include "ProbeFactory.h"
+
+
+//	namespaces
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	The object collector for windows definitions.
+*/
+class ObjectCollector : public AbsObjectCollector {
+public:
+
+	/** Initialize the instance of the oval object collector. */
+	ObjectCollector();
+
+	/** Destroy the object.
+		Shut down the ProbeFactory.
+	*/
+	~ObjectCollector();
+
+protected:
+	/** 
+		Return true if the input object is applicable on the host being evaluated.
+		Return true if the specified object is applicable to this object 
+		collector. All objects defined in the windows and independent schemas 
+		are applicable
+	*/
+	bool IsApplicable(AbsObject* object);
+	
+	
+	bool IsSupported(AbsObject* object);
+	
+	AbsProbe* GetProbe(Object* object);
+};
+
+#endif


Property changes on: trunk/ovaldi/src/windows/ObjectCollector.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/windows/ProbeFactory.cpp
===================================================================
--- trunk/ovaldi/src/windows/ProbeFactory.cpp	                        (rev 0)
+++ trunk/ovaldi/src/windows/ProbeFactory.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,148 @@
+//
+// $Id: ProbeFactory.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "ProbeFactory.h"
+
+// ***************************************************************************************	//
+//								 Public members												//
+// ***************************************************************************************	//
+AbsProbe* ProbeFactory::GetProbe(string objectName) {
+
+	AbsProbe* probe = NULL;
+
+// windows schema objects
+	if(objectName.compare("file_object") == 0) {
+		probe = FileProbe::Instance();
+	} else if(objectName.compare("registry_object") == 0) {
+		probe = RegistryProbe::Instance();
+	} else if(objectName.compare("activedirectory_object") == 0) {
+//		probe = ActiveDirectoryProbe::Instance();
+	} else if(objectName.compare("metabase_object") == 0) {
+//		probe = MetabaseProbe::Instance();
+	} else if(objectName.compare("wmi_object") == 0) {
+		probe = WMIProbe::Instance();
+	} else if(objectName.compare("passwordpolicy_object") == 0) {
+		probe = PasswordPolicyProbe::Instance();
+	} else if(objectName.compare("lockoutpolicy_object") == 0) {
+		probe = LockoutPolicyProbe::Instance();
+	} else if(objectName.compare("auditeventpolicy_object") == 0) {
+		probe = AuditEventPolicyProbe::Instance();
+	} else if(objectName.compare("sid_object") == 0) {
+		probe = SidProbe::Instance();
+	} else if(objectName.compare("fileeffectiverights_object") == 0) {
+		Log::Info("Version 5.3 of OVAL deprecated the fileeffectiverights_object");
+		probe = FileEffectiveRightsProbe::Instance();
+	} else if(objectName.compare("accesstoken_object") == 0) {
+		probe = AccessTokenProbe::Instance();
+	} else if(objectName.compare("group_object") == 0) {
+		probe = GroupProbe::Instance();
+	} else if(objectName.compare("user_object") == 0) {
+		probe = UserProbe::Instance();
+
+// independent schema objects
+	} else if(objectName.compare("family_object") == 0) {
+		probe = FamilyProbe::Instance();
+	} else if(objectName.compare("environmentvariable_object") == 0) {
+		probe = EnvironmentVariableProbe::Instance();
+	} else if(objectName.compare("variable_object") == 0) {
+		probe = VariableProbe::Instance();
+	} else if(objectName.compare("textfilecontent_object") == 0) {
+		probe = TextFileContentProbe::Instance();
+	} else if(objectName.compare("xmlfilecontent_object") == 0) {
+		probe = XmlFileContentProbe::Instance();
+	} else if(objectName.compare("filehash_object") == 0) {
+		probe = FileHashProbe::Instance();
+	} else if(objectName.compare("filemd5_object") == 0) {
+		probe = FileMd5Probe::Instance();
+	}	
+
+	return probe;
+}
+
+void ProbeFactory::Shutdown() {
+
+	AbsProbe* probe = NULL;
+
+	probe = FileProbe::Instance();
+	delete probe;
+
+	probe = RegistryProbe::Instance();
+	delete probe;
+
+//	probe = ActiveDirectoryProbe::Instance();
+//	delete probe;
+
+//	probe = MetabaseProbe::Instance();
+//	delete probe;
+
+	probe = AccessTokenProbe::Instance();
+	delete probe;
+
+	probe = WMIProbe::Instance();
+	delete probe;
+
+	probe = FamilyProbe::Instance();
+	delete probe;
+
+	probe = EnvironmentVariableProbe::Instance();
+	delete probe;
+
+	probe = VariableProbe::Instance();
+	delete probe;
+
+	probe = XmlFileContentProbe::Instance();
+	delete probe;
+
+	probe = FileMd5Probe::Instance();
+	delete probe;
+
+	probe = LockoutPolicyProbe::Instance();
+	delete probe;
+
+	probe = AuditEventPolicyProbe::Instance();
+	delete probe;
+
+	probe = SidProbe::Instance();
+	delete probe;
+
+	probe = GroupProbe::Instance();
+	delete probe;
+
+	probe = UserProbe::Instance();
+	delete probe;
+
+	probe = FileEffectiveRightsProbe::Instance();
+	delete probe;
+
+	probe = TextFileContentProbe::Instance();
+	delete probe;
+}
+


Property changes on: trunk/ovaldi/src/windows/ProbeFactory.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/windows/ProbeFactory.h
===================================================================
--- trunk/ovaldi/src/windows/ProbeFactory.h	                        (rev 0)
+++ trunk/ovaldi/src/windows/ProbeFactory.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,96 @@
+//
+// $Id: ProbeFactory.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef PROBEFACTORY_H
+#define PROBEFACTORY_H
+
+#include <string>
+#include <vector>
+#include <iostream>
+#include <stdlib.h>
+
+#include "AbsDataCollector.h"
+
+
+//	include the probe classes
+//#include "ActiveDirectoryProbe.h"
+#include "FileProbe.h"
+#include "FileMd5Probe.h"
+#include "FileHashProbe.h"
+#include "FamilyProbe.h"
+//#include "MetabaseKeyProbe.h"
+#include "RegistryProbe.h"
+#include "EnvironmentVariableProbe.h"
+//#include "RegistryEffectiveRightsProbe.h"
+#include "TextFileContentProbe.h"
+#include "XmlFileContentProbe.h"
+#include "VariableProbe.h"
+#include "WMIProbe.h"
+#include "PasswordPolicyProbe.h"
+#include "LockoutPolicyProbe.h"
+#include "AuditEventPolicyProbe.h"
+#include "SidProbe.h"
+#include "FileEffectiveRightsProbe.h"
+#include "AccessTokenProbe.h"
+#include "GroupProbe.h"
+#include "UserProbe.h"
+
+using namespace std;
+
+class AbsProbe;
+
+/**
+	This class is a Factory class for getting probes for an object in an oval definitions file. 
+	Each object defined in the oval definition schema has a corresponding probe for data collection. 
+	This class provides uniform access to all probes in the application, and is responsible for determining
+	which probe to associate with a given object.
+
+	Each supported platform should implement its own ProbeFactory that manages the probes for that platform.
+
+	All Probes are singlestons.
+*/
+class ProbeFactory {
+
+public:
+	/** \callgraph
+		Factory method. Based on the specifed object name return the appropriate probe.
+		@param objectName a string taht corresponds to the name of an object in the oval definition schema.
+		@return The probe for the specifed object or NULL.
+	*/
+	static AbsProbe* GetProbe(string objectName);
+
+	/** 
+		Shutdown the ProbeFactory.
+	*/
+	static void Shutdown();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/windows/ProbeFactory.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/windows/SystemInfo.cpp
===================================================================
--- trunk/ovaldi/src/windows/SystemInfo.cpp	                        (rev 0)
+++ trunk/ovaldi/src/windows/SystemInfo.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,658 @@
+//
+// $Id: SystemInfo.cpp 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "SystemInfo.h"
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~		Class SystemInfo		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+
+SystemInfo::SystemInfo() {
+	// -----------------------------------------------------------------------
+	//	ABSTRACT
+	//
+	//	Initialize data memebres
+	//
+	// -----------------------------------------------------------------------
+
+	os_name = "";
+	os_version = "";
+	architecture = "";
+	primary_host_name = "";
+	interfaces;
+}
+
+SystemInfo::~SystemInfo() {
+	// -----------------------------------------------------------------------
+	//	ABSTRACT
+	//
+	//	Delete all objects in the interfaces vector.
+	//
+	// -----------------------------------------------------------------------
+
+	IfData *tmp	= NULL;
+	while(interfaces.size() !=0) {
+
+		tmp = interfaces[interfaces.size()-1];
+		interfaces.pop_back();
+		delete tmp;
+		tmp = NULL;
+	}
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+
+void SystemInfo::Write(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *scDoc)
+{
+	//------------------------------------------------------------------------------------//
+	//
+	//  ABSTRACT
+	//
+	//	Write the system_info node to the sc file.
+	//------------------------------------------------------------------------------------//
+
+	//	Find the system_info node
+	DOMElement* sysInfoNode = XmlCommon::FindElement(scDoc, "system_info");
+
+	DOMElement* tmpElm = XmlCommon::CreateElement(scDoc, "os_name", os_name);
+	sysInfoNode->appendChild(tmpElm);
+
+	tmpElm = XmlCommon::CreateElement(scDoc, "os_version", os_version);
+	sysInfoNode->appendChild(tmpElm);
+
+	tmpElm = XmlCommon::CreateElement(scDoc, "architecture", architecture);
+	sysInfoNode->appendChild(tmpElm);
+
+	tmpElm = XmlCommon::CreateElement(scDoc, "primary_host_name", primary_host_name);
+	sysInfoNode->appendChild(tmpElm);
+
+	// Add the interfaces element and its children
+	DOMElement* interfacesElm = XmlCommon::CreateElement(scDoc, "interfaces");
+	sysInfoNode->appendChild(interfacesElm);
+
+	// Loop through contents of the interfaces vector and write each IfData objet
+	IfDataVector::iterator iterator;
+	for (iterator=interfaces.begin(); iterator!=interfaces.end(); iterator++) {
+
+		if((*iterator)->ipAddress.compare("127.0.0.1") != 0) { 
+			// Create a new interface element
+			DOMElement* interfaceElm = XmlCommon::CreateElement(scDoc, "interface");
+			interfacesElm->appendChild(interfaceElm);
+
+			// Add the childer to the inerface element
+			tmpElm = XmlCommon::CreateElement(scDoc, "interface_name", (*iterator)->ifName);
+			interfaceElm->appendChild(tmpElm);
+			
+			tmpElm = XmlCommon::CreateElement(scDoc, "ip_address", (*iterator)->ipAddress);
+			interfaceElm->appendChild(tmpElm);
+
+			tmpElm = XmlCommon::CreateElement(scDoc, "mac_address", (*iterator)->macAddress);
+			interfaceElm->appendChild(tmpElm);
+		}
+	}
+}
+
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~		 Class SystemInfoCollector		~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+
+SystemInfo* SystemInfoCollector::CollectSystemInfo()
+{
+	//------------------------------------------------------------------------------------//
+	//
+	//  ABSTRACT
+	//
+	//  Run the system info collector. Return a SystemInfo object. 
+	//
+	//------------------------------------------------------------------------------------//
+
+	SystemInfo *sysInfo = new SystemInfo();
+	SystemInfoCollector::GetOSInfo(sysInfo);
+	sysInfo->interfaces = SystemInfoCollector::GetInterfaces();
+
+	return sysInfo;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+
+void SystemInfoCollector::GetOSInfo(SystemInfo *sysInfo) {
+	//------------------------------------------------------------------------------------//
+	//
+	//  ABSTRACT
+	//
+	//  Get the OS name and version, the architecture, and the primary host name
+	//	for the system.
+	//
+	//------------------------------------------------------------------------------------/
+
+	//////////////////////////////////////////////////////////
+	////////////////	Get Archtecture	//////////////////////
+	//////////////////////////////////////////////////////////
+	// Make a call GetSystemInfo to get architecture
+	SYSTEM_INFO siSysInfo;
+	GetSystemInfo(&siSysInfo);
+	if(siSysInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_UNKNOWN) {
+		sysInfo->architecture = "unknown";
+
+	} else if(siSysInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL) {
+		sysInfo->architecture = "INTEL32";
+
+	} else if(siSysInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_IA64) {
+		sysInfo->architecture = "IA64";
+
+	} else if(siSysInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) {
+		sysInfo->architecture = "AMD64";
+	}
+
+
+	//////////////////////////////////////////////////////////
+	/////////////	Get os version and name	//////////////////
+	//////////////////////////////////////////////////////////
+	// Make a call to GetVersionEx() to get the version 
+	// information for the OS.
+	//
+	// Try calling GetVersionEx using the OSVERSIONINFOEX structure.
+	// If that fails, try using the OSVERSIONINFO structure.
+	OSVERSIONINFOEX osvi;
+	BOOL bOsVersionInfoEx;	// flag to indicate that the OSVERSIONINFOEX strucutre was used
+
+	ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
+	osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
+
+	if(!(bOsVersionInfoEx = GetVersionEx ((OSVERSIONINFO *) &osvi))) {
+
+		osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
+		
+		if (!GetVersionEx((OSVERSIONINFO*)&osvi)) {
+			sysInfo->os_name = "unknown";
+			sysInfo->os_version = "unknown";
+			return;
+		}
+	}
+	
+	// Allocate memory for that version number string
+	char *verNum = (char*)malloc(sizeof(char*)*16);
+	if(verNum == NULL) {
+		throw SystemInfoException("Error: Unable to allocate memeory while gathering Operating System information.");
+	}
+
+	switch (osvi.dwPlatformId) {
+
+		// Test for the Windows NT product family.
+		case VER_PLATFORM_WIN32_NT:
+
+			// Test for the specific product.
+			if(osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2) {
+				sysInfo->os_name = "Microsoft Windows Server 2003";	
+			} else if(osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1) {
+				sysInfo->os_name = "Microsoft Windows XP";
+			} else if(osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0) {
+				sysInfo->os_name = "Microsoft Windows 2000";
+			} else if(osvi.dwMajorVersion <= 4) {
+					sysInfo->os_name = "Microsoft Windows NT";
+			} else {
+				sysInfo->os_name = "unknown";
+			}
+
+
+			// Test for specific product on Windows NT 4.0 SP6 and later.
+			// using OSVERSIONINFOEX
+			if(bOsVersionInfoEx) {
+
+				// Test for the workstation type.
+				if(osvi.wProductType == VER_NT_WORKSTATION) {
+					if( osvi.dwMajorVersion == 4 ) {
+						sysInfo->os_name.append(" Workstation 4.0");
+					} else if(osvi.wSuiteMask & VER_SUITE_PERSONAL) {
+						sysInfo->os_name.append(" Home Edition");
+					} else {
+						sysInfo->os_name.append(" Professional");
+					}
+
+				// Test for the server type.
+				} else if(osvi.wProductType == VER_NT_SERVER || osvi.wProductType == VER_NT_DOMAIN_CONTROLLER) {
+				
+					if(osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2) {
+						
+						if(osvi.wSuiteMask & VER_SUITE_DATACENTER) {
+							sysInfo->os_name.append(" Datacenter Edition");
+						} else if(osvi.wSuiteMask & VER_SUITE_ENTERPRISE) {
+							sysInfo->os_name.append(" Enterprise Edition");
+						} else if (osvi.wSuiteMask == VER_SUITE_BLADE) {
+							sysInfo->os_name.append(" Web Edition");
+						} else {
+							sysInfo->os_name.append(" Standard Edition");
+						}
+					
+					} else if( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0 ) {
+						if(osvi.wSuiteMask & VER_SUITE_DATACENTER) {
+							sysInfo->os_name.append(" Datacenter Server");
+						} else if( osvi.wSuiteMask & VER_SUITE_ENTERPRISE) {
+							sysInfo->os_name.append(" Advanced Server");
+						} else {
+							sysInfo->os_name.append(" Server");
+						}
+					}
+
+				// Windows NT 4.0
+				} else {
+					if(osvi.wSuiteMask & VER_SUITE_ENTERPRISE) {
+						sysInfo->os_name.append(" Server 4.0, Enterprise Edition");
+					} else {
+						sysInfo->os_name.append(" Server 4.0");
+					}
+				}
+
+				// Get Version number
+				_itoa(osvi.dwMajorVersion, verNum, 10);
+				sysInfo->os_version = verNum;
+				ZeroMemory(verNum, sizeof(verNum));
+				_itoa(osvi.dwMinorVersion, verNum, 10);
+				sysInfo->os_version.append(".");
+				sysInfo->os_version.append(verNum);
+				ZeroMemory(verNum, sizeof(verNum));
+				_itoa(osvi.dwBuildNumber, verNum, 10);
+				sysInfo->os_version.append(".");
+				sysInfo->os_version.append(verNum);				
+				
+		
+			// Test for specific product on Windows NT 4.0 SP5 and earlier
+			// using OSVERSIONINFO
+			} else {  
+
+				HKEY hKey;
+				const int BUFSIZE = 80;
+				char szProductType[BUFSIZE];
+				DWORD dwBufLen=BUFSIZE;
+				LONG lRet;
+
+				lRet = RegOpenKeyEx( HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\ProductOptions", 0, KEY_QUERY_VALUE, &hKey );
+				if(lRet != ERROR_SUCCESS) {
+					sysInfo->os_name = "unknown";
+					sysInfo->os_version = "unknown";
+					break;
+				}
+
+				lRet = RegQueryValueEx( hKey, "ProductType", NULL, NULL, (LPBYTE) szProductType, &dwBufLen);
+				if((lRet != ERROR_SUCCESS) || (dwBufLen > BUFSIZE)) {
+					sysInfo->os_name = "unknown";
+					sysInfo->os_version = "unknown";
+					break;
+				}
+
+				RegCloseKey(hKey);
+
+				if(lstrcmpi( "WINNT", szProductType) == 0) {
+					sysInfo->os_name.append(" Workstation");
+				}else if(lstrcmpi( "LANMANNT", szProductType) == 0) {
+					sysInfo->os_name.append(" Server");
+				}else if(lstrcmpi( "SERVERNT", szProductType) == 0) {
+					sysInfo->os_name.append(" Advanced Server");
+				}
+
+				// Get Version number
+				_itoa(osvi.dwMajorVersion, verNum, 10);
+				sysInfo->os_version = verNum;
+				ZeroMemory(verNum, sizeof(verNum));
+				_itoa(osvi.dwMinorVersion, verNum, 10);
+				sysInfo->os_version.append(".");
+				sysInfo->os_version.append(verNum);
+			}
+
+			// Display service pack (if any) and build number.
+			if(osvi.dwMajorVersion == 4 && lstrcmpi(osvi.szCSDVersion, "Service Pack 6") == 0) {
+				HKEY hKey;
+				LONG lRet;
+
+				// Test for SP6 versus SP6a.
+				lRet = RegOpenKeyEx( HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Hotfix\\Q246009", 0, KEY_QUERY_VALUE, &hKey );
+				if(lRet == ERROR_SUCCESS) {
+					sysInfo->os_name.append(" Service Pack 6a");
+					
+				
+				// Windows NT 4.0 prior to SP6a
+				} else {
+					sysInfo->os_name.append(" ");
+					sysInfo->os_name.append(osvi.szCSDVersion);
+				}
+				RegCloseKey(hKey);
+
+				// Add the build number to the version string
+				sysInfo->os_version.append(".");
+				_itoa((osvi.dwBuildNumber & 0xFFFF), verNum, 10);
+				sysInfo->os_version.append(verNum);       
+			
+			// not Windows NT 4.0 
+			} else {
+				sysInfo->os_name.append(" ");
+				sysInfo->os_name.append(osvi.szCSDVersion);
+			}
+
+			break;
+
+		// Test for the Windows Me/98/95.
+		case VER_PLATFORM_WIN32_WINDOWS:
+
+			// Look for Win 95
+			if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 0) {
+				sysInfo->os_name = "Microsoft Windows 95";
+			}else if (osvi.szCSDVersion[1] == 'C' || osvi.szCSDVersion[1] == 'B') {
+				sysInfo->os_name.append(" OSR2");
+			} 
+
+			// Look for Win 98
+			if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 10) {
+				sysInfo->os_name = "Microsoft Windows 98";
+			
+				if (osvi.szCSDVersion[1] == 'A')
+					sysInfo->os_name.append(" SE");
+			} 
+
+			// Look for Win Me
+			if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 90) {
+				sysInfo->os_name = "Microsoft Windows Millennium Edition";
+			} 
+			
+			// Get Version number
+			_itoa(osvi.dwMajorVersion, verNum, 10);
+			sysInfo->os_version = verNum;
+			ZeroMemory(verNum, sizeof(verNum));
+			_itoa(osvi.dwMinorVersion, verNum, 10);
+			sysInfo->os_version.append(".");
+			sysInfo->os_version.append(verNum);
+			ZeroMemory(verNum, sizeof(verNum));
+			_itoa((osvi.dwBuildNumber & 0xFFFF), verNum, 10);
+			sysInfo->os_version.append(".");
+			sysInfo->os_version.append(verNum);
+
+			break;
+
+		case VER_PLATFORM_WIN32s:
+
+			sysInfo->os_name = "Microsoft Win32s";
+
+			// Get Version number
+			_itoa(osvi.dwMajorVersion, verNum, 10);
+			sysInfo->os_version = verNum;
+			ZeroMemory(verNum, sizeof(verNum));
+			_itoa(osvi.dwMinorVersion, verNum, 10);
+			sysInfo->os_version.append(".");
+			sysInfo->os_version.append(verNum);
+			ZeroMemory(verNum, sizeof(verNum));
+			_itoa((osvi.dwBuildNumber & 0xFFFF), verNum, 10);
+			sysInfo->os_version.append(".");
+			sysInfo->os_version.append(verNum);		
+
+			break;
+
+		default:
+			sysInfo->os_name = "unknown";
+			sysInfo->os_version = "unknown";
+			break;
+
+	} // end switch
+
+	free(verNum);
+
+	//////////////////////////////////////////////////////////
+	//////////	 Get fully qulaified host name	//////////////
+	//////////////////////////////////////////////////////////
+	
+	// NOTE: the gethostbyname() method is depricated. 
+	// This should be replaced with the new methods
+  
+	WORD version = MAKEWORD(2,2);
+	WSADATA wsaData;
+	
+	if(WSAStartup(version, &wsaData) != 0) {
+		sysInfo->primary_host_name = "unknown";	
+		throw SystemInfoException("Error: Unable to get hostname. Sockets could not be initialized.");
+	}
+
+	// Confirm that the WinSock DLL supports 2.2.  Note that if the DLL supports versions
+	// greater than 2.2 in addition to 2.2, it will still return 2.2 in wVersion since that
+	// is the version we requested.
+	if (LOBYTE(wsaData.wVersion) != 2 || HIBYTE(wsaData.wVersion) != 2 ) {
+		sysInfo->primary_host_name = "unknown";	
+		WSACleanup();
+		throw SystemInfoException("Error: Unable to get hostname. Could not find a usable version of the WinSock DLL.");
+	}
+
+	// First get the host name
+	char *host_name;
+	int size = 256;
+	host_name = (char*)malloc(sizeof(char*)*size);
+	if(host_name == NULL) {
+		sysInfo->primary_host_name = "unknown";	
+		throw SystemInfoException("Error: Unable to allocate memeory while gathering Operating System information.");
+	}
+
+	int ret = gethostname(host_name, size);
+	if (ret != 0) {
+		ret =  WSAGetLastError();
+	
+		sysInfo->primary_host_name = "unknown";	
+		//throw SystemInfoException("Error: Unable to get hostname,");
+
+	} else {
+		// next get the fully qualified host name
+		hostent *remoteHost;
+		remoteHost = gethostbyname(host_name);
+		if(remoteHost == NULL) {
+			sysInfo->primary_host_name = "unknown";	
+			//throw SystemInfoException("Error: Unable to get hostname,");
+		} else {
+			sysInfo->primary_host_name = remoteHost->h_name;	
+		}
+	}
+
+	free(host_name);
+}
+
+IfDataVector SystemInfoCollector::GetInterfaces() {
+	//------------------------------------------------------------------------------------//
+	//
+	//  ABSTRACT
+	//
+	//  Create a vector of IfData object that will represent all the available
+	//	interfaces on the system.
+	//
+	//	Must get interface_name, ip_address, and mac_address for each interface
+	//------------------------------------------------------------------------------------//
+
+	IfDataVector interfaces;
+
+
+	PMIB_IPADDRTABLE pIPAddrTable;
+	DWORD dwSize = 0;
+	pIPAddrTable = (MIB_IPADDRTABLE*) malloc( sizeof( MIB_IPADDRTABLE) );
+	if(pIPAddrTable == NULL) {
+		throw SystemInfoException("Error: Unable to allocate memeory while gathering interface information.");
+	}
+
+	// First call to GetIpAddrTable to get the required size
+	if (GetIpAddrTable(pIPAddrTable, &dwSize, 0) == ERROR_INSUFFICIENT_BUFFER) {
+		free(pIPAddrTable);
+		pIPAddrTable = (MIB_IPADDRTABLE *) malloc ( dwSize );
+	}
+
+	// Make a second call to GetIpAddrTable to get the
+	// actual data we want
+	if (GetIpAddrTable(pIPAddrTable, &dwSize, 0) == NO_ERROR) { 
+
+		// Now loop through the entries in the table to get the available interfaces.
+		unsigned int index = 0; 
+		while(index < pIPAddrTable->dwNumEntries) {
+			IfData *curIf = new IfData();
+
+			// Convert the ip adddress to a string
+			in_addr addr;
+			addr.S_un.S_addr = pIPAddrTable->table[index].dwAddr;
+			curIf->ipAddress = inet_ntoa(addr);
+
+
+			// next get the interface name and mac address by calling GetIfEntry
+			// with the specified interface index of this addr
+			// Declare and initialize variables.
+			PMIB_IFROW pMibIfRow;
+			DWORD dwSize = 0;
+			DWORD dwRetVal = 0;
+
+			// Allocate memory for our pointers.
+			pMibIfRow = (MIB_IFROW*) malloc(sizeof(MIB_IFROW));
+			// Set index to the current index
+			pMibIfRow->dwIndex = pIPAddrTable->table[index].dwIndex;
+			
+			if (GetIfEntry(pMibIfRow) == NO_ERROR) {
+				
+				// Get interface name
+				//
+				// TODO:
+				// I think the correct place to look for the interface name is to 
+				// look at the value of pMibIfRow->wszName. However, when I inspect
+				// this variable's value it appears to be unused. I have been unable
+				// to find any samples of this value being successfully used.
+				//
+				// For now I have decided to use the value of the description as the 
+				// name for an interface. I will leave a chunk of code commented out
+				// below taht should be capable of retreiving the interface name.
+				//
+				//
+				
+				/*
+				// This is a consise convertion of the name
+				int ifNameLen = wcslen(pMibIfRow->wszName);
+				char *charIfName = (char*)malloc(ifNameLen + 1);
+				memset(charIfName, 0, ifNameLen + 1);
+				if(wcstombs(charIfName, pMibIfRow->wszName, ifNameLen) == (size_t)-1) {
+					curIf->ifName = "unknown";
+				} else {
+					curIf->ifName = charIfName;
+				}
+					
+				// here is a more verbose conversion.
+				char a[2] = "j";
+				int ret = WideCharToMultiByte(CP_ACP, WC_NO_BEST_FIT_CHARS, pMibIfRow->wszName, ifNameLen, charIfName, ifNameLen, a, NULL);
+				cout << "ret " << ret << endl;
+				if (ret == 0) {
+					DWORD err = GetLastError();
+						switch(err) {
+					case ERROR_INSUFFICIENT_BUFFER:
+						cout << "1" << endl;
+						break;
+					case ERROR_INVALID_FLAGS:
+						cout << "2" << endl;
+						break;
+					case ERROR_INVALID_PARAMETER:
+						cout << "3" << endl;
+						break;
+
+					default:
+						cout << "what?" << endl;
+						break;
+					}	
+				}
+
+  
+				// Cleanup
+				free(charIfName);
+				*/
+
+				// Here I am using the description value as the name
+				char *descStr = (char*)malloc(pMibIfRow->dwDescrLen+1);
+				ZeroMemory(descStr, sizeof(descStr));
+				if(descStr == NULL) {
+					throw SystemInfoException("Error: Unable to allocate memeory while gathering interface information.");
+				}
+				for (unsigned int j=0;j<pMibIfRow->dwDescrLen;j++) {
+					descStr[j] = (char)pMibIfRow->bDescr[j];
+					//sprintf(&descStr[j],"%s",pMibIfRow->bDescr[j]);
+				}
+				curIf->ifName = descStr;
+				free(descStr);
+
+
+				// Format MAC Address
+				char *macStr = (char*)malloc(sizeof(char*)*30);
+				ZeroMemory(macStr, sizeof(macStr));
+				if(macStr == NULL) {
+					throw SystemInfoException("Error: Unable to allocate memeory while gathering interface information.");
+				}
+				for (unsigned int i=0;i<pMibIfRow->dwPhysAddrLen;i++) {
+					sprintf(&macStr[i*3],"%02X-",pMibIfRow->bPhysAddr[i]);
+				}
+				curIf->macAddress = macStr;
+				curIf->macAddress = curIf->macAddress.substr(0, curIf->macAddress.length()-1);
+				free(macStr);
+
+			} else {
+
+				curIf->ifName = "unknown";
+				curIf->macAddress = "unknown";
+			}
+			free(pMibIfRow);
+			
+			interfaces.push_back(curIf);
+			index ++;
+		}
+		
+		free(pIPAddrTable);
+
+	} else {
+		free(pIPAddrTable);
+		throw SystemInfoException("Error: Call to GetIpAddrTable failed. Unable to get interfaces information.");
+	}
+
+	
+	return interfaces;
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~  Class SystemInfoException  ~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+SystemInfoException::SystemInfoException(string errMsgIn, int severity, Exception* ex) : Exception(errMsgIn, severity, ex) {
+	// Set the error message and then set the severity to ERROR_FATAL. This is done with
+	// the explicit call to the Exception class constructor that takes a single string
+	// param.
+}
+
+SystemInfoException::~SystemInfoException() {
+	// Do nothing for now
+}


Property changes on: trunk/ovaldi/src/windows/SystemInfo.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/windows/SystemInfo.h
===================================================================
--- trunk/ovaldi/src/windows/SystemInfo.h	                        (rev 0)
+++ trunk/ovaldi/src/windows/SystemInfo.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,130 @@
+//
+// $Id: SystemInfo.h 4579 2008-01-02 17:39:07Z bakerj $
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef SYSTEMINFO_H
+#define SYSTEMINFO_H
+
+#pragma warning(disable:4786)
+
+//	required xerces includes
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/DOMAttr.hpp>
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xercesc/dom/DOMNodeList.hpp>
+#include <xercesc/util/XMLString.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/parsers/AbstractDOMParser.hpp>
+
+#include "XmlCommon.h"
+#include "Common.h"
+#include "Exception.h"
+#include "Log.h"
+
+#include <iostream>
+#include <string>
+#include <vector>
+
+//#undef _MAC	// This is a bit messy. windows.h includes winsock.h if _MAC is defined. this causes a conflict with winsock2.h
+
+//#include "winsock2.h"
+#ifndef _INC_WINDOWS
+#include <windows.h>
+#endif
+//#include "Ws2tcpip.h"
+#include "Iphlpapi.h"
+
+//#define _MAC // see note above
+
+XERCES_CPP_NAMESPACE_USE
+using namespace std;
+
+/**
+	This class stores interface infocmetion as strings.
+	the interface name, mac address and ip address are stored.
+*/
+class IfData {
+public:
+	IfData(){};
+	~IfData(){};
+	IfData(string ifn, string ipAddr, string macAddr) : ifName(ifn), ipAddress(ipAddr), macAddress(macAddr) {}
+
+	string ifName;
+	string ipAddress;
+	string macAddress;
+};
+
+/**	
+	A vector for storing interface data dobjects. 
+	Stores only pointers to the objects. 
+*/
+typedef vector < IfData*, allocator<IfData*> > IfDataVector;
+
+/**
+	This class stores system info as defined in the oval system characteristics schema.
+	A write method is provide for writing out the system infor element as defined in the oval 
+	system characteristics schema.
+*/
+class SystemInfo {
+
+public:
+	SystemInfo();
+	~SystemInfo();
+	void Write(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *scDoc);
+		
+	string os_name;
+	string os_version;
+	string architecture;
+	string primary_host_name;
+	IfDataVector interfaces;
+};
+
+/**
+	This class is responsible for collecting system information.
+*/
+class SystemInfoCollector {
+	public:
+		static SystemInfo* CollectSystemInfo();
+		
+	private:
+		static void GetOSInfo(SystemInfo*);
+		static IfDataVector GetInterfaces();
+};
+
+/** 
+	This class represents an Exception that occured while collecting system info.
+*/
+class SystemInfoException : public Exception {
+	public:
+		SystemInfoException(string errMsgIn = "", int severity = ERROR_FATAL, Exception* ex = NULL);
+		~SystemInfoException();
+};
+
+#endif


Property changes on: trunk/ovaldi/src/windows/SystemInfo.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/windows/WindowsCommon.cpp
===================================================================
--- trunk/ovaldi/src/windows/WindowsCommon.cpp	                        (rev 0)
+++ trunk/ovaldi/src/windows/WindowsCommon.cpp	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,1065 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#include "WindowsCommon.h"
+
+StringVector* WindowsCommon::allTrusteeNames = NULL;
+StringVector* WindowsCommon::wellKnownTrusteeNames = NULL;
+
+bool WindowsCommon::DisableAllPrivileges() {
+
+	HANDLE hToken = NULL;
+
+	// Get a handle to the current process.
+
+	if (OpenProcessToken(GetCurrentProcess(),						// handle to the process
+						 TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY,		// requested access types 
+						 &hToken) == FALSE)							// new access token 
+	{
+		char buffer[33];
+		_itoa(GetLastError(), buffer, 10);
+
+		string errorMessage = "";
+		errorMessage.append("\nERROR: Unable to get a handle to the current process.  Error # - ");
+		errorMessage.append(buffer);
+		errorMessage.append("\n");
+		cerr << errorMessage;
+		Log::Fatal(errorMessage);
+
+		return false;
+	}
+
+	// Disable all the privileges for this token.
+
+	if (AdjustTokenPrivileges(hToken,					// handle to token
+							  TRUE,						// disabling option
+							  NULL,						// privilege information
+							  0,						// size of buffer
+							  NULL,						// original state buffer
+							  NULL) == FALSE)			// required buffer size
+	{
+		char buffer[33];
+		_itoa(GetLastError(), buffer, 10);
+
+		string errorMessage = "";
+		errorMessage.append("\nERROR: Unable to disable token privileges.  Error # - ");
+		errorMessage.append(buffer);
+		errorMessage.append("\n");
+		cerr << errorMessage;
+		Log::Fatal(errorMessage);
+
+		CloseHandle(hToken);
+		return false;
+	}
+
+	CloseHandle(hToken);
+
+	return true;
+}
+
+bool WindowsCommon::EnablePrivilege(string privilegeIn) {
+
+	TOKEN_PRIVILEGES tp;
+	HANDLE hProcess = NULL;
+	HANDLE hAccessToken = NULL;
+
+	hProcess = GetCurrentProcess();
+
+	if(!OpenProcessToken(hProcess,									// handle to the process
+						(TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES),	// requested access types 
+						&hAccessToken) == FALSE)					// new access token 
+	{
+		return false;
+	}
+
+	tp.PrivilegeCount = 1;
+    tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
+    
+	if (LookupPrivilegeValue(NULL, privilegeIn.c_str(), &tp.Privileges[0].Luid) == 0)
+	{
+		return false;
+	}
+
+	if (AdjustTokenPrivileges(hAccessToken, FALSE, &tp, NULL, NULL, NULL) == 0)
+	{
+		return false;
+	}
+	 
+	if(GetLastError() == ERROR_NOT_ALL_ASSIGNED)
+	{
+		// The token for the current process does not have the privilege specified. The
+		// AdjustTokenPrivileges() function may succeed with this error value even if no
+		// privileges were adjusted.  The privilege parameter can specify privileges that
+		// the token does not have, without causing the function to fail. In this case, 
+		// the function adjusts the privileges that the token does have and ignores the 
+		// other privileges so that the function succeeds.
+
+		CloseHandle(hAccessToken);
+		return false;
+	}
+	else
+	{
+		CloseHandle(hAccessToken);
+		return true;
+	}
+}
+
+string WindowsCommon::GetErrorMessage(DWORD dwLastError) {
+
+	string errMsg = "";
+
+    HMODULE hModule = NULL; // default to system source
+    LPSTR MessageBuffer;
+    DWORD dwBufferLength;
+
+    DWORD dwFormatFlags = FORMAT_MESSAGE_ALLOCATE_BUFFER |
+        FORMAT_MESSAGE_IGNORE_INSERTS |
+        FORMAT_MESSAGE_FROM_SYSTEM ;
+
+    //
+    // If dwLastError is in the network range, 
+    //  load the message source.
+    //
+    if(dwLastError >= NERR_BASE && dwLastError <= MAX_NERR) {
+        hModule = LoadLibraryEx(
+            TEXT("netmsg.dll"),
+            NULL,
+            LOAD_LIBRARY_AS_DATAFILE
+            );
+
+        if(hModule != NULL)
+            dwFormatFlags |= FORMAT_MESSAGE_FROM_HMODULE;
+    }
+
+    //
+    // Call FormatMessage() to allow for message 
+    //  text to be acquired from the system 
+    //  or from the supplied module handle.
+    //
+    if(dwBufferLength = FormatMessageA(dwFormatFlags,
+										hModule, // module to get message from (NULL == system)
+										dwLastError,
+										MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // default language
+										(LPSTR) &MessageBuffer,
+										0,
+										NULL
+										))
+    {
+		errMsg = MessageBuffer;
+        //
+        // Free the buffer allocated by the system.
+        //
+        LocalFree(MessageBuffer);
+    }
+
+    //
+    // If we loaded a message source, unload it.
+    //
+    if(hModule != NULL)
+        FreeLibrary(hModule);
+
+	return errMsg;
+}
+
+bool WindowsCommon::GetTextualSid(PSID pSid, LPTSTR* TextualSid) { 
+	//------------------------------------------------------------------------------------//
+	//
+	//  ABSTRACT
+	//
+	//  A SID value includes components that provide information about the SID structure
+	//  and components that uniquely identify a trustee. A SID consists of the following
+	//  components: 
+	//
+	//   * The revision level of the SID structure 
+	//   * A 48-bit identifier authority value that identifies the authority that issued
+	//     the SID 
+	//   * A variable number of subauthority or relative identifier (RID) values that
+	//     uniquely identify the trustee relative to the authority that issued the SID
+	//
+	//  The combination of the identifier authority value and the subauthority values
+	//  ensures that no two SIDs will be the same, even if two different SID-issuing
+	//  authorities issue the same combination of RID values. Each SID-issuing authority
+	//  issues a given RID only once. 
+	//
+	//  SIDs are stored in binary format in a SID structure. To display a SID, you can
+	//  call the ConvertSidToStringSid function to convert a binary SID to string format.
+	//  To convert a SID string back to a valid, functional SID, call the
+	//  ConvertStringSidToSid function. 
+	//
+	//  These functions use the following standardized string notation for SIDs, which
+	//  makes it simpler to visualize their components: 
+	//
+	//  S-R-I-S-S...
+	//
+	//  In this notation, the literal character S identifies the series of digits as a
+	//  SID, R is the revision level, I is the identifier-authority value, and S... is one
+	//  or more subauthority values. 
+	//
+	//  NOTE:
+	//
+	//  Windows 2000 provides the ConvertSidToStringSid and ConvertStringSidToSid functions
+	//  for converting a SID to and from string format. For a description of the SID string
+	//  format, see SID Components.
+	//
+	//  On earlier versions of Windows NT, use the following sample code to convert a SID
+	//  to string format.
+	//
+	//------------------------------------------------------------------------------------//
+
+    PSID_IDENTIFIER_AUTHORITY psia;
+    DWORD dwSubAuthorities;
+    DWORD dwSidRev = SID_REVISION;
+    DWORD dwCounter;
+    DWORD dwSidSize;
+
+    // Validate the binary SID.
+
+	if(!IsValidSid(pSid)) return false;
+
+    // Get the identifier authority value from the SID.
+	
+	psia = GetSidIdentifierAuthority(pSid);
+
+	// Get the number of subauthorities in the SID.
+
+    dwSubAuthorities = *GetSidSubAuthorityCount(pSid);
+
+    // compute buffer length
+    // S-SID_REVISION- + identifierauthority- + subauthorities- + NULL
+
+    dwSidSize=(15 + 12 + (12 * dwSubAuthorities) + 1) * sizeof(TCHAR);
+
+    // allocate memory
+ 
+	*TextualSid = (LPTSTR)malloc(dwSidSize);
+	if(*TextualSid == NULL)
+	{
+		return false;
+	}
+
+    // Add 'S' prefix and revision number to the string.
+
+    dwSidSize = wsprintf(*TextualSid, TEXT("S-%lu-"), dwSidRev);
+
+    // Add SID identifier authority to the string.
+ 
+    if ((psia->Value[0] != 0) || (psia->Value[1] != 0))
+    {
+        dwSidSize += wsprintf(*TextualSid + lstrlen(*TextualSid),
+							  TEXT("0x%02hx%02hx%02hx%02hx%02hx%02hx"),
+							  (USHORT)psia->Value[0],
+							  (USHORT)psia->Value[1],
+							  (USHORT)psia->Value[2],
+							  (USHORT)psia->Value[3],
+							  (USHORT)psia->Value[4],
+							  (USHORT)psia->Value[5]);
+    }
+    else
+    {
+        dwSidSize += wsprintf(*TextualSid + lstrlen(*TextualSid),
+							  TEXT("%lu"),
+							  (ULONG)(psia->Value[5]) +
+							  (ULONG)(psia->Value[4] << 8) +
+							  (ULONG)(psia->Value[3] << 16) +
+							  (ULONG)(psia->Value[2] << 24));
+    }
+
+    // Loop through SidSubAuthorities and add them to the string.
+
+    for (dwCounter=0; dwCounter<dwSubAuthorities; dwCounter++)
+    {
+        dwSidSize += wsprintf(*TextualSid + dwSidSize,
+							  TEXT("-%lu"),
+			                  *GetSidSubAuthority(pSid, dwCounter));
+    }
+
+    return true;
+}
+
+bool WindowsCommon::ExpandGroup(string groupName, StringVector* members) {
+
+	// Need to determine if a local or global group.
+	bool groupExists = false;
+	groupExists = WindowsCommon::GetLocalGroupMembers(groupName, members);
+	if(!groupExists)
+		groupExists = WindowsCommon::GetGlobalGroupMembers(groupName, members);	
+		
+	return groupExists;
+}
+
+StringVector* WindowsCommon::GetAllGroups() {
+
+	StringVector* groups = WindowsCommon::GetAllLocalGroups();
+	StringVector* globalGroups = WindowsCommon::GetAllLocalGroups();
+	StringVector::iterator iterator;
+	for(iterator = globalGroups->begin(); iterator != globalGroups->end(); iterator++) {
+		groups->push_back((*iterator));
+	}
+
+    return groups;
+}
+
+bool WindowsCommon::GetLocalGroupMembers(string groupName, StringVector* members) {
+	
+	bool groupExists = false;
+
+	NET_API_STATUS  res;
+	LPCWSTR localgroupname;
+	LPBYTE bufptr = NULL;
+	DWORD entriesread;
+	DWORD totalentries;
+	LOCALGROUP_MEMBERS_INFO_0* userInfo;
+
+	// convert groupName for api use
+	wchar_t* wGroupName = NULL;
+	size_t size = mbstowcs(NULL, groupName.c_str(), groupName.length()) + 1;
+	wGroupName = new wchar_t[size];
+	mbstowcs(wGroupName, groupName.c_str(), groupName.size() + 1 );
+	localgroupname = wGroupName;
+
+	res = NetLocalGroupGetMembers(NULL,					// server name NULL == localhost
+								localgroupname,			// group name
+  								0,						// level LOCALGROUP_MEMBERS_INFO_3
+								(unsigned char**) &userInfo,
+								MAX_PREFERRED_LENGTH,
+								&entriesread,
+								&totalentries,
+								NULL);
+
+	// was there an error?
+	if(res == NERR_Success) {
+
+			// Loop through each user.
+			for (unsigned int i=0; i<entriesread; i++) {
+
+				// get sid
+				PSID pSid = userInfo[i].lgrmi0_sid;
+				try {
+					string userName = WindowsCommon::GetFormattedTrusteeName(pSid);
+					members->push_back(userName);
+				} catch (Exception ex) {
+					Log::Info("Unable to get all group memebrs." + ex.GetErrorMessage());
+				}
+			}
+
+			groupExists = true;
+
+	} else {
+		if(res == NERR_InvalidComputer) {
+			// throw this error
+			throw Exception("Unable to expand local group: " + groupName + ". The computer name is invalid.");
+		} else if(res == ERROR_MORE_DATA) {
+			// throw this error
+			throw Exception("Unable to expand local group: " + groupName + ". More entries are available. Specify a large enough buffer to receive all entries. This error message should never occure since the api call is made with MAX_PREFERRED_LENGTH for the size of the buffer.");
+		} else if(res == ERROR_NO_SUCH_ALIAS || res == NERR_GroupNotFound) {
+			// ignore this error
+			//cout << "The specified local group " + groupName + " does not exist." << endl;
+		} else if(res == ERROR_ACCESS_DENIED) {
+			// throw this error???
+			throw Exception("Unable to expand local group: " + groupName + ". " + " The user does not have access to the requested information.");
+		} else {
+			throw Exception("Unable to expand local group: " + groupName + ". " + WindowsCommon::GetErrorMessage(res));
+		}
+	}
+
+	NetApiBufferFree(bufptr);
+
+	return groupExists;
+}
+
+bool WindowsCommon::GetGlobalGroupMembers(string groupName, StringVector* members) {
+
+	bool groupExists = false;
+	NET_API_STATUS  res;
+	LPCWSTR globalgroupname;
+	LPBYTE bufptr = NULL;
+	DWORD entriesread;
+	DWORD totalentries;
+	GROUP_USERS_INFO_0* userInfo; 
+
+	// convert groupName for api use
+	wchar_t* wGroupName = NULL;
+	size_t size = mbstowcs(NULL, groupName.c_str(), groupName.length()) + 1;
+	wGroupName = new wchar_t[size];
+	mbstowcs(wGroupName, groupName.c_str(), groupName.size() + 1 );
+	globalgroupname = wGroupName;
+
+	res = NetGroupGetUsers(NULL,					// server name NULL == localhost
+						globalgroupname,			// group name
+  						0,							// level LOCALGROUP_MEMBERS_INFO_3
+						(unsigned char**) &userInfo,
+						MAX_PREFERRED_LENGTH,
+						&entriesread,
+						&totalentries,
+						NULL);
+
+	// was there an error?
+	if(res == NERR_Success) {
+
+			char tmpUserName[512];
+
+			// Loop through each user.
+			for (unsigned int i=0; i<entriesread; i++) {
+				ZeroMemory(tmpUserName, 21);
+				_snprintf(tmpUserName, sizeof(tmpUserName) - 1, "%S", userInfo[i].grui0_name);
+				tmpUserName[sizeof(tmpUserName)-1] = '\0';
+
+				// Get the account information.
+				string userName = tmpUserName;
+
+				// get sid for trustee name
+				PSID pSid = WindowsCommon::GetSIDForTrusteeName(userName);
+				// get formatted trustee name
+				userName = WindowsCommon::GetFormattedTrusteeName(pSid);
+				members->push_back(userName);
+			}
+			groupExists = true;
+
+	} else {
+		if(res == NERR_InvalidComputer) {
+			// throw this error
+			throw Exception("Unable to expand global group: " + groupName + ". The computer name is invalid.");
+		} else if(res == ERROR_MORE_DATA) {
+			// throw this error
+			throw Exception("Unable to expand global group: " + groupName + ". More entries are available. Specify a large enough buffer to receive all entries. This error message should never occure since the api call is made with MAX_PREFERRED_LENGTH for the size of the buffer.");
+		} else if(res == NERR_GroupNotFound) {
+			groupExists = false;
+			// no action here
+			//cout << "The global group name: " + groupName + " could not be found." << endl;			
+		} else if(res == ERROR_ACCESS_DENIED) {
+			// throw this error???
+			throw Exception("Unable to expand global group: " + groupName + ". The user does not have access to the requested information.");
+		} else {
+			throw Exception("Unable to expand global group: " + groupName + ". " + WindowsCommon::GetErrorMessage(res));
+		}
+	}
+
+	NetApiBufferFree(bufptr);
+
+	return groupExists;
+}
+
+StringVector* WindowsCommon::GetAllTrusteeNames() {
+
+	if(WindowsCommon::allTrusteeNames == NULL) {
+		WindowsCommon::allTrusteeNames = new StringVector();
+
+		UniqueStringVector* usv = new UniqueStringVector(allTrusteeNames);
+
+		// get the well know trustee names
+		WindowsCommon::GetWellKnownTrusteeNames();
+		StringVector::iterator iterator;
+		for(iterator = WindowsCommon::wellKnownTrusteeNames->begin(); iterator != WindowsCommon::wellKnownTrusteeNames->end(); iterator++) {
+			usv->Append((*iterator));
+		}
+
+		WindowsCommon::GetAllLocalUsers(usv);
+
+		// local groups
+		StringVector* localGroups = WindowsCommon::GetAllLocalGroups();
+		for(iterator = localGroups->begin(); iterator != localGroups->end(); iterator++) {
+			usv->Append((*iterator));
+			// expand the group
+			try {
+				StringVector* members = new StringVector();
+				WindowsCommon::GetLocalGroupMembers((*iterator), members);
+				StringVector::iterator member;
+				for(member = members->begin(); member != members->end(); member++) {
+					usv->Append((*member));
+				}				
+				delete members;
+			} catch(Exception ex) {
+				Log::Debug(ex.GetErrorMessage());
+			}
+		}
+		delete localGroups;
+
+		// global groups
+		StringVector* globalGroups = WindowsCommon::GetAllGlobalGroups();
+		for(iterator = globalGroups->begin(); iterator != globalGroups->end(); iterator++) {
+			usv->Append((*iterator));
+			// expand the group
+			try {
+				StringVector* members = new StringVector();
+				WindowsCommon::GetGlobalGroupMembers((*iterator), allTrusteeNames);
+				StringVector::iterator member;
+				for(member = members->begin(); member != members->end(); member++) {
+					usv->Append((*member));
+				}				
+				delete members;
+
+			} catch(Exception ex) {
+				Log::Debug(ex.GetErrorMessage());
+			}
+		}
+		delete globalGroups;
+
+		// get the system's trustee name
+		string systemName = WindowsCommon::LookUpLocalSystemName();
+		usv->Append(systemName);
+	}
+
+	return WindowsCommon::allTrusteeNames;
+}
+
+void WindowsCommon::GetWellKnownTrusteeNames() {
+
+	if(WindowsCommon::wellKnownTrusteeNames == NULL) {
+		WindowsCommon::wellKnownTrusteeNames = new StringVector();
+
+		// create a vector of the well known sids
+		StringVector wellKnownSids;
+		//wellKnownSids.push_back("S-1-0");			// Null Authority
+		wellKnownSids.push_back("S-1-0-0");			// Nobody
+		//wellKnownSids.push_back("S-1-1");			// World Authority
+		wellKnownSids.push_back("S-1-1-0");			// Everyone
+		//wellKnownSids.push_back("S-1-2");			// Local Authority
+		//wellKnownSids.push_back("S-1-3");			// Creator Authority
+		wellKnownSids.push_back("S-1-3-0");			// Creator Owner
+		wellKnownSids.push_back("S-1-3-1");			// Creator Group
+		wellKnownSids.push_back("S-1-3-2");			// Creator Owner Server
+		wellKnownSids.push_back("S-1-3-3");			// Creator Group Server
+		//wellKnownSids.push_back("S-1-4");			// Non-unique Authority
+		//wellKnownSids.push_back("S-1-5");			// NT Authority
+		wellKnownSids.push_back("S-1-5-1");			// Dialup
+		wellKnownSids.push_back("S-1-5-2");			// Network
+		wellKnownSids.push_back("S-1-5-3");			// Batch
+		wellKnownSids.push_back("S-1-5-4");			// Interactive
+		wellKnownSids.push_back("S-1-5-6");			// Service
+		wellKnownSids.push_back("S-1-5-7");			// Anonymous
+		wellKnownSids.push_back("S-1-5-8");			// Proxy
+		wellKnownSids.push_back("S-1-5-9");			// Enterprise Domain Controllers
+		wellKnownSids.push_back("S-1-5-11");		// Authenticated Users
+		wellKnownSids.push_back("S-1-5-13");		// Terminal Server Users
+		wellKnownSids.push_back("S-1-5-18");		// Local System
+		wellKnownSids.push_back("S-1-5-19");		// NT Authority - local service
+		wellKnownSids.push_back("S-1-5-20");		// NT Authority - network service
+		wellKnownSids.push_back("S-1-5-32-544");	// Administrators
+		wellKnownSids.push_back("S-1-5-32-545");	// Users
+		wellKnownSids.push_back("S-1-5-32-546");	// Guests
+		wellKnownSids.push_back("S-1-5-32-547");	// Power Users
+		//wellKnownSids.push_back("S-1-5-32-548");	// Account Operators
+		//wellKnownSids.push_back("S-1-5-32-549");	// Server Operators
+		//wellKnownSids.push_back("S-1-5-32-550");	// Print Operators
+		wellKnownSids.push_back("S-1-5-32-551");	// Backup Operators
+		wellKnownSids.push_back("S-1-5-32-552");	// Replicators
+
+
+		// look up account names for all the sids
+		StringVector::iterator iterator;
+		for(iterator = wellKnownSids.begin(); iterator != wellKnownSids.end(); iterator++) {
+			string currentSidStr = (*iterator);
+			PSID psid = NULL;
+			if(!ConvertStringSidToSid(const_cast<char*>(currentSidStr.c_str()), &psid)) {
+				Log::Debug("Error converting sid string (" + currentSidStr +") to SID. " + WindowsCommon::GetErrorMessage(GetLastError()));
+			} else {
+			
+				string trusteeName = WindowsCommon::GetFormattedTrusteeName(psid);	
+				WindowsCommon::wellKnownTrusteeNames->push_back(trusteeName);
+			}
+
+			LocalFree(psid);
+		}
+	}
+}
+
+StringVector* WindowsCommon::GetAllLocalGroups() {
+
+	StringVector* allGroups = new StringVector();
+
+	NTSTATUS nts;
+	LOCALGROUP_INFO_0* localGroupInfo = NULL;
+	NET_API_STATUS nas;
+    DWORD recordsEnumerated = 0;
+    DWORD totalRecords = 0;
+
+	// Get a handle to the policy object.
+	LSA_HANDLE polHandle;
+	LSA_OBJECT_ATTRIBUTES ObjectAttributes;
+
+	ZeroMemory(&ObjectAttributes, sizeof(ObjectAttributes));
+
+	nts = LsaOpenPolicy(NULL, &ObjectAttributes, POLICY_LOOKUP_NAMES, &polHandle);
+	if (nts != ERROR_SUCCESS) {
+		string errorMessage = "";
+		errorMessage.append("Error unable to open a handle to the Policy object.");
+		Log::Debug(errorMessage);
+		return allGroups;
+	}
+
+	do { 
+		nas = NetLocalGroupEnum(NULL, 
+								0,
+								(unsigned char**) &localGroupInfo,
+								MAX_PREFERRED_LENGTH,
+								&recordsEnumerated,
+								&totalRecords,
+								NULL);
+
+		if ((nas == NERR_Success) || (nas==ERROR_MORE_DATA)) {
+			// Group account names are limited to 256 characters.
+
+			char tmpGroupName[257];
+
+			// Loop through each group.
+			for (unsigned int i=0; i<recordsEnumerated; i++) {
+				ZeroMemory(tmpGroupName, 257);
+				_snprintf(tmpGroupName, sizeof(tmpGroupName) - 1, "%S", localGroupInfo[i].lgrpi0_name);
+				tmpGroupName[sizeof(tmpGroupName)-1] = '\0';
+
+				string groupName = tmpGroupName;
+				// get sid for trustee name
+				PSID pSid = WindowsCommon::GetSIDForTrusteeName(groupName);
+				// get formatted trustee name
+				groupName = WindowsCommon::GetFormattedTrusteeName(pSid);
+				allGroups->push_back(groupName);
+			}
+		} else {
+			nts = LsaClose(polHandle);
+
+			if(nas == ERROR_ACCESS_DENIED) { 
+				throw Exception("Error unable to enumerate local groups. The user does not have access to the requested information.");
+			} else if(nas == NERR_InvalidComputer) {
+				throw Exception("Error unable to enumerate local groups. The computer name is invalid.");
+			} else {
+				throw Exception("Error unable to enumerate local groups. " + WindowsCommon::GetErrorMessage(GetLastError()));
+			}
+
+		}
+
+		// Free the allocated buffer.
+		if (localGroupInfo != NULL) {
+			NetApiBufferFree(localGroupInfo);
+			localGroupInfo = NULL;
+		}
+	} while (nas==ERROR_MORE_DATA); 
+
+	// Check again for allocated memory.
+	if (localGroupInfo != NULL) NetApiBufferFree(localGroupInfo);
+
+	// Close the handle to the open policy object.
+	nts = LsaClose(polHandle);
+
+	return allGroups;
+}
+
+StringVector* WindowsCommon::GetAllGlobalGroups() {
+
+	StringVector* allGroups = new StringVector();
+
+	// Get a handle to the policy object.
+	NTSTATUS nts;
+	LSA_HANDLE polHandle;
+	LSA_OBJECT_ATTRIBUTES ObjectAttributes;
+	ZeroMemory(&ObjectAttributes, sizeof(ObjectAttributes));
+
+	nts = LsaOpenPolicy(NULL, &ObjectAttributes, POLICY_LOOKUP_NAMES, &polHandle);
+	if (nts != ERROR_SUCCESS) {
+		string errorMessage = "";
+		errorMessage.append("Error unable to open a handle to the Policy object.");
+		Log::Debug(errorMessage);
+		return allGroups;
+	}
+
+	NET_API_STATUS nas;
+	GROUP_INFO_0* globalGroupInfo = NULL;
+	do { 
+		
+		DWORD recordsEnumerated = 0;
+		DWORD totalRecords = 0;
+		nas = NetGroupEnum(NULL,
+						   0,
+						   (unsigned char**) &globalGroupInfo,
+						   MAX_PREFERRED_LENGTH,
+						   &recordsEnumerated,
+						   &totalRecords,
+						   NULL);
+
+		if ((nas == NERR_Success) || (nas==ERROR_MORE_DATA)) {
+			// Group account names are limited to 256 characters.
+
+			char tmpGroupName[257];
+
+			// Loop through each group.
+			for (unsigned int i=0; i<recordsEnumerated; i++) {
+				ZeroMemory(tmpGroupName, 257);
+				_snprintf(tmpGroupName, sizeof(tmpGroupName) - 1, "%S", globalGroupInfo[i].grpi0_name);
+				tmpGroupName[sizeof(tmpGroupName)-1] = '\0';
+
+				string groupName = tmpGroupName;
+				// get sid for trustee name
+				PSID pSid = WindowsCommon::GetSIDForTrusteeName(groupName);
+				// get formatted trustee name
+				groupName = WindowsCommon::GetFormattedTrusteeName(pSid);
+				allGroups->push_back(groupName);
+			}
+		} else {
+			nts = LsaClose(polHandle);
+
+			if(nas == ERROR_ACCESS_DENIED) { 
+				throw Exception("Error unable to enumerate global groups. The user does not have access to the requested information.");
+			} else if(nas == NERR_InvalidComputer) {
+				throw Exception("Error unable to enumerate global groups. The computer name is invalid.");
+			} else {
+				throw Exception("Error unable to enumerate global groups. " + WindowsCommon::GetErrorMessage(GetLastError()));
+			}
+		}
+
+		// Free the allocated buffer.
+		if (globalGroupInfo != NULL) {
+			NetApiBufferFree(globalGroupInfo);
+			globalGroupInfo = NULL;
+		}
+	} while (nas==ERROR_MORE_DATA); 
+
+	// Check again for allocated memory.
+	if (globalGroupInfo != NULL) NetApiBufferFree(globalGroupInfo);
+
+	// Close the handle to the open policy object.
+	nts = LsaClose(polHandle);
+
+	return allGroups;
+}
+void WindowsCommon::GetAllLocalUsers(UniqueStringVector* allUsers) {
+
+	NTSTATUS nts;
+
+	// Get a handle to the policy object.
+	LSA_HANDLE polHandle;
+	LSA_OBJECT_ATTRIBUTES ObjectAttributes;
+	ZeroMemory(&ObjectAttributes, sizeof(ObjectAttributes));
+
+	nts = LsaOpenPolicy(NULL, &ObjectAttributes, POLICY_LOOKUP_NAMES, &polHandle);
+	if (nts != ERROR_SUCCESS) {
+		string errorMessage = "";
+		errorMessage.append("Error unable to open a handle to the Policy object.");
+		Log::Debug(errorMessage);
+		return;
+	}
+
+	NET_API_STATUS nas;
+    DWORD recordsEnumerated = 0;
+    DWORD totalRecords = 0;
+    USER_INFO_0* userInfo = NULL;
+
+	do {
+		// NOTE: Even though MAX_PREFERRED_LENGTH is specified, we must still check for
+		// ERROR_MORE_DATA. (I think!)  I assume that if the server can not allocate the
+		// total amount of space required, then it will allocate a smaller buffer and we
+		// will need to make multiple calls to NetUserEnum().
+		//
+		// NOTE: NetUserEnum() requires us to link to Netapi32.lib.
+
+		nas = NetUserEnum(NULL,
+						  0,			// need to us this to get the name
+						  0,			//FILTER_NORMAL_ACCOUNT
+						  (unsigned char**) &userInfo,
+						  MAX_PREFERRED_LENGTH,
+						  &recordsEnumerated,
+						  &totalRecords,
+						  NULL);
+
+		if ((nas == NERR_Success) || (nas == ERROR_MORE_DATA)) {
+			// User account names are limited to 20 characters.
+
+			char tmpUserName[21];
+
+			// Loop through each user.
+			for (unsigned int i=0; i<recordsEnumerated; i++) {
+				ZeroMemory(tmpUserName, 21);
+				_snprintf(tmpUserName, sizeof(tmpUserName) - 1, "%S", userInfo[i].usri0_name);
+				tmpUserName[sizeof(tmpUserName)-1] = '\0';
+
+				// Get the account information.
+				string userName = tmpUserName;
+				// get sid for trustee name
+				PSID pSid = WindowsCommon::GetSIDForTrusteeName(userName);
+				// get formatted trustee name
+				userName = WindowsCommon::GetFormattedTrusteeName(pSid);
+				allUsers->Append(userName);
+
+			}
+		} else {
+			nts = LsaClose(polHandle);
+
+			if(nas == ERROR_ACCESS_DENIED) { 
+				throw Exception("Error unable to enumerate local users. The user does not have access to the requested information.");
+			} else if(nas == NERR_InvalidComputer) {
+				throw Exception("Error unable to enumerate local users. The computer name is invalid.");
+			} else {
+				throw Exception("Error unable to enumerate local users. " + WindowsCommon::GetErrorMessage(GetLastError()));
+			}
+		}
+
+		// Free the allocated buffer.
+		if (userInfo != NULL) {
+			NetApiBufferFree(userInfo);
+			userInfo = NULL;
+		}
+
+	} while (nas==ERROR_MORE_DATA); 
+
+	// Check again for allocated memory.
+	if (userInfo != NULL) NetApiBufferFree(userInfo);
+
+	// Close the handle to the open policy object.
+	nts = LsaClose(polHandle);
+
+}
+
+string WindowsCommon::GetFormattedTrusteeName(PSID pSid) {
+
+	// validate the sid
+	if(!IsValidSid(pSid)) {
+		throw Exception("Error invlid sid found in WindowsCommon::GetFormattedTrusteeName()");
+	}
+
+	// get the account info for the sid
+	string trusteeDomain = "";
+	string trusteeName = "";
+	SID_NAME_USE sid_type;
+	LPTSTR trustee_name = NULL;
+	LPTSTR domain_name = NULL;
+	DWORD trustee_name_size = 0;
+	DWORD domain_name_size = 0;
+
+	LookupAccountSid(NULL,						// name of local or remote computer
+						pSid,					// security identifier
+						trustee_name,			// account name buffer
+						&trustee_name_size,		// size of account name buffer
+						domain_name,			// domain name
+						&domain_name_size,		// size of domain name buffer
+						&sid_type);				// SID type
+
+	trustee_name_size++;
+	trustee_name = (LPTSTR)realloc(trustee_name, trustee_name_size * sizeof(TCHAR));
+	if (trustee_name == NULL) {
+		throw Exception("Could not allocate space. Cannot get trustee_name for sid.");
+	}
+
+	domain_name_size++;
+	domain_name = (LPTSTR)realloc(domain_name, domain_name_size * sizeof(TCHAR));
+	if (domain_name == NULL) {
+		throw Exception("Could not allocate space. Cannot get domain_name for.");
+	}
+	
+	// Call LookupAccountSid again to retrieve the name of the account and the
+	// name of the first domain on which this SID is found.
+	if (LookupAccountSid(NULL,					// name of local or remote computer
+						pSid,					// security identifier
+						trustee_name,			// account name buffer
+						&trustee_name_size,		// size of account name buffer
+						domain_name,			// domain name
+						&domain_name_size,		// size of domain name buffer
+						&sid_type) == 0)		// SID type
+	{
+		string errMsg = WindowsCommon::GetErrorMessage(GetLastError());
+		LPTSTR sidString;
+		WindowsCommon::GetTextualSid(pSid, &sidString);
+		string sidStr = sidString;
+		free(sidString);
+		// all occurances of this that i have seen are for the domain admins sid and the domain user's sid
+		// I should be able to ignore these.
+		throw Exception("Unable to look up account name for sid: " + sidStr + ". " + WindowsCommon::GetErrorMessage(GetLastError()));
+
+	} else {
+		trusteeDomain = domain_name;
+		if(trusteeDomain.compare("") != 0 && trusteeDomain.compare("NT AUTHORITY") != 0 && trusteeDomain.compare("BUILTIN") != 0) {
+			trusteeName.append(domain_name);
+			trusteeName.append("\\");
+		}
+		trusteeName.append(trustee_name);
+	}
+
+	free(domain_name);
+	free(trustee_name);
+
+	return trusteeName;
+}
+
+PSID WindowsCommon::GetSIDForTrusteeName(string trusteeName) {
+
+	DWORD sidSize = 128;
+	DWORD domainSize = 128;
+	SID_NAME_USE sidUse;
+	BOOL retVal = FALSE;
+	PSID psid = NULL;
+	LPTSTR domain = NULL;
+
+	try {
+		do {
+			// Initial memory allocations for the SID and DOMAIN.
+			psid = (PSID)realloc(psid, sidSize);
+			if (psid == NULL) {
+				retVal = FALSE;
+				break;
+			}
+
+			domain = (LPTSTR)realloc(domain, domainSize);
+			if (domain == NULL) {
+				retVal = FALSE;
+				break;
+			}
+
+			// Call LookupAccountName to get the SID.
+			retVal = LookupAccountName(NULL,								// system name NULL == localhost
+									const_cast<char*>(trusteeName.c_str()),	// account name
+									psid,									// security identifier
+									&sidSize,								// size of security identifier
+									domain,									// domain name
+									&domainSize,							// size of domain name
+									&sidUse);								// SID-type indicator
+
+		} while (GetLastError() == ERROR_INSUFFICIENT_BUFFER);
+
+	} catch(...) {
+		
+		Log::Debug("Error looking up sid for account: " + trusteeName + ". " + WindowsCommon::GetErrorMessage(GetLastError()));
+	}
+
+	return psid;
+}
+
+bool WindowsCommon::LookUpTrusteeName(string* accountNameStr, string* sidStr, string* domainStr) {
+
+	PSID psid = NULL;
+	LPTSTR domain = NULL;
+	DWORD sidSize = 128;
+	DWORD domainSize = 128;
+	SID_NAME_USE sid_type;
+	BOOL retVal = FALSE;
+
+	do {
+		// Initial memory allocations for the SID and DOMAIN.
+		psid = (PSID)realloc(psid, sidSize);
+		if (psid == NULL) {
+			retVal = FALSE;
+			break;
+		}
+
+		domain = (LPTSTR)realloc(domain, domainSize);
+		if (domain == NULL) {
+			retVal = FALSE;
+			break;
+		}
+
+		// Call LookupAccountName to get the SID.
+		retVal = LookupAccountName(NULL,										// system name
+								   const_cast<char*>((*accountNameStr).c_str()),	// account name
+								   psid,										// security identifier
+								   &sidSize,									// size of security identifier
+								   domain,										// domain name
+								   &domainSize,									// size of domain name
+								   &sid_type);									// SID-type indicator
+
+	} while (GetLastError() == ERROR_INSUFFICIENT_BUFFER);
+
+	if(retVal == TRUE) {
+
+		LPTSTR sidString;
+		WindowsCommon::GetTextualSid(psid, &sidString);
+		(*sidStr) = sidString;
+		(*domainStr) = domain;
+		free(sidString);
+		free(psid);
+		free(domain);	
+	} else {
+		free(psid);
+		free(domain);	
+		DWORD error = GetLastError();
+		if(error == ERROR_TRUSTED_RELATIONSHIP_FAILURE) {
+			throw Exception("Unable to locate account: " + (*accountNameStr) + ". " + WindowsCommon::GetErrorMessage(error), ERROR_NOTICE);
+		} else {
+			throw Exception("Error failed to look up account: " + (*accountNameStr) + ". " + WindowsCommon::GetErrorMessage(error));
+		}
+	}
+
+	// determin if this is a group
+	bool isGroup = false;
+	if(sid_type == SidTypeGroup || sid_type == SidTypeWellKnownGroup || sid_type == SidTypeAlias) {
+		if((*accountNameStr).compare("SYSTEM") != 0) // special case...
+			isGroup = true;
+	} 
+	// make sure account names are consistantly formated
+	if(sid_type == SidTypeUser) {
+		// make sure all user accounts are prefixed by their domain or the local system name.
+		if((*accountNameStr).find("\\") == string::npos && (*domainStr).compare("") != 0)
+			(*accountNameStr) = (*domainStr) + "\\" + (*accountNameStr);
+
+	} else if(sid_type == SidTypeDomain) {
+		// do not prepend the domain if it is a domain...
+
+	} else {
+		// make sure all local group accounts are prefixed by their domain
+		// do not prefix if domain is "BUILTIN" "NT AUTHORITY"
+		if((*domainStr).compare("BUILTIN") != 0 && (*domainStr).compare("NT AUTHORITY") != 0) {
+			if((*accountNameStr).find("\\") == string::npos && (*domainStr).compare("") != 0)
+				(*accountNameStr) = (*domainStr) + "\\" + (*accountNameStr);
+		}
+	}
+
+	return isGroup;
+}
+
+string WindowsCommon::LookUpLocalSystemName() {
+
+	string systemName = "";
+
+	LPTSTR buff = NULL;
+	buff = (LPTSTR) malloc(MAX_COMPUTERNAME_LENGTH + 1);
+	DWORD  buffSize = MAX_COMPUTERNAME_LENGTH + 1;
+ 
+	// Get and display the name of the computer. 
+	if(!GetComputerName( buff, &buffSize )) {
+		DWORD error = GetLastError();
+		throw Exception("Error failed to get local computer name. " + WindowsCommon::GetErrorMessage(error));
+	} else {
+		systemName = buff;
+		free(buff);
+	}
+
+	return systemName;
+}
+
+string WindowsCommon::ToString(FILETIME fTime) {
+
+	return Common::ToString(fTime.dwLowDateTime) + Common::ToString(fTime.dwHighDateTime);
+}
+
+string WindowsCommon::ToString(DWORD dw) {
+
+	char dwordBuf[12];
+	ZeroMemory(dwordBuf, sizeof(dwordBuf));
+	_snprintf(dwordBuf, sizeof(dwordBuf)-1, "%d", dw);
+	dwordBuf[sizeof(dwordBuf)-1] = '\0';
+
+	string dwStr = dwordBuf;
+	return dwStr;
+}


Property changes on: trunk/ovaldi/src/windows/WindowsCommon.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/src/windows/WindowsCommon.h
===================================================================
--- trunk/ovaldi/src/windows/WindowsCommon.h	                        (rev 0)
+++ trunk/ovaldi/src/windows/WindowsCommon.h	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,141 @@
+//
+//
+//****************************************************************************************//
+// Copyright (c) 2002-2008, The MITRE Corporation
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright notice, this list
+//       of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright notice, this 
+//       list of conditions and the following disclaimer in the documentation and/or other
+//       materials provided with the distribution.
+//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+//       used to endorse or promote products derived from this software without specific 
+//       prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//****************************************************************************************//
+
+#ifndef WINDOWSCOMMON_H
+#define WINDOWSCOMMON_H
+
+#define STRNICMP _strnicmp
+
+#pragma warning(disable:4786)
+
+#include "WindowsCommon.h"
+#include "Exception.h"
+#include "Log.h"
+
+#include <aclapi.h>
+#include <lm.h>
+#include <Ntsecapi.h>
+#include <windows.h>
+#define _WIN32_WINNT 0x0501
+#include <Sddl.h>
+
+using namespace std;
+
+class WindowsCommon {
+
+public:
+	/** Disable all the privileges associated with the current process token.
+		If a specific privilege is needed later, it can be enabled by calling
+		AdjustTokenPrivileges() again.
+	*/
+	static bool DisableAllPrivileges();
+
+	/** Enable the specified privilege. */
+	static bool EnablePrivilege(string);
+
+	/** Convert the provded PSID to a string in the SID string format. */
+	static bool GetTextualSid(PSID, LPTSTR*);
+
+	/** Return the string error massge for the specified error code. */
+	static string GetErrorMessage(DWORD dwLastError);
+
+	/** Expand the group returning all members. 
+		If the group does not exist return false 
+		Look at local groups then global groups
+	*/
+	static bool ExpandGroup(string groupName, StringVector* members);
+
+	/** Get all trustee names on the system. 
+		This set consists of the following:
+		Get all local user trustee names
+		Get all local groups
+			- expand to get all members
+		Get all global groups
+			- expand to get all members
+		Get the trustee name of the system.
+		Resulting trustee names should be unique.
+	*/
+	static StringVector* GetAllTrusteeNames();
+
+	/** Get the trustee name for the specified sid formatted for oval useage. */
+	static string GetFormattedTrusteeName(PSID pSid);
+
+	/** Get the SID for the specified trustee name. 
+		TrusteeName should be a fully qualified account name. 
+		For more info see:
+		http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/lookupaccountname.asp
+	*/
+	static PSID GetSIDForTrusteeName(string trusteeName);
+
+	/** Get the domain and sid string for the specifeid trustee name. Return true if the trustee is a group. */
+	static bool LookUpTrusteeName(string* accountNameStr, string* sidStr, string* domainStr);
+
+	/** Return the set of all local and global groups on the local system. */
+	static StringVector* GetAllGroups();
+
+	/** Get the set of all local users. */
+	static void GetAllLocalUsers(UniqueStringVector*);
+
+	/** Convert the FILETIME strucutre to an integer. */
+	static string ToString(FILETIME fTime);
+
+	/** Return a string representation of the DWORD */
+	static string ToString(DWORD dw);
+
+private:
+
+	/** Return a StringVector* of all local groups. */
+	static StringVector* GetAllLocalGroups();
+
+	/** Return a StringVector* of all global groups. */
+	static StringVector* GetAllGlobalGroups();
+
+	/** Get the members of the specified local group. */
+	static bool GetLocalGroupMembers(string groupName, StringVector* members);
+
+	/** Get the members of the specified global group. 	*/
+	static bool GetGlobalGroupMembers(string groupName, StringVector* members);
+
+	/** Get the set of all trustee names on the system for the well knowns SIDS.
+		These are sids that are not returend by a call to NetUserEnum, 
+		NetGroupEnum, or NetLocalGroupEnum.
+		Selected well known sids are pulled from:
+		http://support.microsoft.com/kb/243330
+	*/
+	static void GetWellKnownTrusteeNames();
+
+	/** Look up the local system name. */
+	static string WindowsCommon::LookUpLocalSystemName();
+
+	static StringVector* allTrusteeNames;
+	static StringVector* wellKnownTrusteeNames;
+};
+
+#endif


Property changes on: trunk/ovaldi/src/windows/WindowsCommon.h
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/aix-definitions-schema.xsd
===================================================================
--- trunk/ovaldi/xml/aix-definitions-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/aix-definitions-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,369 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:aix-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#aix" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-definitions-5#aix" elementFormDefault="qualified" version="5.4">
+      <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-definitions-5" schemaLocation="oval-definitions-schema.xsd"/>
+      <xsd:annotation>
+            <xsd:documentation>The following is a description of the elements, types, and attributes that compose the AIX specific tests found in Open Vulnerability and Assessment Language (OVAL). Each test is an extension of the standard test element defined in the Core Definition Schema. Through extension, each test inherits a set of elements and attributes that are shared amongst all OVAL tests. Each test is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core Definition Schema is not outlined here.</xsd:documentation>
+            <xsd:documentation>This schema was originally developed by Yuzheng Zhou and Todd Dolinsky at Hewlett-Packard. The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+            <xsd:appinfo>
+                  <schema>AIX Definition</schema>
+                  <version>5.4</version>
+                  <date>4/1/2008 10:41:33 AM</date>
+                  <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                  <sch:title>schematron validation of the AIX portion of an OVAL Definitions file</sch:title>
+                  <sch:ns prefix="oval-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5"/>
+                  <sch:ns prefix="aix-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5#aix"/>
+                  <sch:ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/>
+            </xsd:appinfo>
+      </xsd:annotation>
+      <!-- =============================================================================== -->
+      <!-- ===============================  FILESET TEST  ================================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="fileset_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The fileset test is used to check information associated with different filesets installed on the system. The information used by this test is modeled after the /usr/bin/lslpp -l command. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an inetd_object and the optional state element specifies the information to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="fileset_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The fileset_object element is used by a fileset test to define the fileset to be evaluated. Each object extends the standard ObjectType as defined in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>A fileset object consists of a single flstinst entity that identifies the fileset to be used.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="flstinst" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The flstinst entity represents the fileset name we want to check. For example, if we want to check the status of the fileset 'bos.rte', we can use fileset test and the flstinst entity will be 'bos.rte' or 'bot.*' or etc.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="filesetobjflstinst">
+                                                                        <sch:rule context="aix-def:fileset_object/aix-def:flstinst">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the flstinst entity of a fileset_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="fileset_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The fileset_state element defines the different information associated with filesets installed on the system. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="flstinst" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Represents the name of a fileset.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="filesetsteflstinst">
+                                                            <sch:rule context="aix-def:fileset_state/aix-def:flstinst">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the flstinst entity of a fileset_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="level" type="oval-def:EntityStateVersionType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Maintenance level (also known as version in Solaris or Linux) of a fileset. For example, "5.3.0.10" is the level for 'bos.txt.tfs' fileset in one AIX machine.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="filesetstelevel">
+                                                            <sch:rule context="aix-def:fileset_state/aix-def:level">
+                                                                  <sch:assert test="@datatype='version'"><sch:value-of select="../@id"/> - datatype attribute for the level entity of a fileset_state should be 'version'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="state" type="aix-def:EntityStateFilesetStateType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This gives the state of a fileset. The state can be 'APPLIED', 'APPLYING','BROKEN', 'COMMITTED', 'EFIX LOCKED', 'OBSOLETE', 'COMMITTING','REJECTING'. See the manpage of the 'lslpp' command more information.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="filesetstestate">
+                                                            <sch:rule context="aix-def:fileset_state/aix-def:state">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the state entity of a fileset_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="description" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Short description of a fileset.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="filesetstedescription">
+                                                            <sch:rule context="aix-def:fileset_state/aix-def:description">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the description entity of a fileset_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ================================  FIX TEST  ================================= -->
+      <!-- =============================================================================== -->
+      <xsd:element name="fix_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The fix test is used to check information associated with different fixes installed on the system. The information being tested is based off the /usr/sbin/instfix -iavk command. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an fix_object and the optional state element specifies the information to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="fix_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The fix_object element is used by a fix test to define the specific fix to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>A fix object consists of a single apar_number entity that identifies the fix to be used.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="apar_number" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>APAR is the short for 'Authorized Program Analysis Report'. APAR identifies and describes a software product defect. An APAR number can obtain a PTF (Program Temporary Fix) for the defect, if a PTF is available. An example of an apar_number is 'IY78751', it includes two alphabetic characters and a 5-digit integer.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="fixobjapar_number">
+                                                                        <sch:rule context="aix-def:fix_object/aix-def:apar_number">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the apar_number entity of a fix_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="fix_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The fix_state element defines the different information associated with a specific fix installed on the system. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="apar_number" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>APAR is the short for 'Authorized Program Analysis Report'. APAR identifies and describes a software product defect. An APAR number can obtain a PTF (Program Temporary Fix) for the defect, if a PTF is available. An example of an apar_number is 'IY78751', it includes two alphabetic characters and a 5-digit integer.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fixsteapar_number">
+                                                            <sch:rule context="aix-def:fix_state/aix-def:apar_number">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the apar_number entity of a fix_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="abstract" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The abstract of an APAR. For instance, 'LL syas rXct are available even when not susea' is the abstract of APAR 'IY78751'.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fixsteabstract">
+                                                            <sch:rule context="aix-def:fix_state/aix-def:abstract">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the abstract entity of a fix_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="symptom" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The symptom text related to an APAR. For example, the symptom text for 'IY75211' is 'Daylight savings change for year 2007 and beyond'.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fixstesymptom">
+                                                            <sch:rule context="aix-def:fix_state/aix-def:symptom">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the symptom entity of a fix_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="installation_status" type="aix-def:EntityStateFixInstallationStatusType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The installation status of files associated with the APAR. This cannot be got from the output of the instfix command directly. The last line of the output is 'All filesets for XXXXXXX were found', or 'Not all filesets for XXXXXXX were found' or 'No filesets which have fixes for XXXXXXX are currently installed.'. These can be translated to the correct value as defined by the EntityStateFixInstallationStatusType.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fixsteinstallation_status">
+                                                            <sch:rule context="aix-def:fix_state/aix-def:installation_status">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the installation_status entity of a fix_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ===============================  OSLEVEL TEST  ================================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="oslevel_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The oslevel test reveals information about the release and maintenance level of AIX operating system. This information can be retrieved by the /usr/bin/oslevel -r command. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an oslevel_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="oslevel_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The oslevel_object element is used by an oslevel test to define those objects to be evaluated based on a specified state. There is actually only one object relating to oslevel and this is the system as a whole. Therefore, there are no child entities defined. Any OVAL Test written to check oslevel will reference the same oslevel_object which is basically an empty object element.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType"/>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="oslevel_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The oslevel_state element defines the information about maintenance level (system version). Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="maintenance_level" type="oval-def:EntityStateVersionType" minOccurs="1" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the maintenance level (system version) of current AIX operating system.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="oslevelstemaintenance_level">
+                                                            <sch:rule context="aix-def:oslevel_state/aix-def:maintenance_level">
+                                                                  <sch:assert test="@datatype='version'"><sch:value-of select="../@id"/> - datatype attribute for the maintenance_level entity of an oslevel_state should be 'version'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+      <xsd:complexType name="EntityStateFilesetStateType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityStateFilesetStateType complex type defines the different values that are valid for the state entity of a fileset state. The empty string is also allowed as a valid value to support an empty element that is found when a variable reference is used within the state entity.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityStateStringType">
+                        <xsd:enumeration value="APPLIED">
+                              <xsd:annotation>
+                                    <xsd:documentation>The specified fileset is installed on the system. The APPLIED state means that the fileset can be rejected with the installp command and the previous level of the fileset restored. This state is only valid for Version 4 fileset updates and 3.2 migrated filesets.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="APPLYING">
+                              <xsd:annotation>
+                                    <xsd:documentation>An attempt was made to apply the specified fileset, but it did not complete successfully, and cleanup was not performed.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="BROKEN">
+                              <xsd:annotation>
+                                    <xsd:documentation>The specified fileset or fileset update is broken and should be reinstalled before being used.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="COMMITTED">
+                              <xsd:annotation>
+                                    <xsd:documentation>The specified fileset is installed on the system. The COMMITTED state means that a commitment has been made to this level of the software. A committed fileset update cannot be rejected, but a committed fileset base level and its updates (regardless of state) can be removed or deinstalled by the installp command.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="COMMITTING">
+                              <xsd:annotation>
+                                    <xsd:documentation>An attempt was made to commit the specified fileset, but it did not complete successfully, and cleanup was not performed.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="EFIX LOCKED">
+                              <xsd:annotation>
+                                    <xsd:documentation>The specified fileset was installed sucessfully and locked by the interim fix (interim fix) manager.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="OBSOLETE">
+                              <xsd:annotation>
+                                    <xsd:documentation>The specified fileset was installed with an earlier version of the operating system but has been replaced by a repackaged (renamed) newer version. Some of the files that belonged to this fileset have been replaced by versions from the repackaged fileset.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="REJECTING">
+                              <xsd:annotation>
+                                    <xsd:documentation>An attempt was made to reject the specified fileset, but it did not complete successfully, and cleanup was not performed.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+      <xsd:complexType name="EntityStateFixInstallationStatusType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityStateFixInstallationStatusType complex type defines the different values that are valid for the installation_status entity of a fix_state state. The empty string is also allowed as a valid value to support an empty element that is found when a variable reference is used within the installation_status entity.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityStateStringType">
+                        <xsd:enumeration value="ALL_INSTALLED">
+                              <xsd:annotation>
+                                    <xsd:documentation>All filesets for XXXXXXX were found</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="SOME_INSTALLED">
+                              <xsd:annotation>
+                                    <xsd:documentation>Not all filesets for XXXXXXX were found</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="NONE_INSTALLED">
+                              <xsd:annotation>
+                                    <xsd:documentation>No filesets which have fixes for XXXXXXX are currently installed.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/aix-definitions-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/aix-system-characteristics-schema.xsd
===================================================================
--- trunk/ovaldi/xml/aix-system-characteristics-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/aix-system-characteristics-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,252 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" xmlns:aix-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#aix" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#aix" elementFormDefault="qualified" version="5.4">
+     <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" schemaLocation="oval-system-characteristics-schema.xsd"/>
+     <xsd:annotation>
+          <xsd:documentation>The following is a description of the elements, types, and attributes that compose the AIX specific system characteristic items found in Open Vulnerability and Assessment Language (OVAL). Each item is an extension of the standard test element defined in the Core Definition Schema. Through extension, each test inherits a set of elements and attributes that are shared amongst all OVAL tests. Each test is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core Definition Schema is not outlined here.</xsd:documentation>
+          <xsd:documentation>This schema was originally developed by Yuzheng Zhou and Todd Dolinsky at Hewlett-Packard. The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+          <xsd:appinfo>
+               <schema>AIX System Characteristics</schema>
+               <version>5.4</version>
+               <date>4/1/2008 10:41:38 AM</date>
+                <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                <sch:title>schematron validation of the AIX portion of an OVAL System Characteristics file</sch:title>
+               <sch:ns prefix="oval-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5"/>
+               <sch:ns prefix="aix-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#aix"/>
+          </xsd:appinfo>
+     </xsd:annotation>
+     <!-- =============================================================================== -->
+     <!-- ===============================  FILESET ITEM  ================================ -->
+     <!-- =============================================================================== -->
+     <xsd:element name="fileset_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>Output of /usr/bin/lslpp -l FilesetName. See lslpp manpage for specific fields.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="flstinst" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                         <xsd:documentation>Represents the name of the fileset being checked.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="filesetitemflstinst">
+                                                  <sch:rule context="aix-sc:fileset_item/aix-sc:flstinst">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the flstinst entity of a fileset_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="level" type="oval-sc:EntityItemVersionType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                         <xsd:documentation>Maintenance level (also known as version in Solaris or Linux) of the fileset. For example, "5.3.0.10" is the level for 'bos.txt.tfs' fileset in one AIX machine.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="filesetitemlevel">
+                                                  <sch:rule context="aix-sc:fileset_item/aix-sc:level">
+                                                       <sch:assert test="@datatype='version'">item <sch:value-of select="../@id"/> - datatype attribute for the level entity of a fileset_item should be 'version'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                               <xsd:element name="state" type="aix-sc:EntityItemFilesetStateType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                         <xsd:documentation>This gives the state of the fileset being checked. The state can be 'APPLIED', 'APPLYING','BROKEN', 'COMMITTED', 'EFIX LOCKED', 'OBSOLETE', 'COMMITTING','REJECTING'.  See the manpage of the 'lslpp' command more information.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="filesetitemstate">
+                                                  <sch:rule context="aix-sc:fileset_item/aix-sc:state">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the state entity of a fileset_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="description" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                         <xsd:documentation>Short description of the fileset being checked.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="filesetitemdescription">
+                                                  <sch:rule context="aix-sc:fileset_item/aix-sc:description">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the description entity of a fileset_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =============================  FIX ITEM  ==================================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="fix_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>From /usr/sbin/instfix -iavk APARNum Command. See instfix manpage for specific fields.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="apar_number" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                         <xsd:documentation>APAR is the short for 'Authorized Program Analysis Report'.  APAR identifies and describes a software product defect. An APAR number can obtain a PTF (Program Temporary Fix) for the defect, if a PTF is available.  An example of an apar_number is 'IY78751', it includes two alphabetic characters and a 5-digit integer.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fixitemapar_number">
+                                                  <sch:rule context="aix-sc:fix_item/aix-sc:apar_number">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the apar_number entity of a fix_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="abstract" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                         <xsd:documentation>The abstract of the APAR being checked. For instance, 'LL syas rXct are available even when not susea' is the abstract of APAR 'IY78751'.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fixitemabstract">
+                                                  <sch:rule context="aix-sc:fix_item/aix-sc:abstract">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the abstract entity of a fix_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="symptom" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                         <xsd:documentation>The symptom text related to the APAR being checked. For example, the symptom text for 'IY75211' is 'Daylight savings change for year 2007 and beyond'.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fixitemsymptom">
+                                                  <sch:rule context="aix-sc:fix_item/aix-sc:symptom">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the symptom entity of a fix_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                               <xsd:element name="installation_status" type="aix-sc:EntityItemFixInstallationStatusType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                         <xsd:documentation>The installation status of files associated with the APAR.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fixiteminstallation_status">
+                                                  <sch:rule context="aix-sc:fix_item/aix-sc:installation_status">
+                                                        <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the installation_status entity of a fix_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ===============================  OSLEVEL ITEM  ================================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="oslevel_item" substitutionGroup="oval-sc:item">
+            <xsd:annotation>
+                  <xsd:documentation>Information about the release and maintenance level of AIX operating system. This information can be retrieved by the /usr/bin/oslevel -r command.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-sc:ItemType">
+                              <xsd:sequence>
+                                    <xsd:element name="maintenance_level" type="oval-sc:EntityItemVersionType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the maintenance level (system version) of current AIX operating system.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="oslevelitemmaintenance_level">
+                                                            <sch:rule context="aix-sc:oslevel_item/aix-sc:maintenance_level">
+                                                                  <sch:assert test="@datatype='version'">item <sch:value-of select="../@id"/> - datatype attribute for the maintenance_level entity of an oslevel_item should be 'version'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+      <xsd:complexType name="EntityItemFilesetStateType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityStateFilesetStateType complex type defines the different values that are valid for the state entity of a fileset state.  The empty string is also allowed as a valid value to support an empty element that is found when a variable reference is used within the state entity.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:documentation>The EntityStateFilesetStateType defines the different values that are valid for the state entity of a fileset item.  The empty string is also allowed as a valid value to support empty emlements associated with error conditions.</xsd:documentation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityItemStringType">
+                        <xsd:enumeration value="APPLIED">
+                              <xsd:annotation>
+                                    <xsd:documentation>The specified fileset is installed on the system. The APPLIED state means that the fileset can be rejected with the installp command and the previous level of the fileset restored. This state is only valid for Version 4 fileset updates and 3.2 migrated filesets.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="APPLYING">
+                              <xsd:annotation>
+                                    <xsd:documentation>An attempt was made to apply the specified fileset, but it did not complete successfully, and cleanup was not performed.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="BROKEN">
+                              <xsd:annotation>
+                                    <xsd:documentation>The specified fileset or fileset update is broken and should be reinstalled before being used.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="COMMITTED">
+                              <xsd:annotation>
+                                    <xsd:documentation>The specified fileset is installed on the system. The COMMITTED state means that a commitment has been made to this level of the software. A committed fileset update cannot be rejected, but a committed fileset base level and its updates (regardless of state) can be removed or deinstalled by the installp command.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="COMMITTING">
+                              <xsd:annotation>
+                                    <xsd:documentation>An attempt was made to commit the specified fileset, but it did not complete successfully, and cleanup was not performed.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="EFIX LOCKED">
+                              <xsd:annotation>
+                                    <xsd:documentation>The specified fileset was installed sucessfully and locked by the interim fix (interim fix) manager.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="OBSOLETE">
+                              <xsd:annotation>
+                                    <xsd:documentation>The specified fileset was installed with an earlier version of the operating system but has been replaced by a repackaged (renamed) newer version. Some of the files that belonged to this fileset have been replaced by versions from the repackaged fileset.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="REJECTING">
+                              <xsd:annotation>
+                                    <xsd:documentation>An attempt was made to reject the specified fileset, but it did not complete successfully, and cleanup was not performed.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+      <xsd:complexType name="EntityItemFixInstallationStatusType">
+            <xsd:annotation>>
+                  <xsd:documentation>The EntityStateFixInstallationStatusType defines the different values that are valid for the installation_status entity of a fix_state item.  The empty string is also allowed as a valid value to support empty emlements associated with error conditions.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityItemStringType">
+                        <xsd:enumeration value="ALL_INSTALLED">
+                              <xsd:annotation>
+                                    <xsd:documentation>All filesets for XXXXXXX were found</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="SOME_INSTALLED">
+                              <xsd:annotation>
+                                    <xsd:documentation>Not all filesets for XXXXXXX were found</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="NONE_INSTALLED">
+                              <xsd:annotation>
+                                    <xsd:documentation>No filesets which have fixes for XXXXXXX are currently installed.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/aix-system-characteristics-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/apache-definitions-schema.xsd
===================================================================
--- trunk/ovaldi/xml/apache-definitions-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/apache-definitions-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,175 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:apache-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#apache" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-definitions-5#apache" elementFormDefault="qualified" version="5.4">
+      <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-common-5" schemaLocation="oval-common-schema.xsd"/>
+      <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-definitions-5" schemaLocation="oval-definitions-schema.xsd"/>
+      <xsd:annotation>
+            <xsd:documentation>The following is a description of the elements, types, and attributes that compose the Apache specific tests found in Open Vulnerability and Assessment Language (OVAL). Each test is an extension of the standard test element defined in the Core Definition Schema. Through extension, each test inherits a set of elements and attributes that are shared amongst all OVAL tests. Each test is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core Definition Schema is not outlined here.</xsd:documentation>
+            <xsd:documentation>The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+            <xsd:appinfo>
+                  <schema>Apache Definition</schema>
+                  <version>5.4</version>
+                  <date>4/1/2008 10:41:38 AM</date>
+                  <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                  <sch:title>schematron validation of the Apache portion of an OVAL Definitions file</sch:title>
+                  <sch:ns prefix="oval-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5"/>
+                  <sch:ns prefix="apache-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5#apache"/>
+                  <sch:ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/>
+            </xsd:appinfo>
+      </xsd:annotation>
+      <!-- =============================================================================== -->
+      <!-- =================================  HTTPD TEST  ================================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="httpd_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The httpd test is used to check the version of an installed httpd binary. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an httpd_test and the optional state element specifies the data to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="httpdtst">
+                              <sch:rule context="apache-def:httpd_test/apache-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/apache-def:httpd_object/@id"><sch:value-of select="../@id"/> - the object child element of a httpd_test must reference a httpd_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="apache-def:httpd_test/apache-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/apache-def:httpd_state/@id"><sch:value-of select="../@id"/> - the state child element of a httpd_test must reference a httpd_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="httpd_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The httpd_object element is used by a httpd test to define the different httpd binary installed on a system. There is actually only one object relating to this and it is the collection of all httpd binaries. Therefore, there are no child entities defined. Any OVAL Test written to check version will reference the same version_object which is basically an empty object element. A tool that implements the httpd_test and collects the httpd_object must know how to find all the httpd binaries on the system and verify that they are in fact httpd binaries.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType"/>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="httpd_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The version_state element defines information associated with a specific httpd binary.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="path" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The path element specifies the absolute path to a file on the machine.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="httpdstepath">
+                                                            <sch:rule context="apache-def:httpd_state/apache-def:path">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a httpd_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="binary_name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1" nillable="true">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The filename element specifies the name of the file. If the nillable attribute is set to true, then the object being specified is the higher level path. In this case, the filename element should not be collected or used in analysis. Setting nil equal to true is different than using a .* pattern match, says to collect every file under a given path.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="httpdstebinaryname">
+                                                            <sch:rule context="apache-def:httpd_state/apache-def:binary_name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the binary_name entity of a httpd_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="version" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The version entity is used to check the version of the httpd binary. The datatype for the version entity is 'version' which means the value should be a delimited set of numbers. It is obtained by running 'httpd -v'.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="httpdsteversion">
+                                                            <sch:rule context="apache-def:httpd_state/apache-def:version">
+                                                                  <sch:assert test="@datatype='version'"><sch:value-of select="../@id"/> - datatype attribute for the version entity of a httpd_state should be 'version'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ================================  VERSION TEST  =============================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="version_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>This test has been deprecated. It will be removed from the next major version release (6.0) of the OVAL Schema. It has been replaced by the httpd_test.</xsd:documentation>
+                  <xsd:documentation>The version test is used to check the version of Apache installed system. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an version_object and the optional state element specifies the data to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="apachevertst">
+                              <sch:rule context="apache-def:version_test/apache-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/apache-def:version_object/@id"><sch:value-of select="../@id"/> - the object child element of a version_test must reference a version_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="apache-def:version_test/apache-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/apache-def:version_state/@id"><sch:value-of select="../@id"/> - the state child element of a version_test must reference a version_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="version_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>This object has been deprecated. It will be removed from the next major version release (6.0) of the OVAL Schema. It has been replaced by the httpd_object.</xsd:documentation>
+                  <xsd:documentation>The version_object element is used by a version test to define the different version information associated with an Apache installation. There is actually only one object relating to version and this is the Apche installation as a whole. Therefore, there are no child entities defined. Any OVAL Test written to check version will reference the same version_object which is basically an empty object element.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType"/>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="version_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>This state has been deprecated. It will be removed from the next major version release (6.0) of the OVAL Schema. It has been replaced by the httpd_state.</xsd:documentation>
+                  <xsd:documentation>The version_state element defines the version information of an Apache installation. This is obtained by running 'httpd -v'.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="version" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The version entity is used to check the version of the Apache installation.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="apcheversteversion">
+                                                            <sch:rule context="apache-def:version_state/apache-def:version">
+                                                                  <sch:assert test="not(@datatype) or @datatype='version'"><sch:value-of select="../@id"/> - datatype attribute for the version entity of an version_state should be 'version'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/apache-definitions-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/apache-system-characteristics-schema.xsd
===================================================================
--- trunk/ovaldi/xml/apache-system-characteristics-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/apache-system-characteristics-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,101 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" xmlns:apache-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#apache" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#apache" elementFormDefault="qualified" version="5.4">
+	<xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" schemaLocation="oval-system-characteristics-schema.xsd"/>
+	<xsd:annotation>
+		<xsd:documentation>The following is a description of the elements, types, and attributes that compose the Apache specific system characteristic items found in Open Vulnerability and Assessment Language (OVAL).  Each item is an extension of the standard item element defined in the Core System Characteristic Schema.  Through extension, each item inherits a set of elements and attributes that are shared amongst all OVAL Items.  Each item is described in detail and should provide the information necessary to understand what each element and attribute represents.  This document is intended for developers and assumes some familiarity with XML.  A high level description of the interaction between the different tests and their relationship to the Core System Characteristic Schema is not outlined here.</xsd:documentation>
+		<xsd:documentation>The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+		<xsd:appinfo>
+			<schema>Apache System Characteristics</schema>
+		     <version>5.4</version>
+		     <date>4/1/2008 10:41:38 AM</date>
+		      <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+		      <sch:title>schematron validation of the Apache portion of an OVAL System Characteristics file</sch:title>
+			<sch:ns prefix="oval-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5"/>
+			<sch:ns prefix="apache-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows"/>
+		</xsd:appinfo>
+	</xsd:annotation>
+	<!-- =============================================================================== -->
+	<!-- ================================  HTTPD ITEM  ================================= -->
+	<!-- =============================================================================== -->
+	<xsd:element name="httpd_item" substitutionGroup="oval-sc:item">
+		<xsd:annotation>
+			<xsd:documentation>The httpd item holds information about a installed Apache HTTPD binary.  It extends the standard ItemType as defined in the oval-system-characteristics schema and one should refer to the ItemType description for more information.</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="oval-sc:ItemType">
+					<xsd:sequence>
+						<xsd:element name="path" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>The path entity specifies the absolute path (excluding the filename) to a httpd binary found on the system.</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="httpditempath">
+										<sch:rule context="apache-sc:httpd_item/apache-sc:path">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the path entity of a httpd_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="binary_name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>The name of the httpd binary.</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="httpditembinaryname">
+										<sch:rule context="apache-sc:httpd_item/apache-sc:binary_name">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the binary_name entity of a httpd_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="version" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>The version entity holds the version of the specified httpd binary.</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="httpditemversion">
+										<sch:rule context="apache-sc:httpd_item/apache-sc:version">
+											<sch:assert test="@datatype='version'">item <sch:value-of select="../@id"/> - datatype attribute for the version entity of a httpd_item should be 'version'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+					</xsd:sequence>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+	<!-- =============================================================================== -->
+	<!-- ===============================  VERSION ITEM  ================================ -->
+	<!-- =============================================================================== -->
+	<xsd:element name="version_item" substitutionGroup="oval-sc:item">
+		<xsd:annotation>
+			<xsd:documentation>This item has been deprecated.  It will be removed from the next major version release (6.0) of the OVAL Schema.  It has been replaced by the httpd_item.</xsd:documentation>
+			<xsd:documentation>The version item holds information about the version of Apache installed on the system.  It extends the standard ItemType as defined in the oval-system-characteristics schema and one should refer to the ItemType description for more information.</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="oval-sc:ItemType">
+					<xsd:sequence>
+						<xsd:element name="version" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>The version entity holds the version of Apache installed on the system.</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="apacheveritemversion">
+										<sch:rule context="apache-sc:version_item/apache-sc:version">
+											<sch:assert test="not(@datatype) or @datatype='version'">item <sch:value-of select="../@id"/> - datatype attribute for the version entity of a version_item should be 'version'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+					</xsd:sequence>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+	<!-- =============================================================================== -->
+	<!-- =============================================================================== -->
+	<!-- =============================================================================== -->
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/apache-system-characteristics-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/catos-definitions-schema.xsd
===================================================================
--- trunk/ovaldi/xml/catos-definitions-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/catos-definitions-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,318 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:catos-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#catos" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-definitions-5#catos" elementFormDefault="qualified" version="5.4">
+      <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-common-5" schemaLocation="oval-common-schema.xsd"/>
+      <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-definitions-5" schemaLocation="oval-definitions-schema.xsd"/>
+      <xsd:annotation>
+            <xsd:documentation>The following is a description of the elements, types, and attributes that compose the Cisco CatOS specific tests found in Open Vulnerability and Assessment Language (OVAL). Each test is an extension of the standard test element defined in the Core Definition Schema. Through extension, each test inherits a set of elements and attributes that are shared amongst all OVAL tests. Each test is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core Definition Schema is not outlined here</xsd:documentation>
+            <xsd:documentation>This schema was originally developed by Yuzheng Zhou at Hewlett-Packard. The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+            <xsd:appinfo>
+                  <schema>CatOS Definition</schema>
+                  <version>5.4</version>
+                  <date>4/1/2008 10:41:38 AM</date>
+                  <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                  <sch:title>schematron validation of the Cisco CatOS portion of an OVAL Definitions file</sch:title>
+                  <sch:ns prefix="oval-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5"/>
+                  <sch:ns prefix="catos-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5#catos"/>
+                  <sch:ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/>
+            </xsd:appinfo>
+      </xsd:annotation>
+      <!-- =============================================================================== -->
+      <!-- =============================  MODULE TEST  ================================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="module_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The module test reveals module information in Cisco Catalyst switches. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a module_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:documentation>The module_test is based off the SHOW MODULE command. Having a separate module_test, as opposed to a general command_test, enables running an evaluation based on OVAL without having interactive command access to the device.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="catosmoduletst">
+                              <sch:rule context="catos-def:module_test/catos-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/catos-def:module_object/@id"><sch:value-of select="../@id"/> - the object child element of a module_test must reference a module_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="catos-def:module_test/catos-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/catos-def:module_number/@id"><sch:value-of select="../@id"/> - the state child element of a module_test must reference a module_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="module_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The module_object element is used by a module test to specify the module to be evaluated. Each object extends the standard ObjectType as defined in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions schema.</xsd:documentation>
+                  <xsd:documentation>A module object consists of a single module_number entity that identifies the module to be used.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="module_number" type="oval-def:EntityObjectIntType" minOccurs="0" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>A number that identifies the a specific module.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="moduleobjmodule_number">
+                                                                        <sch:rule context="catos-def:module_object/catos-def:module_number">
+                                                                              <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the module_number entity of a module_object should be 'int'</sch:assert>
+                                                                              <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal'"><sch:value-of select="../@id"/> - operation attribute for the module_number entity of a module_object should be 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', or 'less than or equal'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="module_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The module_state element defines the module information held within a Cisco Catalyst switch. The module_number, type, and model element specifies the number, type and model of the module respectively. The software_major_release, software_individual_release and software_version_id elements specify the software version information of the module. For instance, if the software version is 8.5(4c)GLX, then software_major_release is 8.5GLX, software_individual_release is 4 and software_version_id is c. Similarly, the hardware_major_release, hardware_individual_release, firmware_major_release and firmware_individual_release elements reveal the hardware and firmware version information of the module.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="module_number" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>A number that identifies the a specific module.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="catosmodulestemodule_number">
+                                                            <sch:rule context="catos-def:module_state/catos-def:module_number">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the module_number entity of a module_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="type" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The type of module.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="catosmodulestetype">
+                                                            <sch:rule context="catos-def:module_state/catos-def:type">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the type entity of a module_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="model" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The model of a module.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="catosmodulestemodel">
+                                                            <sch:rule context="catos-def:module_state/catos-def:model">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the model entity of a module_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="software_major_release" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The major relase of the software of a module to check for.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="catosmodulestesoftware_major_release">
+                                                            <sch:rule context="catos-def:module_state/catos-def:software_major_release">
+                                                                  <sch:assert test="@datatype='version'"><sch:value-of select="../@id"/> - datatype attribute for the software_major_release entity of a module_state should be 'version'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="software_individual_release" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The individual release of the software of the module to check for.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="catosmodulestesoftware_individual_release">
+                                                            <sch:rule context="catos-def:module_state/catos-def:software_individual_release">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the software_individual_release entity of a module_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="software_version_id" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The vesion id of the software of a module to check for.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="catosmodulestesoftware_version_id">
+                                                            <sch:rule context="catos-def:module_state/catos-def:software_version_id">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the software_version_id entity of a module_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="hardware_major_release" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The hardware major release of a module to check for.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="catosmodulestehardware_major_release">
+                                                            <sch:rule context="catos-def:module_state/catos-def:hardware_major_release">
+                                                                  <sch:assert test="@datatype='version'"><sch:value-of select="../@id"/> - datatype attribute for the hardware_major_release entity of a module_state should be 'version'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="hardware_individual_release" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The hardware individual release of a module to check for.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="catosmodulestehardware_individual_release">
+                                                            <sch:rule context="catos-def:module_state/catos-def:hardware_individual_release">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the hardware_individual_release entity of a module_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="firmware_major_release" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The major release of the firmware of a module to check for.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="catosmodulestefirmware_major_release">
+                                                            <sch:rule context="catos-def:module_state/catos-def:firmware_major_release">
+                                                                  <sch:assert test="@datatype='version'"><sch:value-of select="../@id"/> - datatype attribute for the firmware_major_release entity of a module_state should be 'version'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="firmware_individual_release" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The individual release of the firmware of a module to check for.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="catosmodulestefirmware_individual_release">
+                                                            <sch:rule context="catos-def:module_state/catos-def:firmware_individual_release">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the firmware_individual_release entity of a module_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ================================  VERSION TEST  =============================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="version_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The version test is used to check the version of the Cisco CatOS operating system. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a version_object and the optional state element specifies the data to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:documentation>The required information of version_test can be got via a SHOW VERSION command. The separated version_test enables an evaluation based on OVAL without having interactive command access to the device.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="version_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The version_object element is used by a version test to define the different version information associated with a Cisco CatOS system. There is actually only one object relating to version and this is the system as a whole. Therefore, there are no child entities defined. Any OVAL Test written to check version will reference the same version_object which is basically an empty object element.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType"/>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="version_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The version_state element defines the version information held within a Cisco CatOS software release. The swtich_series element specifies the Catalyst switch series. The image_name element specifies the name of the CatOS image. The catos_major_release, catos_individual_release and catos_version_id elements specify the software version information of the module. For instance, if the CatOS version is 8.5(4c)GLX, then catos_major_release is 8.5GLX, catos_individual_release is 4 and catos_version_id is c.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="swtich_series" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>A Catalyst switch series to check for.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="catosverstedevice_series">
+                                                            <sch:rule context="catos-def:version_state/catos-def:swtich_series">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the swtich_series entity of a version_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="image_name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The name of a CatOS image to check for.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="catosversteimage_name">
+                                                            <sch:rule context="catos-def:version_state/catos-def:image_name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the image_name entity of a version_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="catos_major_release" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The major release of CatOS to check for.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="catosverstecatos_major_release">
+                                                            <sch:rule context="catos-def:version_state/catos-def:catos_major_release">
+                                                                  <sch:assert test="@datatype='version'"><sch:value-of select="../@id"/> - datatype attribute for the catos_major_release entity of a version_state should be 'version'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="catos_individual_release" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The individual release of CatOS to check for.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="catosverstecatos_individual_release">
+                                                            <sch:rule context="catos-def:version_state/catos-def:catos_individual_release">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the catos_individual_release entity of a version_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="catos_version_id" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The version id of Cat OS to check for.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="catosverstecatos_version_id">
+                                                            <sch:rule context="catos-def:version_state/catos-def:catos_version_id">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the catos_version_id entity of a version_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/catos-definitions-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/catos-system-characteristics-schema.xsd
===================================================================
--- trunk/ovaldi/xml/catos-system-characteristics-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/catos-system-characteristics-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,232 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" xmlns:catos-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#catos" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#catos" elementFormDefault="qualified" version="5.4">
+     <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" schemaLocation="oval-system-characteristics-schema.xsd"/>
+     <xsd:annotation>
+          <xsd:documentation>The following is a description of the elements, types, and attributes that compose the Cisco CatOS specific system characteristic items found in Open Vulnerability and Assessment Language (OVAL). Each item is an extension of the standard test element defined in the Core Definition Schema. Through extension, each test inherits a set of elements and attributes that are shared amongst all OVAL tests. Each test is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core Definition Schema is not outlined here.</xsd:documentation>
+          <xsd:documentation>This schema was originally developed by Yuzheng Zhou at Hewlett-Packard. The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+          <xsd:appinfo>
+               <schema>CatOS System Characteristics</schema>
+               <version>5.4</version>
+               <date>4/1/2008 10:41:39 AM</date>
+                <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                <sch:title>schematron validation of the Cisco CatOS portion of an OVAL System Characteristics file</sch:title>
+               <sch:ns prefix="oval-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5"/>
+               <sch:ns prefix="catos-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#catos"/>
+          </xsd:appinfo>
+     </xsd:annotation>
+     <!-- =============================================================================== -->
+     <!-- ========================  CATOS MODULE ITEM  ================================= -->
+     <!-- =============================================================================== -->
+     <xsd:element name="module_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>Stores results from SHOW MODULE command.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="module_number" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="catosmoduleitemmodule_number">
+                                                  <sch:rule context="catos-sc:module_item/catos-sc:module_number">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the module_number entity of a module_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="type" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="catosmoduleitemtype">
+                                                  <sch:rule context="catos-sc:module_item/catos-sc:type">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the type entity of a module_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="model" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="catosmoduleitemmodel">
+                                                  <sch:rule context="catos-sc:module_item/catos-sc:model">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the model entity of a module_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="software_major_release" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="catosmoduleitemsoftware_major_release">
+                                                  <sch:rule context="catos-sc:module_item/catos-sc:software_major_release">
+                                                       <sch:assert test="@datatype='version'">item <sch:value-of select="../@id"/> - datatype attribute for the software_major_release entity of a module_item should be 'version'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="software_individual_release" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="catosmoduleitemsoftware_individual_release">
+                                                  <sch:rule context="catos-sc:module_item/catos-sc:software_individual_release">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the software_individual_release entity of a module_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="software_version_id" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="catosmoduleitemsoftware_version_id">
+                                                  <sch:rule context="catos-sc:module_item/catos-sc:software_version_id">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the software_version_id entity of a module_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="hardware_major_release" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="catosmoduleitemhardware_major_release">
+                                                  <sch:rule context="catos-sc:module_item/catos-sc:hardware_major_release">
+                                                       <sch:assert test="@datatype='version'">item <sch:value-of select="../@id"/> - datatype attribute for the hardware_major_release entity of a module_item should be 'version'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="hardware_individual_release" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="catosmoduleitemhardware_individual_release">
+                                                  <sch:rule context="catos-sc:module_item/catos-sc:hardware_individual_release">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the hardware_individual_release entity of a module_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="firmware_major_release" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="catosmoduleitemfirmware_major_release">
+                                                  <sch:rule context="catos-sc:module_item/catos-sc:firmware_major_release">
+                                                       <sch:assert test="@datatype='version'">item <sch:value-of select="../@id"/> - datatype attribute for the firmware_major_release entity of a module_item should be 'version'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="firmware_individual_release" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="catosmoduleitemfirmware_individual_release">
+                                                  <sch:rule context="catos-sc:module_item/catos-sc:firmware_individual_release">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the firmware_individual_release entity of a module_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ============================  CATOS VERSION ITEM  ================================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="version_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>Stores results from SHOW VERSION command.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="switch_series" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="versionitemswitch_series">
+                                                  <sch:rule context="catos-sc:version_item/catos-sc:switch_series">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the switch_series entity of a version_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="image_name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="versionitemimage_name">
+                                                  <sch:rule context="catos-sc:version_item/catos-sc:image_name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the image_name entity of a version_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="catos_major_release" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="versionitemcatos_major_release">
+                                                  <sch:rule context="catos-sc:version_item/catos-sc:catos_major_release">
+                                                       <sch:assert test="@datatype='version'">item <sch:value-of select="../@id"/> - datatype attribute for the catos_major_release entity of a version_item should be 'version'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="catos_individual_release" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="versionitemcatos_individual_release">
+                                                  <sch:rule context="catos-sc:version_item/catos-sc:catos_individual_release">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the catos_individual_release entity of a version_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="catos_version_id" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="versionitemcatos_version_id">
+                                                  <sch:rule context="catos-sc:version_item/catos-sc:catos_version_id">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the catos_version_id entity of a version_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/catos-system-characteristics-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/esx-definitions-schema.xsd
===================================================================
--- trunk/ovaldi/xml/esx-definitions-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/esx-definitions-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,187 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:esx-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#esx" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-definitions-5#esx" elementFormDefault="qualified" version="5.4">
+      <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-common-5" schemaLocation="oval-common-schema.xsd"/>
+      <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-definitions-5" schemaLocation="oval-definitions-schema.xsd"/>
+      <xsd:annotation>
+            <xsd:documentation>The following is a description of the elements, types, and attributes that compose the VMware ESX server specific tests found in Open Vulnerability and Assessment Language (OVAL). Each test is an extension of the standard test element defined in the Core Definition Schema. Through extension, each test inherits a set of elements and attributes that are shared amongst all OVAL tests. Each test is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core Definition Schema is not outlined here.</xsd:documentation>
+            <xsd:documentation>This schema was originally developed by Yuzheng Zhou and Todd Dolinsky at Hewlett-Packard. The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+            <xsd:appinfo>
+                  <schema>VMware ESX server Definition</schema>
+                  <version>5.4</version>
+                  <date>4/1/2008 10:41:39 AM</date>
+                  <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                  <sch:title>schematron validation of the VMware ESX server portion of an OVAL Definitions file</sch:title>
+                  <sch:ns prefix="oval-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5"/>
+                  <sch:ns prefix="esx-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5#esx"/>
+                  <sch:ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/>
+            </xsd:appinfo>
+      </xsd:annotation>
+      <!-- =============================================================================== -->
+      <!-- ===============================  PATCH TEST  ================================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="patch_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The patch test reveals the installation status of a specific patch in the VMware ESX server. This information can be retrieved by the "esxupdate query | grep ESX-xxxxxxx" command. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a patch_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="patch_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The patch_object element is used by a patch test to define those objects to be evaluated based on a specified state. Each object extends the standard ObjectType as defined in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>A package object consists of a single patch_number entity that identifies the patch to be checked.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="behaviors" type="esx-def:PatchBehaviors" minOccurs="0" maxOccurs="1"/>
+                                                <xsd:element name="patch_number" type="oval-def:EntityObjectIntType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation/>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="esxpatchobjpatch_number">
+                                                                        <sch:rule context="esx-def:patch_object/esx-def:patch_number">
+                                                                              <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the patch_number entity of a patch_object should be 'int'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="patch_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The patch_state element defines the information about a specific patch. The patch_number element identifies this patch, and the status element reveals the installation status of this patch in the VMware ESX server. For instance, after the "esxupdate query | grep ESX-2559638" command is run, the result is either a string similar to "ESX-2559638 15:27:17 04/05/07 Update info rpm for ESX 3.0.1." or empty.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="patch_number" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the patch number of a specific patch which will be checked in current VMware ESX server.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="esxpatchstepatch_number">
+                                                            <sch:rule context="esx-def:patch_state/esx-def:patch_number">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the patch_number entity of a patch_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="status" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the installation status of a specific patch in current VMware ESX server.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="esxpatchstestatus">
+                                                            <sch:rule context="esx-def:patch_state/esx-def:status">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the status entity of a patch_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:complexType name="PatchBehaviors">
+            <xsd:annotation>
+                  <xsd:documentation>These behaviors allow a more detailed definition of the patch_object being specified.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:attribute name="supersedence" use="optional" default="false">
+                  <xsd:annotation>
+                        <xsd:documentation>'supersedence' specifies that the object should also match any superseding patches to the one being specified. In other words, if set to True the resulting object set would be the original patch specified plus any superseding patches. The default value is 'false' meaning the object should only match the specified patch.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:boolean"/>
+                  </xsd:simpleType>
+            </xsd:attribute>
+      </xsd:complexType>
+      <!-- =============================================================================== -->
+      <!-- ===============================  VERSION TEST  ================================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="version_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The version test reveals information about the release and build version of the VMware ESX server. This information can be retrieved by the "vmware -v" command or by checking the /proc/vmware/version file. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a version_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="version_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The version_object element is used by a version test to define those objects to be evaluated based on a specified state. There is actually only one object relating to version and this is the ESX server as a whole. Therefore, there are no child entities defined. Any OVAL Test written to check version will reference the same version_object which is basically an empty object element.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType"/>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="version_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The version_state element defines the information about the release and build version. The release and build elements specify the release and build information of the VMware ESX server respectively. For instance, if the output of "vmware -v" command is "VMware ESX Server 3.0.1 build-39823", then release is equal to "3.0.1" and build is equal to "39823".</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="release" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the release version of current VMware ESX server.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="versionsterelease">
+                                                            <sch:rule context="esx-def:version_state/esx-def:release">
+                                                                  <sch:assert test="@datatype='version'"><sch:value-of select="../@id"/> - datatype attribute for the release entity of an version_state should be 'version'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="build" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the build version of current VMware ESX server.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="versionstebuild">
+                                                            <sch:rule context="esx-def:version_state/esx-def:build">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the build entity of an version_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/esx-definitions-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/esx-system-characteristics-schema.xsd
===================================================================
--- trunk/ovaldi/xml/esx-system-characteristics-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/esx-system-characteristics-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,100 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" xmlns:esx-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#esx" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#esx" elementFormDefault="qualified" version="5.4">
+      <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" schemaLocation="oval-system-characteristics-schema.xsd"/>
+      <xsd:annotation>
+            <xsd:documentation>The following is a description of the elements, types, and attributes that compose the VMware ESX server specific system characteristic items found in Open Vulnerability and Assessment Language (OVAL). Each item is an extension of the standard test element defined in the Core Definition Schema. Through extension, each test inherits a set of elements and attributes that are shared amongst all OVAL tests. Each test is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core Definition Schema is not outlined here.</xsd:documentation>
+            <xsd:documentation>This schema was originally developed by Yuzheng Zhou and Todd Dolinsky at Hewlett-Packard. The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+            <xsd:appinfo>
+                  <schema>VMware ESX server System Characteristics</schema>
+                  <version>5.4</version>
+                  <date>4/1/2008 10:41:39 AM</date>
+                  <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                  <sch:title>schematron validation of the VMware ESX server portion of an OVAL System Characteristics file</sch:title>
+                  <sch:ns prefix="oval-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5"/>
+                  <sch:ns prefix="esx-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#esx"/>
+            </xsd:appinfo>
+      </xsd:annotation>
+      <!-- =============================================================================== -->
+      <!-- ===============================  PATCH ITEM  ================================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="patch_item" substitutionGroup="oval-sc:item">
+            <xsd:annotation>
+                  <xsd:documentation>Installation information about a specific patch in the VMware ESX server. This information can be retrieved by the "esxupdate query | grep ESX-xxxxxxx" command.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-sc:ItemType">
+                              <xsd:sequence>
+                                    <xsd:element name="patch_number" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the patch number which identifies the patch being checked in current VMware ESX server.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="esxpatchitempatch_number">
+                                                            <sch:rule context="esx-sc:patch_item/esx-sc:patch_number">
+                                                                  <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the patch_number entity of a patch_item should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="status" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the installtaion status of a specific patch which is checked in current VMware ESX server.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="esxpatchitemstatus">
+                                                            <sch:rule context="esx-sc:patch_item/esx-sc:status">
+                                                                  <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the status entity of a patch_item should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ===============================  VERSION ITEM  ================================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="version_item" substitutionGroup="oval-sc:item">
+            <xsd:annotation>
+                  <xsd:documentation>Information about the release and build version of VMware ESX server. This information can be retrieved by the "vmware -v" command or by checking the /proc/vmware/version file.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-sc:ItemType">
+                              <xsd:sequence>
+                                    <xsd:element name="release" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the release of current VMware ESX server.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="versionitemrelease">
+                                                            <sch:rule context="esx-sc:version_item/esx-sc:release">
+                                                                  <sch:assert test="@datatype='version'">item <sch:value-of select="../@id"/> - datatype attribute for the release entity of a version_item should be 'version'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="build" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the build version of current VMware ESX server.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="versionitembuild">
+                                                            <sch:rule context="esx-sc:version_item/esx-sc:build">
+                                                                  <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the build entity of a version_item should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/esx-system-characteristics-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/evaluation-ids.xsd
===================================================================
--- trunk/ovaldi/xml/evaluation-ids.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/evaluation-ids.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
+    xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" 
+    xmlns:evalids="http://oval.mitre.org/XMLSchema/ovaldi/evalids" targetNamespace="http://oval.mitre.org/XMLSchema/ovaldi/evalids" elementFormDefault="qualified">
+    <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-common-5" schemaLocation="oval-common-schema.xsd"/>
+    <xsd:annotation>
+        <xsd:documentation>This schema defines an xml format for inputing a set of OVAL Definition ids into the reference OVAL Interpreter for evaluation.</xsd:documentation>
+        <xsd:appinfo>
+            <schema>OVAL Definition Interpreter - Evaluation Id Schema</schema>
+            <version>5.3</version>
+            <date>01/02/2008 11:19:01 AM</date>
+        </xsd:appinfo>
+    </xsd:annotation>
+    
+    <xsd:element name="evalutation-definition-ids">
+        <xsd:annotation>
+            <xsd:documentation>The evalutation-definition-ids element is the root the Document. Its purpose is to bind together the a set of definition elements.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:sequence>
+                <xsd:element name="definition" type="oval:DefinitionIDPattern" minOccurs="1" maxOccurs="unbounded">
+                    <xsd:annotation>
+                        <xsd:documentation>Each definition represents the id of a definition to be evaluated.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+            </xsd:sequence>
+        </xsd:complexType>
+        <xsd:unique name="UniqueDefinitionId">
+            <xsd:annotation>
+                <xsd:documentation>Enforce uniqueness amongst the definition ids found in the document.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:selector xpath="evalids:definition"/>
+            <xsd:field xpath="."/>
+        </xsd:unique>
+    </xsd:element>
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/evaluation-ids.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/freebsd-definitions-schema.xsd
===================================================================
--- trunk/ovaldi/xml/freebsd-definitions-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/freebsd-definitions-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,165 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:freebsd-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#freebsd" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-definitions-5#freebsd" elementFormDefault="qualified" version="5.4">
+      <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-definitions-5" schemaLocation="oval-definitions-schema.xsd"/>
+      <xsd:annotation>
+            <xsd:documentation>The following is a description of the elements, types, and attributes that compose the FreeBSD specific tests found in Open Vulnerability and Assessment Language (OVAL). Each test is an extension of the standard test element defined in the Core Definition Schema. Through extension, each test inherits a set of elements and attributes that are shared amongst all OVAL tests. Each test is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core Definition Schema is not outlined here.</xsd:documentation>
+            <xsd:documentation>The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+            <xsd:appinfo>
+                  <schema>FreeBSD Definition</schema>
+                  <version>5.4</version>
+                  <date>4/1/2008 10:41:39 AM</date>
+                  <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                  <sch:title>schematron validation of the FreeBSD portion of an OVAL Definitions file</sch:title>
+                  <sch:ns prefix="oval-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5"/>
+                  <sch:ns prefix="freebsd-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5#freebsd"/>
+                  <sch:ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/>
+            </xsd:appinfo>
+      </xsd:annotation>
+      <!-- =============================================================================== -->
+      <!-- ==============================  PORT INFO TEST  =============================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="portinfo_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The port info test is used to check the properties of a component of a FreeBSD system. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an portinfo_object and the optional state element specifies the data to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="portinfotst">
+                              <sch:rule context="freebsd-def:portinfo_test/freebsd-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/freebsd-def:portinfo_object/@id"><sch:value-of select="../@id"/> - the object child element of a portinfo_test must reference an portinfo_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="freebsd-def:portinfo_test/freebsd-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/freebsd-def:portinfo_state/@id"><sch:value-of select="../@id"/> - the state child element of a portinfo_test must reference an portinfo_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="portinfo_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The portinfo_object element is used by a port info test to define the specific FreeBSD package to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>A port info object consists of a single pkginst element that identifies a specific package.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="pkginst" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation/>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="portinfoobjpkginst">
+                                                                        <sch:rule context="freebsd-def:portinfo_object/freebsd-def:pkginst">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the pkginst entity of a portinfo_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="portinfo_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The portinfo_state element defines the different information that can be used to evaluate the specified package. This includes the name, category, version, vendor, and description. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="pkginst" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="portinfostepkginst">
+                                                            <sch:rule context="freebsd-def:portinfo_state/freebsd-def:pkginst">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the pkginst entity of a portinfo_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The name of a package.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="portinfostename">
+                                                            <sch:rule context="freebsd-def:portinfo_state/freebsd-def:name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the name entity of a portinfo_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="category" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="portinfostecategory">
+                                                            <sch:rule context="freebsd-def:portinfo_state/freebsd-def:category">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the category entity of a portinfo_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="version" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The version of a package.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="portinfosteversion">
+                                                            <sch:rule context="freebsd-def:portinfo_state/freebsd-def:version">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the version entity of a portinfo_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="vendor" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="portinfostevendor">
+                                                            <sch:rule context="freebsd-def:portinfo_state/freebsd-def:vendor">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the vendor entity of a portinfo_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="description" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="portinfostedescription">
+                                                            <sch:rule context="freebsd-def:portinfo_state/freebsd-def:description">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the description entity of a portinfo_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/freebsd-definitions-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/freebsd-system-characteristics-schema.xsd
===================================================================
--- trunk/ovaldi/xml/freebsd-system-characteristics-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/freebsd-system-characteristics-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,109 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" xmlns:freebsd-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#freebsd" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#freebsd" elementFormDefault="qualified" version="5.4">
+     <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" schemaLocation="oval-system-characteristics-schema.xsd"/>
+     <xsd:annotation>
+          <xsd:documentation>The following is a description of the elements, types, and attributes that compose the FreeBSD specific system characteristic items found in Open Vulnerability and Assessment Language (OVAL). Each item is an extension of the standard test element defined in the Core Definition Schema. Through extension, each test inherits a set of elements and attributes that are shared amongst all OVAL tests. Each test is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core Definition Schema is not outlined here.</xsd:documentation>
+          <xsd:documentation>The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+          <xsd:appinfo>
+               <schema>FreeBSD System Characteristics</schema>
+               <version>5.4</version>
+               <date>4/1/2008 10:41:39 AM</date>
+                <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                <sch:title>schematron validation of the FreeBSD portion of an OVAL System Characteristics file</sch:title>
+               <sch:ns prefix="oval-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5"/>
+               <sch:ns prefix="freebsd-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#freebsd"/>
+          </xsd:appinfo>
+     </xsd:annotation>
+     <!-- =============================================================================== -->
+     <!-- ===============================  PACKAGE ITEM  ================================ -->
+     <!-- =============================================================================== -->
+     <xsd:element name="portinfo_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation/>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="pkginst" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="portinfoitempkginst">
+                                                  <sch:rule context="freebsd-sc:portinfo_item/freebsd-sc:pkginst">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the pkginst entity of a portinfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="portinfoitemname">
+                                                  <sch:rule context="freebsd-sc:portinfo_item/freebsd-sc:name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the name entity of a portinfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="category" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="portinfoitemcategory">
+                                                  <sch:rule context="freebsd-sc:portinfo_item/freebsd-sc:category">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the category entity of a portinfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="version" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="portinfoitemversion">
+                                                  <sch:rule context="freebsd-sc:portinfo_item/freebsd-sc:version">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the version entity of a portinfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="vendor" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="portinfoitemvendor">
+                                                  <sch:rule context="freebsd-sc:portinfo_item/freebsd-sc:vendor">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the vendor entity of a portinfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="description" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="portinfoitemdescription">
+                                                  <sch:rule context="freebsd-sc:portinfo_item/freebsd-sc:description">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the description entity of a portinfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/freebsd-system-characteristics-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/hpux-definitions-schema.xsd
===================================================================
--- trunk/ovaldi/xml/hpux-definitions-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/hpux-definitions-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,942 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:hpux-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#hpux" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-definitions-5#hpux" elementFormDefault="qualified" version="5.4">
+      <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-common-5" schemaLocation="oval-common-schema.xsd"/>
+      <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-definitions-5" schemaLocation="oval-definitions-schema.xsd"/>
+      <xsd:annotation>
+            <xsd:documentation>The following is a description of the elements, types, and attributes that compose the HP-UX specific tests found in Open Vulnerability and Assessment Language (OVAL). Each test is an extension of the standard test element defined in the Core Definition Schema. Through extension, each test inherits a set of elements and attributes that are shared amongst all OVAL tests. Each test is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core Definition Schema is not outlined here.</xsd:documentation>
+            <xsd:documentation>The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+            <xsd:appinfo>
+                  <schema>HP-UX Definition</schema>
+                  <version>5.4</version>
+                  <date>4/1/2008 10:41:40 AM</date>
+                  <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                  <sch:title>schematron validation of the Red Hat portion of an OVAL Definitions file</sch:title>
+                  <sch:ns prefix="oval-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5"/>
+                  <sch:ns prefix="hpux-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5#hpux"/>
+                  <sch:ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/>
+            </xsd:appinfo>
+      </xsd:annotation>
+      <!-- =============================================================================== -->
+      <!-- ===============================  GETCONF TEST  ================================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="getconf_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>From /usr/bin/getconf. See getconf manpage for specific fields</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="getconf_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation/>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="parameter_name" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>This is the parameter name to check</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="gcobjparameter_name">
+                                                                        <sch:rule context="hpux-def:getconf_object/hpux-def:parameter_name">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the parameter_name entity of a getconf_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="pathname" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>This is the pathname to check. Note that pathname is optional in the getconf call. An empty pathname in OVAL should be interpreted as if it was not supplied to the getconf call.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="gcobjpathname">
+                                                                        <sch:rule context="hpux-def:getconf_object/hpux-def:pathname">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the pathname entity of a getconf_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="getconf_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation/>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="parameter_name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the parameter name to check</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="gcsteparameter_name">
+                                                            <sch:rule context="hpux-def:getconf_state/hpux-def:parameter_name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the parameter_name entity of a getconf_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="pathname" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the pathname to check. Note that pathname is optional in the getconf call. An empty pathname in OVAL should be interpreted as if it was not supplied to the getconf call.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="gcstepathname">
+                                                            <sch:rule context="hpux-def:getconf_state/hpux-def:pathname">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the pathname entity of a getconf_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="output" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The output produced by the getconf command.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="gcsteoutput">
+                                                            <sch:rule context="hpux-def:getconf_state/hpux-def:output">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the output entity of a getconf_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ==============================  PATCH(53) TEST  =============================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="patch53_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>From /usr/sbin/swlist -l patch PHxx_yyyyy. See swlist manpage for specific fields</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="patch53_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation/>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="behaviors" type="hpux-def:Patch53Behaviors" minOccurs="0" maxOccurs="1"/>
+                                                <xsd:element name="swtype" type="oval-def:EntityObjectStringType" minOccurs="0" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>HP-UX patch names begin with 'PH'</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="patch53objswtype">
+                                                                        <sch:rule context="hpux-def:patch53_object/hpux-def:swtype">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the swtype entity of a patch53_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="area_patched" type="oval-def:EntityObjectStringType" minOccurs="0" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The third and fourth characters in HP-UX patch names indicate the area of software being patched. CO - General HP-UX commands KL - Kernel patches NE - Network specific patches SS - All other subsystems (X11, starbase, etc.) </xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="patch53objarea_patched">
+                                                                        <sch:rule context="hpux-def:patch_object/hpux-def:area_patched">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the area_patched entity of a patch53_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="patch_base" type="oval-def:EntityObjectStringType" minOccurs="0" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The sixth through tenth characters in HP-UX patch names represent a unique numeric identifier for the patch</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="patch53objpatch_base">
+                                                                        <sch:rule context="hpux-def:patch_object/hpux-def:patch_base">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the patch_base entity of a patch53_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="patch53_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation/>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="swtype" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>HP-UX patch names begin with 'PH'</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="patch53steswtype">
+                                                            <sch:rule context="hpux-def:patch53_state/hpux-def:swtype">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the swtype entity of a patch53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="area_patched" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The third and fourth characters in HP-UX patch names indicate the area of software being patched. CO - General HP-UX commands KL - Kernel patches NE - Network specific patches SS - All other subsystems (X11, starbase, etc.)</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="patch53stearea_patched">
+                                                            <sch:rule context="hpux-def:patch53_state/hpux-def:area_patched">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the area_patched entity of a patch53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="patch_base" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The sixth through tenth characters in HP-UX patch names represent a unique numeric identifier for the patch</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="patch53stepatch_base">
+                                                            <sch:rule context="hpux-def:patch53_state/hpux-def:patch_base">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the patch_base entity of a patch53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:complexType name="Patch53Behaviors">
+            <xsd:annotation>
+                  <xsd:documentation>These behaviors allow a more detailed definition of the patch53 objects being specified.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:attribute name="supersedence" use="optional" default="false">
+                  <xsd:annotation>
+                        <xsd:documentation>'supersedence' specifies that the object should also match any superseding patches to the one being specified. In other words, if set to True the resulting object set would be the original patch specified plus any superseding patches. The default value is 'false' meaning the object should only match the specified patch.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:boolean"/>
+                  </xsd:simpleType>
+            </xsd:attribute>
+      </xsd:complexType>
+      <!-- =============================================================================== -->
+      <!-- ==========================  PATCH TEST (deprecated)  ========================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="patch_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>This test has been deprecated and will be removed in version 6.0 of the language. Recommend use of the newer patch53_test.</xsd:documentation>
+                  <xsd:documentation>From /usr/sbin/swlist -l patch PHxx_yyyyy. See swlist manpage for specific fields</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="patch_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>This object has been deprecated and will be removed in version 6.0 of the language. Recommend use of the newer patch53_object.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="patch_name" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>This is the patch name to check</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="patchobjpatch_name">
+                                                                        <sch:rule context="hpux-def:patch_object/hpux-def:patch_name">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the patch_name entity of a patch_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="patch_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>This state has been deprecated and will be removed in version 6.0 of the language. Recommend use of the newer patch53_state.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="patch_name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the patch name to check</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="patchstepatch_name">
+                                                            <sch:rule context="hpux-def:patch_state/hpux-def:patch_name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the patch_name entity of a patch_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="swtype" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>HP-UX patch names begin with 'PH'</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="patchsteswtype">
+                                                            <sch:rule context="hpux-def:patch_state/hpux-def:swtype">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the swtype entity of a patch_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="area_patched" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The third and fourth characters in HP-UX patch names indicate the area of software being patched. CO - General HP-UX commands KL - Kernel patches NE - Network specific patches SS - All other subsystems (X11, starbase, etc.) </xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="patchstearea_patched">
+                                                            <sch:rule context="hpux-def:patch_state/hpux-def:area_patched">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the area_patched entity of a patch_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="patch_base" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The sixth through tenth characters in HP-UX patch names represent a unique numeric identifier for the patch</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="patchstepatch_base">
+                                                            <sch:rule context="hpux-def:patch_state/hpux-def:patch_base">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the patch_base entity of a patch_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ============================  SOFTWARE LIST TEST  ============================= -->
+      <!-- =============================================================================== -->
+      <xsd:element name="swlist_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>Output of /usr/sbin/swlist command. Note: A quick way to check for the installation of a specific fileset is to use the command 'swlist -a version -l fileset filesetname'. See manpage for swlist for explanation of additional command options.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="swlist_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation/>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="swlist" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>This is the name of the bundle or fileset to check.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="swlistobjswlist">
+                                                                        <sch:rule context="hpux-def:swlist_object/hpux-def:swlist">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the swlist entity of a swlist_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="swlist_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation/>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="swlist" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the name of the bundle or fileset to check.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="swliststeswlist">
+                                                            <sch:rule context="hpux-def:swlist_state/hpux-def:swlist">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the swlist entity of a swlist_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="bundle" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="swliststebundle">
+                                                            <sch:rule context="hpux-def:swlist_state/hpux-def:bundle">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the bundle entity of a swlist_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="fileset" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="swliststefileset">
+                                                            <sch:rule context="hpux-def:swlist_state/hpux-def:fileset">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the fileset entity of a swlist_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="version" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="swliststeversion">
+                                                            <sch:rule context="hpux-def:swlist_state/hpux-def:version">
+                                                                  <sch:assert test="@datatype='fileset_revision'"><sch:value-of select="../@id"/> - datatype attribute for the version entity of a swlist_state should be 'fileset_revision'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="title" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="swliststetitle">
+                                                            <sch:rule context="hpux-def:swlist_state/hpux-def:title">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the title entity of a swlist_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="vendor" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="swliststevendor">
+                                                            <sch:rule context="hpux-def:swlist_state/hpux-def:vendor">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the vendor entity of a swlist_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ===========================  TRUSTED ACCOUNTS TEST  =========================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="trusted_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>This test allows for analysis of account settings in trusted HP-UX installations</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="trusted_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation/>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="username" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>This is the name of the user being checked</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="trustobjusername">
+                                                                        <sch:rule context="hpux-def:trusted_object/hpux-def:username">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the username entity of a trusted_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="trusted_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation/>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="username" type="oval-def:EntityStateStringType" minOccurs="1" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the name of the user being checked</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststeusername">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:username">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the username entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="uid" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The user's ID</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststeuid">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:uid">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the uid entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="password" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the encrypted version of the user's password</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststepassword">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:password">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the password entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="account_owner" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The Account owner for pseudo-users</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststeaccount_owner">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:account_owner">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the account_owner entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="boot_auth" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Boot authorization</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststeboot_auth">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:boot_auth">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the boot_auth entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="audit_id" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>getprpwaid uses the audit ID rather than the UID</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststeaudit_id">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:audit_id">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the audit_id entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="audit_flag" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststeaudit_flag">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:audit_flag">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the audit_flag entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="pw_change_min" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Minimum time between password changes</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststepw_change_min">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:pw_change_min">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the pw_change_min entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="pw_max_size" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Maximum password length in characters</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststepw_max_size">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:pw_max_size">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the pw_max_size entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="pw_expiration" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Password expiration time in seconds</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststepw_expiration">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:pw_expiration">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the pw_expiration entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="pw_life" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Trusted lifetime, after which the account is locked</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststepw_life">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:pw_life">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the pw_life entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="pw_change_s" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Time of last successful password change</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststepw_change_s">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:pw_change_s">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the pw_change_s entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="pw_change_u" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Time of last unsuccessful password change</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststepw_change_u">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:pw_change_u">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the pw_change_u entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="acct_expire" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Absolute account lifetime in seconds</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststeacct_expire">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:acct_expire">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the acct_expire entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="max_llogin" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Maximum time allowed between logins before the account is locked</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststemax_llogin">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:max_llogin">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the max_llogin entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="exp_warning" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The time in seconds before expiration when a warning will appear</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststeexp_warning">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:exp_warning">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the exp_warning entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="usr_chg_pw" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Who can change this user's password</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststeusr_chg_pw">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:usr_chg_pw">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the usr_chg_pw entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="gen_pw" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Allows user to use system-generated passwords</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststegen_pw">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:gen_pw">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the gen_pw entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="pw_restrict" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Whether a triviality check is performed on user-generated passwords</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststepw_restrict">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:pw_restrict">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the pw_restrict entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="pw_null" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Determines if null passwords are allowed for this account</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststepw_null">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:pw_null">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the pw_null entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="pw_gen_char" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Allows password generator to use random printable ASCII characters</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststepw_gen_char">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:pw_gen_char">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the pw_gen_char entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="pw_gen_let" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Allows password generator to use random letters</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststepw_gen_let">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:pw_gen_let">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the pw_gen_let entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="login_time" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Specifies the times when the user may login to this account</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststelogin_time">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:login_time">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the login_time entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="pw_changer" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The user ID of the user who last changed the password on the user's account, if it was not the account owner</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststepw_changer">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:pw_changer">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the pw_changer entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="login_time_s" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The time of the last successful login using this account</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststelogin_time_s">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:login_time_s">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the login_time_s entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="login_time_u" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The time of the last unsuccessful login using this account</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststelogin_time_u">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:login_time_u">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the login_time_u entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="login_tty_s" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The terminal or remote host associated with the last successful login to the account</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststelogin_tty_s">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:login_tty_s">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the login_tty_s entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="login_tty_u" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The terminal or remote hosts associated with the last unsuccessful login to the account</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststelogin_tty_u">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:login_tty_u">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the login_tty_u entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="num_u_logins" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The number of unsuccessful login attempts since that last successful login</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststenum_u_logins">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:num_u_logins">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the num_u_logins entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="max_u_logins" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The maximum number of unsuccessful login attempts before the account is locked</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststemax_u_logins">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:max_u_logins">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the max_u_logins entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="lock_flag" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Indicates whether the administrative lock on the account is set</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="truststelock_flag">
+                                                            <sch:rule context="hpux-def:trusted_state/hpux-def:lock_flag">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the lock_flag entity of a trusted_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/hpux-definitions-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/hpux-system-characteristics-schema.xsd
===================================================================
--- trunk/ovaldi/xml/hpux-system-characteristics-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/hpux-system-characteristics-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,597 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" xmlns:hpux-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#hpux" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#hpux" elementFormDefault="qualified" version="5.4">
+	<xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" schemaLocation="oval-system-characteristics-schema.xsd"/>
+	<xsd:annotation>
+		<xsd:documentation>The following is a description of the elements, types, and attributes that compose the HP-UX specific system characteristic items found in Open Vulnerability and Assessment Language (OVAL).  Each item is an extension of the standard item element defined in the Core System Characteristic Schema.  Through extension, each item inherits a set of elements and attributes that are shared amongst all OVAL Items.  Each item is described in detail and should provide the information necessary to understand what each element and attribute represents.  This document is intended for developers and assumes some familiarity with XML.  A high level description of the interaction between the different tests and their relationship to the Core System Characteristic Schema is not outlined here.</xsd:documentation>
+		<xsd:documentation>The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+		<xsd:appinfo>
+			<schema>HP-UX System Characteristics</schema>
+		     <version>5.4</version>
+		     <date>4/1/2008 10:41:40 AM</date>
+		      <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+		      <sch:title>schematron validation of the HP-UX portion of an OVAL System Characteristics file</sch:title>
+			<sch:ns prefix="oval-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5"/>
+			<sch:ns prefix="hpux-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#hpux"/>
+		</xsd:appinfo>
+	</xsd:annotation>
+	<!-- =============================================================================== -->
+	<!-- ===============================  GETCONF ITEM  ================================ -->
+	<!-- =============================================================================== -->
+	<xsd:element name="getconf_item" substitutionGroup="oval-sc:item">
+		<xsd:annotation>
+			<xsd:documentation>These items contain getconf items.</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="oval-sc:ItemType">
+					<xsd:sequence>
+						<xsd:element name="parameter_name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>This is the parameter name to check</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="gcitemparameter_name">
+										<sch:rule context="hpux-sc:getconf_item/hpux-sc:parameter_name">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the parameter_name entity of a getconf_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="pathname" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>This is the pathname to check</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="gcitempathname">
+										<sch:rule context="hpux-sc:getconf_item/hpux-sc:pathname">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the pathname entity of a getconf_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="output" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>The output produced by the getconf command.</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="gcitemoutput">
+										<sch:rule context="hpux-sc:getconf_item/hpux-sc:output">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the output entity of a getconf_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+					</xsd:sequence>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ================================  PATCH ITEM  ================================= -->
+	<!-- =============================================================================== -->
+	<xsd:element name="patch_item" substitutionGroup="oval-sc:item">
+		<xsd:annotation>
+		     <xsd:documentation>From /usr/sbin/swlist -l patch PHxx_yyyyy. See swlist manpage for specific fields</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="oval-sc:ItemType">
+					<xsd:sequence>
+					     <xsd:element name="swtype" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+					          <xsd:annotation>
+					               <xsd:documentation>HP-UX patch names begin with 'PH'</xsd:documentation>
+					               <xsd:appinfo>
+					                    <sch:pattern id="patchitemswtype">
+					                         <sch:rule context="hpux-def:patch_state/hpux-def:swtype">
+					                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the swtype entity of a patch_item should be 'string'</sch:assert>
+					                         </sch:rule>
+					                    </sch:pattern>
+					               </xsd:appinfo>
+					          </xsd:annotation>
+					     </xsd:element>
+					     <xsd:element name="area_patched" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+							     <xsd:documentation>The third and fourth characters in HP-UX patch names indicate the area of software being patched. CO - General HP-UX commands KL - Kernel patches NE - Network specific patches SS - All other subsystems (X11, starbase, etc.)</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="patchitemarea_patched">
+										<sch:rule context="hpux-sc:patch_item/hpux-sc:area_patched">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the area_patched entity of a patch_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="patch_number" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>The sixth through tenth characters in HP-UX patch names represent a unique numeric identifier for the patch.</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="patchitempatch_number">
+										<sch:rule context="hpux-sc:patch_item/hpux-sc:patch_number">
+											<sch:assert test="not(@datatype) or @datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the patch_number entity of a patch_item should be 'int'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+					</xsd:sequence>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+	<!-- =============================================================================== -->
+	<!-- =============================  SOFTWARE LIST ITEM  ============================ -->
+	<!-- =============================================================================== -->
+	<xsd:element name="swlist_item" substitutionGroup="oval-sc:item">
+		<xsd:annotation>
+			<xsd:documentation>Output of /usr/sbin/swlist command.  Note:  A quick way to check for the installation of a specific fileset is to use the command 'swlist -a version -l fileset filesetname'. See manpage for swlist for explanation of additional command options.</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="oval-sc:ItemType">
+					<xsd:sequence>
+						<xsd:element name="swlist" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>This is the name of the bundle or fileset to check.</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="swlistitemswlist">
+										<sch:rule context="hpux-sc:swlist_item/hpux-sc:swlist">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the swlist entity of a swlist_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="bundle" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation/>
+								<xsd:appinfo>
+									<sch:pattern id="swlistitembundle">
+										<sch:rule context="hpux-sc:swlist_item/hpux-sc:bundle">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the bundle entity of a swlist_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="fileset" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation/>
+								<xsd:appinfo>
+									<sch:pattern id="swlistitemfileset">
+										<sch:rule context="hpux-sc:swlist_item/hpux-sc:fileset">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the fileset entity of a swlist_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="version" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation/>
+								<xsd:appinfo>
+									<sch:pattern id="swlistitemversion">
+										<sch:rule context="hpux-sc:swlist_item/hpux-sc:version">
+										      <sch:assert test="@datatype='fileset_revision'">item <sch:value-of select="../@id"/> - datatype attribute for the version entity of a swlist_item should be 'fileset_revision'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="title" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation/>
+								<xsd:appinfo>
+									<sch:pattern id="swlistitemtitle">
+										<sch:rule context="hpux-sc:swlist_item/hpux-sc:title">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the title entity of a swlist_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="vendor" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation/>
+								<xsd:appinfo>
+									<sch:pattern id="swlistitemvendor">
+										<sch:rule context="hpux-sc:swlist_item/hpux-sc:vendor">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the vendor entity of a swlist_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+					</xsd:sequence>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+	<!-- =============================================================================== -->
+	<!-- ===========================  TRUSTED ACCOUNTS ITEM  =========================== -->
+	<!-- =============================================================================== -->
+	<xsd:element name="trusted_item" substitutionGroup="oval-sc:item">
+		<xsd:annotation>
+			<xsd:documentation>These items contain account settings for trusted HP-UX installations.</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="oval-sc:ItemType">
+					<xsd:sequence>
+						<xsd:element name="username" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>This is the name of the user being checked</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitemtrustitem">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:trustitem">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the trustitem entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="uid" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>The user's ID</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitemuid">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:uid">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the uid entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="password" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>This is the encrypted version of the user's password</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitempassword">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:password">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the password entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="account_owner" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>The Account owner for pseudo-users</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitemaccount_owner">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:account_owner">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the account_owner entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="boot_auth" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>Boot authorization</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitemboot_auth">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:boot_auth">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the boot_auth entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="audit_id" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>getprpwaid uses the audit ID rather than the UID</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitemaudit_id">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:audit_id">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the audit_id entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="audit_flag" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation/>
+								<xsd:appinfo>
+									<sch:pattern id="trustitemaudit_flag">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:audit_flag">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the audit_flag entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="pw_change_min" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>Minimum time between password changes</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitempw_change_min">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:pw_change_min">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the pw_change_min entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="pw_max_size" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>Maximum password length in characters</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitempw_max_size">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:pw_max_size">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the pw_max_size entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="pw_expiration" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>Password expiration time in seconds</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitempw_expiration">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:pw_expiration">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the pw_expiration entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="pw_life" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>Trusted lifetime, after which the account is locked</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitempw_life">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:pw_life">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the pw_life entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="pw_change_s" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>Time of last successful password change</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitempw_change_s">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:pw_change_s">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the pw_change_s entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="pw_change_u" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>Time of last unsuccessful password change</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitempw_change_u">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:pw_change_u">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the pw_change_u entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="acct_expire" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>Absolute account lifetime in seconds</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitemacct_expire">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:acct_expire">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the acct_expire entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="max_llogin" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>Maximum time allowed between logins before the account is locked</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitemmax_llogin">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:max_llogin">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the max_llogin entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="exp_warning" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>The time in seconds before expiration when a warning will appear</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitemexp_warning">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:exp_warning">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the exp_warning entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="usr_chg_pw" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>Who can change this user's password</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitemusr_chg_pw">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:usr_chg_pw">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the usr_chg_pw entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="gen_pw" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>Allows user to use system-generated passwords</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitemgen_pw">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:gen_pw">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the gen_pw entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="pw_restrict" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>Whether a triviality check is performed on user-generated passwords</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitempw_restrict">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:pw_restrict">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the pw_restrict entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="pw_null" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>Determines if null passwords are allowed for this account</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitempw_null">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:pw_null">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the pw_null entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="pw_gen_char" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>Allows password generator to use random printable ASCII characters</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitempw_gen_char">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:pw_gen_char">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the pw_gen_char entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="pw_gen_let" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>Allows password generator to use random letters</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitempw_gen_let">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:swlistpw_gen_let">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the pw_gen_let entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="login_time" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>Specifies the times when the user may login to this account</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitemlogin_time">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:login_time">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the login_time entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="pw_changer" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>The user ID of the user who last changed the password on the user's account, if it was not the account owner</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitempw_changer">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:pw_changer">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the pw_changer entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="login_time_s" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>The time of the last successful login using this account</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitemlogin_time_s">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:login_time_s">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the login_time_s entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="login_time_u" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>The time of the last unsuccessful login using this account</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitemlogin_time_u">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:login_time_u">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the login_time_u entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="login_tty_s" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>The terminal or remote host associated with the last successful login to the account</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitemlogin_tty_s">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:login_tty_s">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the login_tty_s entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="login_tty_u" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>The terminal or remote hosts associated with the last unsuccessful login to the account</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitemlogin_tty_u">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:login_tty_u">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the login_tty_u entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="num_u_logins" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>The number of unsuccessful login attempts since that last successful login</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitemnum_u_logins">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:num_u_logins">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the num_u_logins entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="max_u_logins" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>The maximum number of unsuccessful login attempts before the account is locked</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitemmax_u_logins">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:max_u_logins">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the max_u_logins entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+						<xsd:element name="lock_flag" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+							<xsd:annotation>
+								<xsd:documentation>Indicates whether the administrative lock on the account is set</xsd:documentation>
+								<xsd:appinfo>
+									<sch:pattern id="trustitemlock_flag">
+										<sch:rule context="hpux-sc:trusted_item/hpux-sc:lock_flag">
+											<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the lock_flag entity of a trusted_item should be 'string'</sch:assert>
+										</sch:rule>
+									</sch:pattern>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:element>
+					</xsd:sequence>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/hpux-system-characteristics-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/independent-definitions-schema.xsd
===================================================================
--- trunk/ovaldi/xml/independent-definitions-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/independent-definitions-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,1373 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:ind-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" elementFormDefault="qualified" version="5.4">
+      <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-common-5" schemaLocation="oval-common-schema.xsd"/>
+      <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-definitions-5" schemaLocation="oval-definitions-schema.xsd"/>
+      <xsd:annotation>
+            <xsd:documentation>The following is a description of the elements, types, and attributes that compose the tests found in Open Vulnerability and Assessment Language (OVAL) that are independent of a specific piece of software. Each test is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core Definition Schema is not outlined here.</xsd:documentation>
+            <xsd:documentation>The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+            <xsd:appinfo>
+                  <schema>Independent Definition</schema>
+                  <version>5.4</version>
+                  <date>4/1/2008 10:41:40 AM</date>
+                  <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                  <sch:title>schematron validation of the Independent portion of an OVAL Definitions file</sch:title>
+                  <sch:ns prefix="oval-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5"/>
+                  <sch:ns prefix="ind-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent"/>
+                  <sch:ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/>
+            </xsd:appinfo>
+      </xsd:annotation>
+      <!-- =============================================================================== -->
+      <!-- ================================  FAMILY TEST  ================================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="family_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The family_test element is used to check the family a certain system belongs to. This test basically allows the high level system types (window, unix, ios, etc.) to be tested. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a family_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="famtst">
+                              <sch:rule context="ind-def:family_test/ind-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ind-def:family_object/@id"><sch:value-of select="../@id"/> - the object child element of a family_test must reference a family_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="ind-def:family_test/ind-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/ind-def:family_state/@id"><sch:value-of select="../@id"/> - the state child element of a family_test must reference a family_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="family_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The family_object element is used by a family test to define those objects to evaluate based on a specified state. There is actually only one object relating to family and this is the system as a whole. Therefore, there are no child entities defined. Any OVAL Test written to check the family will reference the same family_object which is basically an empty object element.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType"/>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="family_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The family_state element contains a single entity that is used to check the family associated with the system. The family is a high-level classification of system types.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="family" type="ind-def:EntityStateFamilyType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This element describes the high-level system OS type to test against. Please refer to the definition of the EntityFamilyType for more information about the possible values..</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="famstefamily">
+                                                            <sch:rule context="ind-def:family_state/ind-def:family">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the family entity of a family_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ===============================  FILE MD5 TEST  =============================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="filemd5_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The file md5 test is used to check the md5 associated with a specified file. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a filemd5_object and the optional state element specifies the md5 to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:documentation>This test has been deprecated. You should use the filehash_test instead. This test will be dropped in the major release of OVAL.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="md5tst">
+                              <sch:rule context="ind-def:filemd5_test/ind-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ind-def:filemd5_object/@id"><sch:value-of select="../@id"/> - the object child element of a filemd5_test must reference a filemd5_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="ind-def:filemd5_test/ind-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/ind-def:filemd5_state/@id"><sch:value-of select="../@id"/> - the state child element of a filemd5_test must reference a filemd5_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="filemd5_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The filemd5_object element is used by a file test to define the specific file(s) to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>A file object defines the path and filename of the file(s). In addition, a number of behaviors may be provided that help guide the collection of objects. Please refer to the Filemd5Behaviors complex type for more information about specific behaviors.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="behaviors" type="ind-def:Filemd5Behaviors" minOccurs="0" maxOccurs="1"/>
+                                                <xsd:element name="path" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The path element specifies the absolute path to a file on the machine.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="md5objpath">
+                                                                        <sch:rule context="ind-def:filemd5_object/ind-def:path">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a filemd5_object should be 'string'</sch:assert>
+                                                                       </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="filename" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The filename element specifies the name of the file. If the nillable attribute is set to true, then the object being specified is the higher level path. In this case, the filename element should not be collected or used in analysis. Setting nil equal to true is different than using a .* pattern match, says to collect every file under a given path.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="md5objfilename">
+                                                                        <sch:rule context="ind-def:filemd5_object/ind-def:filename">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filename entity of a filemd5_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="filemd5_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The filemd5_state element contains entities that are used to check the file path, name, and the md5 associated with a specific file.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="path" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The path element specifies the absolute path to a file on the machine.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="md5stepath">
+                                                            <sch:rule context="ind-def:filemd5_state/ind-def:path">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a filemd5_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="filename" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The filename element specifies the name of the file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="md5stefilename">
+                                                            <sch:rule context="ind-def:filemd5_state/ind-def:filename">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filename entity of a filemd5_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="md5" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The md5 element is the md5 hash of the file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="md5stemd5">
+                                                            <sch:rule context="ind-def:filemd5_state/ind-def:md5">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the md5 entity of a filemd5_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:complexType name="Filemd5Behaviors">
+            <xsd:annotation>
+                  <xsd:documentation>The Filemd5Behaviors complex type defines a number of behaviors that allow a more detailed definition of the filemd5_object being specified.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:attribute name="max_depth" use="optional" default="1">
+                  <xsd:annotation>
+                        <xsd:documentation>'max_depth' defines the maximum depth of recursion to perform when a recurse_direction is specified. A value of '0' is equivalent to no recursion, '1' means to step only one directory level up/down, and so on. The default value is '-1' meaning no limitation. Note that the default recurse_direction behavior is 'none' so even though max_depth specifies no limitation by default, the recurse_direction behavior turns recusion off.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:integer">
+                              <xsd:fractionDigits value="0"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="recurse_direction" use="optional" default="none">
+                  <xsd:annotation>
+                        <xsd:documentation>'recurse_direction' defines the direction, either 'up' to parent directories, or 'down' into child directories to recursively search for files. When recursing up or down, one is limited by the max_depth behavior. Note that it is not an error if max_depth specifies a certain level of recursion and that level does not exist. Recursing should only go as deep as available. The default value is 'none' for no recursion.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:string">
+                              <xsd:enumeration value="none"/>
+                              <xsd:enumeration value="up"/>
+                              <xsd:enumeration value="down"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+      </xsd:complexType>
+      <!-- =============================================================================== -->
+      <!-- ==============================  FILE HASH TEST  =============================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="filehash_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The file hash test is used to check the hashes associated with a specified file. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a filehash_object and the optional state element specifies the different hashes to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="hashtst">
+                              <sch:rule context="ind-def:filehash_test/ind-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ind-def:filehash_object/@id"><sch:value-of select="../@id"/> - the object child element of a filehash_test must reference a filesha1_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="ind-def:filehash_test/ind-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/ind-def:filehash_state/@id"><sch:value-of select="../@id"/> - the state child element of a filehash_test must reference a filesha1_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="filehash_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The filehash_object element is used by a file hash test to define the specific file(s) to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>A file object defines the path and filename of the file(s). In addition, a number of behaviors may be provided that help guide the collection of objects. Please refer to the FilehashBehaviors complex type for more information about specific behaviors.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="behaviors" type="ind-def:FilehashBehaviors" minOccurs="0" maxOccurs="1"/>
+                                                <xsd:element name="path" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The path element specifies the absolute path to a file on the machine.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="hashobjpath">
+                                                                        <sch:rule context="ind-def:filehash_object/ind-def:path">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a filehash_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="filename" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The filename element specifies the name of the file. If the nillable attribute is set to true, then the object being specified is the higher level path. In this case, the filename element should not be collected or used in analysis. Setting nil equal to true is different than using a .* pattern match, says to collect every file under a given path.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="hashobjfilename">
+                                                                        <sch:rule context="ind-def:filehash_object/ind-def:filename">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filename entity of a filehash_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="filehash_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The filehash_state element contains entities that are used to check the file path, name, and the different hashes associated with a specific file.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="path" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The path element specifies the absolute path to a file on the machine.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="hashstepath">
+                                                            <sch:rule context="ind-def:filehash_state/ind-def:path">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a filehash_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="filename" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The filename element specifies the name of the file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="hashstefilename">
+                                                            <sch:rule context="ind-def:filehash_state/ind-def:filename">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filename entity of a filehash_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="md5" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The md5 element is the md5 hash of the file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="hashstemd5">
+                                                            <sch:rule context="ind-def:filehash_state/ind-def:md5">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the md5 entity of a filehash_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="sha1" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The sha1 element is the sha1 hash of the file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="hashstesha1">
+                                                            <sch:rule context="ind-def:filehash_state/ind-def:sha1">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the sha1 entity of a filehash_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:complexType name="FilehashBehaviors">
+            <xsd:annotation>
+                  <xsd:documentation>The FilehashBehaviors complex type defines a number of behaviors that allow a more detailed definition of the filehash_object being specified.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:attribute name="max_depth" use="optional" default="1">
+                  <xsd:annotation>
+                        <xsd:documentation>'max_depth' defines how many directories to recurse when a recures direction is specified. The default value is '-1' meaning no limitation. A value of '0' is equivalent to no recursion, '1' means to step only one directory level up/down, and so on.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:integer">
+                              <xsd:fractionDigits value="0"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="recurse_direction" use="optional" default="none">
+                  <xsd:annotation>
+                        <xsd:documentation>'recurse_direction' defines the direction to recurse, either 'up' to parent directories, or 'down' into child directories. The default value is 'none' for no recursion.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:string">
+                              <xsd:enumeration value="none"/>
+                              <xsd:enumeration value="up"/>
+                              <xsd:enumeration value="down"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+      </xsd:complexType>
+      <!-- =============================================================================== -->
+      <!-- =======================  ENVIRONMENT VARIABLE TEST  =========================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="environmentvariable_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The environmentvariable_test element is used to check an environment variable found on the system. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a environmentvariable_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="envtst">
+                              <sch:rule context="ind-def:environmentvariable_test/ind-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ind-def:environmentvariable_object/@id"><sch:value-of select="../@id"/> - the object child element of an environmentvariable_test must reference a environmentvariable_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="ind-def:environmentvariable_test/ind-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/ind-def:environmentvariable_state/@id"><sch:value-of select="../@id"/> - the state child element of an environmentvariable_test must reference a environmentvariable_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="environmentvariable_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The environmentvariable_object element is used by an environment variable test to define the specific environment variable(s) to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set" minOccurs="0" maxOccurs="1"/>
+                                          <xsd:sequence minOccurs="0" maxOccurs="1">
+                                                <xsd:element name="name" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>This element describes the name of an environment variable.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="envobjname">
+                                                                        <sch:rule context="ind-def:environmentvariable_object/ind-def:name">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the name entity of an environmentvariable_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="environmentvariable_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The environmentvariable_state element contains two entities that are used to check the name of the specified environment varible and the value associated with it.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This element describes the name of an environment variable.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="envstename">
+                                                            <sch:rule context="ind-def:environmentvariable_state/ind-def:name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the name entity of an environmentvariable_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="value" type="oval-def:EntityStateAnyType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The actual value of the specified environment variable.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="envstevalue">
+                                                            <sch:rule context="ind-def:environmentvariable_state/ind-def:value">
+                                                                  <sch:assert test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"><sch:value-of select="../@id"/> - The datatype has been set to 'int' but the value is not an integer.</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =================================  SQL TEST  ================================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="sql_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The sql test is used to check information stored in a database. It is often teh case that applications store configuration settings in a database as opposed to a file. This test has been designed to enable those settings to be tested. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a wmi_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="sqltst">
+                              <sch:rule context="ind-def:sql_test/ind-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ind-def:sql_object/@id"><sch:value-of select="../@id"/> - the object child element of a sql_test must reference a sql_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="ind-def:sql_test/ind-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/ind-def:sql_state/@id"><sch:value-of select="../@id"/> - the state child element of a sql_test must reference a sql_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="sql_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The sql_object element is used by a sql test to define the specific database and query to be evaluated. Connection information is supplied allowing the tool to connect to the desired database and a query is supplied to call out the desired setting. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set" minOccurs="0"/>
+                                          <xsd:sequence minOccurs="0">
+                                                <xsd:element name="engine" type="ind-def:EntityObjectEngineType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The engine entity defines the specific database engine to use. Any tool looking to collect information about this object will need to know the engine in order to use the appropriate drivers to establish a connection.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="sqlobjdengine">
+                                                                        <sch:rule context="ind-def:sql_object/ind-def:engine">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the engine entity of an sql_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="version" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The version entity defines the specific version of the database engine to use. This is alos important in determining the correct driver to use for establishing a connection.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="sqlobjversion">
+                                                                        <sch:rule context="ind-def:sql_object/ind-def:version">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the version entity of an sql_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="connection_string" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The connection_string entity defines specific connection parameters to be used in connecting to the database. This will help a tool connect to the correct database.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="sqlobjconnection_string">
+                                                                        <sch:rule context="ind-def:sql_object/ind-def:connection_string">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the connection_string entity of an sql_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="sql" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The sql entity defines a query used to identify the object(s) to test against. Any valid SQL query is usable with one exception, at most one field is allowed in the SELECT portion of the query. For example SELECT name FROM ... is valid, as is SELECT 'true' FROM ..., but SELECT name, number FROM ... is not valid. This is because the result element in the data section is only designed to work against a single field.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="sqlobjsql">
+                                                                        <sch:rule context="ind-def:sql_object/ind-def:sql">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the sql entity of a sql_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="sql_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The sql_state element contains two entities that are used to check the name of the specified environment varible and the value associated with it.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="engine" type="ind-def:EntityObjectEngineType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The engine entity defines a specific database engine.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="sqlsteengine">
+                                                            <sch:rule context="ind-def:sql_state/ind-def:engine">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the engine entity of an sql_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="version" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The version entity defines a specific version of a given database engine.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="sqlsteversion">
+                                                            <sch:rule context="ind-def:sql_state/ind-def:version">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the version entity of an sql_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="connection_string" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The connection_string entity defines a set of parameters that help identify the connection to the database.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="sqlsteconnection_string">
+                                                            <sch:rule context="ind-def:sql_state/ind-def:connection_string">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the connection_string entity of an sql_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="sql" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>the sql entity defines a query used to identify the object(s) to test against.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="sqlstesql">
+                                                            <sch:rule context="ind-def:sql_state/ind-def:sql">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the sql entity of a sql_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="result" type="oval-def:EntityStateAnyType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The result entity specifies how to test objects in the result set of the specified SQL statement. Only one comparable field is allowed. So if the SQL statement look like 'SELECT name FROM ...', then a result entity with a value of 'Fred' would test the set of 'name' values returned by the SQL statement against the value 'Fred'.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="sqlsteresult">
+                                                            <sch:rule context="ind-def:sql_state/ind-def:result">
+                                                                  <sch:assert test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"><sch:value-of select="../@id"/> - The datatype has been set to 'int' but the value is not an integer.</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ==========================  TEXT FILE CONTENT TEST  =========================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="textfilecontent54_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The textfilecontent54_test element is used to check the contents of a text file (aka a configuration file) by looking at individual blocks of text. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a textfilecontent54_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="txt54tst">
+                              <sch:rule context="ind-def:textfilecontent54_test/ind-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ind-def:textfilecontent54_object/@id"><sch:value-of select="../@id"/> - the object child element of a textfilecontent54_test must reference a textfilecontent54_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="ind-def:textfilecontent54_test/ind-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/ind-def:textfilecontent54_state/@id"><sch:value-of select="../@id"/> - the state child element of a textfilecontent54_test must reference a textfilecontent54_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="textfilecontent54_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The textfilecontent54_object element is used by a textfilecontent_test to define the specific block(s) of text of a file(s) to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set" minOccurs="0" maxOccurs="1"/>
+                                          <xsd:sequence minOccurs="0" maxOccurs="1">
+                                                <xsd:element name="behaviors" type="ind-def:TextfilecontentBehaviors" minOccurs="0" maxOccurs="1"/>
+                                                <xsd:element name="path" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The path entity specifies the absolute path to a file on the machine, not including the filename.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="txt54objpath">
+                                                                        <sch:rule context="ind-def:textfilecontent54_object/ind-def:path">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a textfilecontent54_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="filename" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The filename entity specifies the name of a file.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="txt54objfilename">
+                                                                        <sch:rule context="ind-def:textfilecontent54_object/ind-def:filename">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filename entity of a textfilecontent54_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="pattern" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The pattern entity defines a chunk of text in a file and is represented using a regular expression. A subexpression (using parentheses) can call out a piece of the text block to test. For example, the pattern abc(.*)xyz would look for a block of text in the file that starts with abc and ends with xyz, with the subexpression being all the characters that exist inbetween. The value of the subexpression can then be tested using the subexpression entity of a textfilecontent54_state. Note that if the pattern, starting at the same point in the file, matches more than one block of text, then it matches the longest. For example, given a file with abcdefxyzxyzabc, then the pattern abc(.*)xyz would match the block abcdefxyzxyz. Subexpressions also match the longest possible substrings, subject to the constraint that the whole match be as long as possible, with subexpressions starting earlier in the pattern taking priority over ones starting later.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="txt54objpattern">
+                                                                        <sch:rule context="ind-def:textfilecontent54_object/ind-def:pattern">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the pattern entity of a textfilecontent54_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="instance" type="oval-def:EntityObjectIntType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The instance entity calls out a specific match of the pattern. Note that the main purpose of this entity is too provide uniqueness for different textfilecontent_items that results from multiple matches of a given pattern against the same file. Most likely this entity will be defined as greater than 1 which would result in the object representing the set of all matches of the pattern.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="txt54objinstance">
+                                                                        <sch:rule context="ind-def:textfilecontent54_object/ind-def:instance">
+                                                                              <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the instance entity of a textfilecontent54_object should be 'int'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="textfilecontent54_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The textfilecontent54_state element contains entities that are used to check the file path and name, as well as the text block in question and the value of the subexpressions.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="path" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The path entity represents the absolute path to a file on the machine.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="txt54stepath">
+                                                            <sch:rule context="ind-def:textfilecontent54_state/ind-def:path">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a textfilecontent_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="filename" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The filename entity represents the name of a file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="txt54stefilename">
+                                                            <sch:rule context="ind-def:textfilecontent54_state/ind-def:filename">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filename entity of a textfilecontent54_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="pattern" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The pattern entity represents a regular expression that is used to define a block of text.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="txt54stepattern">
+                                                            <sch:rule context="ind-def:textfilecontent54_state/ind-def:pattern">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the pattern entity of a textfilecontent54_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="instance" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The instance entity calls out a specific match of the pattern.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="txt54steinstance">
+                                                            <sch:rule context="ind-def:textfilecontent54_state/ind-def:instance">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the instance entity of a textfilecontent54_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="subexpression" type="oval-def:EntityStateAnyType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The subexpression entity represents a value to test against the subexpression in the specified pattern. If multiple subexpressions are specified in the pattern, this value tested against all of them. For example, if the pattern abc(.*)mno(.*)xyp was supplied, and the state specifies a subexpression value of enabled, then the test would check that both (or at least one, none, etc. depending on the entity_check attribute) of the subexpressions have a value of enabled. </xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="txt54stesubexpression">
+                                                            <sch:rule context="ind-def:textfilecontent54_state/ind-def:subexpression">
+                                                                  <sch:assert test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"><sch:value-of select="../@id"/> - The datatype has been set to 'int' but the value is not an integer.</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="textfilecontent_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>This test has been deprecated and will be removed in version 6.0 of the language. Recommend use of the newer textfilecontent54_test.</xsd:documentation>
+                  <xsd:documentation>The textfilecontent_test element is used to check the contents of a text file (aka a configuration file) by looking at individual lines. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a textfilecontent_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="txttst">
+                              <sch:rule context="ind-def:textfilecontent_test/ind-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ind-def:textfilecontent_object/@id"><sch:value-of select="../@id"/> - the object child element of a textfilecontent_test must reference a textfilecontent_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="ind-def:textfilecontent_test/ind-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/ind-def:textfilecontent_state/@id"><sch:value-of select="../@id"/> - the state child element of a textfilecontent_test must reference a textfilecontent_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="textfilecontent_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>This object has been deprecated and will be removed in version 6.0 of the language. Recommend use of the newer ftextfilecontent54_object.</xsd:documentation>
+                  <xsd:documentation>The textfilecontent_object element is used by a text file content test to define the specific line(s) of a file(s) to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set" minOccurs="0" maxOccurs="1"/>
+                                          <xsd:sequence minOccurs="0" maxOccurs="1">
+                                                <xsd:element name="behaviors" type="ind-def:TextfilecontentBehaviors" minOccurs="0" maxOccurs="1"/>
+                                                <xsd:element name="path" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>Specifies the absolute path to a file on the machine, not including the filename.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="txtobjpath">
+                                                                        <sch:rule context="ind-def:textfilecontent_object/ind-def:path">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a textfilecontent_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="filename" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The filename element specifies the name of the file.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="txtobjfilename">
+                                                                        <sch:rule context="ind-def:textfilecontent_object/ind-def:filename">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filename entity of a textfilecontent_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="line" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The line element represents a line in the file and is represented using a regular expression. A single subexpression can be called out using parentheses. The value of this subexpression can then be checked using a textfilecontent_state.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="txtobjline">
+                                                                        <sch:rule context="ind-def:textfilecontent_object/ind-def:line">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the line entity of a textfilecontent_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="textfilecontent_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>This state has been deprecated and will be removed in version 6.0 of the language. Recommend use of the newer textfilecontent54_state.</xsd:documentation>
+                  <xsd:documentation>The textfilecontent_state element contains entities that are used to check the file path and name, as well as the line in question and the value of the specific subexpression.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="path" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Specifies the absolute path to a file on the machine.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="txtstepath">
+                                                            <sch:rule context="ind-def:textfilecontent_state/ind-def:path">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a textfilecontent_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="filename" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The name of the file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="txtstefilename">
+                                                            <sch:rule context="ind-def:textfilecontent_state/ind-def:filename">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filename entity of a textfilecontent_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="line" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The line element represents a line in the file that was collected.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="txtsteline">
+                                                            <sch:rule context="ind-def:textfilecontent_state/ind-def:line">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the line entity of a textfilecontent_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="subexpression" type="oval-def:EntityStateAnyType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Each subexpression in the regular expression of the line element is then tested against the value specified in the subexpression element.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="txtstesubexpression">
+                                                            <sch:rule context="ind-def:textfilecontent_state/ind-def:subexpression">
+                                                                   <sch:assert test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"><sch:value-of select="../@id"/> - The datatype has been set to 'int' but the value is not an integer.</sch:assert>
+                                                                  <!-- we can use the xpath 2.0 function matches() to define assertions for other datatypes -->
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:complexType name="TextfilecontentBehaviors">
+            <xsd:annotation>
+                  <xsd:documentation>The TextfilecontentBehaviors complex type defines a number of behaviors that allow a more detailed definition of the textfilecontent_object being specified.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:attribute name="max_depth" use="optional" default="1">
+                  <xsd:annotation>
+                        <xsd:documentation>'max_depth' defines the maximum depth of recursion to perform when a recurse_direction is specified. A value of '0' is equivalent to no recursion, '1' means to step only one directory level up/down, and so on. The default value is '-1' meaning no limitation. Note that the default recurse_direction behavior is 'none' so even though max_depth specifies no limitation by default, the recurse_direction behavior turns recusion off.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:integer">
+                              <xsd:fractionDigits value="0"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="recurse_direction" use="optional" default="none">
+                  <xsd:annotation>
+                        <xsd:documentation>'recurse_direction' defines the direction, either 'up' to parent directories, or 'down' into child directories to recursively search for files. When recursing up or down, one is limited by the max_depth behavior. Note that it is not an error if max_depth specifies a certain level of recursion and that level does not exist. Recursing should only go as deep as available. The default value is 'none' for no recursion.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:string">
+                              <xsd:enumeration value="none"/>
+                              <xsd:enumeration value="up"/>
+                              <xsd:enumeration value="down"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+      </xsd:complexType>
+      <!-- =============================================================================== -->
+      <!-- ===============================  UNKNOWN TEST  ================================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="unknown_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>An unknown test acts as a placeholder for tests whose implementation is unknown. Any information that is known about the test should be held in the notes child element that is available through the extension of the abstract test element. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. Note that for an unknown test, the required check attribute that is part of the extended TestType should be ignored during evaluation and hence can be set to any valid value.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType"/>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ===============================  VARIABLE TEST  =============================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="variable_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The variable test allows the value of a variable to be compared to a defined value. As an example one might use this test to validate that a variable being passed in from an external source falls within a specified range. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a variable_object and the optional state element specifies the value to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="vattst">
+                              <sch:rule context="ind-def:variable_test/ind-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ind-def:variable_object/@id"><sch:value-of select="../@id"/> - the object child element of a variable_test must reference a variable_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="ind-def:variable_test/ind-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/ind-def:variable_state/@id"><sch:value-of select="../@id"/> - the state child element of a variable_test must reference a variable_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="variable_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation/>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set" minOccurs="0" maxOccurs="1"/>
+                                          <xsd:sequence minOccurs="0" maxOccurs="1">
+                                                <xsd:element name="var_ref" type="ind-def:EntityObjectVariableRefType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The id of the variable you want.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="varobjvar_ref">
+                                                                        <sch:rule context="ind-def:variable_object/ind-def:var_ref">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the var_ref entity of a variable_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="variable_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The variable_state element contains two entities that are used to check the var_ref of the specified varible and the value associated with it.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="var_ref" type="ind-def:EntityStateVariableRefType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The id of the variable.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="varstevar_ref">
+                                                            <sch:rule context="ind-def:variable_state/ind-def:var_ref">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the var_ref entity of a variable_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="value" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The value of the variable.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="varstevalue">
+                                                            <sch:rule context="ind-def:variable_state/ind-def:value">
+                                                                  <sch:assert test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"><sch:value-of select="../@id"/> - The datatype has been set to 'int' but the value is not an integer.</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ===========================  XML FILE CONTENT TEST  =========================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="xmlfilecontent_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The xmlfilecontent_test element is used to explore the contents of an xml file. This test basically allows specific pieces of an xml document specified using xpath to be tested. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a family_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="xmltst">
+                              <sch:rule context="ind-def:xmlfilecontent_test/ind-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ind-def:xmlfilecontent_object/@id"><sch:value-of select="../@id"/> - the object child element of a xmlfilecontent_test must reference a xmlfilecontent_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="ind-def:xmlfilecontent_test/ind-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/ind-def:xmlfilecontent_state/@id"><sch:value-of select="../@id"/> - the state child element of a xmlfilecontent_test must reference a xmlfilecontent_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="xmlfilecontent_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The xmlfilecontent_object element is used by a xml file content test to define the specific piece of an xml file(s) to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set" minOccurs="0" maxOccurs="1"/>
+                                          <xsd:sequence minOccurs="0" maxOccurs="1">
+                                                <xsd:element name="behaviors" type="ind-def:XmlfilecontentBehaviors" minOccurs="0" maxOccurs="1"/>
+                                                <xsd:element name="path" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>Specifies the absolute path to a file on the machine.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="xmlobjpath">
+                                                                        <sch:rule context="ind-def:xmlfilecontent_object/ind-def:path">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a xmlfilecontent_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="filename" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The filename element specifies the name of the file.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="xmlobjfilename">
+                                                                        <sch:rule context="ind-def:xmlfilecontent_object/ind-def:filename">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filename entity of a xmlfilecontent_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="xpath" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>Specifies an Xpath expression describing the nodes to look at. The only valid operator for xpath is equals since there is an infinite number of possible xpaths and determinining all those that do not equal a give xpath would be impossible.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="xmlobjxpath">
+                                                                        <sch:rule context="ind-def:xmlfilecontent_object/ind-def:xpath">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the xpath entity of a xmlfilecontent_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="xmlfilecontent_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The xmlfilecontent_state element contains entities that are used to check the file path and name, as well as the xpath used and the value of the this xpath.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="path" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Specifies the absolute path to a file on the machine.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="xmlstepath">
+                                                            <sch:rule context="ind-def:xmlfilecontent_state/ind-def:path">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a xmlfilecontent_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="filename" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The filename element specifies the name of the file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="xmlstefilename">
+                                                            <sch:rule context="ind-def:xmlfilecontent_state/ind-def:filename">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filename entity of a xmlfilecontent_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="xpath" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Specifies an Xpath expression describing the nodes to look at.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="xmlstexpath">
+                                                            <sch:rule context="ind-def:xmlfilecontent_state/ind-def:xpath">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the xpath entity of a xmlfilecontent_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="value_of" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The value element checks the value of the nodes found.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="xmlstevalue_of">
+                                                            <sch:rule context="ind-def:xmlfilecontent_state/ind-def:value_of">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the value_of entity of a xmlfilecontent_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:complexType name="XmlfilecontentBehaviors">
+            <xsd:annotation>
+                  <xsd:documentation>The XmlfilecontentBehaviors complex type defines a number of behaviors that allow a more detailed definition of the xmlfilecontentBehaviors_object being specified.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:attribute name="max_depth" use="optional" default="1">
+                  <xsd:annotation>
+                        <xsd:documentation>'max_depth' defines the maximum depth of recursion to perform when a recurse_direction is specified. A value of '0' is equivalent to no recursion, '1' means to step only one directory level up/down, and so on. The default value is '-1' meaning no limitation. Note that the default recurse_direction behavior is 'none' so even though max_depth specifies no limitation by default, the recurse_direction behavior turns recusion off.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:integer">
+                              <xsd:fractionDigits value="0"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="recurse_direction" use="optional" default="none">
+                  <xsd:annotation>
+                        <xsd:documentation>'recurse_direction' defines the direction, either 'up' to parent directories, or 'down' into child directories to recursively search for files. When recursing up or down, one is limited by the max_depth behavior. Note that it is not an error if max_depth specifies a certain level of recursion and that level does not exist. Recursing should only go as deep as available. The default value is 'none' for no recursion.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:string">
+                              <xsd:enumeration value="none"/>
+                              <xsd:enumeration value="up"/>
+                              <xsd:enumeration value="down"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+      </xsd:complexType>
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+      <xsd:complexType name="EntityObjectEngineType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityObjectEngineType complex type defines a string entity value that is restricted to a set of enumerations. Each valid enumeration is a valid database engine. The empty string is also allowed to support empty emlement associated with variable references.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityStateStringType">
+                        <xsd:enumeration value="access"/>
+                        <xsd:enumeration value="db2"/>
+                        <xsd:enumeration value="cache"/>
+                        <xsd:enumeration value="firebird"/>
+                        <xsd:enumeration value="firstsql"/>
+                        <xsd:enumeration value="foxpro"/>
+                        <xsd:enumeration value="informix"/>
+                        <xsd:enumeration value="ingres"/>
+                        <xsd:enumeration value="interbase"/>
+                        <xsd:enumeration value="lightbase"/>
+                        <xsd:enumeration value="maxdb"/>
+                        <xsd:enumeration value="monetdb"/>
+                        <xsd:enumeration value="mimer"/>
+                        <xsd:enumeration value="oracle"/>
+                        <xsd:enumeration value="paradox"/>
+                        <xsd:enumeration value="pervasive"/>
+                        <xsd:enumeration value="postgre"/>
+                        <xsd:enumeration value="postgre"/>
+                        <xsd:enumeration value="sqlbase"/>
+                        <xsd:enumeration value="sqlite"/>
+                        <xsd:enumeration value="sqlserver"/>
+                        <xsd:enumeration value="sybase"/>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+      <xsd:complexType name="EntityStateEngineType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityStateEngineType complex type defines a string entity value that is restricted to a set of enumerations. Each valid enumeration is a valid database engine. The empty string is also allowed to support empty emlement associated with variable references.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityStateStringType">
+                        <xsd:enumeration value="access"/>
+                        <xsd:enumeration value="db2"/>
+                        <xsd:enumeration value="cache"/>
+                        <xsd:enumeration value="firebird"/>
+                        <xsd:enumeration value="firstsql"/>
+                        <xsd:enumeration value="foxpro"/>
+                        <xsd:enumeration value="informix"/>
+                        <xsd:enumeration value="ingres"/>
+                        <xsd:enumeration value="interbase"/>
+                        <xsd:enumeration value="lightbase"/>
+                        <xsd:enumeration value="maxdb"/>
+                        <xsd:enumeration value="monetdb"/>
+                        <xsd:enumeration value="mimer"/>
+                        <xsd:enumeration value="oracle"/>
+                        <xsd:enumeration value="paradox"/>
+                        <xsd:enumeration value="pervasive"/>
+                        <xsd:enumeration value="postgre"/>
+                        <xsd:enumeration value="postgre"/>
+                        <xsd:enumeration value="sqlbase"/>
+                        <xsd:enumeration value="sqlite"/>
+                        <xsd:enumeration value="sqlserver"/>
+                        <xsd:enumeration value="sybase"/>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+      <xsd:complexType name="EntityStateFamilyType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityStateFamilyType complex type defines a string entity value that is restricted to a set of enumerations. Each valid enumeration is a high-level family of system operating system. The empty string is also allowed to support empty emlement associated with variable references.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityStateStringType">
+                        <xsd:enumeration value="ios"/>
+                        <xsd:enumeration value="macos"/>
+                        <xsd:enumeration value="unix"/>
+                        <xsd:enumeration value="windows"/>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+      <xsd:complexType name="EntityObjectVariableRefType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityObjectVariableRefType complex type defines a string object entity that has a valid OVAL variable id as the value. The empty string is also allowed to support empty emlement associated with variable references.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityObjectStringType">
+                        <xsd:pattern value="(oval:[A-Za-z0-9_\-\.]+:var:[1-9][0-9]*){0,}"/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+      <xsd:complexType name="EntityStateVariableRefType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityStateVariableRefType complex type defines a string state entity that has a valid OVAL variable id as the value. The empty string is also allowed to support empty emlement associated with variable references.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityStateStringType">
+                        <xsd:pattern value="(oval:[A-Za-z0-9_\-\.]+:var:[1-9][0-9]*){0,}"/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/independent-definitions-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/independent-system-characteristics-schema.xsd
===================================================================
--- trunk/ovaldi/xml/independent-system-characteristics-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/independent-system-characteristics-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,541 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" xmlns:ind-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#independent" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#independent" elementFormDefault="qualified" version="5.4">
+     <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" schemaLocation="oval-system-characteristics-schema.xsd"/>
+     <xsd:annotation>
+          <xsd:documentation>This document outlines the items of the OVAL System Characteristics XML schema that are independent of any specific family or platform. Each iten is an extention of a basic System Characteristics item defined in the core System Characteristics XML schema.</xsd:documentation>
+          <xsd:documentation>The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+          <xsd:appinfo>
+               <schema>Independent System Characteristics</schema>
+               <version>5.4</version>
+               <date>4/1/2008 10:41:41 AM</date>
+                <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                <sch:title>schematron validation of the Independent portion of an OVAL System Characteristics file</sch:title>
+               <sch:ns prefix="oval-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5"/>
+               <sch:ns prefix="ind-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#independent"/>
+          </xsd:appinfo>
+     </xsd:annotation>
+     <!-- =============================================================================== -->
+     <!-- ================================  FAMILY ITEM  ================================ -->
+     <!-- =============================================================================== -->
+     <xsd:element name="family_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>This element stores high level system OS type, otherwise known as the family.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="family" type="ind-sc:EntityItemFamilyType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This element describes the name of an environment variable.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="famitemfamily">
+                                                  <sch:rule context="ind-sc:family_item/ind-sc:family">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the family entity of a family_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ===============================  FILE MD5 ITEM  =============================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="filemd5_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>This element stores md5 hash associated with a specific file.</xsd:documentation>
+               <xsd:documentation>This item has been deprecated. You should use the filehash_item instead. This item will be dropped in the major release of OVAL.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="path" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Specifies the absolute path to a file on the machine.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="md5itempath">
+                                                  <sch:rule context="ind-sc:filemd5_item/ind-sc:path">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the path entity of a filemd5_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="filename" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The name of the file.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="md5itemfilename">
+                                                  <sch:rule context="ind-sc:filemd5_item/ind-sc:filename">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the filename entity of a filemd5_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="md5" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The md5 hash of the file</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="md5itemmd5">
+                                                  <sch:rule context="ind-sc:filemd5_item/ind-sc:md5">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the md5 entity of a filemd5_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ==============================  FILE HASH ITEM  =============================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="filehash_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>This element stores the different hash values associated with a specific file.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="path" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Specifies the absolute path to a file on the machine.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="hashitempath">
+                                                  <sch:rule context="ind-sc:filehash_item/ind-sc:path">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the path entity of a filehash_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="filename" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The name of the file.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="hashitemfilename">
+                                                  <sch:rule context="ind-sc:filehash_item/ind-sc:filename">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the filename entity of a filehash_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="md5" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The md5 hash of the file</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="hashitemmd5">
+                                                  <sch:rule context="ind-sc:filehash_item/ind-sc:md5">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the md5 entity of a filehash_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="sha1" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The sha1 hash of the file</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="hashitemsha1">
+                                                  <sch:rule context="ind-sc:filehash_item/ind-sc:sha1">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the sha1 entity of a filehash_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =======================  ENVIRONMENT VARIABLE ITEM  =========================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="environmentvariable_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>This item stores information about environment variables and their values.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This element describes the name of an environment variable.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="envitemname">
+                                                  <sch:rule context="ind-sc:environmentvariable_item/ind-sc:name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the name entity of an environmentvariable_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="value" type="oval-sc:EntityItemAnyType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The actual value of the specified environment variable.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="envitemvalue">
+                                                  <sch:rule context="ind-sc:environmentvariable_item/ind-sc:value">
+                                                       <sch:assert test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"><sch:value-of select="../@id"/> - The datatype has been set to 'int' but the value is not an integer.</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =============================  SQL CONTENT ITEM   ============================= -->
+     <!-- =============================================================================== -->
+     <xsd:element name="sql_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>The sql_item outlines information collected from a database via an SQL query.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="engine" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The engine entity identifies the specific database engine used to connect to the database.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sqlitemengine">
+                                                  <sch:rule context="ind-sc:sql_item/ind-sc:engine">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the engine entity of an sql_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="version" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The version entity identifies the version of the database engine used to connect to the database.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sqlitemversion">
+                                                  <sch:rule context="ind-sc:sql_item/ind-sc:version">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the version entity of an sql_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="connection_string" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The connection_string entity defines connection parameters used to connect to the specific database.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sqlitemconnection_string">
+                                                  <sch:rule context="ind-sc:sql_item/ind-sc:connection_string">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the connection_string entity of an sql_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="sql" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The sql entity holds the specific query used to identify the object(s) in the database.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sqlitemsql">
+                                                  <sch:rule context="ind-sc:sql_item/ind-sc:sql">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the sql entity of an sql_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="result" type="oval-sc:EntityItemAnyType" minOccurs="0" maxOccurs="unbounded">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The result entity specifies the result(s) of the given SQL query against the database.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sqlitemresult">
+                                                  <sch:rule context="ind-sc:sql_item/ind-sc:result">
+                                                       <sch:assert test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"><sch:value-of select="../@id"/> - The datatype has been set to 'int' but the value is not an integer.</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ==========================  TEXT FILE CONTENT ITEM  =========================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="textfilecontent_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>The textfilecontent_item looks at the contents of a text file (aka a configuration file) by looking at individual lines.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="path" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The path entity specifies the absolute path (without the filename) to the file that is being represented.  Note that the trailing slash should be included.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="txtitempath">
+                                                  <sch:rule context="ind-sc:textfilecontent_item/ind-sc:path">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the path entity of a textfilecontent_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="filename" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                         <xsd:documentation>The filename entity specifies the name of the file (without the path) that is being represented.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="txtitemfilename">
+                                                  <sch:rule context="ind-sc:textfilecontent_item/ind-sc:filename">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the filename entity of a textfilecontent_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                               <xsd:element name="pattern" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                     <xsd:annotation>
+                                           <xsd:documentation>The pattern entity represents a regular expression that is used to define a block of text.  Subexpression notation (parenthesis) is used to call out a value(s) to test against.  For example, the pattern abc(.*)xyz would look for a block of text in the file that starts with abc and ends with xyz, with the subexpression being all the characters that exist inbetween.  Note that if the pattern can match more than one block of text starting at the same point, then it matches the longest. Subexpressions also match the longest possible substrings, subject to the constraint that the whole match be as long as possible, with subexpressions starting earlier in the pattern taking priority over ones starting later.</xsd:documentation>
+                                           <xsd:appinfo>
+                                                 <sch:pattern id="txtitempattern">
+                                                       <sch:rule context="ind-sc:textfilecontent_item/ind-sc:pattern">
+                                                             <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the pattern entity of a textfilecontent_item should be 'string'</sch:assert>
+                                                       </sch:rule>
+                                                 </sch:pattern>
+                                           </xsd:appinfo>
+                                     </xsd:annotation>
+                               </xsd:element>
+                               <xsd:element name="instance" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                     <xsd:annotation>
+                                           <xsd:documentation>The instance entity calls out which match of the pattern is being represented by this item.  The main purpose of this entity is too provide uniqueness for different textfilecontent_items that results from multiple matches of a given pattern against the same file.</xsd:documentation>
+                                           <xsd:appinfo>
+                                                 <sch:pattern id="txtiteminstance">
+                                                       <sch:rule context="ind-sc:textfilecontent_item/ind-sc:instance">
+                                                             <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the instance entity of a textfilecontent_item should be 'int'</sch:assert>
+                                                       </sch:rule>
+                                                 </sch:pattern>
+                                           </xsd:appinfo>
+                                     </xsd:annotation>
+                               </xsd:element>
+                               <xsd:element name="line" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                         <xsd:documentation>The line entity has been deprecated and will be removed in version 6.0 of the language.</xsd:documentation>
+                                         <xsd:documentation>The line element represents a line in the file and is represented using a regular expression.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="txtitemline">
+                                                  <sch:rule context="ind-sc:textfilecontent_item/ind-sc:line">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the line entity of a textfilecontent_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                               <xsd:element name="text" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                     <xsd:annotation>
+                                           <xsd:documentation>The text entity represents the block of text that matched the specified pattern.</xsd:documentation>
+                                           <xsd:appinfo>
+                                                 <sch:pattern id="txtitemtext">
+                                                       <sch:rule context="ind-sc:textfilecontent_item/ind-sc:text">
+                                                             <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the text entity of a textfilecontent_item should be 'string'</sch:assert>
+                                                       </sch:rule>
+                                                 </sch:pattern>
+                                           </xsd:appinfo>
+                                     </xsd:annotation>
+                               </xsd:element>
+                               <xsd:element name="subexpression" type="oval-sc:EntityItemAnyType" minOccurs="0" maxOccurs="unbounded">
+                                   <xsd:annotation>
+                                         <xsd:documentation>The subexpression entity represents the value of a subexpression in the specified pattern.  If multiple subexpressions are specified in the pattern, then multiple entities are presented.  Note that the textfilecontent_state in the definition schema only allows a single subexpression entity.  This means that the test will check that all (or at least one, none, etc.) the subexpressions pass the same check.  This means that the order of multiple subexpression entities in the item does not matter.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="txtitemsubexpression">
+                                                  <sch:rule context="ind-sc:textfilecontent_item/ind-sc:subexpression">
+                                                        <sch:assert test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"><sch:value-of select="../@id"/> - The datatype has been set to 'int' but the value is not an integer.</sch:assert>
+                                                        <!-- we can use the xpath 2.0 function matches() to define assertions for other datatypes -->
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ===============================  VARIABLE ITEM  =============================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="variable_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>This item stores information about OVAL Variables and their values.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="var_ref" type="ind-sc:EntityItemVariableRefType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The id of the variable.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="varitemvar_ref">
+                                                  <sch:rule context="ind-sc:variable_item/ind-sc:var_ref">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the var_ref entity of a variable_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="value" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="unbounded">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The value of the variable. If a variable represents and array of values, then multiple value elements should exist.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="varitemvalue">
+                                                  <sch:rule context="ind-sc:variable_item/ind-sc:value">
+                                                       <sch:assert test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"><sch:value-of select="../@id"/> - The datatype has been set to 'int' but the value is not an integer.</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ===========================  XML FILE CONTENT ITEM  =========================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="xmlfilecontent_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>This item stores results from checking the contents of an xml file.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="path" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Specifies the absolute path to a file on the machine.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="xmlitempath">
+                                                  <sch:rule context="ind-sc:xmlfilecontent_item/ind-sc:path">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the path entity of a xmlfilecontent_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="filename" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The filename element specifies the name of the file.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="xmlitemfilename">
+                                                  <sch:rule context="ind-sc:xmlfilecontent_item/ind-sc:filename">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the filename entity of a xmlfilecontent_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="xpath" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Specifies an Xpath expression describing the nodes to look at.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="xmlitemxpath">
+                                                  <sch:rule context="ind-sc:xmlfilecontent_item/ind-sc:xpath">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the xpath entity of a xmlfilecontent_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="value_of" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The value element checks the value of the nodes found. How this is used is entirely controlled by operator attributes.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="xmlitemvalue_of">
+                                                  <sch:rule context="ind-sc:xmlfilecontent_item/ind-sc:value_of">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the value_of entity of a xmlfilecontent_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <xsd:complexType name="EntityItemEngineType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityItemEngineType complex type defines a string entity value that is restricted to a set of enumerations. Each valid enumeration is a valid database engine.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-sc:EntityItemStringType">
+                    <xsd:enumeration value="access"/>
+                    <xsd:enumeration value="db2"/>
+                    <xsd:enumeration value="cache"/>
+                    <xsd:enumeration value="firebird"/>
+                    <xsd:enumeration value="firstsql"/>
+                    <xsd:enumeration value="foxpro"/>
+                    <xsd:enumeration value="informix"/>
+                    <xsd:enumeration value="ingres"/>
+                    <xsd:enumeration value="interbase"/>
+                    <xsd:enumeration value="lightbase"/>
+                    <xsd:enumeration value="maxdb"/>
+                    <xsd:enumeration value="monetdb"/>
+                    <xsd:enumeration value="mimer"/>
+                    <xsd:enumeration value="oracle"/>
+                    <xsd:enumeration value="paradox"/>
+                    <xsd:enumeration value="pervasive"/>
+                    <xsd:enumeration value="postgre"/>
+                    <xsd:enumeration value="postgre"/>
+                    <xsd:enumeration value="sqlbase"/>
+                    <xsd:enumeration value="sqlite"/>
+                    <xsd:enumeration value="sqlserver"/>
+                    <xsd:enumeration value="sybase"/>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityItemFamilyType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityItemFamilyType complex type defines a string entity value that is restricted to a set of enumerations. Each valid enumeration is a high-level family of system operating system.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-sc:EntityItemStringType">
+                    <xsd:enumeration value="ios"/>
+                    <xsd:enumeration value="macos"/>
+                    <xsd:enumeration value="unix"/>
+                    <xsd:enumeration value="windows"/>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityItemVariableRefType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityItemVariableRefType complex type defines a string item entity that has a valid OVAL variable id as the value.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-sc:EntityItemStringType">
+                    <xsd:pattern value="oval:[A-Za-z\-\.]+:var:[1-9][0-9]*"/>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/independent-system-characteristics-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/ios-definitions-schema.xsd
===================================================================
--- trunk/ovaldi/xml/ios-definitions-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/ios-definitions-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,604 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:ios-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#ios" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-definitions-5#ios" elementFormDefault="qualified" version="5.4">
+      <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-common-5" schemaLocation="oval-common-schema.xsd"/>
+      <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-definitions-5" schemaLocation="oval-definitions-schema.xsd"/>
+      <xsd:annotation>
+            <xsd:documentation>The following is a description of the elements, types, and attributes that compose the IOS specific tests found in Open Vulnerability and Assessment Language (OVAL). Each test is an extension of the standard test element defined in the Core Definition Schema. Through extension, each test inherits a set of elements and attributes that are shared amongst all OVAL tests. Each test is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core Definition Schema is not outlined here.</xsd:documentation>
+            <xsd:documentation>The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+            <xsd:appinfo>
+                  <schema>IOS Definition</schema>
+                  <version>5.4</version>
+                  <date>4/1/2008 10:41:41 AM</date>
+                  <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                  <sch:title>schematron validation of the Cisco IOS portion of an OVAL Definitions file</sch:title>
+                  <sch:ns prefix="oval-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5"/>
+                  <sch:ns prefix="ios-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5#ios"/>
+                  <sch:ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/>
+            </xsd:appinfo>
+      </xsd:annotation>
+      <!-- =============================================================================== -->
+      <!-- =============================  GLOBAL TEST  =================================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="global_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The global test is used to check for the existence of a particular line in the ios config file under the global context. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a global_object and the optional state element specifies the data to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="globaltst">
+                              <sch:rule context="ios-def:global_test/ios-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ios-def:global_object/@id"><sch:value-of select="../@id"/> - the object child element of a global_test must reference a global_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="ios-def:global_test/ios-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/ios-def:global_state/@id"><sch:value-of select="../@id"/> - the state child element of a global_test must reference a global_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="global_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The global_object element is used by a global test to define the object to be evaluated. For the most part this object checks for existance and is used without a state comparision. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="global_command" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The global_command entity identifies a specific line in the ios config file under the global context.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="globalobjglobal_command">
+                                                                        <sch:rule context="ios-def:global_object/ios-def:global_command">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the global_command entity of a global_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="global_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The global_state element defines the different information that can be found in the ios config file under the global context. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="global_command" type="oval-def:EntityStateStringType" minOccurs="1" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The global_command entity identifies a specific line in the ios config file under the global context.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="globalsteglobal_command">
+                                                            <sch:rule context="ios-def:global_state/ios-def:global_command">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the global_command entity of a global_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =============================  INTERFACE TEST  ================================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="interface_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation/>
+                  <xsd:appinfo>
+                        <sch:pattern id="iosinterfacetst">
+                              <sch:rule context="ios-def:interface_test/ios-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ios-def:interface_object/@id"><sch:value-of select="../@id"/> - the object child element of an interface_test must reference an interface_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="ios-def:interface_test/ios-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/ios-def:interface_state/@id"><sch:value-of select="../@id"/> - the state child element of an interface_test must reference an interface_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="interface_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation/>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="name" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation/>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="iosinterfaceobjname">
+                                                                        <sch:rule context="ios-def:interface_object/ios-def:name">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the name entity of an interface_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="interface_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation/>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="iosinterfacestename">
+                                                            <sch:rule context="ios-def:interface_state/ios-def:name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the name entity of an interface_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="ip_directed_broadcast_command" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="iosinterfacesteip_directed_broadcast_command">
+                                                            <sch:rule context="ios-def:interface_state/ios-def:ip_directed_broadcast_command">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the ip_directed_broadcast_command entity of an interface_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="no_ip_directed_broadcast_command" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="iosinterfacesteno_ip_directed_broadcast_command">
+                                                            <sch:rule context="ios-def:interface_state/ios-def:no_ip_directed_broadcast_command">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the no_ip_directed_broadcast_command entity of an interface_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="proxy_arp_command" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="iosinterfacesteproxy_arp_command">
+                                                            <sch:rule context="ios-def:interface_state/ios-def:proxy_arp_command">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the proxy_arp_command entity of an interface_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="shutdown_command" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="iosinterfacesteshutdown_command">
+                                                            <sch:rule context="ios-def:interface_state/ios-def:shutdown_command">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the shutdown_command entity of an interface_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =================================  LINE TEST  ================================= -->
+      <!-- =============================================================================== -->
+      <xsd:element name="line_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The line test is used to check the properties of specific output lines from a SHOW command, such as show running-config. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a line_object and the optional state element specifies the data to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="linetst">
+                              <sch:rule context="ios-def:line_test/ios-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ios-def:line_object/@id"><sch:value-of select="../@id"/> - the object child element of a line_test must reference a line_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="ios-def:line_test/ios-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/ios-def:line_state/@id"><sch:value-of select="../@id"/> - the state child element of a line_test must reference a line_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="line_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The line_object element is used by a line test to define the object to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>A line object consists of a show_subcommand entity that is the name of a SHOW sub-command to be tested.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="show_subcommand" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The name of a SHOW sub-command.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="lineobjshow_subcommand">
+                                                                        <sch:rule context="ios-def:line_object/ios-def:show_subcommand">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the show_subcommand entity of a line_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="line_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The line_state element defines the different information that can be used to evaluate the result of a specific SHOW sub-command. This includes the name of ths sub-command and the corresponding config line. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="show_subcommand" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The name of the SHOW sub-command.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="linesteshow_subcommand">
+                                                            <sch:rule context="ios-def:line_state/ios-def:show_subcommand">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the show_subcommand entity of a line_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="config_line" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The value returned from by the specified SHOW sub-command.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="linesteconfig_line">
+                                                            <sch:rule context="ios-def:line_state/ios-def:config_line">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the config_line entity of a line_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =================================  SNMP TEST  ================================= -->
+      <!-- =============================================================================== -->
+      <xsd:element name="snmp_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>Tests if lines under the global context associated with snmp that have a specifiec access list or cmmunity name.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="snmptst">
+                              <sch:rule context="ios-def:snmp_test/ios-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ios-def:snmp_object/@id"><sch:value-of select="../@id"/> - the object child element of a snmp_test must reference a snmp_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="ios-def:snmp_test/ios-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/ios-def:snmp_state/@id"><sch:value-of select="../@id"/> - the state child element of a snmp_test must reference a snmp_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="snmp_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The snmp_object element is used by a snmp test to define those objects to evaluated based on a specified state. There is actually only one object relating to snmp and this is the system as a whole. Therefore, there are no child entities defined. Any OVAL Test written to check snmp will reference the same snmp_object which is basically an empty object element.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType"/>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="snmp_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation/>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="access_list" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="snmpsteaccess_list">
+                                                            <sch:rule context="ios-def:snmp_state/ios-def:access_list">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the access_list entity of a snmp_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="community_name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="snmpstecommunity_name">
+                                                            <sch:rule context="ios-def:snmp_state/ios-def:community_name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the community_name entity of a snmp_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =================================  TCLSH TEST  ================================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="tclsh_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The tclsh test is used to check tclsh information of the IOS operating system. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a tclsh_object and the optional state element specifies the data to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="tclshtst">
+                              <sch:rule context="ios-def:tclsh_test/ios-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ios-def:tclsh_object/@id"><sch:value-of select="../@id"/> - the object child element of a tclsh_test must reference a tclsh_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="ios-def:tclsh_test/ios-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/ios-def:tclsh_state/@id"><sch:value-of select="../@id"/> - the state child element of a tclsh_test must reference a tclsh_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="tclsh_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The tclsh_object element is used by a tclsh test to define those objects to evaluated based on a specified state. There is actually only one object relating to tchlsh and this is the system as a whole. Therefore, there are no child entities defined. Any OVAL Test written to check tclsh will reference the same tclsh_object which is basically an empty object element.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType"/>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="tclsh_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The tclsh_state element defines information about TCLSH. This includes the available entity which describes whether TCLSH is available on the system. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="available" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This boolean entity describes whether TCLSH is available on the system. A value of true means that TCLSH is available.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="tclshsteavailable">
+                                                            <sch:rule context="ios-def:tclsh_state/ios-def:available">
+                                                                  <sch:assert test="not(@datatype) or @datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the available entity of a tclsh_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ================================  VERSION TEST  =============================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="version_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The version test is used to check the version of the IOS operating system. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a version_object and the optional state element specifies the data to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="iosvertst">
+                              <sch:rule context="ios-def:version_test/ios-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ios-def:version_object/@id"><sch:value-of select="../@id"/> - the object child element of a version_test must reference a version_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="ios-def:version_test/ios-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/ios-def:version_state/@id"><sch:value-of select="../@id"/> - the state child element of a version_test must reference a version_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="version_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The version_object element is used by a version test to define the different version information associated with an IOS system. There is actually only one object relating to version and this is the system as a whole. Therefore, there are no child entities defined. Any OVAL Test written to check version will reference the same version_object which is basically an empty object element.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType"/>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="version_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The version_state element defines the version information held within a Cisco IOS Train. A Cisco IOS train is a vehicle for delivering releases that evolve from a common code base.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="major_release" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The major_release is a combination of train and rebuild information and is used by Cisco advisories to identify major releases.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="iosverstemajor_release">
+                                                            <sch:rule context="ios-def:version_state/ios-def:major_release">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the major_release entity of a version_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="train_number" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The train number is the dotted version that starts a version string. For example the version string 12.2(3)T has a train number of 12.2.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="iosverstetrain_number">
+                                                            <sch:rule context="ios-def:version_state/ios-def:train_number">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the train_number entity of a version_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="train_identifier" type="ios-def:EntityStateTrainIdentifierType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The train identifier is the type of Train. For example the version string 12.2(3)T has a train identifier of T. Please see the EntityStateVersionTrainIdentifierType for more information about the different train identifiers.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="iosverstetrain_identifier">
+                                                            <sch:rule context="ios-def:version_state/ios-def:train_identifier">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the train_identifier entity of a version_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="version_string" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The version is the raw string output of a 'show version' command.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="iosversteversion_string">
+                                                            <sch:rule context="ios-def:version_state/ios-def:version_string">
+                                                                  <sch:assert test="not(@datatype) or @datatype='ios_version'"><sch:value-of select="../@id"/> - datatype attribute for the version_string entity of a version_state should be 'ios_version'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+      <xsd:complexType name="EntityStateTrainIdentifierType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityStateTrainIdentifierType complex type restricts a string value to a specific set of values. These values describe the possible types of trains in a Cisco IOS release. The empty string is also allowed to support empty emlement associated with variable references.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityStateStringType">
+                        <xsd:enumeration value="mainline">
+                              <xsd:annotation>
+                                    <xsd:documentation>The mainline Train consolidates releases and fixes defects. Inherits features from the parent T train, and does not add additional features.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="T">
+                              <xsd:annotation>
+                                    <xsd:documentation>Introduces new features and fixes defects. </xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="S">
+                              <xsd:annotation>
+                                    <xsd:documentation>Consolidates 12.1E, 12.2 mainline, and 12.0S, which supports high-end backbone routing, and fixes defects. </xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="E">
+                              <xsd:annotation>
+                                    <xsd:documentation>Targets enterprise core and SP edge, supports advanced QoS, voice, security, and firewall, and fixes defects.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="B">
+                              <xsd:annotation>
+                                    <xsd:documentation>Supports broadband features and fixes defects.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/ios-definitions-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/ios-system-characteristics-schema.xsd
===================================================================
--- trunk/ovaldi/xml/ios-system-characteristics-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/ios-system-characteristics-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,311 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" xmlns:ios-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#ios" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#ios" elementFormDefault="qualified" version="5.4">
+     <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" schemaLocation="oval-system-characteristics-schema.xsd"/>
+     <xsd:annotation>
+          <xsd:documentation>The following is a description of the elements, types, and attributes that compose the IOS specific system characteristic items found in Open Vulnerability and Assessment Language (OVAL). Each item is an extension of the standard item element defined in the Core System Characteristic Schema. Through extension, each item inherits a set of elements and attributes that are shared amongst all OVAL Items. Each item is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core System Characteristic Schema is not outlined here.</xsd:documentation>
+          <xsd:documentation>The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+          <xsd:appinfo>
+               <schema>IOS System Characteristics</schema>
+               <version>5.4</version>
+               <date>4/1/2008 10:41:42 AM</date>
+                <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                <sch:title>schematron validation of the Cisco IOS portion of an OVAL System Characteristics file</sch:title>
+               <sch:ns prefix="oval-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5"/>
+               <sch:ns prefix="ios-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#ios"/>
+          </xsd:appinfo>
+     </xsd:annotation>
+     <!-- =============================================================================== -->
+     <!-- ========================  IOS GLOBAL ITEM   =================================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="global_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>Sotres information about the existence of a particular line in the ios config file under the global context</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="global_command" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="globalitemglobal_command">
+                                                  <sch:rule context="ios-sc:global_item/ios-sc:global_command">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the global_command entity of a global_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ========================  IOS INTERFACE ITEM  ================================= -->
+     <!-- =============================================================================== -->
+     <xsd:element name="interface_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation/>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="iosinterfaceitemname">
+                                                  <sch:rule context="ios-sc:interface_item/ios-sc:name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the name entity of a global_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="ip_directed_broadcast_command" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="iosinterfaceitemip_directed_broadcast_command">
+                                                  <sch:rule context="ios-sc:interface_item/ios-sc:ip_directed_broadcast_command">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the ip_directed_broadcast_command entity of a global_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="no_ip_directed_broadcast_command" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="iosinterfaceitemno_ip_directed_broadcast_command">
+                                                  <sch:rule context="ios-sc:interface_item/ios-sc:no_ip_directed_broadcast_command">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the no_ip_directed_broadcast_command entity of a global_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="proxy_arp_command" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="iosinterfaceitemproxy_arp_command">
+                                                  <sch:rule context="ios-sc:interface_item/ios-sc:proxy_arp_command">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the proxy_arp_command entity of a global_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="shutdown_command" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="iosinterfaceitemshutdown_command">
+                                                  <sch:rule context="ios-sc:interface_item/ios-sc:shutdown_command">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the shutdown_command entity of a global_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ============================  IOS LINE ITEM  ================================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="line_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>Stores the properties of specific lines in the ios config file.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="show_subcommand" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The name of the SHOW sub-command.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="lineitemshow_subcommand">
+                                                  <sch:rule context="ios-sc:line_item/ios-sc:show_subcommand">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the show_subcommand entity of a line_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="config_line" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The value returned from by the specified SHOW sub-command.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="lineitemconfig_line">
+                                                  <sch:rule context="ios-sc:line_item/ios-sc:config_line">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the config_line entity of a line_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ==========================  IOS SNMP ITEM   =================================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="snmp_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>Stores results from collecting lines under the global context associated with snmp.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="access_list" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="snmpitemaccess_list">
+                                                  <sch:rule context="ios-sc:snmp_item/ios-sc:access_list">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the access_list entity of a snmp_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="community_name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="snmpitemcommunity_name">
+                                                  <sch:rule context="ios-sc:snmp_item/ios-sc:community_name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the community_name entity of a snmp_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ==========================  IOS TCLSH ITEM   =================================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="tclsh_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>The tclsh item holds information about the availability of tcl on the IOS operating system. It extends the standard ItemType as defined in the oval-system-characteristics schema and one should refer to the ItemType description for more information.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="available" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This boolean entity describes whether TCLSH is available on the system. A value of true means that TCLSH is available. Per Cisco documentation, the accepted way to see if the device supports tcl functionality is to enter the tcl shell. If the attempt results in a tcl prompt then the device supports tclsh and has it enabled.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="tclshitemavailable">
+                                                  <sch:rule context="ios-sc:tclsh_item/ios-sc:available">
+                                                       <sch:assert test="not(@datatype) or @datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the available entity of a tclsh_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ========================  IOS VERSION ITEM  =================================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="version_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>The version item holds information about the version of the IOS operating system. It extends the standard ItemType as defined in the oval-system-characteristics schema and one should refer to the ItemType description for more information.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="major_release" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The major_release is a combination of train and rebuild information and is used by Cisco advisories to identify major releases.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="iosversionitemmajor_release">
+                                                  <sch:rule context="ios-sc:version_item/ios-sc:major_release">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the major_release entity of a version_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="train_number" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The train number is the dotted version that starts a version string. For example the version string 12.2(3)T has a train number of 12.2.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="iosversionitemtrain_number">
+                                                  <sch:rule context="ios-sc:version_item/ios-sc:train_number">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the train_number entity of a version_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="train_identifier" type="ios-sc:EntityItemTrainIdentifierType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The train identifier is the type of Train. For example the version string 12.2(3)T has a train identifier of T. Please see the EntityItemTrainIdentifierType for more information about the different train identifiers.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="iosversionitemtrain_identifier">
+                                                  <sch:rule context="ios-sc:version_item/ios-sc:train_identifier">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the train_identifier entity of a version_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="version_string" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The version entity holds the raw string output of a 'show version' command.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="iosversionitemversion_string">
+                                                  <sch:rule context="ios-sc:version_item/ios-sc:version_string">
+                                                       <sch:assert test="not(@datatype) or @datatype='ios_version'">item <sch:value-of select="../@id"/> - datatype attribute for the version_string entity of a version_item should be 'ios_version'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <xsd:complexType name="EntityItemTrainIdentifierType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityTrainIdentifierType restricts a string value to a specific set of values that describe the different types of trains in a Cisco IOS release. The empty string is also allowed to support empty emlement associated with error conditions.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-sc:EntityItemStringType">
+                    <xsd:enumeration value="mainline"/>
+                    <xsd:enumeration value="T"/>
+                    <xsd:enumeration value="S"/>
+                    <xsd:enumeration value="E"/>
+                    <xsd:enumeration value="B"/>
+                    <xsd:enumeration value=""/>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/ios-system-characteristics-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/linux-definitions-schema.xsd
===================================================================
--- trunk/ovaldi/xml/linux-definitions-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/linux-definitions-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,650 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:linux-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" elementFormDefault="qualified" version="5.4">
+     <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-definitions-5" schemaLocation="oval-definitions-schema.xsd"/>
+     <xsd:annotation>
+          <xsd:documentation>The following is a description of the elements, types, and attributes that compose the Linux specific tests found in Open Vulnerability and Assessment Language (OVAL). Each test is an extension of the standard test element defined in the Core Definition Schema. Through extension, each test inherits a set of elements and attributes that are shared amongst all OVAL tests. Each test is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core Definition Schema is not outlined here.</xsd:documentation>
+          <xsd:documentation>The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+          <xsd:appinfo>
+               <schema>Linux Definition</schema>
+               <version>5.4</version>
+               <date>4/1/2008 10:41:42 AM</date>
+                <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                <sch:title>schematron validation of the Linux portion of an OVAL Definitions file</sch:title>
+               <sch:ns prefix="oval-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5"/>
+               <sch:ns prefix="linux-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"/>
+               <sch:ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/>
+          </xsd:appinfo>
+     </xsd:annotation>
+     <!-- =============================================================================== -->
+     <!-- ==============================  DPKG INFO TEST  =============================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="dpkginfo_test" substitutionGroup="oval-def:test">
+          <xsd:annotation>
+               <xsd:documentation>The dpkginfo test is used to check information for a given DPKG package. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a dpkginfo_object and the optional state element specifies the data to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-def:TestType">
+                         <xsd:sequence>
+                              <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                              <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <xsd:element name="dpkginfo_object" substitutionGroup="oval-def:object">
+          <xsd:annotation>
+               <xsd:documentation>The dpkginfo_object element is used by a dpkginfo test to define the object to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+               <xsd:documentation>A dpkginfo object consists of a single name entity that identifies the package being checked.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-def:ObjectType">
+                         <xsd:sequence>
+                              <xsd:choice minOccurs="1" maxOccurs="1">
+                                   <xsd:element ref="oval-def:set"/>
+                                   <xsd:sequence>
+                                        <xsd:element name="name" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                             <xsd:annotation>
+                                                  <xsd:documentation>This is the package name to check.</xsd:documentation>
+                                                  <xsd:appinfo>
+                                                       <sch:pattern id="dpkgobjname">
+                                                            <sch:rule context="linux-def:dpkginfo_object/linux-def:name">
+                                                                 <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the name entity of a dpkginfo_object should be 'string'</sch:assert>
+                                                                 <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the name entity of a dpkginfo_object should be 'equals', 'not equal', or 'pattern match'</sch:assert>
+                                                            </sch:rule>
+                                                       </sch:pattern>
+                                                  </xsd:appinfo>
+                                             </xsd:annotation>
+                                        </xsd:element>
+                                   </xsd:sequence>
+                              </xsd:choice>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <xsd:element name="dpkginfo_state" substitutionGroup="oval-def:state">
+          <xsd:annotation>
+               <xsd:documentation>The dpkginfo_state element defines the different information that can be used to evaluate the specified DPKG package. This includes the architecture, epoch number, release, and version numbers. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-def:StateType">
+                         <xsd:sequence>
+                              <xsd:element name="name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the DPKG package name to check.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="dpkgstename">
+                                                  <sch:rule context="linux-def:dpkginfo_state/linux-def:name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the name entity of a dpkginfo_state should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the name entity of a dpkginfo_state should be 'equals', 'not equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="arch" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the architecture for which the package was built, like : i386, ppc, sparc, noarch.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="dpkgstearch">
+                                                  <sch:rule context="linux-def:dpkginfo_state/linux-def:arch">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the arch entity of a dpkginfo_state should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the arch entity of a dpkginfo_state should be 'equals', 'not equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="epoch" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the epoch number of the package, this is used as a kludge for version-release comparisons where the vendor has done some kind of re-numbering or version forking.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="dpkgsteepoch">
+                                                  <sch:rule context="linux-def:dpkginfo_state/linux-def:epoch">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the epoch entity of a dpkginfo_state should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal' or 'pattern match'"><sch:value-of select="../@id"/> - operation attribute for the epoch entity of a dpkginfo_state should be 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', 'less than or equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="release" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the release number of the build, changed by the vendor/builder.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="dpkgsterelease">
+                                                  <sch:rule context="linux-def:dpkginfo_state/linux-def:release">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the release entity of a dpkginfo_state should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal' or 'pattern match'"><sch:value-of select="../@id"/> - operation attribute for the release entity of a dpkginfo_state should be 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', 'less than or equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="version" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the version number of the build.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="dpkgsteversion">
+                                                  <sch:rule context="linux-def:dpkginfo_state/linux-def:version">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the version entity of a dpkginfo_state should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal' or 'pattern match'"><sch:value-of select="../@id"/> - operation attribute for the version entity of a dpkginfo_state should be 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', 'less than or equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="evr" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This represents the epoch, version, and release fields as a single version string. It has the form "EPOCH:VERSION-RELEASE".</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="dpkgsteevr">
+                                                  <sch:rule context="linux-def:dpkginfo_state/linux-def:evr">
+                                                       <sch:assert test="not(@datatype) or @datatype='evr_string'"><sch:value-of select="../@id"/> - datatype attribute for the evr entity of a dpkginfo_state should be 'evr_string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal' or 'pattern match'"><sch:value-of select="../@id"/> - operation attribute for the evr entity of a dpkginfo_state should be 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', 'less than or equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ========================  INET LISTENING SERVERS TEST  ======================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="inetlisteningservers_test" substitutionGroup="oval-def:test">
+          <xsd:annotation>
+               <xsd:documentation>The inet listening servers test is used to check what applications are listening on the network. It is generally using the parsed output of running the command netstat -tuwlnpe with root privilege. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an inetlisteningservers_object and the optional state element specifies the data to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-def:TestType">
+                         <xsd:sequence>
+                              <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                              <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <xsd:element name="inetlisteningservers_object" substitutionGroup="oval-def:object">
+          <xsd:annotation>
+               <xsd:documentation>The inetlisteningservers_object element is used by an inet listening servers test to define the specific protocol-address-port to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+               <xsd:documentation>An inet listening servers object consists of three entities. The first identifies a specific ip address. The second entity represents a certain port number. While the third identifies the protocol.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-def:ObjectType">
+                         <xsd:sequence>
+                              <xsd:choice minOccurs="1" maxOccurs="1">
+                                   <xsd:element ref="oval-def:set"/>
+                                   <xsd:sequence>
+                                        <xsd:element name="protocol" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                             <xsd:annotation>
+                                                  <xsd:documentation>The protocol entity defines a certain transport-layer protocol, in lowercase: tcp or udp.</xsd:documentation>
+                                                  <xsd:appinfo>
+                                                       <sch:pattern id="ilsobjprotocol">
+                                                            <sch:rule context="linux-def:inetlisteningservers_object/linux-def:protocol">
+                                                                 <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the protocol entity of an inetlisteningservers_object should be 'string'</sch:assert>
+                                                                 <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the protocol entity of an inetlisteningservers_object should be 'equals', 'not equal', or 'pattern match'</sch:assert>
+                                                            </sch:rule>
+                                                       </sch:pattern>
+                                                  </xsd:appinfo>
+                                             </xsd:annotation>
+                                        </xsd:element>
+                                        <xsd:element name="local_address" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                             <xsd:annotation>
+                                                  <xsd:documentation>This is the IP address of the network interface on which an application listens.</xsd:documentation>
+                                                  <xsd:appinfo>
+                                                       <sch:pattern id="ilsobjlocal_address">
+                                                            <sch:rule context="linux-def:inetlisteningservers_object/linux-def:local_address">
+                                                                 <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the local_address entity of an inetlisteningservers_object should be 'string'</sch:assert>
+                                                                 <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the local_address entity of an inetlisteningservers_object should be 'equals', 'not equal', or 'pattern match'</sch:assert>
+                                                            </sch:rule>
+                                                       </sch:pattern>
+                                                  </xsd:appinfo>
+                                             </xsd:annotation>
+                                        </xsd:element>
+                                        <xsd:element name="local_port" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                             <xsd:annotation>
+                                                  <xsd:documentation>This is the TCP or UDP port on which an application would listen. Note that this is not a list -- if a program listens on multiple ports, or on a combination of TCP and UDP, each will be represented by its own object.</xsd:documentation>
+                                                  <xsd:appinfo>
+                                                       <sch:pattern id="ilsobjlocal_port">
+                                                            <sch:rule context="linux-def:inetlisteningservers_object/linux-def:local_port">
+                                                                 <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the local_port entity of an inetlisteningservers_object should be 'string'</sch:assert>
+                                                                 <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the local_port entity of an inetlisteningservers_object should be 'equals', 'not equal', or 'pattern match'</sch:assert>
+                                                            </sch:rule>
+                                                       </sch:pattern>
+                                                  </xsd:appinfo>
+                                             </xsd:annotation>
+                                        </xsd:element>
+                                   </xsd:sequence>
+                              </xsd:choice>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <xsd:element name="inetlisteningservers_state" substitutionGroup="oval-def:state">
+          <xsd:annotation>
+               <xsd:documentation>The inetlisteningservers_state element defines the different information that can be used to evaluate the specified inet listening server. This includes the local address, foreign address, port information, and process id. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-def:StateType">
+                         <xsd:sequence>
+                              <xsd:element name="protocol" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The protocol entity defines the specific transport-layer protocol, in lowercase: tcp or udp, associated with the inet listening server.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ilssteprotocol">
+                                                  <sch:rule context="linux-def:inetlisteningservers_state/linux-def:protocol">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the protocol entity of an inetlisteningservers_state should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the protocol entity of an inetlisteningservers_state should be 'equals', 'not equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="local_address" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the IP address of the network interface on which the program listens.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ilsstelocal_address">
+                                                  <sch:rule context="linux-def:inetlisteningservers_state/linux-def:local_address">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the local_address entity of an inetlisteningservers_state should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the local_address entity of an inetlisteningservers_state should be 'equals', 'not equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="local_port" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the TCP or UDP port number associated with the inet listening server.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ilsstelocal_port">
+                                                  <sch:rule context="linux-def:inetlisteningservers_state/linux-def:local_port">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the local_port entity of an inetlisteningservers_state should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the local_port entity of an inetlisteningservers_state should be 'equals', 'not equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="local_full_address" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the IP address and network port number associated with the inet listening server, equivalent to local_address:local_port.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ilsstelocal_full_address">
+                                                  <sch:rule context="linux-def:inetlisteningservers_state/linux-def:local_full_address">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the local_full_address entity of an inetlisteningservers_state should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the local_full_address entity of an inetlisteningservers_state should be 'equals', 'not equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="program_name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the name of the communicating program.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ilssteprogram_name">
+                                                  <sch:rule context="linux-def:inetlisteningservers_state/linux-def:program_name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the program_name entity of an inetlisteningservers_state should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the program_name entity of an inetlisteningservers_state should be 'equals', 'not equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="foreign_address" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the IP address with which the program is communicating, or with which it will communicate, in the case of a listening server.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ilssteforeign_address">
+                                                  <sch:rule context="linux-def:inetlisteningservers_state/linux-def:foreign_address">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the foreign_address entity of an inetlisteningservers_state should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the foreign_address entity of an inetlisteningservers_state should be 'equals', 'not equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="foreign_port" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the TCP or UDP port to which the program communicates. In the case of a listening program accepting new connections, this is usually a *.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ilssteforeign_port">
+                                                  <sch:rule context="linux-def:inetlisteningservers_state/linux-def:foreign_port">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the foreign_port entity of an inetlisteningservers_state should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the foreign_port entity of an inetlisteningservers_state should be 'equals', 'not equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="foreign_full_address" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the IP address and network port to which the program is communicating or will accept communications from, equivalent to foreign_address:foreign_port.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ilssteforeign_full_address">
+                                                  <sch:rule context="linux-def:inetlisteningservers_state/linux-def:foreign_full_address">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the foreign_full_address entity of an inetlisteningservers_state should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the foreign_full_address entity of an inetlisteningservers_state should be 'equals', 'not equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="pid" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The pid is the process ID of a specific process.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ilsstepid">
+                                                  <sch:rule context="linux-def:inetlisteningservers_state/linux-def:pid">
+                                                       <sch:assert test="not(@datatype) or @datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the pid entity of an inetlisteningservers_state should be 'int'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal'"><sch:value-of select="../@id"/> - operation attribute for the pid entity of an inetlisteningservers_state should be 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', or 'less than or equal'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="user_id" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The numeric user id, or uid, is the third column of each user's entry in /etc/passwd. It represents the owner, and thus privilege level, of the specified program.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ilssteuser_id">
+                                                  <sch:rule context="linux-def:inetlisteningservers_state/linux-def:user_id">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the user_id entity of an inetlisteningservers_state should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the user_id entity of an inetlisteningservers_state should be 'equals', 'not equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ===============================  RPM INFO TEST  =============================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="rpminfo_test" substitutionGroup="oval-def:test">
+          <xsd:annotation>
+               <xsd:documentation>The rpm info test is used to check the RPM header information for a given RPM package. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a rpminfo_object and the optional state element specifies the data to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-def:TestType">
+                         <xsd:sequence>
+                              <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                              <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <xsd:element name="rpminfo_object" substitutionGroup="oval-def:object">
+          <xsd:annotation>
+               <xsd:documentation>The rpminfo_object element is used by a rpm info test to define the object to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+               <xsd:documentation>A rpm info object consists of a single name entity that identifies the package being checked.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-def:ObjectType">
+                         <xsd:sequence>
+                              <xsd:choice minOccurs="1" maxOccurs="1">
+                                   <xsd:element ref="oval-def:set"/>
+                                   <xsd:sequence>
+                                        <xsd:element name="name" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                             <xsd:annotation>
+                                                  <xsd:documentation>This is the package name to check.</xsd:documentation>
+                                                  <xsd:appinfo>
+                                                       <sch:pattern id="rpmobjname">
+                                                            <sch:rule context="linux-def:rpminfo_object/linux-def:name">
+                                                                 <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the name entity of a rpminfo_object should be 'string'</sch:assert>
+                                                                 <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the name entity of a rpminfo_object should be 'equals', 'not equal', or 'pattern match'</sch:assert>
+                                                            </sch:rule>
+                                                       </sch:pattern>
+                                                  </xsd:appinfo>
+                                             </xsd:annotation>
+                                        </xsd:element>
+                                   </xsd:sequence>
+                              </xsd:choice>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <xsd:element name="rpminfo_state" substitutionGroup="oval-def:state">
+          <xsd:annotation>
+               <xsd:documentation>The rpminfo_state element defines the different information that can be used to evaluate the specified rpm. This includes the architecture, epoch number, and version numbers. Most of this information can be obtained through the rpm function. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-def:StateType">
+                         <xsd:sequence>
+                              <xsd:element name="name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the package name to check.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rpmstename">
+                                                  <sch:rule context="linux-def:rpminfo_state/linux-def:name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the name entity of a rpminfo_state should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the name entity of a rpminfo_state should be 'equals', 'not equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="arch" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the architecture for which the RPM was built, like : i386, ppc, sparc, noarch. In the case of an apache rpm named httpd-2.0.40-21.11.4.i686.rpm, this value would be i686.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rpmstearch">
+                                                  <sch:rule context="linux-def:rpminfo_state/linux-def:arch">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the arch entity of a rpminfo_state should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the arch entity of a rpminfo_state should be 'equals', 'not equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="epoch" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the epoch number of the RPM, this is used as a kludge for version-release comparisons where the vendor has done some kind of re-numbering or version forking. For a null epoch (or '(none)' as returned by rpm) is equivalent to '0'. This number is not revealed by a normal query of the RPM's information -- you must use a formatted rpm query command to gather this data from the command line, like so. For an already-installed RPM: rpm -q --qf '%{EPOCH}\n' installed_rpm For an RPM file that has not been installed: rpm -qp --qf '%{EPOCH}\n' rpm_file</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rpmsteepoch">
+                                                  <sch:rule context="linux-def:rpminfo_state/linux-def:epoch">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the epoch entity of a rpminfo_state should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the epoch entity of a rpminfo_state should be 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', 'less than or equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="release" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the release number of the build, changed by the vendor/builder.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rpmsterelease">
+                                                  <sch:rule context="linux-def:rpminfo_state/linux-def:release">
+                                                       <sch:assert test="not(@datatype) or @datatype='string' or @datatype='version'"><sch:value-of select="../@id"/> - datatype attribute for the release entity of a rpminfo_state should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the release entity of a rpminfo_state should be 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', 'less than or equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="version" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the version number of the build. In the case of an apache rpm named httpd-2.0.40-21.11.4.i686.rpm, this value would be 21.11.4.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rpmsteversion">
+                                                  <sch:rule context="linux-def:rpminfo_state/linux-def:version">
+                                                       <sch:assert test="not(@datatype) or @datatype='string' or @datatype='version'"><sch:value-of select="../@id"/> - datatype attribute for the version entity of a rpminfo_state should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the version entity of a rpminfo_state should be 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', 'less than or equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="evr" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This represents the epoch, version, and release fields as a single version string. It has the form "EPOCH:VERSION-RELEASE". Note that a null epoch (or '(none)' as returned by rpm) is equivalent to '0' and would hence have the form 0:VERSION-RELEASE. Comparisons involving this datatype should follow the algorithm of librpm's rpmvercmp() function.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rpmsteevr">
+                                                  <sch:rule context="linux-def:rpminfo_state/linux-def:evr">
+                                                       <sch:assert test="not(@datatype) or @datatype='evr_string'"><sch:value-of select="../@id"/> - datatype attribute for the evr entity of a rpminfo_state should be 'evr_string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the evr entity of a rpminfo_state should be 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', 'less than or equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="signature_keyid" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This field contains the 64-bit PGP key ID that the RPM issuer (generally the original operating system vendor) uses to sign the key. Note that the value should NOT contain a hyphen to seperat the higher 32-bits from the lower 32-bits. It should simply be a 16 character hex string. PGP is used to verify the authenticity and integrity of the RPM being considered. Software packages and patches are signed cryptographically to allow administrators to allay concerns that the distribution mechanism has been compromised, whether that mechanism is web site, FTP server, or even a mirror controlled by a hostile party. OVAL uses this field most of all to confirm that the package installed on the system is that shipped by the vendor, since comparing package version numbers against patch announcements is only programmatically valid if the installed package is known to contain the patched code.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rpmstesignaturekeyid">
+                                                  <sch:rule context="linux-def:rpminfo_state/linux-def:signature_keyid">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the signature_keyid entity of a rpminfo_state should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the signature_keyid entity of a rpminfo_state should be 'equals', 'not equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ==========================  SLACKWARE PKG INFO TEST  ========================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="slackwarepkginfo_test" substitutionGroup="oval-def:test">
+          <xsd:annotation>
+               <xsd:documentation>The slackware package info test is used to check information associated with a given Slackware package. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a slackwarepkginfo_object and the optional state element specifies the data to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-def:TestType">
+                         <xsd:sequence>
+                              <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                              <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <xsd:element name="slackwarepkginfo_object" substitutionGroup="oval-def:object">
+          <xsd:annotation>
+               <xsd:documentation>The slackwarepkginfo_object element is used by a slackware package info test to define the object to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+               <xsd:documentation>A slackware package info object consists of a single name entity that identifies the package being checked.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-def:ObjectType">
+                         <xsd:sequence>
+                              <xsd:choice minOccurs="1" maxOccurs="1">
+                                   <xsd:element ref="oval-def:set"/>
+                                   <xsd:sequence>
+                                        <xsd:element name="name" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                             <xsd:annotation>
+                                                  <xsd:documentation>This is the package name to check.</xsd:documentation>
+                                                  <xsd:appinfo>
+                                                       <sch:pattern id="spkginfoobjname">
+                                                            <sch:rule context="linux-def:slackwarepkginfo_object/linux-def:name">
+                                                                 <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the name entity of a slackwarepkginfo_object should be 'string'</sch:assert>
+                                                                 <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the name entity of a slackwarepkginfo_object should be 'equals', 'not equal', or 'pattern match'</sch:assert>
+                                                            </sch:rule>
+                                                       </sch:pattern>
+                                                  </xsd:appinfo>
+                                             </xsd:annotation>
+                                        </xsd:element>
+                                   </xsd:sequence>
+                              </xsd:choice>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <xsd:element name="slackwarepkginfo_state" substitutionGroup="oval-def:state">
+          <xsd:annotation>
+               <xsd:documentation>The slackwarepkginfo_state element defines the different information that can be used to evaluate the specified package. This includes the version, architecture, and revision. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-def:StateType">
+                         <xsd:sequence>
+                              <xsd:element name="name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the package name to check.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="spkginfostename">
+                                                  <sch:rule context="linux-def:slackwarepkginfo_state/linux-def:name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the name entity of a slackwarepkginfo_state should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the name entity of a slackwarepkginfo_state should be 'equals', 'not equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="version" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the version number of the package.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="spkginfosteversion">
+                                                  <sch:rule context="linux-def:slackwarepkginfo_state/linux-def:version">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the version entity of a slackwarepkginfo_state should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the version entity of a slackwarepkginfo_state should be 'equals', 'not equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="architecture" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="spkginfostearch">
+                                                  <sch:rule context="linux-def:slackwarepkginfo_state/linux-def:architecture">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the architecture entity of a slackwarepkginfo_state should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the architecture entity of a slackwarepkginfo_state should be 'equals', 'not equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="revision" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="spkginfosterevision">
+                                                  <sch:rule context="linux-def:slackwarepkginfo_state/linux-def:revision">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the revision entity of a slackwarepkginfo_state should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"><sch:value-of select="../@id"/> - operation attribute for the revision entity of a slackwarepkginfo_state should be 'equals', 'not equal', or 'pattern match'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/linux-definitions-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/linux-system-characteristics-schema.xsd
===================================================================
--- trunk/ovaldi/xml/linux-system-characteristics-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/linux-system-characteristics-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,408 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" xmlns:linux-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#linux" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#linux" elementFormDefault="qualified" version="5.4">
+     <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" schemaLocation="oval-system-characteristics-schema.xsd"/>
+     <xsd:annotation>
+          <xsd:documentation>The following is a description of the elements, types, and attributes that compose the Linux specific system characteristic items found in Open Vulnerability and Assessment Language (OVAL). Each item is an extension of the standard item element defined in the Core System Characteristic Schema. Through extension, each item inherits a set of elements and attributes that are shared amongst all OVAL Items. Each item is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core System Characteristic Schema is not outlined here.</xsd:documentation>
+          <xsd:documentation>The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+          <xsd:appinfo>
+               <schema>Linux System Characteristics</schema>
+               <version>5.4</version>
+               <date>4/1/2008 10:41:42 AM</date>
+                <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                <sch:title>schematron validation of the Linux portion of an OVAL System Characteristics file</sch:title>
+               <sch:ns prefix="oval-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5"/>
+               <sch:ns prefix="linux-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#linux"/>
+          </xsd:appinfo>
+     </xsd:annotation>
+     <!-- =============================================================================== -->
+     <!-- ==============================  DPKG INFO ITEM  =============================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="dpkginfo_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>This item stores DPKG package info.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the pakage name to check.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="dpkgitemname">
+                                                  <sch:rule context="linux-sc:dpkginfo_item/linux-sc:name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the name entity of a dpkginfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="arch" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the architecture for which the DPKG was built, like : i386, ppc, sparc, noarch.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="dpkgitemarch">
+                                                  <sch:rule context="linux-sc:dpkginfo_item/linux-sc:arch">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the arch entity of a dpkginfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="epoch" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the epoch number of the DPKG. For a null epoch (or '(none)' as returned by rpm) is equivalent to '0'.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="dpkgitemepoch">
+                                                  <sch:rule context="linux-sc:dpkginfo_item/linux-sc:epoch">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the epoch entity of a dpkginfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="release" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the release number of the build.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="dpkgitemrelease">
+                                                  <sch:rule context="linux-sc:dpkginfo_item/linux-sc:release">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the release entity of a dpkginfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="version" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the version number of the build, changed by the vendor/builder.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="dpkgitemversion">
+                                                  <sch:rule context="linux-sc:dpkginfo_item/linux-sc:version">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the version entity of a dpkginfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="evr" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This represents the epoch, version, and release fields as a single version string. It has the form "EPOCH:VERSION-RELEASE". Note that a null epoch (or '(none)' as returned by rpm) is equivalent to '0' and would hence have the form 0:VERSION-RELEASE.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="dpkgitemevr">
+                                                  <sch:rule context="linux-sc:dpkginfo_item/linux-sc:evr">
+                                                       <sch:assert test="not(@datatype) or @datatype='evr_string'">item <sch:value-of select="../@id"/> - datatype attribute for the evr entity of a dpkginfo_item should be 'evr_string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =====================  INET LISTENING SERVERS ITEM  =========================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="inetlisteningserver_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>An inet listening server item stores the results of checking for network servers currently active on a system. It holds information pertaining to a specific protocol-address-port combination.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="protocol" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the transport-layer protocol, in lowercase: tcp or udp.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ilsitemprotocol">
+                                                  <sch:rule context="linux-sc:inetlisteningserver_item/linux-sc:protocol">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the protocol entity of an inetlisteningserver_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="local_address" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the IP address associated with the inet listening server.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ilsitemlocal_address">
+                                                  <sch:rule context="linux-sc:inetlisteningserver_item/linux-sc:local_address">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the local_address entity of an inetlisteningserver_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="local_port" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the TCP or UDP port on which the program listens.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ilsitemlocal_port">
+                                                  <sch:rule context="linux-sc:inetlisteningserver_item/linux-sc:local_port">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the local_port entity of an inetlisteningserver_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="local_full_address" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the IP address and network port on which the program listens, equivalent to local_address:local_port.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ilsitemlocal_full_address">
+                                                  <sch:rule context="linux-sc:inetlisteningserver_item/linux-sc:local_full_address">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the local_full_address entity of an inetlisteningserver_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="program_name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the name of the communicating program.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ilsitemprogram_name">
+                                                  <sch:rule context="linux-sc:inetlisteningserver_item/linux-sc:program_name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the program_name entity of an inetlisteningserver_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="foreign_address" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the IP address with which the program is communicating, or with which it will communicate, in the case of a listening server.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ilsitemforeign_address">
+                                                  <sch:rule context="linux-sc:inetlisteningserver_item/linux-sc:foreign_address">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the foreign_address entity of an inetlisteningserver_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="foreign_port" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the TCP or UDP port to which the program communicates. In the case of a listening program accepting new connections, this is usually a *.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ilsitemforeign_port">
+                                                  <sch:rule context="linux-sc:inetlisteningserver_item/linux-sc:foreign_port">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the foreign_port entity of an inetlisteningserver_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="foreign_full_address" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the IP address and network port to which the program is communicating or will accept communications from, equivalent to foreign_address:foreign_port.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ilsitemforeign_full_address">
+                                                  <sch:rule context="linux-sc:inetlisteningserver_item/linux-sc:foreign_full_address">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the foreign_full_address entity of an inetlisteningserver_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="pid" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the process ID of the process. The process in question is that of the program communicating on the network.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ilsitempid">
+                                                  <sch:rule context="linux-sc:inetlisteningserver_item/linux-sc:pid">
+                                                       <sch:assert test="not(@datatype) or @datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the pid entity of an inetlisteningserver_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="user_id" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The numeric user id, or uid, is the third column of each user's entry in /etc/passwd. It represents the owner, and thus privilege level, of the specified program.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ilsitemuser_id">
+                                                  <sch:rule context="linux-sc:inetlisteningserver_item/linux-sc:user_id">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the user_id entity of an inetlisteningserver_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ============================  RPM INFO ITEM  ================================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="rpminfo_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>This item stores rpm info.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the pakage name to check.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rpmitemname">
+                                                  <sch:rule context="linux-sc:rpminfo_item/linux-sc:name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the name entity of a rpminfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="arch" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the architecture for which the RPM was built, like : i386, ppc, sparc, noarch. In the case of an apache rpm named httpd-2.0.40-21.11.4.i686.rpm, this value would be i686.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rpmitemarch">
+                                                  <sch:rule context="linux-sc:rpminfo_item/linux-sc:arch">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the arch entity of a rpminfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="epoch" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the epoch number of the RPM, this is used as a kludge for version-release comparisons where the vendor has done some kind of re-numbering or version forking. For a null epoch (or '(none)' as returned by rpm) is equivalent to '0'.This number is not revealed by a normal query of the RPM's information -- you must use a formatted rpm query command to gather this data from the command line, like so. For an already-installed RPM: rpm -q --qf '%{EPOCH}\n' installed_rpm For an RPM file that has not been installed: rpm -qp --qf '%{EPOCH}\n' rpm_file</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rpmitemepoch">
+                                                  <sch:rule context="linux-sc:rpminfo_item/linux-sc:epoch">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the epoch entity of a rpminfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="release" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the release number of the build.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rpmitemrelease">
+                                                  <sch:rule context="linux-sc:rpminfo_item/linux-sc:release">
+                                                       <sch:assert test="not(@datatype) or @datatype='string' or @datatype='version'">item <sch:value-of select="../@id"/> - datatype attribute for the release entity of a rpminfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="version" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the version number of the build, changed by the vendor/builder. In the case of an apache rpm named httpd-2.0.40-21.11.4.i686.rpm, this value would be 21.11.4.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rpmitemversion">
+                                                  <sch:rule context="linux-sc:rpminfo_item/linux-sc:version">
+                                                       <sch:assert test="not(@datatype) or @datatype='string' or @datatype='version'">item <sch:value-of select="../@id"/> - datatype attribute for the version entity of a rpminfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="evr" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This represents the epoch, version, and release fields as a single version string. It has the form "EPOCH:VERSION-RELEASE". Note that a null epoch (or '(none)' as returned by rpm) is equivalent to '0' and would hence have the form 0:VERSION-RELEASE.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rpmitemevr">
+                                                  <sch:rule context="linux-sc:rpminfo_item/linux-sc:evr">
+                                                       <sch:assert test="not(@datatype) or @datatype='evr_string'">item <sch:value-of select="../@id"/> - datatype attribute for the evr entity of a rpminfo_item should be 'evr_string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="signature_keyid" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This field contains the PGP key ID that the RPM issuer (generally the original operating system vendor) uses to sign the key. PGP is used to verify the authenticity and integrity of the RPM being considered. Software packages and patches are signed cryptographically to allow administrators to allay concerns that the distribution mechanism has been compromised, whether that mechanism is web site, FTP server, or even a mirror controlled by a hostile party. OVAL uses this field most of all to confirm that the package installed on the system is that shipped by the vendor, since comparing package version numbers against patch announcements is only programmatically valid if the installed package is known to contain the patched code.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rpmitemsignature_keyid">
+                                                  <sch:rule context="linux-sc:rpminfo_item/linux-sc:signature_keyid">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the signature_keyid entity of a rpminfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ==========================  SLACKWARE PKG INFO ITEM  ========================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="slackwarepkginfo_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>This item discribes info related to Slackware packages. It extends the standard ItemType as defined in the oval-system-characteristics schema and one should refer to the ItemType description for more information.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the pakage name to check.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="spkginfoitemname">
+                                                  <sch:rule context="linux-sc:slackwarepkginfo_item/linux-sc:name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the name entity of a slackwarepkginfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="version" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the version number of the pakage.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="spkginfoitemversion">
+                                                  <sch:rule context="linux-sc:slackwarepkginfo_item/linux-sc:version">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the version entity of a slackwarepkginfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="architecture" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the architecture the package is designed for.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="spkginfoitemarchitecture">
+                                                  <sch:rule context="linux-sc:slackwarepkginfo_item/linux-sc:architecture">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the architecture entity of a slackwarepkginfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="revision" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the revision of the package.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="spkginfoitemrevision">
+                                                  <sch:rule context="linux-sc:slackwarepkginfo_item/linux-sc:revision">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the revision entity of a slackwarepkginfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/linux-system-characteristics-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/macos-definitions-schema.xsd
===================================================================
--- trunk/ovaldi/xml/macos-definitions-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/macos-definitions-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,627 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:macos-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#macos" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-definitions-5#macos" elementFormDefault="qualified" version="5.4">
+      <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-definitions-5" schemaLocation="oval-definitions-schema.xsd"/>
+      <xsd:annotation>
+            <xsd:documentation>The following is a description of the elements, types, and attributes that compose the MacOS specific tests found in Open Vulnerability and Assessment Language (OVAL). Each test is an extension of the standard test element defined in the Core Definition Schema. Through extension, each test inherits a set of elements and attributes that are shared amongst all OVAL tests. Each test is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core Definition Schema is not outlined here.</xsd:documentation>
+            <xsd:documentation>The MacOS Definition Schema was initially developed by The Center for Internet Security. Many thanks to their contributions to OVAL and the security community.</xsd:documentation>
+            <xsd:documentation>The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+            <xsd:appinfo>
+                  <schema>MacOS Definition</schema>
+                  <version>5.4</version>
+                  <date>4/1/2008 10:41:43 AM</date>
+                  <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                  <sch:title>schematron validation of the MacOS portion of an OVAL Definitions file</sch:title>
+                  <sch:ns prefix="oval-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5"/>
+                  <sch:ns prefix="macos-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5#macos"/>
+                  <sch:ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/>
+            </xsd:appinfo>
+      </xsd:annotation>
+      <!-- =============================================================================== -->
+      <!-- =============================  ACCOUNT INFO TEST  ============================= -->
+      <!-- =============================================================================== -->
+      <xsd:element name="accountinfo_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>User account information (username, uid, gid, etc.) See netinfo(5) for field information, niutil(1) for retrieving it. We may need/want to add in data elements for things like authentication_authority, generateduid, mcx_settings (restricted account settings).</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="accountinfo_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The accountinfo_object element is used by an accountinfo_test to define the object(s) to be evaluated. This object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>An accountinfo_object consists of a single username that identifies the account from which to gather information.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="username" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>Specifies the user of the account to gather information from.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="accountobjusername">
+                                                                        <sch:rule context="macos-def:accountinfo_object/macos-def:username">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the username entity of an accountinfo_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="accountinfo_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The accountinfo_state element defines the different information that can be used to evaluate the specified accounts. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="username" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Specifies the user of the account to gather information from.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="accountsteusername">
+                                                            <sch:rule context="macos-def:accountinfo_state/macos-def:username">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the username entity of an accountinfo_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="password" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Obfuscated (*****) or encrypted password for this user.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="accountstepassword">
+                                                            <sch:rule context="macos-def:accountinfo_state/macos-def:password">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the password entity of an accountinfo_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="uid" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The numeric user id, or uid, is the third column of each user's entry in /etc/passwd. This element represents the owner of the file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="accountsteuid">
+                                                            <sch:rule context="macos-def:accountinfo_state/macos-def:uid">
+                                                                  <sch:assert test="not(@datatype) or @datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the uid entity of an accountinfo_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="gid" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Group ID of this account.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="accountstegid">
+                                                            <sch:rule context="macos-def:accountinfo_state/macos-def:gid">
+                                                                  <sch:assert test="not(@datatype) or @datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the gid entity of an accountinfo_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="realname" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>User's real name, aka gecos field of /etc/passwd.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="accountsterealname">
+                                                            <sch:rule context="macos-def:accountinfo_state/macos-def:realname">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the realname entity of an accountinfo_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="home_dir" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="accountstehome_dir">
+                                                            <sch:rule context="macos-def:accountinfo_state/macos-def:home_dir">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the home_dir entity of an accountinfo_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="login_shell" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="accountstelogin_shell">
+                                                            <sch:rule context="macos-def:accountinfo_state/macos-def:login_shell">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the login_shell entity of an accountinfo_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ========================  INET LISTENING SERVERS TEST  ======================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="inetlisteningservers_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>This test's purpose is generally used to check if a program is listening on the network, either for a new connections or as part of an ongoing connection. It is generally speaking the parsed output of running the command netstat -tuwlnpe with root privilege.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="inetlisteningservers_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The inetlisteningservers_object element is used by an inetlisteningserver test to define the object to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="program_name" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation/>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="macosilsobjprogram_name">
+                                                                        <sch:rule context="macos-def:inetlisteningservers_object/macos-def:program_name">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the program_name entity of an inetlisteningservers_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="inetlisteningservers_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The inetlisteningservers_state element defines the different information that can be used to evaluate the specified inet listening server. This includes the local address, foreign address, port information, and process id. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="program_name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the name of the communicating program.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="macosilssteprogram_name">
+                                                            <sch:rule context="macos-def:inetlisteningservers_state/macos-def:program_name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the program_name entity of an inetlisteningservers_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="local_address" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the IP address of the network interface on which the program listens.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="macosilsstelocal_address">
+                                                            <sch:rule context="macos-def:inetlisteningservers_state/macos-def:local_address">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the local_address entity of an inetlisteningservers_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="local_full_address" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the IP address and network port on which the program listens, equivalent to local_address:local_port.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="macosilsstelocal_full_address">
+                                                            <sch:rule context="macos-def:inetlisteningservers_state/macos-def:local_full_address">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the local_full_address entity of an inetlisteningservers_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="local_port" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the TCP or UDP port on which the program listens. Note that this is not a list -- if a program listens on multiple ports, or on a combination of TCP and UDP, each will have its own entry in the table data stored by this test.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="macosilsstelocal_port">
+                                                            <sch:rule context="macos-def:inetlisteningservers_state/macos-def:local_port">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the local_port entity of an inetlisteningservers_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="foreign_address" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the IP address with which the program is communicating, or with which it will communicate, in the case of a listening server.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="macosilssteforeign_address">
+                                                            <sch:rule context="macos-def:inetlisteningservers_state/macos-def:foreign_address">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the foreign_address entity of an inetlisteningservers_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="foreign_full_address" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the IP address and network port to which the program is communicating or will accept communications from, equivalent to foreign_address:foreign_port.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="macosilssteforeign_full_address">
+                                                            <sch:rule context="macos-def:inetlisteningservers_state/macos-def:foreign_full_address">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the foreign_full_address entity of an inetlisteningservers_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="foreign_port" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the TCP or UDP port to which the program communicates. In the case of a listening program accepting new connections, this is usually a *.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="macosilssteforeign_port">
+                                                            <sch:rule context="macos-def:inetlisteningservers_state/macos-def:foreign_port">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the foreign_port entity of an inetlisteningservers_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="pid" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the process ID of the process. The process in question is that of the program communicating on the network.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="macosilsstepid">
+                                                            <sch:rule context="macos-def:inetlisteningservers_state/macos-def:pid">
+                                                                  <sch:assert test="not(@datatype) or @datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the pid entity of an inetlisteningservers_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="protocol" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the transport-layer protocol, in lowercase: tcp or udp.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="macosilssteprotocol">
+                                                            <sch:rule context="macos-def:inetlisteningservers_state/macos-def:protocol">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the protocol entity of an inetlisteningservers_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="user_id" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The numeric user id, or uid, is the third column of each user's entry in /etc/passwd. It represents the owner, and thus privilege level, of the specified program.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="macosilssteuser_id">
+                                                            <sch:rule context="macos-def:inetlisteningservers_state/macos-def:user_id">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the user_id entity of an inetlisteningservers_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ==============================  NVRAM INFO TEST  ============================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="nvram_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>This test pulls data from the 'nvram -p' output.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="nvram_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The nvram_object element is used by a nvram test to define the object to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="nvram_var" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation/>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="nvramobjnvram_var">
+                                                                        <sch:rule context="macos-def:nvram_object/macos-def:nvram_var">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the nvram_var entity of a nvram_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="nvram_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>This test pulls data from the 'nvram -p' output.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="nvram_var" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This specifies the nvram variable to check.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="nvramstenvram_var">
+                                                            <sch:rule context="macos-def:nvram_state/macos-def:nvram_var">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the nvram_var entity of a nvram_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="nvram_value" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the value of the associated nvram variable.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="nvramstenvram_value">
+                                                            <sch:rule context="macos-def:nvram_state/macos-def:nvram_value">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the nvram_value entity of a nvram_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ===============================  PWPOLICY TEST  =============================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="pwpolicy_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>This test pulls data from the 'pwpolicy -getpolicy' output. The actual values get stored under /var/db/netinfo/local.nidb/ in a Store.# file. Is this test actually needed, or can the text file content test be used instead?</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="pwpolicy_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The pwpolicy_object element is used by a pwpolicy test to define the object to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="username" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation/>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="pwpobjusername">
+                                                                        <sch:rule context="macos-def:pwpolicy_object/macos-def:username">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the username entity of a pwpolicy_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="userpass" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation/>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="pwpobjuserpass">
+                                                                        <sch:rule context="macos-def:pwpolicy_object/macos-def:userpass">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the userpass entity of a pwpolicy_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="directory_node" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation/>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="pwpobjdirectory_node">
+                                                                        <sch:rule context="macos-def:pwpolicy_object/macos-def:directory_node">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the directory_node entity of a pwpolicy_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="pwpolicy_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation/>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="username" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="pwpsteusername">
+                                                            <sch:rule context="macos-def:pwpolicy_state/macos-def:username">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the username entity of a pwpolicy_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="userpass" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="pwpsteuserpass">
+                                                            <sch:rule context="macos-def:pwpolicy_state/macos-def:userpass">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the userpass entity of a pwpolicy_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="directory_node" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="pwpstedirectory_node">
+                                                            <sch:rule context="macos-def:pwpolicy_state/macos-def:directory_node">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the directory_node entity of a pwpolicy_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="maxChars" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Maximum number of characters allowed in a password.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="pwpstemaxChars">
+                                                            <sch:rule context="macos-def:pwpolicy_state/macos-def:maxChars">
+                                                                  <sch:assert test="not(@datatype) or @datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the maxChars entity of a pwpolicy_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="maxFailedLoginAttempts" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Maximum number of failed logins before the account is locked.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="pwpstemaxFailedLoginAttempts">
+                                                            <sch:rule context="macos-def:pwpolicy_state/macos-def:maxFailedLoginAttempts">
+                                                                  <sch:assert test="not(@datatype) or @datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the maxFailedLoginAttempts entity of a pwpolicy_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="minChars" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Minimum number of characters allowed in a password.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="pwpsteminChars">
+                                                            <sch:rule context="macos-def:pwpolicy_state/macos-def:minChars">
+                                                                  <sch:assert test="not(@datatype) or @datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the minChars entity of a pwpolicy_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="passwordCannotBeName" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Defines if the password is allowed to be the same as the username or not</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="pwpstepasswordCannotBeName">
+                                                            <sch:rule context="macos-def:pwpolicy_state/macos-def:passwordCannotBeName">
+                                                                  <sch:assert test="not(@datatype) or @datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the passwordCannotBeName entity of a pwpolicy_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="requiresAlpha" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Defines if the password must contain an alphabetical character or not</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="pwpsterequiresAlpha">
+                                                            <sch:rule context="macos-def:pwpolicy_state/macos-def:requiresAlpha">
+                                                                  <sch:assert test="not(@datatype) or @datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the requiresAlpha entity of a pwpolicy_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="requiresNumeric" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Defines if the password must contain an numeric character or not</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="pwpsterequiresNumeric">
+                                                            <sch:rule context="macos-def:pwpolicy_state/macos-def:requiresNumeric">
+                                                                  <sch:assert test="not(@datatype) or @datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the requiresNumeric entity of a pwpolicy_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/macos-definitions-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/macos-system-characteristics-schema.xsd
===================================================================
--- trunk/ovaldi/xml/macos-system-characteristics-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/macos-system-characteristics-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,421 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" xmlns:macos-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#macos" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#macos" elementFormDefault="qualified" version="5.4">
+     <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" schemaLocation="oval-system-characteristics-schema.xsd"/>
+     <xsd:annotation>
+          <xsd:documentation>The following is a description of the elements, types, and attributes that compose the MacOS specific system characteristic items found in Open Vulnerability and Assessment Language (OVAL). Each item is an extension of the standard test element defined in the Core Definition Schema. Through extension, each test inherits a set of elements and attributes that are shared amongst all OVAL tests. Each test is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core Definition Schema is not outlined here.</xsd:documentation>
+          <xsd:documentation>The MacOS System Characteristics Schema was initially developed by The Center for Internet Security. Many thanks to their contributions to OVAL and the security community.</xsd:documentation>
+          <xsd:documentation>The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+          <xsd:appinfo>
+               <schema>MacOS System Characteristics</schema>
+               <version>5.4</version>
+               <date>4/1/2008 10:41:43 AM</date>
+                <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                <sch:title>schematron validation of the MacOS portion of an OVAL System Characteristics file</sch:title>
+               <sch:ns prefix="oval-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5"/>
+               <sch:ns prefix="macos-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#macos"/>
+          </xsd:appinfo>
+     </xsd:annotation>
+     <!-- =============================================================================== -->
+     <!-- =============================  ACCOUNT INFO ITEM  ============================= -->
+     <!-- =============================================================================== -->
+     <xsd:element name="accountinfo_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>This item stores sser account information (username, uid, gid, etc.).</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="username" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The user associated with the information collected.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="accountitemusername">
+                                                  <sch:rule context="macos-sc:accountinfo_item/macos-sc:username">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the username entity of an accountinfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="password" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Obfuscated (*****) or encrypted password for this user.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="accountitempassword">
+                                                  <sch:rule context="macos-sc:accountinfo_item/macos-sc:password">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the password entity of an accountinfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="uid" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The numeric user id, or uid, is the third column of each user's entry in /etc/passwd. This element represents the owner of the file.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="accountitemuid">
+                                                  <sch:rule context="macos-sc:accountinfo_item/macos-sc:uid">
+                                                       <sch:assert test="not(@datatype) or @datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the uid entity of an accountinfo_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="gid" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Group ID of this account.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="accountitemgid">
+                                                  <sch:rule context="macos-sc:accountinfo_item/macos-sc:gid">
+                                                       <sch:assert test="not(@datatype) or @datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the gid entity of an accountinfo_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="realname" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>User's real name, aka gecos field of /etc/passwd.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="accountitemrealname">
+                                                  <sch:rule context="macos-sc:accountinfo_item/macos-sc:realname">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the realname entity of an accountinfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="home_dir" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="accountitemhome_dir">
+                                                  <sch:rule context="macos-sc:accountinfo_item/macos-sc:home_dir">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the home_dir entity of an accountinfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="login_shell" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="accountitemlogin_shell">
+                                                  <sch:rule context="macos-sc:accountinfo_item/macos-sc:login_shell">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the login_shell entity of an accountinfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ========================  INET LISTENING SERVERS ITEM  ======================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="inetlisteningserver_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>An inet listening server item stores the results of checking for network servers currently active on a system.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="program_name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the name of the communicating program.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="macosilsitemprogram_name">
+                                                  <sch:rule context="macos-sc:inetlisteningserver_item/macos-sc:program_name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the program_name entity of an inetlisteningserver_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="local_address" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the IP address of the network interface on which the program listens.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="macosilsitemlocal_address">
+                                                  <sch:rule context="macos-sc:inetlisteningserver_item/macos-sc:local_address">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the local_address entity of an inetlisteningserver_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="local_full_address" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the IP address and network port on which the program listens, equivalent to local_address:local_port.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="macosilsitemlocal_full_address">
+                                                  <sch:rule context="macos-sc:inetlisteningserver_item/macos-sc:local_full_address">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the local_full_address entity of an inetlisteningserver_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="local_port" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the TCP or UDP port on which the program listens. Note that this is not a list -- if a program listens on multiple ports, or on a combination of TCP and UDP, each will have its own entry in the table data stored by this item.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="macosilsitemlocal_port">
+                                                  <sch:rule context="macos-sc:inetlisteningserver_item/macos-sc:local_port">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the local_port entity of an inetlisteningserver_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="foreign_address" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the IP address with which the program is communicating, or with which it will communicate, in the case of a listening server.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="macosilsitemforeign_address">
+                                                  <sch:rule context="macos-sc:inetlisteningserver_item/macos-sc:foreign_address">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the foreign_address entity of an inetlisteningserver_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="foreign_full_address" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the IP address and network port to which the program is communicating or will accept communications from, equivalent to foreign_address:foreign_port.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="macosilsitemforeign_full_address">
+                                                  <sch:rule context="macos-sc:inetlisteningserver_item/macos-sc:foreign_full_address">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the foreign_full_address entity of an inetlisteningserver_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="foreign_port" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the TCP or UDP port to which the program communicates. In the case of a listening program accepting new connections, this is usually a *.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="macosilsitemforeign_port">
+                                                  <sch:rule context="macos-sc:inetlisteningserver_item/macos-sc:foreign_port">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the foreign_port entity of an inetlisteningserver_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="pid" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the process ID of the process. The process in question is that of the program communicating on the network.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="macosilsitempid">
+                                                  <sch:rule context="macos-sc:inetlisteningserver_item/macos-sc:pid">
+                                                       <sch:assert test="not(@datatype) or @datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the pid entity of an inetlisteningserver_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="protocol" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the transport-layer protocol, in lowercase: tcp or udp.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="macosilsitemprotocol">
+                                                  <sch:rule context="macos-sc:inetlisteningserver_item/macos-sc:protocol">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the protocol entity of an inetlisteningserver_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="user_id" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The numeric user id, or uid, is the third column of each user's entry in /etc/passwd. It represents the owner, and thus privilege level, of the specified program.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="macosilsitemuser_id">
+                                                  <sch:rule context="macos-sc:inetlisteningserver_item/macos-sc:user_id">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the user_id entity of an inetlisteningserver_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ==============================  NVRAM INFO ITEM   ============================= -->
+     <!-- =============================================================================== -->
+     <xsd:element name="nvram_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>Output of 'nvram -p'</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="nvram_var" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>A nvram variabl.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="nvramitemnvram_var">
+                                                  <sch:rule context="macos-sc:nvram_item/macos-sc:nvram_var">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the nvram_var entity of a nvram_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="nvram_value" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the value of the associated nvram variable.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="nvramitemnvram_value">
+                                                  <sch:rule context="macos-sc:nvram_item/macos-sc:nvram_value">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the nvram_value entity of a nvram_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ===============================  PWPOLICY ITEM  =============================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="pwpolicy_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>Output of 'pwpolicy -getpolicy'</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="username" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="pwpitemusername">
+                                                  <sch:rule context="macos-sc:pwpolicy_item/macos-sc:username">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the username entity of a pwpolicy_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="userpass" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="pwpitemuserpass">
+                                                  <sch:rule context="macos-sc:pwpolicy_item/macos-sc:userpass">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the userpass entity of a pwpolicy_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="directory_node" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="pwpitemdirectory_node">
+                                                  <sch:rule context="macos-sc:pwpolicy_item/macos-sc:directory_node">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the directory_node entity of a pwpolicy_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="maxChars" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Maximum number of characters allowed in a password.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="pwpitemmaxChars">
+                                                  <sch:rule context="macos-sc:pwpolicy_item/macos-sc:maxChars">
+                                                       <sch:assert test="not(@datatype) or @datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the maxChars entity of a pwpolicy_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="maxFailedLoginAttempts" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Maximum number of failed logins before the account is locked.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="pwpitemmaxFailedLoginAttempts">
+                                                  <sch:rule context="macos-sc:pwpolicy_item/macos-sc:maxFailedLoginAttempts">
+                                                       <sch:assert test="not(@datatype) or @datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the maxFailedLoginAttempts entity of a pwpolicy_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="minChars" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Minimum number of characters allowed in a password</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="pwpitemminChars">
+                                                  <sch:rule context="macos-sc:pwpolicy_item/macos-sc:minChars">
+                                                       <sch:assert test="not(@datatype) or @datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the minChars entity of a pwpolicy_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="passwordCannotBeName" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Defines if the password is allowed to be the same as the username or not</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="pwpitempasswordCannotBeName">
+                                                  <sch:rule context="macos-sc:pwpolicy_item/macos-sc:passwordCannotBeName">
+                                                       <sch:assert test="not(@datatype) or @datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the passwordCannotBeName entity of a pwpolicy_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="requiresAlpha" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Defines if the password must contain an alphabetical character or not</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="pwpitemrequiresAlpha">
+                                                  <sch:rule context="macos-sc:pwpolicy_item/macos-sc:requiresAlpha">
+                                                       <sch:assert test="not(@datatype) or @datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the requiresAlpha entity of a pwpolicy_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="requiresNumeric" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Defines if the password must contain an numeric character or not</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="pwpitemrequiresNumeric">
+                                                  <sch:rule context="macos-sc:pwpolicy_item/macos-sc:requiresNumeric">
+                                                       <sch:assert test="not(@datatype) or @datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the requiresNumeric entity of a pwpolicy_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/macos-system-characteristics-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/oval-common-schema.xsd
===================================================================
--- trunk/ovaldi/xml/oval-common-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/oval-common-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,563 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-common-5" elementFormDefault="qualified" version="5.4">
+     <xsd:annotation>
+          <xsd:documentation>The following is a description of the common types that are shared across the different schemas within Open Vulnerability and Assessment Language (OVAL). Each type is described in detail and should provide the information necessary to understand what each represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between these type is not outlined here.</xsd:documentation>
+          <xsd:documentation>The OVAL Schema is maintained by The MITRE Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+          <xsd:appinfo>
+               <schema>Core Common</schema>
+               <version>5.4</version>
+               <date>4/1/2008 10:41:43 AM</date>
+                <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+          </xsd:appinfo>
+     </xsd:annotation>
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <xsd:complexType name="GeneratorType">
+          <xsd:annotation>
+               <xsd:documentation>The GeneratorType complex type defines an element that is used to hold information about when a particular OVAL document was compiled, what version of the schema was used, what tool compiled the document, and what version of that tools was used. </xsd:documentation>
+               <xsd:documentation>Additional generator information is also allowed although it is not part of the official OVAL Schema. Individual organizations can place generator information that they feel are important and these will be skipped during the validation. All OVAL really cares about is that the stated generator information is there.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element name="product_name" type="xsd:string" minOccurs="0" maxOccurs="1">
+                    <xsd:annotation>
+                         <xsd:documentation>The optional product_name specifies the name of the application used to generate the file.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:element>
+               <xsd:element name="product_version" type="xsd:string" minOccurs="0" maxOccurs="1">
+                    <xsd:annotation>
+                         <xsd:documentation>The optional product_version specifies the version of the application used to generate the file.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:element>
+               <xsd:element name="schema_version" type="xsd:decimal" minOccurs="1" maxOccurs="1">
+                    <xsd:annotation>
+                         <xsd:documentation>The required schema_version specifies the version of the OVAL Schema that the document has been written in and that should be used for validation.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:element>
+               <xsd:element name="timestamp" type="xsd:dateTime" minOccurs="1" maxOccurs="1">
+                    <xsd:annotation>
+                         <xsd:documentation>The required timestamp specifies when the particular OVAL document was compiled. The format for the timestamp is yyyy-mm-ddThh:mm:ss. Note that the timestamp element does not specify when a definition (or set of definitions) was created or modified but rather when the actual XML document that contains the definition was created. For example, the document might have pulled a bunch of existing OVAL Definitions together, each of the definitions having been created at some point in the past. The timestamp in this case would be when the combined document was created.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:element>
+               <xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
+          </xsd:sequence>
+     </xsd:complexType>
+     <xsd:complexType name="MessageType">
+          <xsd:annotation>
+               <xsd:documentation>The MessageType complex type defines the structure for which messages are relayed from the data collection engine. Each message is a text string that has an associated level attribute identifying the type of message being sent. These messages could be error messages, warning messages, debug messages, etc. How the messages are used by tools and whether or not they are displayed to the user is up to the specific implementation. Please refer to the description of the MessageLevelEnumeration for more information about each type of message.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:extension base="xsd:string">
+                    <xsd:attribute name="level" type="oval:MessageLevelEnumeration" use="optional" default="info"/>
+               </xsd:extension>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <!-- =============================================================================== -->
+     <!-- ===============================  ENUMERATIONS  ================================ -->
+     <!-- =============================================================================== -->
+     <xsd:simpleType name="CheckEnumeration">
+          <xsd:annotation>
+               <xsd:documentation>The CheckEnumeration simple type defines acceptable check values, which are used to determine the final result of something based on the results of individual components. When used to define the relationship between objects and states, each check value defines how many of the matching objects must satisfy the given state for the test to return true. When used to define the relationship between instances of a given entity, the different check values defines how many instances must be true for the entity to return true. When used to define the relationship between entities and multiple variable values, each check value defines how many variable values must be true for the entity to return true.</xsd:documentation>
+               <xsd:appinfo>
+                    <evaluation_documentation>Below are some tables that outline how each check attribute effects evaluation. The far left column identifies the check attribute in question. The middle column specifies the different combinations of individual results that the check attribute may bind together. (T=true, F=false, E=error, U=unknown, NE=not evaluated, NA=not applicable) For example, a 1+ under T means that one or more individual results are true, while a 0 under U means that zero individual results are unknown. The last column specifies what the final result would be according to each combination of individual results. Note that if the individual test is negated, then a true result is false and a false result is true, all other results stay as is.</evaluation_documentation>
+                    <evaluation_chart xml:space="preserve">
+               ||  num of individual results  ||
+ check attr is ||                             ||  final result is
+               || T  | F  | E  | U  | NE | NA ||
+---------------||-----------------------------||------------------
+               || 1+ | 0  | 0  | 0  | 0  | 0+ ||  True
+               || 0+ | 1+ | 0+ | 0+ | 0+ | 0+ ||  False
+     ALL       || 0+ | 0  | 1+ | 0+ | 0+ | 0+ ||  Error
+               || 0+ | 0  | 0  | 1+ | 0+ | 0+ ||  Unknown
+               || 0+ | 0  | 0  | 0  | 1+ | 0+ ||  Not Evaluated
+               || 0  | 0  | 0  | 0  | 0  | 1+ ||  Not Applicable
+---------------||-----------------------------||------------------
+                    </evaluation_chart>
+                    <evaluation_chart xml:space="preserve">
+               ||  num of individual results  ||
+ check attr is ||                             ||  final result is
+               || T  | F  | E  | U  | NE | NA ||
+---------------||-----------------------------||------------------
+               || 1+ | 0+ | 0+ | 0+ | 0+ | 0+ ||  True
+               || 0  | 1+ | 0  | 0  | 0  | 0+ ||  False
+  AT LEAST ONE || 0  | 0+ | 1+ | 0+ | 0+ | 0+ ||  Error
+               || 0  | 0+ | 0  | 1+ | 0+ | 0+ ||  Unknown
+               || 0  | 0+ | 0  | 0  | 1+ | 0+ ||  Not Evaluated
+               || 0  | 0  | 0  | 0  | 0  | 1+ ||  Not Applicable
+---------------||-----------------------------||------------------
+                    </evaluation_chart>
+                    <evaluation_chart xml:space="preserve">
+               ||  num of individual results  ||
+ check attr is ||                             ||  final result is
+               || T  | F  | E  | U  | NE | NA ||
+---------------||-----------------------------||------------------
+               || 1  | 0+ | 0  | 0  | 0  | 0+ ||  True
+               || 2+ | 0+ | 0+ | 0+ | 0+ | 0+ ||  ** False **
+               || 0  | 1+ | 0  | 0  | 0  | 0+ ||  ** False **
+   ONLY ONE    ||0,1 | 0+ | 1+ | 0+ | 0+ | 0+ ||  Error
+               ||0,1 | 0+ | 0  | 1+ | 0+ | 0+ ||  Unknown
+               ||0,1 | 0+ | 0  | 0  | 1+ | 0+ ||  Not Evaluated
+               || 0  | 0  | 0  | 0  | 0  | 1+ ||  Not Applicable
+---------------||-----------------------------||------------------
+                    </evaluation_chart>
+                    <evaluation_chart xml:space="preserve">
+               ||  num of individual results  ||
+ check attr is ||                             ||  final result is
+               || T  | F  | E  | U  | NE | NA ||
+---------------||-----------------------------||------------------
+               || 0  | 1+ | 0  | 0  | 0  | 0+ ||  True
+               || 1+ | 0+ | 0+ | 0+ | 0+ | 0+ ||  False
+  NONE SATISFY || 0  | 0+ | 1+ | 0+ | 0+ | 0+ ||  Error
+               || 0  | 0+ | 0  | 1+ | 0+ | 0+ ||  Unknown
+               || 0  | 0+ | 0  | 0  | 1+ | 0+ ||  Not Evaluated
+               || 0  | 0  | 0  | 0  | 0  | 1+ ||  Not Applicable
+---------------||-----------------------------||------------------
+                    </evaluation_chart>
+               </xsd:appinfo>
+          </xsd:annotation>
+          <xsd:restriction base="xsd:string">
+               <xsd:enumeration value="all">
+                    <xsd:annotation>
+                         <xsd:documentation>A value of 'all' means that a final result of true is given if all the individual results are true.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="at least one">
+                    <xsd:annotation>
+                         <xsd:documentation>A value of 'at least one' means that a final result of true is given if at least one of the individual results is true.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="none exist">
+                    <xsd:annotation>
+                         <xsd:documentation>A value of 'none exists' means that a test evaluates to true if no matching object exists that satisfy the data requirements.</xsd:documentation>
+                         <xsd:documentation>DEPRECATED: this value has been deprecated and will be removed with the next major version of the language.  One should use the other possible values in addition to the existance attributes instead of the 'none exist' value here.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="none satisfy">
+                    <xsd:annotation>
+                         <xsd:documentation>A value of 'none satisfy' means that a final result of true is given if none the individual results are true.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="only one">
+                    <xsd:annotation>
+                         <xsd:documentation>A value of 'only one' means that a final result of true is given if one and only one of the individual results are true.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+          </xsd:restriction>
+     </xsd:simpleType>
+     <xsd:simpleType name="DatatypeEnumeration">
+          <xsd:annotation>
+               <xsd:documentation>The DatatypeEnumeration simple type defines the legal datatypes that are used to describe the values of individual entities. A value should be interpreted according to the specified type. This is most important during comparisons. For example, is '21' less than '123'? will evaluate to true if the datatypes are 'int', but will evaluate to 'false' if the datatypes are 'string'. Another example is applying the 'equal' operation to '1.0.0.0' and '1.0'. With datatype 'string' they are not equal, with datatype 'version' they are.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:restriction base="xsd:string">
+               <xsd:enumeration value="binary">
+                    <xsd:annotation>
+                         <xsd:documentation>The binary datatype is used to represent data that is in raw (non-printable) form. Values should be hex strings. Expected operations within OVAL for binary values are 'equals' and 'not equal'.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="boolean">
+                    <xsd:annotation>
+                         <xsd:documentation>The boolean datatype represents standard boolean data, either true or false. Expected operations within OVAL for boolean values are 'equals' and 'not equal'.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="evr_string">
+                    <xsd:annotation>
+                         <xsd:documentation>The evr_string datatype represents the epoch, version, and release fields as a single version string. It has the form "EPOCH:VERSION-RELEASE". Comparisons involving this datatype should follow the algorithm of librpm's rpmvercmp() function. Expected operations within OVAL for evr_string values are 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', and 'less than or equal'.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+                <xsd:enumeration value="fileset_revision">
+                      <xsd:annotation>
+                            <xsd:documentation>The fileset_revision datatype represents the version string related to filesets in HP-UX. An example would be 'A.03.61.00'. As far as implementing operations, right now there is a IP licensing issue being discussed on our ability to publicize the method to do this; however, the HP-UX team is willing to discuss how to implement this with anyone who would like to do it while we are waiting for the IP licensing issue to be resolved. Expected operations within OVAL for fileset_version values are 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', and 'less than or equal'.</xsd:documentation>
+                      </xsd:annotation>
+                </xsd:enumeration>
+                <xsd:enumeration value="float">
+                    <xsd:annotation>
+                         <xsd:documentation>The float datatype describes standard float data. Expected operations within OVAL for float values are 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', and 'less than or equal'.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="ios_version">
+                    <xsd:annotation>
+                         <xsd:documentation>The ios_version datatype describes Cisco IOS Train strings. These are in essence version strings for IOS. Please refer to Cisco's IOS Reference Guide for information on how to compare different Trains as they follow a very specific pattern. Expected operations within OVAL for ios_version values are 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', and 'less than or equal'.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="int">
+                    <xsd:annotation>
+                         <xsd:documentation>The int datatype describes standard integer data.  Note that this is based off the built-in xsd integer datatype with an infinite range.  Expected operations within OVAL for int values are 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', 'less than or equal', 'bitwise and', and 'bitwise or'.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="string">
+                    <xsd:annotation>
+                          <xsd:documentation>The string datatype describes standard string data. Expected operations within OVAL for string values are 'equals', 'not equal', 'case insensitive equals', 'case insensitive not equal', 'pattern match'.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="version">
+                    <xsd:annotation>
+                         <xsd:documentation>The version datatype represents a value that is a hierarchical list of non-negative integers separated by a single character delimiter. Expected operations within OVAL for version values are 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', and 'less than or equal'.</xsd:documentation>
+                         <xsd:documentation>For example '#.#.#' or '#-#-#-#' where the numbers to the left are more significant than the numbers to the right. When performing an 'equals' operation on a version datatype, you should first check the left most number for equality. If that fails, then the values are not equal. If it succeeds, then check the second left most number for equality. Continue checking the numbers from left to right until the last number has been checked. If, after testing all the previous numbers, the last number is equal then the two versions are equal. When performing other operations, such as 'less than', 'less than or equal', 'greater than, or 'greater than or equal', similar logic as above is used. Start with the left most number and move from left to right. For each number, check if it is less than the number you are testing against. If it is, then the version in question is less than the version you are testing against. If the number is equal, then move to check the next number to the right. For example, to test if 5.7.23 is less than or equal to 5.8.0 you first compare 5 to 5. They are equal so you move on to compare 7 to 8. 7 is less than 8 so the entire test succeeds and 5.7.23 is 'less than or equal' to 5.8.0. The difference between the 'less than' and 'less than or equal' operations is how the last number is handled. If the last number is reached, the check should use the given operation (either 'less than' and 'less than or equal') to test the number. For example, to test if 4.23.6 is greater than 4.23.6 you first compare 4 to 4. They are equal so you move on to compare 23 to 23. They are equal so you move on to compare 6 to 6. This is the last number in the version and since 6 is not greater than 6, the entire test fails and 4.23.6 is not greater than 4.23.6.</xsd:documentation>
+                         <xsd:documentation>Version strings with a different number of components shall be padded with zeros to make them the same size. For example, if the version strings '1.2.3' and '6.7.8.9' are being compared, then the short one should be padded to become '1.2.3.0'.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+          </xsd:restriction>
+     </xsd:simpleType>
+     <xsd:simpleType name="ExistenceEnumeration">
+          <xsd:annotation>
+               <xsd:documentation>The ExistenceEnumeration simple type defines acceptable existence values, which are used to determine a result based on the existence of individual components. The main use for this is for a test regarding the existence of objects on the system.</xsd:documentation>
+               <xsd:appinfo>
+                    <evaluation_documentation>Below are some tables that outline how each ExistenceEnumeration value effects evaluation. The far left column identifies the ExistenceEnumeration value in question. The middle column specifies the different combinations of individual item status flags that the attribute may bind together. (EX=exists, DE=does not exist, ER=error, NC=not collected) For example, a 1+ under EX means that one or more individual item flags are set to exists, while a 0 under NC means that zero individual item flags are set to not collected. The last column specifies what the final result would be according to each combination of individual item flags. Note that if the individual test is negated, then a true result is false and a false result is true, all other results stay as is.</evaluation_documentation>
+                    <evaluation_chart xml:space="preserve">
+               || item status value count   ||
+  attr value   ||                           ||  final result is
+               ||  EX  |  DE  |  ER  |  NC  ||
+---------------||---------------------------||------------------
+               ||  1+  |  0   |  0   |  0   ||  True
+               ||  0   |  0   |  0   |  0   ||  False
+               ||  0+  |  1+  |  0+  |  0+  ||  False  
+ all_exist     ||  0+  |  0   |  1+  |  0+  ||  Error
+               ||  0+  |  0   |  0   |  1+  ||  Unknown
+               ||  --  |  --  |  --  |  --  ||  Not Evaluated
+               ||  --  |  --  |  --  |  --  ||  Not Applicable
+---------------||---------------------------||------------------
+                    </evaluation_chart>
+                    <evaluation_chart xml:space="preserve">
+               || item status value count   ||
+  attr value   ||                           ||  final result is
+               ||  EX  |  DE  |  ER  |  NC  ||
+---------------||---------------------------||------------------
+               ||  0+  |  0+  |  0   |  0+  ||  True 
+               ||  1+  |  0+  |  1+  |  0+  ||  True
+               ||  --  |  --  |  --  |  --  ||  False
+ any           ||  0   |  0+  |  1+  |  0+  ||  Error
+               ||  --  |  --  |  --  |  --  ||  Unknown
+               ||  --  |  --  |  --  |  --  ||  Not Evaluated
+               ||  --  |  --  |  --  |  --  ||  Not Applicable
+---------------||---------------------------||------------------
+                    </evaluation_chart>
+                    <evaluation_chart xml:space="preserve">
+               || item status value count   ||
+  attr value   ||                           ||  final result is
+               ||  EX  |  DE  |  ER  |  NC  ||
+---------------||---------------------------||------------------
+               ||  1+  |  0+  |  0+  |  0+  ||  True 
+               ||  0   |  1+  |  0   |  0   ||  False
+ at_least_one  ||  0   |  0+  |  1+  |  0+  ||  Error
+               ||  0   |  0+  |  0   |  1+  ||  Unknown
+               ||  --  |  --  |  --  |  --  ||  Not Evaluated
+               ||  --  |  --  |  --  |  --  ||  Not Applicable
+---------------||---------------------------||------------------
+                    </evaluation_chart>
+                    <evaluation_chart xml:space="preserve">
+               || item status value count   ||
+  attr value   ||                           ||  final result is
+               ||  EX  |  DE  |  ER  |  NC  ||
+---------------||---------------------------||------------------
+               ||  0   |  0+  |  0   |  0   ||  True 
+               ||  1+  |  0+  |  0+  |  0+  ||  False
+ none          ||  0   |  0+  |  1+  |  0+  ||  Error
+               ||  0   |  0+  |  0   |  1+  ||  Unknown
+               ||  --  |  --  |  --  |  --  ||  Not Evaluated
+               ||  --  |  --  |  --  |  --  ||  Not Applicable
+---------------||---------------------------||------------------
+                    </evaluation_chart>
+                    <evaluation_chart xml:space="preserve">
+               || item status value count   ||
+  attr value   ||                           ||  final result is
+               ||  EX  |  DE  |  ER  |  NC  ||
+---------------||---------------------------||------------------
+               ||  1   |  0+  |  0   |  0   ||  True 
+               ||  2+  |  0+  |  0+  |  0+  ||  False
+               ||  0   |  0+  |  0   |  0   ||  False
+ only_one      ||  0,1 |  0+  |  1+  |  0+  ||  Error
+               ||  0,1 |  0+  |  0   |  1+  ||  Unknown
+               ||  --  |  --  |  --  |  --  ||  Not Evaluated
+               ||  --  |  --  |  --  |  --  ||  Not Applicable
+---------------||---------------------------||------------------
+                    </evaluation_chart>
+               </xsd:appinfo>
+          </xsd:annotation>
+          <xsd:restriction base="xsd:string">
+               <xsd:enumeration value="all_exist">
+                    <xsd:annotation>
+                         <xsd:documentation>A value of 'all_exist' means that every object defined by the description exists on the system.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="any_exist">
+                    <xsd:annotation>
+                         <xsd:documentation>A value of 'any_exist' means that zero or more objects defined by the description exist on the system.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="at_least_one_exists">
+                    <xsd:annotation>
+                         <xsd:documentation>A value of 'at_least_one_exists' means that at least one object defined by the description exists on the system.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="none_exist">
+                    <xsd:annotation>
+                         <xsd:documentation>A value of 'none_exist' means that none of the objects defined by the description exist on the system.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="only_one_exists">
+                    <xsd:annotation>
+                         <xsd:documentation>A value of 'only_one_exists' means that only one object defined by the description exists on the system.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+          </xsd:restriction>
+     </xsd:simpleType>
+     <xsd:simpleType name="FamilyEnumeration">
+          <xsd:annotation>
+               <xsd:documentation>The FamilyEnumeration simple type is a listing of families that OVAL supports at this time.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:restriction base="xsd:string">
+               <xsd:enumeration value="ios"/>
+               <xsd:enumeration value="macos"/>
+               <xsd:enumeration value="unix"/>
+               <xsd:enumeration value="windows"/>
+          </xsd:restriction>
+     </xsd:simpleType>
+     <xsd:simpleType name="MessageLevelEnumeration">
+          <xsd:annotation>
+               <xsd:documentation>The MessageLevelEnumeration simple type defines the different levels associated with a message. There is no specific criteria about which messages get assigned which level. This is completely arbitrary and up to the content producer to decide what is an error message and what is a debug message.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:restriction base="xsd:string">
+               <xsd:enumeration value="debug">
+                    <xsd:annotation>
+                         <xsd:documentation>Debug messages should only be displayed by a tool when run in some sort of verbose mode.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="error">
+                    <xsd:annotation>
+                         <xsd:documentation>Error messages should be recorded when there was an error that did not allow the collection of specific data.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="fatal">
+                    <xsd:annotation>
+                         <xsd:documentation>A fatal message should be recorded when an error causes the failure of more than just a single piece of data.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="info">
+                    <xsd:annotation>
+                         <xsd:documentation>Info messages are used to pass useful information about the data collection to a user.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="warning">
+                    <xsd:annotation>
+                         <xsd:documentation>A warning message reports something that might not correct but information was still collected.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+          </xsd:restriction>
+     </xsd:simpleType>
+     <xsd:simpleType name="OperationEnumeration">
+          <xsd:annotation>
+               <xsd:documentation>The OperationEnumeration simple type defines acceptable operations. Each operation defines how to compare entities against their actual values.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:restriction base="xsd:string">
+               <xsd:enumeration value="equals">
+                    <xsd:annotation>
+                         <xsd:documentation>The 'equals' operation returns true if the actual value on the system is equal to the stated entity.  When the specified datatype is a string, this results in a case-sensitive comparison.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+                <xsd:enumeration value="not equal">
+                    <xsd:annotation>
+                          <xsd:documentation>The 'not equal' operation returns true if the actual value on the system is not equal to the stated entity.  When the specified datatype is a string, this results in a case-sensitive comparison.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+                <xsd:enumeration value="case insensitive equals">
+                      <xsd:annotation>
+                            <xsd:documentation>The 'case insensitive equals' operation is meant for string data and returns true if the actual value on the system is equal (using a case insensitive comparison) to the stated entity.</xsd:documentation>
+                      </xsd:annotation>
+                </xsd:enumeration>
+                <xsd:enumeration value="case insensitive not equal">
+                      <xsd:annotation>
+                            <xsd:documentation>The 'case insensitive not equal' operation is meant for string data and returns true if the actual value on the system is not equal (using a case insensitive comparison) to the stated entity.</xsd:documentation>
+                      </xsd:annotation>
+                </xsd:enumeration>
+                <xsd:enumeration value="greater than">
+                    <xsd:annotation>
+                         <xsd:documentation>The 'greater than' operation returns true if the actual value on the system is greater than the stated entity.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="less than">
+                    <xsd:annotation>
+                         <xsd:documentation>The 'less than' operation returns true if the actual value on the system is less than the stated entity.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="greater than or equal">
+                    <xsd:annotation>
+                         <xsd:documentation>The 'greater than or equal' operation returns true if the actual value on the system is greater than or equal to the stated entity.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="less than or equal">
+                    <xsd:annotation>
+                         <xsd:documentation>The 'less than or equal' operation returns true if the actual value on the system is less than or equal to the stated entity.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="bitwise and">
+                    <xsd:annotation>
+                         <xsd:documentation>The 'bitwise and' operation is used to determine if a specific bit is set. It returns true if performing a BITWISE AND with the binary representation of the stated entity against the binary representation of the actual value on the system results in a binary value that is equal to the binary representation of the stated entity. For example, assuming a datatype of 'int', if the actual integer value of the setting on your machine is 6 (same as 0110 in binary), then performing a 'bitwise and' with the stated integer 4 (0100) returns 4 (0100). Since the result is the same as the state mask, then the test returns true. If the actual value on your machine is 1 (0001), then the 'bitwise and' with the stated integer 4 (0100) returns 0 (0000). Since the result is not the same as the stated mask, then the test fails.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="bitwise or">
+                    <xsd:annotation>
+                         <xsd:documentation>The 'bitwise or' operation is used to determine if a specific bit is not set. It returns true if performing a BITWISE OR with the binary representation of the stated entity against the binary representation of the actual value on the system results in a binary value that is equal to the binary representation of the stated entity. For example, assuming a datatype of 'int', if the actual integer value of the setting on your machine is 6 (same as 0110 in binary), then performing a 'bitwise or' with the stated integer 14 (1110) returns 14 (1110). Since the result is the same as the state mask, then the test returns true. If the actual value on your machine is 1 (0001), then the 'bitwise or' with the stated integer 14 (1110) returns 15 (1111). Since the result is not the same as the stated mask, then the test fails.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="pattern match">
+                    <xsd:annotation>
+                         <xsd:documentation>The 'pattern match' operation allows an item to be tested against a regular expression. When used by an entity in an OVAL Object, the regular expression represents the set of matching objects on the system. Patterns must comply with POSIX std 1003.2-1992, Section 2.8 - 'Regular Expression Notation'. Patterns can use both Basic and Extended Regular Expression notation.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+          </xsd:restriction>
+     </xsd:simpleType>
+     <xsd:simpleType name="OperatorEnumeration">
+          <xsd:annotation>
+               <xsd:documentation>The OperatorEnumeration simple type defines acceptable operators. Each operator defines how to evaluate multiple arguments.</xsd:documentation>
+               <xsd:appinfo>
+                    <evaluation_documentation>Below are some tables that outline how each operator effects evaluation. The far left column identifies the operator in question. The middle column specifies the different combinations of individual results that the operator may bind together. (T=true, F=false, E=error, U=unknown, NE=not evaluated, NA=not applicable) For example, a 1+ under T means that one or more individual results are true, while a 0 under U means that zero individual results are unknown. The last column specifies what the final result would be according to each combination of individual results. Note that if the individual test is negated, then a true result is false and a false result is true, all other results stay as is.</evaluation_documentation>
+                    <evaluation_chart xml:space="preserve">
+               ||  num of individual results  ||
+  operator is  ||                             ||  final result is
+               || T  | F  | E  | U  | NE | NA ||
+---------------||-----------------------------||------------------
+               || 1+ | 0  | 0  | 0  | 0  | 0+ ||  True
+               || 0+ | 1+ | 0+ | 0+ | 0+ | 0+ ||  False
+      AND      || 0+ | 0  | 1+ | 0+ | 0+ | 0+ ||  Error
+               || 0+ | 0  | 0  | 1+ | 0+ | 0+ ||  Unknown
+               || 0+ | 0  | 0  | 0  | 1+ | 0+ ||  Not Evaluated
+               || 0  | 0  | 0  | 0  | 0  | 1+ ||  Not Applicable
+---------------||-----------------------------||------------------
+                    </evaluation_chart>
+                    <evaluation_chart xml:space="preserve">
+               ||  num of individual results  || 
+  operator is  ||                             ||  final result is
+               || T  | F  | E  | U  | NE | NA ||
+---------------||-----------------------------||------------------
+               || 1  | 0+ | 0  | 0  | 0  | 0+ ||  True
+               || 2+ | 0+ | 0+ | 0+ | 0+ | 0+ ||  ** False **
+               || 0  | 1+ | 0  | 0  | 0  | 0+ ||  ** False **
+      ONE      ||0,1 | 0+ | 1+ | 0+ | 0+ | 0+ ||  Error
+               ||0,1 | 0+ | 0  | 1+ | 0+ | 0+ ||  Unknown
+               ||0,1 | 0+ | 0  | 0  | 1+ | 0+ ||  Not Evaluated
+               || 0  | 0  | 0  | 0  | 0  | 1+ ||  Not Applicable
+---------------||-----------------------------||------------------
+                    </evaluation_chart>
+                    <evaluation_chart xml:space="preserve">
+               ||  num of individual results  || 
+  operator is  ||                             ||  final result is
+               || T  | F  | E  | U  | NE | NA ||
+---------------||-----------------------------||------------------
+               || 1+ | 0+ | 0+ | 0+ | 0+ | 0+ ||  True
+               || 0  | 1+ | 0  | 0  | 0  | 0+ ||  False
+      OR       || 0  | 0+ | 1+ | 0+ | 0+ | 0+ ||  Error
+               || 0  | 0+ | 0  | 1+ | 0+ | 0+ ||  Unknown
+               || 0  | 0+ | 0  | 0  | 1+ | 0+ ||  Not Evaluated
+               || 0  | 0  | 0  | 0  | 0  | 1+ ||  Not Applicable
+---------------||-----------------------------||------------------
+                    </evaluation_chart>
+                    <evaluation_chart xml:space="preserve">
+               ||  num of individual results  ||
+  operator is  ||                             ||  final result is
+               || T  | F  | E  | U  | NE | NA ||
+---------------||-----------------------------||------------------
+               ||odd | 0+ | 0  | 0  | 0  | 0+ ||  True
+               ||even| 0+ | 0  | 0  | 0  | 0+ ||  False
+      XOR      || 0+ | 0+ | 1+ | 0+ | 0+ | 0+ ||  Error
+               || 0+ | 0+ | 0  | 1+ | 0+ | 0+ ||  Unknown
+               || 0+ | 0+ | 0  | 0  | 1+ | 0+ ||  Not Evaluated
+               || 0  | 0  | 0  | 0  | 0  | 1+ ||  Not Applicable
+---------------||-----------------------------||------------------
+                    </evaluation_chart>
+               </xsd:appinfo>
+          </xsd:annotation>
+          <xsd:restriction base="xsd:string">
+               <xsd:enumeration value="AND">
+                    <xsd:annotation>
+                         <xsd:documentation>The AND operator produces a true result if every argument is true. If one or more arguments are false, the result of the AND is false. If one or more of the arguments are unknown, and if none of the arguments are false, then the AND operator produces a result of unknown.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="ONE">
+                    <xsd:annotation>
+                         <xsd:documentation>The ONE operator produces a true result if one and only one argument is true. If there are more than argument is true (or if there are no true arguements), the result of the ONE is false. If one or more of the arguments are unknown, then the ONE operator produces a result of unknown.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="OR">
+                    <xsd:annotation>
+                         <xsd:documentation>The OR operator produces a true result if one or more arguments is true. If every argument is false, the result of the OR is false. If one or more of the arguments are unknown and if none of arguments are true, then the OR operator produces a result of unknown.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="XOR">
+                    <xsd:annotation>
+                         <xsd:documentation>XOR is defined to be true if an odd number of its arguments are true, and false otherwise. If any of the arguments are unknown, then the XOR operator produces a result of unknown.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+          </xsd:restriction>
+     </xsd:simpleType>
+     <!-- =============================================================================== -->
+     <!-- ================================  ID PATTERNS  ================================ -->
+     <!-- =============================================================================== -->
+     <xsd:simpleType name="DefinitionIDPattern">
+          <xsd:annotation>
+               <xsd:documentation>Define the format for acceptable OVAL Definition ids. An urn format is used with the id starting with the word oval followed by a unique string, followed by the three letter code 'def', and ending with an integer.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:restriction base="xsd:string">
+               <xsd:pattern value="oval:[A-Za-z0-9_\-\.]+:def:[1-9][0-9]*"/>
+          </xsd:restriction>
+     </xsd:simpleType>
+     <xsd:simpleType name="ObjectIDPattern">
+          <xsd:annotation>
+               <xsd:documentation>Define the format for acceptable OVAL Object ids. An urn format is used with the id starting with the word oval followed by a unique string, followed by the three letter code 'obj', and ending with an integer.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:restriction base="xsd:string">
+               <xsd:pattern value="oval:[A-Za-z0-9_\-\.]+:obj:[1-9][0-9]*"/>
+          </xsd:restriction>
+     </xsd:simpleType>
+     <xsd:simpleType name="StateIDPattern">
+          <xsd:annotation>
+               <xsd:documentation>Define the format for acceptable OVAL State ids. An urn format is used with the id starting with the word oval followed by a unique string, followed by the three letter code 'ste', and ending with an integer.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:restriction base="xsd:string">
+               <xsd:pattern value="oval:[A-Za-z0-9_\-\.]+:ste:[1-9][0-9]*"/>
+          </xsd:restriction>
+     </xsd:simpleType>
+     <xsd:simpleType name="TestIDPattern">
+          <xsd:annotation>
+               <xsd:documentation>Define the format for acceptable OVAL Test ids. An urn format is used with the id starting with the word oval followed by a unique string, followed by the three letter code 'tst', and ending with an integer.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:restriction base="xsd:string">
+               <xsd:pattern value="oval:[A-Za-z0-9_\-\.]+:tst:[1-9][0-9]*"/>
+          </xsd:restriction>
+     </xsd:simpleType>
+     <xsd:simpleType name="VariableIDPattern">
+          <xsd:annotation>
+               <xsd:documentation>Define the format for acceptable OVAL Variable ids. An urn format is used with the id starting with the word oval followed by a unique string, followed by the three letter code 'var', and ending with an integer.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:restriction base="xsd:string">
+               <xsd:pattern value="oval:[A-Za-z0-9_\-\.]+:var:[1-9][0-9]*"/>
+          </xsd:restriction>
+     </xsd:simpleType>
+     <xsd:simpleType name="ItemIDPattern">
+          <xsd:annotation>
+               <xsd:documentation>Define the format for acceptable OVAL Item ids. The format is an integer. An item id is used to identify the different items found in an OVAL System Characteristics file.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:restriction base="xsd:integer"/>
+     </xsd:simpleType>
+     <!-- =============================================================================== -->
+     <!-- ================================  OTHER TYPES  ================================ -->
+     <!-- =============================================================================== -->
+     <xsd:simpleType name="EmptyStringType">
+          <xsd:annotation>
+               <xsd:documentation>The EmptyStringType simple type is a restriction of the built-in string simpleType. The only allowed string is the empty string with a length of zero. This type is used by certain elements to allow empty content when non-string data is accepted. See the EntityIntType in the OVAL Definition Schema for an example of its use.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:restriction base="xsd:string">
+               <xsd:maxLength value="0"/>
+          </xsd:restriction>
+     </xsd:simpleType>
+     <xsd:simpleType name="NonEmptyStringType">
+          <xsd:annotation>
+               <xsd:documentation>The NonEmptyStringType simple type is a restriction of the built-in string simpleType. Empty strings are not allowed. This type is used by comment attributes where an empty value is not allowed.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:restriction base="xsd:string">
+               <xsd:minLength value="1"/>
+          </xsd:restriction>
+     </xsd:simpleType>
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/oval-common-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/oval-definitions-schema.xsd
===================================================================
--- trunk/ovaldi/xml/oval-definitions-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/oval-definitions-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,951 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-definitions-5" elementFormDefault="qualified" version="5.4">
+     <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-common-5" schemaLocation="oval-common-schema.xsd"/>
+     <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>
+     <xsd:annotation>
+          <xsd:documentation>The following is a description of the elements, types, and attributes that compose the core schema for encoding Open Vulnerability and Assessment Language (OVAL) Definitions. Some of the objects defined here are extended and enhanced by individual component schemas, which are described in separate documents. Each of the elements, types, and attributes that make up the Core Definition Schema are described in detail and should provide the information necessary to understand what each represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between these objects is not outlined here.</xsd:documentation>
+          <xsd:documentation>The OVAL Schema is maintained by The MITRE Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+          <xsd:appinfo>
+               <schema>Core Definition</schema>
+               <version>5.4</version>
+               <date>4/1/2008 10:41:43 AM</date>
+                <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                <sch:title>Schematron validation of the Core portion of an OVAL Definitions file</sch:title>
+               <sch:ns prefix="oval-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5"/>
+          </xsd:appinfo>
+     </xsd:annotation>
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="oval_definitions">
+          <xsd:annotation>
+               <xsd:documentation>The oval_definitions element is the root of an OVAL Definition Document. Its purpose is to bind together the major sections of a document - generator, definitions, tests, objects, states, and variables - which are the children of the root element.</xsd:documentation>
+               <xsd:appinfo>
+                    <sch:pattern id="empty_def_doc">
+                         <sch:rule context="oval-def:oval_definitions">
+                              <sch:assert test="oval-def:definitions or oval-def:tests or oval-def:objects or oval-def:states or oval-def:variables">A valid OVAL Definition document must contain at least one definitions, tests, objects, states, or variables element. The optional definitions, tests, objects, states, and variables sections define the specific characteristics that should be evaluated on a system to determine the truth values of the OVAL Definition Document. To be valid though, at least one definitions, tests, objects, states, or variables element must be present.</sch:assert>
+                         </sch:rule>
+                    </sch:pattern>
+               </xsd:appinfo>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:sequence>
+                    <xsd:element name="generator" type="oval:GeneratorType" minOccurs="1" maxOccurs="1">
+                         <xsd:annotation>
+                              <xsd:documentation>The required generator section provides information about when the definition file was compiled and under what version.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="definitions" type="oval-def:DefinitionsType" minOccurs="0" maxOccurs="1">
+                         <xsd:annotation>
+                              <xsd:documentation>The optional definitions section contains 1 or more definitions.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="tests" type="oval-def:TestsType" minOccurs="0" maxOccurs="1">
+                         <xsd:annotation>
+                              <xsd:documentation>The optional tests section contains 1 or more tests.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="objects" type="oval-def:ObjectsType" minOccurs="0" maxOccurs="1">
+                         <xsd:annotation>
+                              <xsd:documentation>The optional objects section contains 1 or more objects.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="states" type="oval-def:StatesType" minOccurs="0" maxOccurs="1">
+                         <xsd:annotation>
+                              <xsd:documentation>The optional states section contains 1 or more states.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="variables" type="oval-def:VariablesType" minOccurs="0" maxOccurs="1">
+                         <xsd:annotation>
+                              <xsd:documentation>The optional variables section contains 1 or more variables.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element ref="ds:Signature" minOccurs="0" maxOccurs="1">
+                         <xsd:annotation>
+                              <xsd:documentation>The optional Signature element allows an XML Signature as defined by the W3C to be attached to the document. This allows authentication and data integrity to be provided to the user. Enveloped signatures are supported. More information about the official W3C Recommendation regarding XML digital signatures can be found at http://www.w3.org/TR/xmldsig-core/.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:element>
+               </xsd:sequence>
+          </xsd:complexType>
+          <xsd:key name="definitionKey">
+               <xsd:annotation>
+                    <xsd:documentation>Enforce uniqueness amongst the ids differentiating the individual definition elements.</xsd:documentation>
+               </xsd:annotation>
+               <xsd:selector xpath="oval-def:definitions/oval-def:definition"/>
+               <xsd:field xpath="@id"/>
+          </xsd:key>
+          <xsd:key name="testKey">
+               <xsd:annotation>
+                    <xsd:documentation>Enforce uniqueness amongst the ids differentiating the individual test elements.</xsd:documentation>
+               </xsd:annotation>
+               <xsd:selector xpath="oval-def:tests/*"/>
+               <xsd:field xpath="@id"/>
+          </xsd:key>
+          <xsd:key name="objectKey">
+               <xsd:annotation>
+                    <xsd:documentation>Enforce uniqueness amongst the ids differentiating the individual object elements.</xsd:documentation>
+               </xsd:annotation>
+               <xsd:selector xpath="oval-def:objects/*"/>
+               <xsd:field xpath="@id"/>
+          </xsd:key>
+          <xsd:key name="stateKey">
+               <xsd:annotation>
+                    <xsd:documentation>Enforce uniqueness amongst the ids differentiating the individual state elements.</xsd:documentation>
+               </xsd:annotation>
+               <xsd:selector xpath="oval-def:states/*"/>
+               <xsd:field xpath="@id"/>
+          </xsd:key>
+          <xsd:key name="variableKey">
+               <xsd:annotation>
+                    <xsd:documentation>Enforce uniqueness amongst the ids differentiating the individual variable elements.</xsd:documentation>
+               </xsd:annotation>
+               <xsd:selector xpath="oval-def:variables/*"/>
+               <xsd:field xpath="@id"/>
+          </xsd:key>
+          <xsd:keyref name="extendKeyRef" refer="oval-def:definitionKey">
+               <xsd:annotation>
+                    <xsd:documentation>Requires each definition reference to refer to a valid definition id.</xsd:documentation>
+               </xsd:annotation>
+               <xsd:selector xpath=".//*"/>
+               <xsd:field xpath="@definition_ref"/>
+          </xsd:keyref>
+          <xsd:keyref name="testKeyRef" refer="oval-def:testKey">
+               <xsd:annotation>
+                    <xsd:documentation>Requires each test reference to refer to a valid test id.</xsd:documentation>
+               </xsd:annotation>
+               <xsd:selector xpath=".//*"/>
+               <xsd:field xpath="@test_ref"/>
+          </xsd:keyref>
+          <xsd:keyref name="objectKeyRef" refer="oval-def:objectKey">
+               <xsd:annotation>
+                    <xsd:documentation>Requires each object reference to refer to a valid object id.</xsd:documentation>
+               </xsd:annotation>
+               <xsd:selector xpath=".//*"/>
+               <xsd:field xpath="@object_ref"/>
+          </xsd:keyref>
+          <xsd:keyref name="stateKeyRef" refer="oval-def:stateKey">
+               <xsd:annotation>
+                    <xsd:documentation>Requires each state reference to refer to a valid state id.</xsd:documentation>
+               </xsd:annotation>
+               <xsd:selector xpath=".//*"/>
+               <xsd:field xpath="@state_ref"/>
+          </xsd:keyref>
+          <xsd:keyref name="variableKeyRef" refer="oval-def:variableKey">
+               <xsd:annotation>
+                    <xsd:documentation>Requires each variable reference to refer to a valid variable id.</xsd:documentation>
+               </xsd:annotation>
+               <xsd:selector xpath=".//*"/>
+               <xsd:field xpath="@var_ref"/>
+          </xsd:keyref>
+          <xsd:keyref name="object_referenceKeyRef" refer="oval-def:objectKey">
+               <xsd:annotation>
+                    <xsd:documentation>Require each object reference in a set element to refer to a valid object id.</xsd:documentation>
+               </xsd:annotation>
+               <xsd:selector xpath=".//oval-def:object_reference"/>
+               <xsd:field xpath="."/>
+          </xsd:keyref>
+          <xsd:keyref name="filterKeyRef" refer="oval-def:stateKey">
+               <xsd:annotation>
+                    <xsd:documentation>Require each filter in a set element to refer to a valid state id.</xsd:documentation>
+               </xsd:annotation>
+               <xsd:selector xpath=".//oval-def:filter"/>
+               <xsd:field xpath="."/>
+          </xsd:keyref>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =================================  GENERATOR  ================================= -->
+     <!-- =============================================================================== -->
+     <!--
+		The GeneratorType is defined by the oval common schema.  Please refer to
+		that documentation for a description of the complex type.
+	 -->
+     <!-- =============================================================================== -->
+     <!-- ================================  DEFINITIONS  ================================ -->
+     <!-- =============================================================================== -->
+     <xsd:complexType name="DefinitionsType">
+          <xsd:annotation>
+               <xsd:documentation>The DefinitionsType complex type is a container for one or more definition elements. Each definition element describes a single OVAL Definition. Please refer to the description of the DefinitionType for more information about an individual definition.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element name="definition" type="oval-def:DefinitionType" minOccurs="1" maxOccurs="unbounded"/>
+          </xsd:sequence>
+     </xsd:complexType>
+     <xsd:complexType name="DefinitionType">
+          <xsd:annotation>
+               <xsd:documentation>The DefinitionType defines a single OVAL Definition. A definition is the key structure in OVAL. It is analogous to the logical sentence or proposition: if a computer's state matches the configuration parameters laid out in the criteria, then that computer exhibits the state described. The DefinitionType contains a section for various metadata related elements that describe the definition. This includes a description, version, affected system types, and reference information. The notes section of a definition should be used to hold information that might be helpful to someone examining the technical aspects of the definition. For example, why certain tests have been included in the criteria, or maybe a link to where further information can be found. The DefinitionType also (unless the definition is deprecated) contains a criteria child element that joins individual tests together with a logical operator to specify the specific computer state being described.</xsd:documentation>
+                <xsd:documentation>The required id attribute is the OVAL-ID of the Definition. The form of an OVAL-ID must follow the specific format described by the definitionidPattern. The required version attribute holds the current version of the definition. Versions are integers, starting at 1 and incrementing every time a definition is modified. The required class attribute indicates the specific class to which the definition belongs.  The class gives a hint to a user so they can know what the definition writer is trying to say. See the definition of classEnumeration for more information about the different valid classes. The optional deprecated attribute signifies that an id is no longer to be used or referenced but the information has been kept around for historic purposes.</xsd:documentation>
+                <xsd:appinfo>
+                      <sch:pattern id="required_criteria">
+                            <sch:rule context="/oval-def:oval_definitions/oval-def:definitions/oval-def:definition[@deprecated='false' or not(@deprecated)]">
+                                  <sch:assert test="oval-def:criteria">A valid OVAL Definition document must contain a criteria unless the definition is a deprecated definition.</sch:assert>
+                            </sch:rule>
+                      </sch:pattern>
+                </xsd:appinfo>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element ref="ds:Signature" minOccurs="0" maxOccurs="1"/>
+               <xsd:element name="metadata" type="oval-def:MetadataType" minOccurs="1" maxOccurs="1"/>
+               <xsd:element name="notes" type="oval-def:NotesType" minOccurs="0" maxOccurs="1"/>
+               <xsd:element name="criteria" type="oval-def:CriteriaType" minOccurs="0" maxOccurs="1"/>
+          </xsd:sequence>
+          <xsd:attribute name="id" type="oval:DefinitionIDPattern" use="required"/>
+          <xsd:attribute name="version" type="xsd:nonNegativeInteger" use="required"/>
+          <xsd:attribute name="class" type="oval-def:ClassEnumeration" use="required"/>
+          <xsd:attribute name="deprecated" type="xsd:boolean" use="optional" default="false"/>
+     </xsd:complexType>
+     <xsd:complexType name="MetadataType">
+          <xsd:annotation>
+               <xsd:documentation>The MetadataType complex type contains all the metadata available to an OVAL Definition. This metadata is for informational purposes only and is not part of the criteria used to evaluate machine state. The required title child element holds a short string that is used to quickly identify the definition to a human user. The affected metadata item contains information about the system(s) for which the definition has been written. Remember that this is just metadata and not part of the criteria. Please refer to the AffectedType description for more information. The required description element contains a textual description of the configuration state being addressed by the OVAL Definition. In the case of a definition from the vulnerability class, the reference is usually the Common Vulnerability and Exposures (CVE) Identifier, and this description field corresponds with the CVE description.</xsd:documentation>
+               <xsd:documentation>Additional metadata is also allowed although it is not part of the official OVAL Schema. Individual organizations can place metadata items that they feel are important and these will be skipped during the validation. All OVAL really cares about is that the stated metadata items are there.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element name="title" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+               <xsd:element name="affected" type="oval-def:AffectedType" minOccurs="0" maxOccurs="unbounded"/>
+               <xsd:element name="reference" type="oval-def:ReferenceType" minOccurs="0" maxOccurs="unbounded"/>
+               <xsd:element name="description" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+               <xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
+               <!-- For the next major release of OVAL, the xsd:any tag above will be modified to
+		         only allow elements from namespaces other than the default namespace.  This
+		         fixes a bug in the current schema where the affected or reference element can
+		         appear after the description element and still produce a vailid document.
+
+		        <xsd:any minOccurs="0" maxOccurs="unbounded" namespace="##other" processContents="skip"/>
+		    -->
+          </xsd:sequence>
+     </xsd:complexType>
+     <xsd:complexType name="AffectedType">
+          <xsd:annotation>
+               <xsd:documentation>Each OVAL Definition is written to evaluate a certain type of system(s). The family, platform(s), and product(s) of this target are described by the AffectedType whose main purpose is to provide hints for tools using OVAL Definitions. For instance, to help a reporting tool only use Windows definitions, or to preselect only Red Hat definitions to be evaluated. Note, the inclusion of a particular platform or product does not mean the definition is physically checking for the existence of the platform or product. For the actual test to be performed, the correct test must still be included in the definition's criteria section.</xsd:documentation>
+               <xsd:documentation>The AffectedType complex type details the specific system, application, subsystem, library, etc. for which a definition has been written. If a definition is not tied to a specific product, then this element should not be included. The absence of the platform or product element can be thought of as definition applying to all platforms or products. The inclusion of a particular platform or product does not mean the definition is physically checking for the existence of the platform or product. For the actual test to be performed, the correct test must still be included in the definition's criteria section. To increase the utility of this element, care should be taken when assigning and using strings for product names. The schema places no restrictions on the values that can be assigned, potentially leading to many different representations of the same value. For example 'Internet Explorer' and 'IE'. The current convention is to fully spell out all terms, and avoid the use of abbreviations at all costs.</xsd:documentation>
+               <xsd:documentation>Please note that the AffectedType will change in future versions of OVAL in order to support the Common Platform Enumeration (CPE).</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element name="platform" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+               <xsd:element name="product" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+          </xsd:sequence>
+          <xsd:attribute name="family" type="oval:FamilyEnumeration" use="required"/>
+     </xsd:complexType>
+     <xsd:complexType name="ReferenceType">
+          <xsd:annotation>
+               <xsd:documentation>The ReferenceType complex type links the OVAL Definition to a definitive external reference. For example, CVE Identifiers for vulnerabilities. The intended purpose for this reference is to link the definition to a variety of other sources that address the same issue being specified by the OVAL Definition.</xsd:documentation>
+               <xsd:documentation>The required source attribute specifies where the reference is coming from. In other words, it identifies the reference repository being used. The required ref_id attribute is the external id of the reference. The optional ref_url attribute is the URL to the reference.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:attribute name="source" type="xsd:string" use="required"/>
+          <xsd:attribute name="ref_id" type="xsd:string" use="required"/>
+          <xsd:attribute name="ref_url" type="xsd:anyURI" use="optional"/>
+     </xsd:complexType>
+     <xsd:complexType name="NotesType">
+          <xsd:annotation>
+               <xsd:documentation>The NotesType complex type is a container for one or more note child elements. Each note contains some information about the definition or tests that it references. A note may record an unresolved question about the definition or test or present the reason as to why a particular approach was taken.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element name="note" type="xsd:string" minOccurs="1" maxOccurs="unbounded"/>
+          </xsd:sequence>
+     </xsd:complexType>
+     <xsd:complexType name="CriteriaType">
+          <xsd:annotation>
+               <xsd:documentation>The CriteriaType complex type describes the high level container for all the tests and represents the meat of the definition. Each criteria can contain other criteria elements in a recursive structure allowing complex logical trees to be constructed. Each referenced test is represented by a criterion element. Please refer to the description of the CriterionType for more information about and individual criterion element. The optional extend_definition element allows existing definitions to be included in the criteria. Refer to the description of the ExtendDefinitionType for more information.</xsd:documentation>
+               <xsd:documentation>The required operator attribute provides the logical operator that binds the different statements inside a criteria together. The optional negate attribute signifies that the result of the criteria as a whole should be negated during analysis. For example, consider a criteria that evaluates to TRUE if a certain software is installed. By negating this test, it now evaluates to TRUE if the software is NOT installed. The optional comment attribute provides a short description of the criteria.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:choice minOccurs="1" maxOccurs="unbounded">
+               <xsd:element name="criteria" type="oval-def:CriteriaType"/>
+               <xsd:element name="criterion" type="oval-def:CriterionType"/>
+               <xsd:element name="extend_definition" type="oval-def:ExtendDefinitionType"/>
+          </xsd:choice>
+          <xsd:attribute name="operator" type="oval:OperatorEnumeration" use="optional" default="AND"/>
+          <xsd:attribute name="negate" type="xsd:boolean" use="optional" default="false"/>
+          <xsd:attribute name="comment" type="oval:NonEmptyStringType" use="optional"/>
+     </xsd:complexType>
+     <xsd:complexType name="CriterionType">
+          <xsd:annotation>
+               <xsd:documentation>The CriterionType complex type identifies a specific test to be included in the definition's criteria.</xsd:documentation>
+               <xsd:documentation>The required test_ref attribute is the actual id of the test being referenced. The optional negate attribute signifies that the result of an individual test should be negated during analysis. For example, consider a test that evaluates to TRUE if a specific patch is installed. By negating this test, it now evaluates to TRUE if the patch is NOT installed. The optional comment attribute provides a short description of the specified test and should mirror the comment attribute of the actual test.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:attribute name="test_ref" type="oval:TestIDPattern" use="required"/>
+          <xsd:attribute name="negate" type="xsd:boolean" use="optional" default="false"/>
+          <xsd:attribute name="comment" type="oval:NonEmptyStringType" use="optional"/>
+     </xsd:complexType>
+     <xsd:complexType name="ExtendDefinitionType">
+          <xsd:annotation>
+               <xsd:documentation>The ExtendDefinitionType complex type allows existing definitions to be extended by another definition. This works by evaluating the extended definition and then using the result within the logical context of the extending definition.</xsd:documentation>
+               <xsd:documentation>The required definition_ref attribute is the actual id of the definition being extended. The optional negate attribute signifies that the result of an extended definition should be negated during analysis. For example, consider a definition that evaluates TRUE if a certain software is installed. By negating the definition, it now evaluates to TRUE if the software is NOT installed. The optional comment attribute provides a short description of the specified definition and should mirror the title metadata of the extended definition.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:attribute name="definition_ref" type="oval:DefinitionIDPattern" use="required"/>
+          <xsd:attribute name="negate" type="xsd:boolean" use="optional" default="false"/>
+          <xsd:attribute name="comment" type="oval:NonEmptyStringType" use="optional"/>
+     </xsd:complexType>
+     <!-- =============================================================================== -->
+     <!-- ===================================  TESTS  =================================== -->
+     <!-- =============================================================================== -->
+     <xsd:complexType name="TestsType">
+          <xsd:annotation>
+               <xsd:documentation>The TestsType complex type is a container for one or more test child elements. Each test element describes a single OVAL Test. Please refer to the description of the TestType for more information about an individual test.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element ref="oval-def:test" minOccurs="1" maxOccurs="unbounded"/>
+          </xsd:sequence>
+     </xsd:complexType>
+     <xsd:element name="test" type="oval-def:TestType" abstract="true">
+          <xsd:annotation>
+               <xsd:documentation>The test element is an abstract element that is meant to be extended (via substitution groups) by the individual tests found in the component schemas.  An OVAL Test is used to compare an object(s) against a defined state.  An actual test element is not valid. The use of this abstract class simplifies the OVAL schema by allowing individual tests to inherit the optional notes child element, and the id and comment attributes from the base TestType. Please refer to the description of the TestType complex type for more information.</xsd:documentation>
+          </xsd:annotation>
+     </xsd:element>
+     <xsd:complexType name="TestType">
+          <xsd:annotation>
+               <xsd:documentation>The base type of every test includes an optional notes element and five attributes. The notes section of a test should be used to hold information that might be helpful to someone examining the technical aspects of the test. For example, why certain values have been used by the test, or maybe a link to where further information can be found. Please refer to the description of the NotesType complex type for more information about the notes element.</xsd:documentation>
+               <xsd:documentation>The required id attribute uniquely identifies each test, and must conform to the format specified by the testidPattern simple type. The required version attribute holds the current version of the test. Versions are integers, starting at 1 and incrementing every time a test is modified.  The optional check_existence attribute determines how many items in the specified set must exists for the test to evaluate to true.  For example, if a value of 'all_exist' is given, every item defined by the OVAL Object must exist on the system for the test to evaluate to true.  If the OVAL Object uses a variable reference, then every value of that variable must exist.  Note that a pattern match defines a set of matching objects found on a system.  So when check_existence = 'all_exist' and a regex matches anything on a system the test will evaluate to true.  (since all matching objects on the system were found on the system)  When check_existence = 'all_exist' and a regex does not match anything on a system the test will evaluate to false.  The required check attribute determines how many of the existing objects must satisfy the state requirements. (For example: Should the test check that all files match a specified version or that at least one file matches the specified version?) The valid check values are explained in the description of the CheckEnumeration simple type.  Note that if the test does not contain any references to OVAL States, then the check attribute has no meaning and can be ignored during evaluation.  Also note that both the 'check' and 'check_existence' attributes must be satisfied during evaluation for the test to return true.  For example, if the check_existence fails then there is no need to evaluate the check since the test will have a result of false no matter what.  The required comment attribute provides a short description of the test. The optional deprecated attribute signifies that an id is no longer to be used or referenced but the information has been kept around for historic purposes.</xsd:documentation>
+               <xsd:appinfo>
+                    <sch:pattern id="test_type">
+                         <sch:rule context="/oval-def:oval_definitions/oval-def:tests/*[@check_existence='none_exist']">
+                              <sch:assert test="not(*[name()='state'])"><sch:value-of select="@id"/> - No state should be referenced when check_existence has a value of 'none_exist'.</sch:assert>
+                         </sch:rule>
+                    </sch:pattern>
+               </xsd:appinfo>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element ref="ds:Signature" minOccurs="0" maxOccurs="1"/>
+               <xsd:element name="notes" type="oval-def:NotesType" minOccurs="0" maxOccurs="1"/>
+          </xsd:sequence>
+          <xsd:attribute name="id" type="oval:TestIDPattern" use="required"/>
+          <xsd:attribute name="version" type="xsd:nonNegativeInteger" use="required"/>
+          <xsd:attribute name="check_existence" type="oval:ExistenceEnumeration" use="optional" default="at_least_one_exists"/>
+          <xsd:attribute name="check" type="oval:CheckEnumeration" use="required"/>
+          <xsd:attribute name="comment" type="oval:NonEmptyStringType" use="required"/>
+          <xsd:attribute name="deprecated" type="xsd:boolean" use="optional" default="false"/>
+     </xsd:complexType>
+     <xsd:complexType name="ObjectRefType">
+          <xsd:annotation>
+               <xsd:documentation>The ObjectRefType complex type defines an object reference to be used by OVAL Tests that are defined in the component schemas. The required object_ref attribute specifies the id of the OVAL Object being referenced.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:attribute name="object_ref" type="oval:ObjectIDPattern" use="required"/>
+     </xsd:complexType>
+     <xsd:complexType name="StateRefType">
+          <xsd:annotation>
+               <xsd:documentation>The StateRefType complex type defines a state reference to be used by OVAL Tests that are defined in the component schemas. The required state_ref attribute specifies the id of the OVAL State being referenced.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:attribute name="state_ref" type="oval:StateIDPattern" use="required"/>
+     </xsd:complexType>
+     <!-- =============================================================================== -->
+     <!-- ==================================  OBJECTS  ================================== -->
+     <!-- =============================================================================== -->
+     <xsd:complexType name="ObjectsType">
+          <xsd:annotation>
+               <xsd:documentation>The ObjectsType complex type is a container for one or more object child elements. Each object element provides details that define a set of matching objects to be used by an OVAL Test. Please refer to the description of the object element for more information about an individual object.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element ref="oval-def:object" minOccurs="1" maxOccurs="unbounded"/>
+          </xsd:sequence>
+     </xsd:complexType>
+     <xsd:element name="object" type="oval-def:ObjectType" abstract="true">
+          <xsd:annotation>
+               <xsd:documentation>The object element is an abstract element that is meant to be extended (via substitution groups) by the objects found in the component schemas. An actual object element is not valid. The use of this abstract class simplifies the OVAL schema by allowing individual objects to inherit any common elements and attributes from the base ObjectType. The optional notes child element, and the id and comment attributes from the base testType. A description of the notes element can be found under the definitions section. Please refer to the description of the ObjectType complex type for more information.</xsd:documentation>
+               <xsd:documentation>An OVAL Object describes a set of items to look for on a system.  A simple object will usually result in a single file, process, etc being identified.  But through the use pattern matches, sets, and variables, multiple matching objects can be identified.  Therefore an OVAL Object can identify a set of many individual items on a system.  This set of items defined by the OVAL Object can then be used by an OVAL Test and compared against an OVAL State.</xsd:documentation>
+          </xsd:annotation>
+     </xsd:element>
+     <xsd:complexType name="ObjectType">
+          <xsd:annotation>
+               <xsd:documentation>The base type of every object includes an optional notes element. The notes element of an object should be used to hold information that might be helpful to someone examining the technical aspects of the object. For example, why certain values have been used, or maybe a link to where further information can be found. Please refer to the description of the NotesType complex type for more information about the notes element.</xsd:documentation>
+               <xsd:documentation>The required id attribute uniquely identifies each object, and must conform to the format specified by the objectidPattern simple type. The required version attribute holds the current version of the object element. Versions are integers, starting at 1 and incrementing every time an object is modified. The optional comment attribute provides a short description of the object. The optional deprecated attribute signifies that an id is no longer to be used or referenced but the information has been kept around for historic purposes.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element ref="ds:Signature" minOccurs="0" maxOccurs="1"/>
+               <xsd:element name="notes" type="oval-def:NotesType" minOccurs="0" maxOccurs="1"/>
+          </xsd:sequence>
+          <xsd:attribute name="id" type="oval:ObjectIDPattern" use="required"/>
+          <xsd:attribute name="version" type="xsd:nonNegativeInteger" use="required"/>
+          <xsd:attribute name="comment" type="oval:NonEmptyStringType" use="optional"/>
+          <xsd:attribute name="deprecated" type="xsd:boolean" use="optional" default="false"/>
+     </xsd:complexType>
+     <xsd:element name="set">
+          <xsd:annotation>
+               <xsd:documentation>The set element enables complex objects to be described. It is a recursive element in that each set element can contain additional set elements as children. Each set element defines characteristics that produce a matching set of objects. The possible characteristics are an object reference and a collection of filters. The object_reference refers to an existing OVAL Object. The filter element provides a reference to an existing OVAL State. A filter is used to eliminate certain objects from the set. Each filter is applied to each OVAL Object before the set_operator is applied. For example, if an object_reference points to an OVAL Object that is every file in a certain directory, a filter might be set up to limit the object set to only those files with a size less than 10 KB. If multiple filters are provided, then each filter is used separately against the defined object set. In other words, if an object matches any of the supplied filters, then it is thrown out of the set.</xsd:documentation>
+               <xsd:documentation>The required set_operator attribute defines how different child sets are combined to form the overall set of objects. For example, does one take the union of different sets or the intersection? For a description of the valid values please refer to the SetOperatorEnumeration simple type.</xsd:documentation>
+               <xsd:appinfo>
+                    <sch:pattern id="setobjref">
+                         <sch:rule context="/oval-def:oval_definitions/oval-def:objects/*/oval-def:set/oval-def:object_reference">
+                              <sch:assert test="name(./../..) = name(/oval-def:oval_definitions/oval-def:objects/*[@id=current()])"><sch:value-of select="../../@id"/> - Each object referenced by the set must be of the same type as parent object</sch:assert>
+                         </sch:rule>
+                         <sch:rule context="/oval-def:oval_definitions/oval-def:objects/*/oval-def:set/oval-def:set/oval-def:object_reference">
+                              <sch:assert test="name(./../../..) = name(/oval-def:oval_definitions/oval-def:objects/*[@id=current()])"><sch:value-of select="../../../@id"/> - Each object referenced by the set must be of the same type as parent object</sch:assert>
+                         </sch:rule>
+                         <sch:rule context="/oval-def:oval_definitions/oval-def:objects/*/oval-def:set/oval-def:set/oval-def:set/oval-def:object_reference">
+                              <sch:assert test="name(./../../../..) = name(/oval-def:oval_definitions/oval-def:objects/*[@id=current()])"><sch:value-of select="../../../../@id"/> - Each object referenced by the set must be of the same type as parent object</sch:assert>
+                         </sch:rule>
+                    </sch:pattern>
+               </xsd:appinfo>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:choice>
+                    <xsd:sequence>
+                         <xsd:element ref="oval-def:set" minOccurs="1" maxOccurs="2"/>
+                    </xsd:sequence>
+                    <xsd:sequence>
+                         <xsd:element name="object_reference" type="oval:ObjectIDPattern" minOccurs="1" maxOccurs="2"/>
+                         <xsd:element name="filter" type="oval:StateIDPattern" minOccurs="0" maxOccurs="unbounded"/>
+                    </xsd:sequence>
+               </xsd:choice>
+               <xsd:attribute name="set_operator" type="oval-def:SetOperatorEnumeration" use="optional" default="UNION"/>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ==================================  STATES  =================================== -->
+     <!-- =============================================================================== -->
+     <xsd:complexType name="StatesType">
+          <xsd:annotation>
+               <xsd:documentation>The StatesType complex type is a container for one or more state child elements. Each state provides details about specific characteristics that can be used during an evaluation of an object. Please refer to the description of the state element for more information about an individual state.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element ref="oval-def:state" minOccurs="1" maxOccurs="unbounded"/>
+          </xsd:sequence>
+     </xsd:complexType>
+     <xsd:element name="state" type="oval-def:StateType" abstract="true">
+          <xsd:annotation>
+               <xsd:documentation>The state element is an abstract element that is meant to be extended (via substitution groups) by the states found in the component schemas. An actual state element is not valid. The use of this abstract class simplifies the OVAL schema by allowing individual states to inherit the optional notes child element, and the id and operator attributes from the base StateType. Please refer to the description of the StateType complex type for more information.</xsd:documentation>
+               <xsd:documentation>An OVAL State is a collection of one or more characteristics pertaining to a specific object type.  The OVAL State is used by an OVAL Test to determine if a set of items identified on a system meet certain characteristics.</xsd:documentation>
+          </xsd:annotation>
+     </xsd:element>
+     <xsd:complexType name="StateType">
+          <xsd:annotation>
+               <xsd:documentation>The base type of every state includes an optional notes element and two attributes. The notes section of a state should be used to hold information that might be helpful to someone examining the technical aspects of the state. For example, why certain values have been used by the state, or maybe a link to where further information can be found. Please refer to the description of the NotesType complex type for more information about the notes element.</xsd:documentation>
+               <xsd:documentation>The required id attribute uniquely identifies each state, and must conform to the format specified by the stateidPattern simple type. The required version attribute holds the current version of the state. Versions are integers, starting at 1 and incrementing every time a state is modified. The required operator attribute provides the logical operator that binds the different characteristics inside a state together. The optional comment attribute provides a short description of the state. The optional deprecated attribute signifies that an id is no longer to be used or referenced but the information has been kept around for historic purposes.</xsd:documentation>
+               <xsd:documentation>When evaluating a particular state against an object, one should evaluate each individual entity separately. The individual results are then combined by the operator to produce an overall result. This process holds true even when there are multiple instances of the same entity. Evaluate each instance separately, taking the entity check attribute into account, and then combine everything using the operator.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element ref="ds:Signature" minOccurs="0" maxOccurs="1"/>
+               <xsd:element name="notes" type="oval-def:NotesType" minOccurs="0" maxOccurs="1"/>
+          </xsd:sequence>
+          <xsd:attribute name="id" type="oval:StateIDPattern" use="required"/>
+          <xsd:attribute name="version" type="xsd:nonNegativeInteger" use="required"/>
+          <xsd:attribute name="operator" type="oval:OperatorEnumeration" use="optional" default="AND"/>
+          <xsd:attribute name="comment" type="oval:NonEmptyStringType" use="optional"/>
+          <xsd:attribute name="deprecated" type="xsd:boolean" use="optional" default="false"/>
+     </xsd:complexType>
+     <!-- =============================================================================== -->
+     <!-- =================================  VARIABLES  ================================= -->
+     <!-- =============================================================================== -->
+     <xsd:complexType name="VariablesType">
+          <xsd:annotation>
+               <xsd:documentation>The VariablesType complex type is a container for one or more variable child elements. Each variable element is a way to define one or more values to be obtained at the time a definition is evaluated.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element ref="oval-def:variable" minOccurs="1" maxOccurs="unbounded"/>
+          </xsd:sequence>
+     </xsd:complexType>
+     <xsd:element name="variable" type="oval-def:VariableType" abstract="true">
+          <xsd:annotation>
+               <xsd:documentation>The variable element is an abstract element that is meant to be extended (via substitution groups) by the different types of variables. An actual variable element is not valid. The different variable types describe different sources for obtaining a value(s) for the variable. There are currently three types of variables; local, external, and constant. Please refer to the description of each one for more specific information. The value(s) of a variable is treated as if it were inserted where referenced. One of the main benefits of variables is that they allow tests to evaluate user-defined policy. For example, an OVAL Test might check to see if a password is at least a certain number of characters long, but this number depends upon the individual policy of the user. To solve this, the test for password length can be written to refer to a variable element that defines the length.</xsd:documentation>
+               <xsd:documentation>If a variable defines an array of values, any entity that references the variable will evaluate to true depending on the value of the var_check attribute. For example, if an entity 'size' with an operation of 'less than' references a variable that returns five different integers, and the var_check attribute has a value of 'all', then the 'size' entity returns true only if the actual size is less than each of the five integers defined by the variable. If a variable does not return any value, then an error should be thrown during OVAL analysis.</xsd:documentation>
+          </xsd:annotation>
+     </xsd:element>
+     <xsd:complexType name="VariableType">
+          <xsd:annotation>
+               <xsd:documentation>The VariableType complex type defines attributes associated with each OVAL Variable. The required id attribute uniquely identifies each variable, and must conform to the format specified by the varidPattern simple type. The required version attribute holds the current version of the variable. Versions are integers, starting at 1 and incrementing every time a variable is modified. The required datatype attribute specifies the type of value being defined. The set of values identified by a variable must comply with the specified datatype. The required comment attribute provides a short description of the variable. The optional deprecated attribute signifies that an id is no longer to be used or referenced but the information has been kept around for historic purposes.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element ref="ds:Signature" minOccurs="0" maxOccurs="1"/>
+          </xsd:sequence>
+          <xsd:attribute name="id" type="oval:VariableIDPattern" use="required"/>
+          <xsd:attribute name="version" type="xsd:nonNegativeInteger" use="required"/>
+          <xsd:attribute name="datatype" type="oval:DatatypeEnumeration" use="required"/>
+          <xsd:attribute name="comment" type="oval:NonEmptyStringType" use="required"/>
+          <xsd:attribute name="deprecated" type="xsd:boolean" use="optional" default="false"/>
+     </xsd:complexType>
+     <xsd:element name="external_variable" substitutionGroup="oval-def:variable">
+          <xsd:annotation>
+               <xsd:documentation>The external_variable element extends the VariableType and defines a variable with some external source. The actual value(s) for the variable is not provided within the OVAL file, but rather it is retrieved during the evaluation of the OVAL Definition from an external source. An unbounded set of possible-value and possible_restriction child elements can be specified that together specify the list of all possible values that an external source is allowed to supply for the external variable. In other words, the value assigned by an external source must match one of the possible_value or possible_restriction elements specified. Each possible_value element contains a single value that could be assigned to the given external_variable while each possible_restriction element outlines a range of possible values. Note that it is not necessary to declare a variable's possible values, but the option is available if desired. If no possible child elements are specified, then the valid values are only bound to the specified datatype of the external variable. Please refer to the description of the PossibleValueType and PossibleRestrictionType complex types for more information.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-def:VariableType">
+                         <xsd:choice minOccurs="0" maxOccurs="unbounded">
+                              <xsd:element name="possible_value" type="oval-def:PossibleValueType"/>
+                              <xsd:element name="possible_restriction" type="oval-def:PossibleRestrictionType"/>
+                         </xsd:choice>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <xsd:complexType name="PossibleValueType">
+          <xsd:annotation>
+               <xsd:documentation>The PossibleValueType complex type is used to outline a single expected value of an external variable. The required hint attribute gives a short description of what the value means or represents.</xsd:documentation>
+               <xsd:appinfo> </xsd:appinfo>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:extension base="xsd:anySimpleType">
+                    <xsd:attribute name="hint" type="xsd:string" use="required"/>
+               </xsd:extension>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="PossibleRestrictionType">
+          <xsd:annotation>
+               <xsd:documentation>The PossibleRestrictionType complex type outlines a range of possible expected value of an external variable. Each possible_restriction element contains an unbounded list of child restriction elements that each specify a range that an actual value may fall in. For example, a restriction element my specify that a value must be less than 10. When multiple restriction elements are present, a valid possible value would have to meet every restriction. One can think of the possible_value and possible_restriction elements as an OR'd list of possible values, and the restriction elements as an AND'd list of value descriptions. Please refer to the description of the RestrictionType complex type for more information. The required hint attribute gives a short description of what the value means or represents.</xsd:documentation>
+               <xsd:appinfo> </xsd:appinfo>
+          </xsd:annotation>
+          <xsd:choice>
+               <xsd:element name="restriction" type="oval-def:RestrictionType" minOccurs="1" maxOccurs="unbounded"/>
+          </xsd:choice>
+          <xsd:attribute name="hint" type="xsd:string" use="required"/>
+     </xsd:complexType>
+     <xsd:complexType name="RestrictionType">
+          <xsd:annotation>
+               <xsd:documentation>The RestrictionType complex type outlines a restriction that is placed on expected values for an external variable. For example, a possible value may be restricted to a integer less than 10. Please refer to the operationEnumeration simple type for a description of the valid operations. The required hint attribute gives a short description of what the value means or reporesents.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:extension base="xsd:anySimpleType">
+                    <xsd:attribute name="operation" type="oval:OperationEnumeration" use="required"/>
+               </xsd:extension>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:element name="constant_variable" substitutionGroup="oval-def:variable">
+          <xsd:annotation>
+               <xsd:documentation>The constant_variable element extends the VariableType and defines a variable with a constant value(s). Each constant_variable defines either a single value or an array of values to be used throughout the evaluation of the OVAL Definition File in which it has been defined. Constant variables can not be over-ridden by an external source. The actual value of a constant variable is defined by the required value child element. An array of values can be specified by including multiple instances of the value element. Please refer to the description of the ValueType complex type for more information.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-def:VariableType">
+                         <xsd:sequence>
+                              <xsd:element name="value" type="oval-def:ValueType" minOccurs="1" maxOccurs="unbounded"/>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <xsd:complexType name="ValueType">
+          <xsd:annotation>
+               <xsd:documentation>The ValueType complex type holds the actual value of the variable when dealing with a constant variable. This value should be used by all tests that reference this variable. The value can not be over-ridden by an external source.</xsd:documentation>
+               <xsd:appinfo>
+                    <sch:pattern id="value">
+                         <sch:rule context="oval-def:constant_variable/oval-def:value">
+                              <sch:assert test=".!=''">The value element of the constant_variable <sch:value-of select="../../@id"/> can not be empty.</sch:assert>
+                         </sch:rule>
+                    </sch:pattern>
+               </xsd:appinfo>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:extension base="xsd:anySimpleType"/>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:element name="local_variable" substitutionGroup="oval-def:variable">
+          <xsd:annotation>
+               <xsd:documentation>The local_variable element extends the VariableType and defines a variable with some local source. The actual value(s) for the variable is not provided in the OVAL Definition document but rather it is retrieved during the evaluation of the OVAL Definition. A value can be as simple as a literal string or as complex as multiple registry keys concatenated together. Each local variable is defined by either a single component or a complex function. Please refer to the description of the ComponentGroup for more information.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-def:VariableType">
+                         <xsd:sequence>
+                              <xsd:group ref="oval-def:ComponentGroup" minOccurs="1" maxOccurs="1"/>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <xsd:group name="ComponentGroup">
+          <xsd:annotation>
+               <xsd:documentation>Any value that is pulled directly off the local system is defined by the basic component element. For example, the name of a user or the value of a registry key. Please refer to the definition of the ObjectComponentType for more information. A value can also be obtained from another variable. The variable element identifies a variable id to pull a value(s) from. Please refer to the definition of the VariableComponentType for more information. Literal values can also be specified.</xsd:documentation>
+               <xsd:appinfo>
+                    <sch:pattern id="literal_component">
+                         <sch:rule context="oval-def:literal_component">
+                              <sch:assert test=".!=''">The literal_component of variable <sch:value-of select="../../@id"/> can not be empty.</sch:assert>
+                         </sch:rule>
+                    </sch:pattern>
+               </xsd:appinfo>
+          </xsd:annotation>
+          <xsd:choice>
+               <xsd:element name="object_component" type="oval-def:ObjectComponentType"/>
+               <xsd:element name="variable_component" type="oval-def:VariableComponentType"/>
+               <xsd:element name="literal_component" type="xsd:anySimpleType"/>
+               <xsd:group ref="oval-def:FunctionGroup"/>
+          </xsd:choice>
+     </xsd:group>
+     <xsd:complexType name="ObjectComponentType">
+          <xsd:annotation>
+               <xsd:documentation>The ObjectComponentType complex type defines a specific value on the local system to obtain. The required obj_id provides a reference to an existing OVAL Object declaration. This object defines the object to examine and eventually pull the value from. The required item_field defines which piece of data to retrieve from the object referenced by the obj_id. For example, if the obj_id references a file, the item_field may define the version as the piece of information to use as the value of the variable. The data to retrieve can be found in the OVAL System Characteristics file under the items associated with the object referenced by obj_id.</xsd:documentation>
+               <xsd:appinfo>
+                    <sch:pattern id="item_field">
+                         <sch:rule context="oval-def:object_component">
+                              <sch:assert test="@item_field!=''">The item_field attribute of an object_component of variable <sch:value-of select="../../@id"/> can not be empty.</sch:assert>
+                         </sch:rule>
+                    </sch:pattern>
+               </xsd:appinfo>
+          </xsd:annotation>
+          <xsd:attribute name="object_ref" type="oval:ObjectIDPattern" use="required"/>
+          <xsd:attribute name="item_field" type="xsd:string" use="required"/>
+     </xsd:complexType>
+     <xsd:complexType name="VariableComponentType">
+          <xsd:annotation>
+               <xsd:documentation>The VariableComponentType complex type defines a specific value obtained by looking at the value of another OVAL Variable. The required var_ref attribute provides a reference to the variable. One must make sure that the variable reference does not point to the parent variable that uses this component to avoid a race condition.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:attribute name="var_ref" type="oval:VariableIDPattern" use="required"/>
+     </xsd:complexType>
+     <xsd:group name="FunctionGroup">
+          <xsd:annotation>
+               <xsd:documentation>Complex functions have been defined that help determine how to manipulated specific values. These functions can be nested together to form complex statements. Each function is designed to work on a specific type of data. If the data being worked on is not of the correct type, a cast should be attempted before throwing an error. For example, if a concat function includes a registry component that returns an integer, then the integer should be cast as a string in order to work with the concat function. Note that if the operation being applied to the variable by the calling entity is "pattern match", then all the functions are performed before the regular expression is evaluated. In short, the variable would produce a value as normal and then any pattern match operation would be performed. Please refer to the description of a specific function for more details about it.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:choice>
+               <xsd:element name="begin" type="oval-def:BeginFunctionType"/>
+               <xsd:element name="concat" type="oval-def:ConcatFunctionType"/>
+               <xsd:element name="end" type="oval-def:EndFunctionType"/>
+               <xsd:element name="escape_regex" type="oval-def:EscapeRegexFunctionType"/>
+               <xsd:element name="split" type="oval-def:SplitFunctionType"/>
+               <xsd:element name="substring" type="oval-def:SubstringFunctionType"/>
+          </xsd:choice>
+     </xsd:group>
+     <xsd:complexType name="BeginFunctionType">
+          <xsd:annotation>
+               <xsd:documentation>The begin function takes a single string component and defines a character (or string) that the component string should start with. The character attribute defines the specific character (or string). The character (or string) is only added to the component string if the component string doesn't already start with the specified character (or string).</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence minOccurs="1" maxOccurs="1">
+               <xsd:group ref="oval-def:ComponentGroup"/>
+          </xsd:sequence>
+          <xsd:attribute name="character" type="xsd:string" use="required"/>
+     </xsd:complexType>
+     <xsd:complexType name="ConcatFunctionType">
+          <xsd:annotation>
+               <xsd:documentation>The concat function takes two or more components and concatenates them together to form a single string. The first component makes up the begining of the resulting string and any following components are added to the end it. If one of the components returns multiple values then the concat function would be performed multiple times and the end result would be an array of values for the local variable. For example assume a local variable has two sub-components: a basic component element returns the values "abc" and "def", and a literal component element that has a value of "xyz". The local_variable element would be evaluated to have two values, "abcxyz" and "defxyz". If one of the components does not exist, then the result of the concat operation should be does not exist.</xsd:documentation>
+               <xsd:appinfo>
+                    <evaluation_documentation>Below is a chart that specifies how to classify the flag status of a variable using the concat function during evaluation when multiple components are supplied. Both the object and variable component are indirectly associated with collected objects in a system characteristics file. These objects could have been completely collected from the system, or there might have been some type of error that led to the object not being collected, or maybe only a part of the object set was collected. This flag status is important as OVAL Objects or OVAL State that are working with a variable (through the var_ref attribute on an entity) can use this information to report more accurate results. For example, an OVAL Test with a check attribute of 'at least one' that specifies an object with a variable reference, might be able to produce a valid result based on an incomplete object set as long as one of the objects in the set is true.</evaluation_documentation>
+                    <evaluation_chart> || num of components with flag || || || resulting flag is || E | C | I | DNE | NC | NA || ------||-----------------------------------||------------------ || 1+ | 0+ | 0+ | 0+ | 0+ | 0+ || Error || 0 | 1+ | 0 | 0 | 0 | 0 || Complete || 0 | 0+ | 1+ | 0 | 0 | 0 || Incomplete || 0 | 0+ | 0+ | 1+ | 0 | 0 || Does Not Exist || 0 | 0+ | 0+ | 0+ | 1+ | 0 || Not Collected || 0 | 0+ | 0+ | 0+ | 0+ | 1+ || Not Applicable ------||-----------------------------------||------------------</evaluation_chart>
+               </xsd:appinfo>
+          </xsd:annotation>
+          <xsd:sequence minOccurs="2" maxOccurs="unbounded">
+               <xsd:group ref="oval-def:ComponentGroup"/>
+          </xsd:sequence>
+     </xsd:complexType>
+     <xsd:complexType name="EndFunctionType">
+          <xsd:annotation>
+               <xsd:documentation>The end function takes a single string component and defines a character (or string) that the component string should end with. The character attribute defines the specific character (or string). The character (or string) is only added to the component string if the component string doesn't already end with the specified character (or string).</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence minOccurs="1" maxOccurs="1">
+               <xsd:group ref="oval-def:ComponentGroup"/>
+          </xsd:sequence>
+          <xsd:attribute name="character" type="xsd:string" use="required"/>
+     </xsd:complexType>
+     <xsd:complexType name="EscapeRegexFunctionType">
+          <xsd:annotation>
+               <xsd:documentation>The escape regex function takes a single string component and escapes all the regular expression characters. The purpose for this is that many times, a component used in pattern match needs to be treated a literal string and not regular expression. For example assume a basic component element that pulls a file path out of the Windows registry. This path is a string that might contain regular expression characters but these characters are not intended to be such, so they need to be escaped. This function allows a definition writer to mark which components are in regular expression format and which aren't.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence minOccurs="1" maxOccurs="1">
+               <xsd:group ref="oval-def:ComponentGroup"/>
+          </xsd:sequence>
+     </xsd:complexType>
+     <xsd:complexType name="SplitFunctionType">
+          <xsd:annotation>
+               <xsd:documentation>The split function takes a single string component and turns it into multiple values based on a delimiter string. For example assume a basic component element that returns the value "a-b-c-d" with the delimiter set to "-". The local_variable element would be evaluated to have four values "a", "b", "c", and "d". If the string component used by the split function returns multiple values, then the split is performed multiple times.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence minOccurs="1" maxOccurs="1">
+               <xsd:group ref="oval-def:ComponentGroup"/>
+          </xsd:sequence>
+          <xsd:attribute name="delimiter" type="xsd:string" use="required"/>
+     </xsd:complexType>
+     <xsd:complexType name="SubstringFunctionType">
+          <xsd:annotation>
+               <xsd:documentation>The substring function takes a single string component and produces a single value that contains a portion of the original string. The substring_start attribute defines the starting position in the original string. Note, to include the first character of the string, the start position would be 1. Also note that a value less than one also means starting at the first character of the string. The substring_length attribute defines how many character after and including the starting character to include. Note that a substring_length value greater than the actual length of the string or a negative value means to include all the characters after the starting character. For example assume a basic component element that returns the value "abcdefg" with a substring_start value of 3 and a substring_length value of 2. The local_variable element would be evaluate to have a single value of "cd". If the string component used by the substring function returns multiple values, then the substring operation is performed multiple times and results in multiple values for the component.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence minOccurs="1" maxOccurs="1">
+               <xsd:group ref="oval-def:ComponentGroup"/>
+          </xsd:sequence>
+          <xsd:attribute name="substring_start" type="xsd:int" use="required"/>
+          <xsd:attribute name="substring_length" type="xsd:int" use="required"/>
+     </xsd:complexType>
+     <!-- =============================================================================== -->
+     <!-- =================================  SIGNATURE  ================================= -->
+     <!-- =============================================================================== -->
+     <!--
+		The signature element is defined by the xmldsig schema.  Please refer to that
+		documentation for a description of the valid elements and types.  More
+		information about the official W3C Recommendation regarding XML digital
+		signatures can be found at http://www.w3.org/TR/xmldsig-core/.
+	 -->
+     <!-- =============================================================================== -->
+     <!-- ===============================  ENUMERATIONS  ================================ -->
+     <!-- =============================================================================== -->
+     <xsd:simpleType name="ClassEnumeration">
+          <xsd:annotation>
+                <xsd:documentation>The ClassEnumeration simple type defines the different classes of definitions.  Each class defines a certain intent regarding how an OVAL Definition is written and what that definition is describing.  The specified class gives a hint about the definition so a user can know what the definition writer is trying to say.  Note that the class does not make a statement about whether a true result is good or bad as this depends on the use of an OVAL Definition.  These classes are also used to group definitions by the type of system state they are describing.  For example, this allows users to find all the vulnerability (or patch, or inventory, etc) definitions.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:restriction base="xsd:string">
+               <xsd:enumeration value="compliance">
+                    <xsd:annotation>
+                          <xsd:documentation>A compliance definition describes the state of a machine as it complies with a specific policy.  The intention is that a definition of this class will return true when the system is found to be compliant with the stated policy.  Another way of thinking about this is that a compliance definition is stating "the system is compliant if ...".</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="inventory">
+                    <xsd:annotation>
+                          <xsd:documentation>An inventory definition describes whether a specific piece of software is installed on the system.  The intention is that a definition of this class will return true when the specified software is found on the system.  Another way of thinking about this is that an inventory definition is stating "the software is installed if ...".</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="miscellaneous">
+                    <xsd:annotation>
+                         <xsd:documentation>The 'miscellaneous' class is used to identify definitions that do not fall into any of the other defined classes.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="patch">
+                    <xsd:annotation>
+                          <xsd:documentation>A patch definition details the machine state of whether a patch executable should be installed.  The intention is that a definition of this class will return true when the specified patch is missing from the system.  Another way of thinking about this is that a patch definition is stating "the patch should be installed if ...".  Note that word SHOULD is intended to mean more than just CAN the patch executable be installed.  In other words, if a more recent patch is already installed then the specified patch might not need to be installed.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="vulnerability">
+                    <xsd:annotation>
+                          <xsd:documentation>A vulnerability definition describes the conditions under which a machine is vulnerable.  The intention is that a definition of this class will return true when the system is found to be vulnerable with the stated issue.  Another way of thinking about this is that a vulnerability definition is stating "the system is vulnerable if ...".</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+          </xsd:restriction>
+     </xsd:simpleType>
+     <xsd:simpleType name="SetOperatorEnumeration">
+          <xsd:annotation>
+               <xsd:documentation>The SetOperatorEnumeration simple type defines acceptable set operations. Set operations are used to take multiple different sets of objects within OVAL and merge them into a single set. The different operators that guide this merge are defined below. For each operator, if only a single object has been supplied, then the resulting set is simply that complete object.</xsd:documentation>
+                <xsd:appinfo>
+                      <evaluation_documentation>Below are some tables that outline how different flags are combined with a given set_operator to return a new flag. These tables are needed when computing the flag for collected objects that represent object sets in an OVAL Definition. The top row identifies the flag associated with the first set or object reference. The left column identifies the flag associated with the second set or object reference. The matrix inside the table represent the resulting flag when the given set_operator is applied. (E=error, C=complete, I=incomplete, DNE=does not exist, NC=not collected, NA=not applicable)</evaluation_documentation>
+                      <evaluation_chart xml:space="preserve">
+                 ||                                   ||
+ set_operator is ||            obj 1 flag             || 
+      union      ||                                   ||
+                 ||  E  |  C  |  I  | DNE | NC  | NA  ||
+-----------------||-----------------------------------||
+               E ||  E  |  E  |  E  |  E  |  E  |  E  || 
+  obj          C ||  E  |  C  |  I  |  C  |  I  |  C  ||
+   2           I ||  E  |  I  |  I  |  I  |  I  |  I  || 
+  flag       DNE ||  E  |  C  |  I  | DNE |  I  | DNE ||
+              NC ||  E  |  I  |  I  |  I  |  NC |  NC || 
+              NA ||  E  |  C  |  I  | DNE |  NC |  NA ||
+-----------------||-----------------------------------||
+                      </evaluation_chart>
+                      <evaluation_chart xml:space="preserve">
+                 ||                                   ||
+ set_operator is ||             obj 1 flag            ||
+  intersection   ||                                   ||
+                 ||  E  |  C  |  I  | DNE | NC  | NA  ||
+-----------------||-----------------------------------||
+               E ||  E  |  E  |  E  | DNE |  E  |  E  ||
+   obj         C ||  E  |  C  |  I  | DNE |  NC |  C  ||
+    2          I ||  E  |  I  |  I  | DNE |  NC |  I  ||
+   flag      DNE || DNE | DNE | DNE | DNE | DNE | DNE ||
+              NC ||  E  |  NC |  NC | DNE |  NC |  NC ||
+              NA ||  E  |  C  |  I  | DNE |  NC |  NA ||
+-----------------||-----------------------------------||
+                      </evaluation_chart>
+                      <evaluation_chart xml:space="preserve">
+                 ||                                   ||
+ set_operator is ||             obj 1 flag            ||
+    complement   ||                                   ||
+                 ||  E  |  C  |  I  | DNE | NC  | NA  ||
+-----------------||-----------------------------------||
+               E ||  E  |  E  |  E  | DNE |  E  |  E  ||
+   obj         C ||  E  |  C  |  I  | DNE |  NC |  E  ||
+    2          I ||  E  |  E  |  E  | DNE |  NC |  E  ||
+   flag      DNE ||  E  |  C  |  I  | DNE |  NC |  E  ||
+              NC ||  E  |  NC |  NC | DNE |  NC |  E  ||
+              NA ||  E  |  E  |  E  |  E  |  E  |  E  ||
+-----------------||-----------------------------------||
+                      </evaluation_chart>
+                </xsd:appinfo>
+          </xsd:annotation>
+          <xsd:restriction base="xsd:string">
+               <xsd:enumeration value="COMPLEMENT">
+                    <xsd:annotation>
+                         <xsd:documentation>The complement operator is defined in OVAL as a relative complement. The resulting set contains everything that belongs to the first declared set that is not part of the second declared set. If A and B are sets (with A being the first declared set), then the relative complement is the set of elements in A, but not in B.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="INTERSECTION">
+                    <xsd:annotation>
+                         <xsd:documentation>The intersection of two sets in OVAL results in a set that contains everything that belongs both sets in the collection, but nothing else. If A and B are sets, then the intersection of A and B contains all the elements of A that also belong to B, but no other elements.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="UNION">
+                    <xsd:annotation>
+                         <xsd:documentation>The union of two sets in OVAL results in a set that contains everything that belongs to either of the original sets. If A and B are sets, then the union of A and B contains all the elements of A and all elements of B, with the duplicates removed.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+          </xsd:restriction>
+     </xsd:simpleType>
+     <!-- =============================================================================== -->
+     <!-- ===============================  ENTITY TYPES  ================================ -->
+     <!-- =============================================================================== -->
+     <xsd:complexType name="EntityBaseType" abstract="true">
+          <xsd:annotation>
+               <xsd:documentation>The EntityBaseType complex type is an abstract type that defines the default attributes associated with every entity. Entities can be found in both OVAL Objects and OVAL States and represent the individual properties associated with items found on a system. An example of a single entity would be the path of a file. Another example would be the version of the file.</xsd:documentation>
+               <xsd:documentation>The optional datatype attribute specifies how the given operation should be applied to the data. (the default datatype is 'string') An example is with the statement 'is 123 less than 98'. If the data is treated as integers the answer is no, but if the data is treated as strings, then the answer is yes. Specifying a datatype details how the less than operation should be performed. Another way of thinking of things is that the datatype attribute specifies how the data should be cast before performing the operation. In the previous example, if the datatype is set to int, then '123' and '98' should be cast as integers. If a cast can not be made, (trying to cast 'abc' to an integer) then an error should be thrown. Another example is applying the 'equal' operation to '1.0.0.0' and '1.0'. With datatype 'string' they are not equal, with datatype 'version' they are.</xsd:documentation>
+               <xsd:documentation>The optional operation determines how the individual entities should be evaluated. (the default operator is 'equals') Both of these attributes are optional in order to keep the XML clean and readable. The default values are used most of the time and putting datatype="string" and operator="equals" for each element would muddy up the XML.</xsd:documentation>
+               <xsd:documentation>The optional mask attribute can be used in situations where information is need for evaluation, but this information should not be disclosed in the results file.  (maybe due to sensitivity concerns)  If the mask attribute is set to 'true', then the value of this field, along with the operation used, should not appear in the results file.  Note that this value would appear in the copy of the system characteristics contained in the results file.  In this case the results file should make use of the corresponding mask attribute in the system characteristics schema should be set to true and the value should be ommitted.  In addition to the value being omitted from the copy of the system characteristics file, the copy of the definition file should also omit the value and operation used for testing.</xsd:documentation>
+               <xsd:documentation>The optional var_ref attribute refers the value of the entity to a variable element. When supplied, the value(s) associated with the OVAL Variable should be used as the value(s) of the entity. If there is an error computing the value of the variable, then that error should be passed up to the entity referencing it. If the variable being referenced does not have a value (for example, if the variable pertains to the size of a file, but the file does not exist) then one of two results are possible. If the entity is part of an object declaration, then the object is considered to not exist. If the entity is part of a state declaration, then the state comparison should result in an error.</xsd:documentation>
+               <xsd:appinfo>
+                    <sch:pattern id="entityrules">
+                         <sch:rule context="oval-def:objects/*/*|oval-def:states/*/*">
+                               <sch:let name="var_ref" value="@var_ref"/>
+                               <sch:assert test="((not(@datatype) and (not(@operation) or @operation='equals' or @operation='not equal' or @operation='case insensitive equals' or @operation='case insensitive not equal' or @operation='pattern match')) or (@datatype='binary' and (not(@operation) or @operation='equals' or @operation='not equal')) or (@datatype='boolean' and (not(@operation) or @operation='equals' or @operation='not equal')) or (@datatype='evr_string' and (not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal')) or (@datatype='fileset_revision' and (not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal')) or (@datatype='float' and (not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal')) or (@datatype='ios_version' and (not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal')) or (@datatype='int' and (not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal' or @operation='bitwise and' or @operation='bitwise or')) or (@datatype='string' and (not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match')) or (@datatype='version' and (not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal')))"><sch:value-of select="../@id"/> - the supplied operation attribute for the <sch:value-of select="name()"/> entity is not valid given a datatype of '<sch:value-of select="@datatype"/>'</sch:assert>
+                              <sch:assert test="not(@var_ref) or .=''"><sch:value-of select="../@id"/> - a var-ref has been supplied for the <sch:value-of select="name()"/> entity so no value should be provided</sch:assert>
+                              <sch:assert test="if (@var_ref) then (if (@datatype) then (@datatype=/oval-def:oval_definitions/oval-def:variables/*[@id=$var_ref]/@datatype) else ('string' = /oval-def:oval_definitions/oval-def:variables/*[@id=$var_ref]/@datatype)) else (1=1)"><sch:value-of select="$var_ref"/> - inconsistent datatype between the variable and an associated var_ref</sch:assert>
+                         </sch:rule>
+                    </sch:pattern>
+               </xsd:appinfo>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:extension base="xsd:anySimpleType">
+                    <xsd:attribute name="datatype" type="oval:DatatypeEnumeration" use="optional" default="string"/>
+                    <xsd:attribute name="operation" type="oval:OperationEnumeration" use="optional" default="equals"/>
+                    <xsd:attribute name="mask" type="xsd:boolean" use="optional" default="false"/>
+                    <xsd:attribute name="var_ref" type="oval:VariableIDPattern" use="optional"/>
+               </xsd:extension>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityObjectBaseType" abstract="true">
+          <xsd:annotation>
+               <xsd:documentation>The EntityObjectBaseType complex type is an abstract type that extends the EntityBaseType and is used by the entities within an OVAL Objects.</xsd:documentation>
+               <xsd:documentation>If the entity uses a var_ref and the associated variable defines more than one values, the optional var_check attribute defines how the data collection should proceed. For example, if an object entity 'filename' with an operation of 'does not equal' references a variable that returns five different values, and the var_check attribute has a value of 'all', then an actual file on the system matches only if the actual filename does not equal any of the variable values. If a variable does not return any value, then an error should be thrown during OVAL analysis.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:extension base="oval-def:EntityBaseType">
+                    <xsd:attribute name="var_check" type="oval:CheckEnumeration" use="optional" default="all"/>
+               </xsd:extension>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityObjectAnyType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityObjectAnyType type is extended by the entities of an individual OVAL Object. This type provides uniformity to each object entity by including the attributes found in the EntityObjectBaseType. This specific type describes any simple data.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:extension base="oval-def:EntityObjectBaseType"/>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityObjectBinaryType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityBinaryType type is extended by the entities of an individual OVAL Object. This type provides uniformity to each object entity by including the attributes found in the EntityObjectBaseType. This specific type describes simple binary data. The empty string is also allowed when using a variable reference with an element.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-def:EntityObjectBaseType">
+                    <xsd:simpleType>
+                         <xsd:union memberTypes="xsd:hexBinary oval:EmptyStringType"/>
+                    </xsd:simpleType>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityObjectBoolType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityBoolType type is extended by the entities of an individual OVAL Object. This type provides uniformity to each object entity by including the attributes found in the EntityObjectBaseType. This specific type describes simple boolean data. The empty string is also allowed when using a variable reference with an element.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-def:EntityObjectBaseType">
+                    <xsd:simpleType>
+                         <xsd:union memberTypes="xsd:boolean oval:EmptyStringType"/>
+                    </xsd:simpleType>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityObjectFloatType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityObjectFloatType type is extended by the entities of an individual OVAL Object. This type provides uniformity to each object entity by including the attributes found in the EntityObjectBaseType. This specific type describes simple float data. The empty string is also allowed when using a variable reference with an element.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-def:EntityObjectBaseType">
+                    <xsd:simpleType>
+                         <xsd:union memberTypes="xsd:float oval:EmptyStringType"/>
+                    </xsd:simpleType>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityObjectIntType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityIntType type is extended by the entities of an individual OVAL Object. This type provides uniformity to each object entity by including the attributes found in the EntityObjectBaseType. This specific type describes simple integer data. The empty string is also allowed when using a variable reference with an element.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-def:EntityObjectBaseType">
+                    <xsd:simpleType>
+                         <xsd:union memberTypes="xsd:integer oval:EmptyStringType"/>
+                    </xsd:simpleType>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityObjectStringType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityStringType type is extended by the entities of an individual OVAL Object. This type provides uniformity to each object entity by including the attributes found in the EntityObjectBaseType. This specific type describes simple string data.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-def:EntityObjectBaseType">
+                    <xsd:simpleType>
+                         <xsd:restriction base="xsd:string"/>
+                    </xsd:simpleType>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityStateBaseType" abstract="true">
+          <xsd:annotation>
+               <xsd:documentation>The EntityStateBaseType complex type is an abstract type that extends the EntityBaseType and is used by the entities withing an OVAL State.</xsd:documentation>
+               <xsd:documentation>The optional entity_check attribute specifies how to handle entities with multiple instances in the system characteristics file. For example, if an OVAL Object has multiple values associated with it and the OVAL State defines the value entity as 'less than 3', the entity_check attribute determines if all values must be less than 3, or at least one value must be less than 3, etc.</xsd:documentation>
+               <xsd:documentation>If the state entity uses a var_ref and the associated variable defines more than one value, the optional var_check attribute defines how the evaluation should proceed. For example, if an entity 'size' with an operation of 'less than' references a variable that returns five different integers, and the var_check attribute has a value of 'all', then the 'size' entity returns true only if the actual size is less than each of the five integers defined by the variable. If a variable does not return any value, then an error should be thrown during OVAL analysis.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:extension base="oval-def:EntityBaseType">
+                    <xsd:attribute name="entity_check" type="oval:CheckEnumeration" use="optional" default="all"/>
+                    <xsd:attribute name="var_check" type="oval:CheckEnumeration" use="optional" default="all"/>
+               </xsd:extension>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityStateAnyType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityStateAnyType type is extended by the entities of an individual OVAL State. This type provides uniformity to each state entity by including the attributes found in the EntityStateBaseType. This specific type describes any simple data.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:extension base="oval-def:EntityStateBaseType"/>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityStateBinaryType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityStateBinaryType type is extended by the entities of an individual OVAL State. This type provides uniformity to each state entity by including the attributes found in the EntityStateBaseType. This specific type describes simple binary data. The empty string is also allowed when using a variable reference with an element.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-def:EntityStateBaseType">
+                    <xsd:simpleType>
+                         <xsd:union memberTypes="xsd:hexBinary oval:EmptyStringType"/>
+                    </xsd:simpleType>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityStateBoolType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityStateBoolType type is extended by the entities of an individual OVAL State. This type provides uniformity to each state entity by including the attributes found in the EntityStateBaseType. This specific type describes simple boolean data. The empty string is also allowed when using a variable reference with an element.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-def:EntityStateBaseType">
+                    <xsd:simpleType>
+                         <xsd:union memberTypes="xsd:boolean oval:EmptyStringType"/>
+                    </xsd:simpleType>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityStateFloatType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityStateFloatType type is extended by the entities of an individual OVAL State. This type provides uniformity to each state entity by including the attributes found in the EntityStateBaseType. This specific type describes simple float data. The empty string is also allowed when using a variable reference with an element.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-def:EntityStateBaseType">
+                    <xsd:simpleType>
+                         <xsd:union memberTypes="xsd:float oval:EmptyStringType"/>
+                    </xsd:simpleType>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityStateIntType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityStateIntType type is extended by the entities of an individual OVAL State. This type provides uniformity to each state entity by including the attributes found in the EntityStateBaseType. This specific type describes simple integer data. The empty string is also allowed when using a variable reference with an element.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-def:EntityStateBaseType">
+                    <xsd:simpleType>
+                         <xsd:union memberTypes="xsd:integer oval:EmptyStringType"/>
+                    </xsd:simpleType>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityStateStringType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityStateStringType type is extended by the entities of an individual OVAL State. This type provides uniformity to each state entity by including the attributes found in the EntityStateBaseType. This specific type describes simple string data.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-def:EntityStateBaseType">
+                    <xsd:simpleType>
+                         <xsd:restriction base="xsd:string"/>
+                    </xsd:simpleType>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/oval-definitions-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/oval-definitions-schematron.xsl
===================================================================
--- trunk/ovaldi/xml/oval-definitions-schematron.xsl	                        (rev 0)
+++ trunk/ovaldi/xml/oval-definitions-schematron.xsl	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,22842 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<xsl:stylesheet xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:xs="http://www.w3.org/2001/XMLSchema"
+                xmlns:sch="http://www.ascc.net/xml/schematron"
+                xmlns:iso="http://purl.oclc.org/dsdl/schematron"
+                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5"
+                xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5"
+                xmlns:ind-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent"
+                xmlns:aix-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#aix"
+                xmlns:apache-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#apache"
+                xmlns:catos-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#catos"
+                xmlns:esx-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#esx"
+                xmlns:freebsd-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#freebsd"
+                xmlns:hpux-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#hpux"
+                xmlns:ios-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#ios"
+                xmlns:linux-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"
+                xmlns:macos-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#macos"
+                xmlns:sol-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#solaris"
+                xmlns:unix-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix"
+                xmlns:win-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#windows"
+                version="2.0">
+
+<!--PHASES-->
+
+
+<!--PROLOG-->
+
+
+<!--KEYS-->
+
+
+<!--DEFAULT RULES-->
+
+
+<!--MODE: SCHEMATRON-FULL-PATH-->
+<xsl:template match="*|@*" mode="schematron-get-full-path">
+      <xsl:apply-templates select="parent::*" mode="schematron-get-full-path"/>
+      <xsl:text>/</xsl:text>
+      <xsl:choose>
+         <xsl:when test="namespace-uri()=''">
+            <xsl:value-of select="name()"/>
+         </xsl:when>
+         <xsl:otherwise>
+            <xsl:text>*:</xsl:text>
+            <xsl:value-of select="local-name()"/>
+            <xsl:text>[namespace-uri()='</xsl:text>
+            <xsl:value-of select="namespace-uri()"/>
+            <xsl:text>']</xsl:text>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:variable name="preceding"
+                    select="count(preceding-sibling::*[local-name()=local-name(current())                                   and namespace-uri() = namespace-uri(current())])"/>
+      <xsl:text>[</xsl:text>
+      <xsl:value-of select="1+ $preceding"/>
+      <xsl:text>]</xsl:text>
+   </xsl:template>
+   <xsl:template match="@*" mode="schematron-get-full-path">
+      <xsl:apply-templates select="parent::*" mode="schematron-get-full-path"/>@*[local-name()='schema' and namespace-uri()='http://purl.oclc.org/dsdl/schematron']</xsl:template>
+
+   <!--MODE: GENERATE-ID-FROM-PATH -->
+<xsl:template match="/" mode="generate-id-from-path"/>
+   <xsl:template match="text()" mode="generate-id-from-path">
+      <xsl:apply-templates select="parent::*" mode="generate-id-from-path"/>
+      <xsl:value-of select="concat('.text-', 1+count(preceding-sibling::text()), '-')"/>
+   </xsl:template>
+   <xsl:template match="comment()" mode="generate-id-from-path">
+      <xsl:apply-templates select="parent::*" mode="generate-id-from-path"/>
+      <xsl:value-of select="concat('.comment-', 1+count(preceding-sibling::comment()), '-')"/>
+   </xsl:template>
+   <xsl:template match="processing-instruction()" mode="generate-id-from-path">
+      <xsl:apply-templates select="parent::*" mode="generate-id-from-path"/>
+      <xsl:value-of select="concat('.processing-instruction-', 1+count(preceding-sibling::processing-instruction()), '-')"/>
+   </xsl:template>
+   <xsl:template match="@*" mode="generate-id-from-path">
+      <xsl:apply-templates select="parent::*" mode="generate-id-from-path"/>
+      <xsl:value-of select="concat('.@', name())"/>
+   </xsl:template>
+   <xsl:template match="*" mode="generate-id-from-path" priority="-0.5">
+      <xsl:apply-templates select="parent::*" mode="generate-id-from-path"/>
+      <xsl:text>.</xsl:text>
+      <xsl:choose>
+         <xsl:when test="count(. | ../namespace::*) = count(../namespace::*)">
+            <xsl:value-of select="concat('.namespace::-',1+count(namespace::*),'-')"/>
+         </xsl:when>
+         <xsl:otherwise>
+            <xsl:value-of select="concat('.',name(),'-',1+count(preceding-sibling::*[name()=name(current())]),'-')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+   </xsl:template>
+   <!--Strip characters--><xsl:template match="text()" priority="-1"/>
+
+   <!--SCHEMA METADATA-->
+<xsl:template match="/">
+      <xsl:apply-templates select="/" mode="M17"/>
+      <xsl:apply-templates select="/" mode="M18"/>
+      <xsl:apply-templates select="/" mode="M19"/>
+      <xsl:apply-templates select="/" mode="M20"/>
+      <xsl:apply-templates select="/" mode="M21"/>
+      <xsl:apply-templates select="/" mode="M22"/>
+      <xsl:apply-templates select="/" mode="M23"/>
+      <xsl:apply-templates select="/" mode="M24"/>
+      <xsl:apply-templates select="/" mode="M25"/>
+      <xsl:apply-templates select="/" mode="M26"/>
+      <xsl:apply-templates select="/" mode="M27"/>
+      <xsl:apply-templates select="/" mode="M28"/>
+      <xsl:apply-templates select="/" mode="M29"/>
+      <xsl:apply-templates select="/" mode="M30"/>
+      <xsl:apply-templates select="/" mode="M31"/>
+      <xsl:apply-templates select="/" mode="M32"/>
+      <xsl:apply-templates select="/" mode="M33"/>
+      <xsl:apply-templates select="/" mode="M34"/>
+      <xsl:apply-templates select="/" mode="M35"/>
+      <xsl:apply-templates select="/" mode="M36"/>
+      <xsl:apply-templates select="/" mode="M37"/>
+      <xsl:apply-templates select="/" mode="M38"/>
+      <xsl:apply-templates select="/" mode="M39"/>
+      <xsl:apply-templates select="/" mode="M40"/>
+      <xsl:apply-templates select="/" mode="M41"/>
+      <xsl:apply-templates select="/" mode="M42"/>
+      <xsl:apply-templates select="/" mode="M43"/>
+      <xsl:apply-templates select="/" mode="M44"/>
+      <xsl:apply-templates select="/" mode="M45"/>
+      <xsl:apply-templates select="/" mode="M46"/>
+      <xsl:apply-templates select="/" mode="M47"/>
+      <xsl:apply-templates select="/" mode="M48"/>
+      <xsl:apply-templates select="/" mode="M49"/>
+      <xsl:apply-templates select="/" mode="M50"/>
+      <xsl:apply-templates select="/" mode="M51"/>
+      <xsl:apply-templates select="/" mode="M52"/>
+      <xsl:apply-templates select="/" mode="M53"/>
+      <xsl:apply-templates select="/" mode="M54"/>
+      <xsl:apply-templates select="/" mode="M55"/>
+      <xsl:apply-templates select="/" mode="M56"/>
+      <xsl:apply-templates select="/" mode="M57"/>
+      <xsl:apply-templates select="/" mode="M58"/>
+      <xsl:apply-templates select="/" mode="M59"/>
+      <xsl:apply-templates select="/" mode="M60"/>
+      <xsl:apply-templates select="/" mode="M61"/>
+      <xsl:apply-templates select="/" mode="M62"/>
+      <xsl:apply-templates select="/" mode="M63"/>
+      <xsl:apply-templates select="/" mode="M64"/>
+      <xsl:apply-templates select="/" mode="M65"/>
+      <xsl:apply-templates select="/" mode="M66"/>
+      <xsl:apply-templates select="/" mode="M67"/>
+      <xsl:apply-templates select="/" mode="M68"/>
+      <xsl:apply-templates select="/" mode="M69"/>
+      <xsl:apply-templates select="/" mode="M70"/>
+      <xsl:apply-templates select="/" mode="M71"/>
+      <xsl:apply-templates select="/" mode="M72"/>
+      <xsl:apply-templates select="/" mode="M73"/>
+      <xsl:apply-templates select="/" mode="M74"/>
+      <xsl:apply-templates select="/" mode="M75"/>
+      <xsl:apply-templates select="/" mode="M76"/>
+      <xsl:apply-templates select="/" mode="M77"/>
+      <xsl:apply-templates select="/" mode="M78"/>
+      <xsl:apply-templates select="/" mode="M79"/>
+      <xsl:apply-templates select="/" mode="M80"/>
+      <xsl:apply-templates select="/" mode="M81"/>
+      <xsl:apply-templates select="/" mode="M82"/>
+      <xsl:apply-templates select="/" mode="M83"/>
+      <xsl:apply-templates select="/" mode="M84"/>
+      <xsl:apply-templates select="/" mode="M85"/>
+      <xsl:apply-templates select="/" mode="M86"/>
+      <xsl:apply-templates select="/" mode="M87"/>
+      <xsl:apply-templates select="/" mode="M88"/>
+      <xsl:apply-templates select="/" mode="M89"/>
+      <xsl:apply-templates select="/" mode="M90"/>
+      <xsl:apply-templates select="/" mode="M91"/>
+      <xsl:apply-templates select="/" mode="M92"/>
+      <xsl:apply-templates select="/" mode="M93"/>
+      <xsl:apply-templates select="/" mode="M94"/>
+      <xsl:apply-templates select="/" mode="M95"/>
+      <xsl:apply-templates select="/" mode="M96"/>
+      <xsl:apply-templates select="/" mode="M97"/>
+      <xsl:apply-templates select="/" mode="M98"/>
+      <xsl:apply-templates select="/" mode="M99"/>
+      <xsl:apply-templates select="/" mode="M100"/>
+      <xsl:apply-templates select="/" mode="M101"/>
+      <xsl:apply-templates select="/" mode="M102"/>
+      <xsl:apply-templates select="/" mode="M103"/>
+      <xsl:apply-templates select="/" mode="M104"/>
+      <xsl:apply-templates select="/" mode="M105"/>
+      <xsl:apply-templates select="/" mode="M106"/>
+      <xsl:apply-templates select="/" mode="M107"/>
+      <xsl:apply-templates select="/" mode="M108"/>
+      <xsl:apply-templates select="/" mode="M109"/>
+      <xsl:apply-templates select="/" mode="M110"/>
+      <xsl:apply-templates select="/" mode="M111"/>
+      <xsl:apply-templates select="/" mode="M112"/>
+      <xsl:apply-templates select="/" mode="M113"/>
+      <xsl:apply-templates select="/" mode="M114"/>
+      <xsl:apply-templates select="/" mode="M115"/>
+      <xsl:apply-templates select="/" mode="M116"/>
+      <xsl:apply-templates select="/" mode="M117"/>
+      <xsl:apply-templates select="/" mode="M118"/>
+      <xsl:apply-templates select="/" mode="M119"/>
+      <xsl:apply-templates select="/" mode="M120"/>
+      <xsl:apply-templates select="/" mode="M121"/>
+      <xsl:apply-templates select="/" mode="M122"/>
+      <xsl:apply-templates select="/" mode="M123"/>
+      <xsl:apply-templates select="/" mode="M124"/>
+      <xsl:apply-templates select="/" mode="M125"/>
+      <xsl:apply-templates select="/" mode="M126"/>
+      <xsl:apply-templates select="/" mode="M127"/>
+      <xsl:apply-templates select="/" mode="M128"/>
+      <xsl:apply-templates select="/" mode="M129"/>
+      <xsl:apply-templates select="/" mode="M130"/>
+      <xsl:apply-templates select="/" mode="M131"/>
+      <xsl:apply-templates select="/" mode="M132"/>
+      <xsl:apply-templates select="/" mode="M133"/>
+      <xsl:apply-templates select="/" mode="M134"/>
+      <xsl:apply-templates select="/" mode="M135"/>
+      <xsl:apply-templates select="/" mode="M136"/>
+      <xsl:apply-templates select="/" mode="M137"/>
+      <xsl:apply-templates select="/" mode="M138"/>
+      <xsl:apply-templates select="/" mode="M139"/>
+      <xsl:apply-templates select="/" mode="M140"/>
+      <xsl:apply-templates select="/" mode="M141"/>
+      <xsl:apply-templates select="/" mode="M142"/>
+      <xsl:apply-templates select="/" mode="M143"/>
+      <xsl:apply-templates select="/" mode="M144"/>
+      <xsl:apply-templates select="/" mode="M145"/>
+      <xsl:apply-templates select="/" mode="M146"/>
+      <xsl:apply-templates select="/" mode="M147"/>
+      <xsl:apply-templates select="/" mode="M148"/>
+      <xsl:apply-templates select="/" mode="M149"/>
+      <xsl:apply-templates select="/" mode="M150"/>
+      <xsl:apply-templates select="/" mode="M151"/>
+      <xsl:apply-templates select="/" mode="M152"/>
+      <xsl:apply-templates select="/" mode="M153"/>
+      <xsl:apply-templates select="/" mode="M154"/>
+      <xsl:apply-templates select="/" mode="M155"/>
+      <xsl:apply-templates select="/" mode="M156"/>
+      <xsl:apply-templates select="/" mode="M157"/>
+      <xsl:apply-templates select="/" mode="M158"/>
+      <xsl:apply-templates select="/" mode="M159"/>
+      <xsl:apply-templates select="/" mode="M160"/>
+      <xsl:apply-templates select="/" mode="M161"/>
+      <xsl:apply-templates select="/" mode="M162"/>
+      <xsl:apply-templates select="/" mode="M163"/>
+      <xsl:apply-templates select="/" mode="M164"/>
+      <xsl:apply-templates select="/" mode="M165"/>
+      <xsl:apply-templates select="/" mode="M166"/>
+      <xsl:apply-templates select="/" mode="M167"/>
+      <xsl:apply-templates select="/" mode="M168"/>
+      <xsl:apply-templates select="/" mode="M169"/>
+      <xsl:apply-templates select="/" mode="M170"/>
+      <xsl:apply-templates select="/" mode="M171"/>
+      <xsl:apply-templates select="/" mode="M172"/>
+      <xsl:apply-templates select="/" mode="M173"/>
+      <xsl:apply-templates select="/" mode="M174"/>
+      <xsl:apply-templates select="/" mode="M175"/>
+      <xsl:apply-templates select="/" mode="M176"/>
+      <xsl:apply-templates select="/" mode="M177"/>
+      <xsl:apply-templates select="/" mode="M178"/>
+      <xsl:apply-templates select="/" mode="M179"/>
+      <xsl:apply-templates select="/" mode="M180"/>
+      <xsl:apply-templates select="/" mode="M181"/>
+      <xsl:apply-templates select="/" mode="M182"/>
+      <xsl:apply-templates select="/" mode="M183"/>
+      <xsl:apply-templates select="/" mode="M184"/>
+      <xsl:apply-templates select="/" mode="M185"/>
+      <xsl:apply-templates select="/" mode="M186"/>
+      <xsl:apply-templates select="/" mode="M187"/>
+      <xsl:apply-templates select="/" mode="M188"/>
+      <xsl:apply-templates select="/" mode="M189"/>
+      <xsl:apply-templates select="/" mode="M190"/>
+      <xsl:apply-templates select="/" mode="M191"/>
+      <xsl:apply-templates select="/" mode="M192"/>
+      <xsl:apply-templates select="/" mode="M193"/>
+      <xsl:apply-templates select="/" mode="M194"/>
+      <xsl:apply-templates select="/" mode="M195"/>
+      <xsl:apply-templates select="/" mode="M196"/>
+      <xsl:apply-templates select="/" mode="M197"/>
+      <xsl:apply-templates select="/" mode="M198"/>
+      <xsl:apply-templates select="/" mode="M199"/>
+      <xsl:apply-templates select="/" mode="M200"/>
+      <xsl:apply-templates select="/" mode="M201"/>
+      <xsl:apply-templates select="/" mode="M202"/>
+      <xsl:apply-templates select="/" mode="M203"/>
+      <xsl:apply-templates select="/" mode="M204"/>
+      <xsl:apply-templates select="/" mode="M205"/>
+      <xsl:apply-templates select="/" mode="M206"/>
+      <xsl:apply-templates select="/" mode="M207"/>
+      <xsl:apply-templates select="/" mode="M208"/>
+      <xsl:apply-templates select="/" mode="M209"/>
+      <xsl:apply-templates select="/" mode="M210"/>
+      <xsl:apply-templates select="/" mode="M211"/>
+      <xsl:apply-templates select="/" mode="M212"/>
+      <xsl:apply-templates select="/" mode="M213"/>
+      <xsl:apply-templates select="/" mode="M214"/>
+      <xsl:apply-templates select="/" mode="M215"/>
+      <xsl:apply-templates select="/" mode="M216"/>
+      <xsl:apply-templates select="/" mode="M217"/>
+      <xsl:apply-templates select="/" mode="M218"/>
+      <xsl:apply-templates select="/" mode="M219"/>
+      <xsl:apply-templates select="/" mode="M220"/>
+      <xsl:apply-templates select="/" mode="M221"/>
+      <xsl:apply-templates select="/" mode="M222"/>
+      <xsl:apply-templates select="/" mode="M223"/>
+      <xsl:apply-templates select="/" mode="M224"/>
+      <xsl:apply-templates select="/" mode="M225"/>
+      <xsl:apply-templates select="/" mode="M226"/>
+      <xsl:apply-templates select="/" mode="M227"/>
+      <xsl:apply-templates select="/" mode="M228"/>
+      <xsl:apply-templates select="/" mode="M229"/>
+      <xsl:apply-templates select="/" mode="M230"/>
+      <xsl:apply-templates select="/" mode="M231"/>
+      <xsl:apply-templates select="/" mode="M232"/>
+      <xsl:apply-templates select="/" mode="M233"/>
+      <xsl:apply-templates select="/" mode="M234"/>
+      <xsl:apply-templates select="/" mode="M235"/>
+      <xsl:apply-templates select="/" mode="M236"/>
+      <xsl:apply-templates select="/" mode="M237"/>
+      <xsl:apply-templates select="/" mode="M238"/>
+      <xsl:apply-templates select="/" mode="M239"/>
+      <xsl:apply-templates select="/" mode="M240"/>
+      <xsl:apply-templates select="/" mode="M241"/>
+      <xsl:apply-templates select="/" mode="M242"/>
+      <xsl:apply-templates select="/" mode="M243"/>
+      <xsl:apply-templates select="/" mode="M244"/>
+      <xsl:apply-templates select="/" mode="M245"/>
+      <xsl:apply-templates select="/" mode="M246"/>
+      <xsl:apply-templates select="/" mode="M247"/>
+      <xsl:apply-templates select="/" mode="M248"/>
+      <xsl:apply-templates select="/" mode="M249"/>
+      <xsl:apply-templates select="/" mode="M250"/>
+      <xsl:apply-templates select="/" mode="M251"/>
+      <xsl:apply-templates select="/" mode="M252"/>
+      <xsl:apply-templates select="/" mode="M253"/>
+      <xsl:apply-templates select="/" mode="M254"/>
+      <xsl:apply-templates select="/" mode="M255"/>
+      <xsl:apply-templates select="/" mode="M256"/>
+      <xsl:apply-templates select="/" mode="M257"/>
+      <xsl:apply-templates select="/" mode="M258"/>
+      <xsl:apply-templates select="/" mode="M259"/>
+      <xsl:apply-templates select="/" mode="M260"/>
+      <xsl:apply-templates select="/" mode="M261"/>
+      <xsl:apply-templates select="/" mode="M262"/>
+      <xsl:apply-templates select="/" mode="M263"/>
+      <xsl:apply-templates select="/" mode="M264"/>
+      <xsl:apply-templates select="/" mode="M265"/>
+      <xsl:apply-templates select="/" mode="M266"/>
+      <xsl:apply-templates select="/" mode="M267"/>
+      <xsl:apply-templates select="/" mode="M268"/>
+      <xsl:apply-templates select="/" mode="M269"/>
+      <xsl:apply-templates select="/" mode="M270"/>
+      <xsl:apply-templates select="/" mode="M271"/>
+      <xsl:apply-templates select="/" mode="M272"/>
+      <xsl:apply-templates select="/" mode="M273"/>
+      <xsl:apply-templates select="/" mode="M274"/>
+      <xsl:apply-templates select="/" mode="M275"/>
+      <xsl:apply-templates select="/" mode="M276"/>
+      <xsl:apply-templates select="/" mode="M277"/>
+      <xsl:apply-templates select="/" mode="M278"/>
+      <xsl:apply-templates select="/" mode="M279"/>
+      <xsl:apply-templates select="/" mode="M280"/>
+      <xsl:apply-templates select="/" mode="M281"/>
+      <xsl:apply-templates select="/" mode="M282"/>
+      <xsl:apply-templates select="/" mode="M283"/>
+      <xsl:apply-templates select="/" mode="M284"/>
+      <xsl:apply-templates select="/" mode="M285"/>
+      <xsl:apply-templates select="/" mode="M286"/>
+      <xsl:apply-templates select="/" mode="M287"/>
+      <xsl:apply-templates select="/" mode="M288"/>
+      <xsl:apply-templates select="/" mode="M289"/>
+      <xsl:apply-templates select="/" mode="M290"/>
+      <xsl:apply-templates select="/" mode="M291"/>
+      <xsl:apply-templates select="/" mode="M292"/>
+      <xsl:apply-templates select="/" mode="M293"/>
+      <xsl:apply-templates select="/" mode="M294"/>
+      <xsl:apply-templates select="/" mode="M295"/>
+      <xsl:apply-templates select="/" mode="M296"/>
+      <xsl:apply-templates select="/" mode="M297"/>
+      <xsl:apply-templates select="/" mode="M298"/>
+      <xsl:apply-templates select="/" mode="M299"/>
+      <xsl:apply-templates select="/" mode="M300"/>
+      <xsl:apply-templates select="/" mode="M301"/>
+      <xsl:apply-templates select="/" mode="M302"/>
+      <xsl:apply-templates select="/" mode="M303"/>
+      <xsl:apply-templates select="/" mode="M304"/>
+      <xsl:apply-templates select="/" mode="M305"/>
+      <xsl:apply-templates select="/" mode="M306"/>
+      <xsl:apply-templates select="/" mode="M307"/>
+      <xsl:apply-templates select="/" mode="M308"/>
+      <xsl:apply-templates select="/" mode="M309"/>
+      <xsl:apply-templates select="/" mode="M310"/>
+      <xsl:apply-templates select="/" mode="M311"/>
+      <xsl:apply-templates select="/" mode="M312"/>
+      <xsl:apply-templates select="/" mode="M313"/>
+      <xsl:apply-templates select="/" mode="M314"/>
+      <xsl:apply-templates select="/" mode="M315"/>
+      <xsl:apply-templates select="/" mode="M316"/>
+      <xsl:apply-templates select="/" mode="M317"/>
+      <xsl:apply-templates select="/" mode="M318"/>
+      <xsl:apply-templates select="/" mode="M319"/>
+      <xsl:apply-templates select="/" mode="M320"/>
+      <xsl:apply-templates select="/" mode="M321"/>
+      <xsl:apply-templates select="/" mode="M322"/>
+      <xsl:apply-templates select="/" mode="M323"/>
+      <xsl:apply-templates select="/" mode="M324"/>
+      <xsl:apply-templates select="/" mode="M325"/>
+      <xsl:apply-templates select="/" mode="M326"/>
+      <xsl:apply-templates select="/" mode="M327"/>
+      <xsl:apply-templates select="/" mode="M328"/>
+      <xsl:apply-templates select="/" mode="M329"/>
+      <xsl:apply-templates select="/" mode="M330"/>
+      <xsl:apply-templates select="/" mode="M331"/>
+      <xsl:apply-templates select="/" mode="M332"/>
+      <xsl:apply-templates select="/" mode="M333"/>
+      <xsl:apply-templates select="/" mode="M334"/>
+      <xsl:apply-templates select="/" mode="M335"/>
+      <xsl:apply-templates select="/" mode="M336"/>
+      <xsl:apply-templates select="/" mode="M337"/>
+      <xsl:apply-templates select="/" mode="M338"/>
+      <xsl:apply-templates select="/" mode="M339"/>
+      <xsl:apply-templates select="/" mode="M340"/>
+      <xsl:apply-templates select="/" mode="M341"/>
+      <xsl:apply-templates select="/" mode="M342"/>
+      <xsl:apply-templates select="/" mode="M343"/>
+      <xsl:apply-templates select="/" mode="M344"/>
+      <xsl:apply-templates select="/" mode="M345"/>
+      <xsl:apply-templates select="/" mode="M346"/>
+      <xsl:apply-templates select="/" mode="M347"/>
+      <xsl:apply-templates select="/" mode="M348"/>
+      <xsl:apply-templates select="/" mode="M349"/>
+      <xsl:apply-templates select="/" mode="M350"/>
+      <xsl:apply-templates select="/" mode="M351"/>
+      <xsl:apply-templates select="/" mode="M352"/>
+      <xsl:apply-templates select="/" mode="M353"/>
+      <xsl:apply-templates select="/" mode="M354"/>
+      <xsl:apply-templates select="/" mode="M355"/>
+      <xsl:apply-templates select="/" mode="M356"/>
+      <xsl:apply-templates select="/" mode="M357"/>
+      <xsl:apply-templates select="/" mode="M358"/>
+      <xsl:apply-templates select="/" mode="M359"/>
+      <xsl:apply-templates select="/" mode="M360"/>
+      <xsl:apply-templates select="/" mode="M361"/>
+      <xsl:apply-templates select="/" mode="M362"/>
+      <xsl:apply-templates select="/" mode="M363"/>
+      <xsl:apply-templates select="/" mode="M364"/>
+      <xsl:apply-templates select="/" mode="M365"/>
+      <xsl:apply-templates select="/" mode="M366"/>
+      <xsl:apply-templates select="/" mode="M367"/>
+      <xsl:apply-templates select="/" mode="M368"/>
+      <xsl:apply-templates select="/" mode="M369"/>
+      <xsl:apply-templates select="/" mode="M370"/>
+      <xsl:apply-templates select="/" mode="M371"/>
+      <xsl:apply-templates select="/" mode="M372"/>
+      <xsl:apply-templates select="/" mode="M373"/>
+      <xsl:apply-templates select="/" mode="M374"/>
+      <xsl:apply-templates select="/" mode="M375"/>
+      <xsl:apply-templates select="/" mode="M376"/>
+      <xsl:apply-templates select="/" mode="M377"/>
+      <xsl:apply-templates select="/" mode="M378"/>
+      <xsl:apply-templates select="/" mode="M379"/>
+      <xsl:apply-templates select="/" mode="M380"/>
+      <xsl:apply-templates select="/" mode="M381"/>
+      <xsl:apply-templates select="/" mode="M382"/>
+      <xsl:apply-templates select="/" mode="M383"/>
+      <xsl:apply-templates select="/" mode="M384"/>
+      <xsl:apply-templates select="/" mode="M385"/>
+      <xsl:apply-templates select="/" mode="M386"/>
+      <xsl:apply-templates select="/" mode="M387"/>
+      <xsl:apply-templates select="/" mode="M388"/>
+      <xsl:apply-templates select="/" mode="M389"/>
+      <xsl:apply-templates select="/" mode="M390"/>
+      <xsl:apply-templates select="/" mode="M391"/>
+      <xsl:apply-templates select="/" mode="M392"/>
+      <xsl:apply-templates select="/" mode="M393"/>
+      <xsl:apply-templates select="/" mode="M394"/>
+      <xsl:apply-templates select="/" mode="M395"/>
+      <xsl:apply-templates select="/" mode="M396"/>
+      <xsl:apply-templates select="/" mode="M397"/>
+      <xsl:apply-templates select="/" mode="M398"/>
+      <xsl:apply-templates select="/" mode="M399"/>
+      <xsl:apply-templates select="/" mode="M400"/>
+      <xsl:apply-templates select="/" mode="M401"/>
+      <xsl:apply-templates select="/" mode="M402"/>
+      <xsl:apply-templates select="/" mode="M403"/>
+      <xsl:apply-templates select="/" mode="M404"/>
+      <xsl:apply-templates select="/" mode="M405"/>
+      <xsl:apply-templates select="/" mode="M406"/>
+      <xsl:apply-templates select="/" mode="M407"/>
+      <xsl:apply-templates select="/" mode="M408"/>
+      <xsl:apply-templates select="/" mode="M409"/>
+      <xsl:apply-templates select="/" mode="M410"/>
+      <xsl:apply-templates select="/" mode="M411"/>
+      <xsl:apply-templates select="/" mode="M412"/>
+      <xsl:apply-templates select="/" mode="M413"/>
+      <xsl:apply-templates select="/" mode="M414"/>
+      <xsl:apply-templates select="/" mode="M415"/>
+      <xsl:apply-templates select="/" mode="M416"/>
+      <xsl:apply-templates select="/" mode="M417"/>
+      <xsl:apply-templates select="/" mode="M418"/>
+      <xsl:apply-templates select="/" mode="M419"/>
+      <xsl:apply-templates select="/" mode="M420"/>
+      <xsl:apply-templates select="/" mode="M421"/>
+      <xsl:apply-templates select="/" mode="M422"/>
+      <xsl:apply-templates select="/" mode="M423"/>
+      <xsl:apply-templates select="/" mode="M424"/>
+      <xsl:apply-templates select="/" mode="M425"/>
+      <xsl:apply-templates select="/" mode="M426"/>
+      <xsl:apply-templates select="/" mode="M427"/>
+      <xsl:apply-templates select="/" mode="M428"/>
+      <xsl:apply-templates select="/" mode="M429"/>
+      <xsl:apply-templates select="/" mode="M430"/>
+      <xsl:apply-templates select="/" mode="M431"/>
+      <xsl:apply-templates select="/" mode="M432"/>
+      <xsl:apply-templates select="/" mode="M433"/>
+      <xsl:apply-templates select="/" mode="M434"/>
+      <xsl:apply-templates select="/" mode="M435"/>
+      <xsl:apply-templates select="/" mode="M436"/>
+      <xsl:apply-templates select="/" mode="M437"/>
+      <xsl:apply-templates select="/" mode="M438"/>
+      <xsl:apply-templates select="/" mode="M439"/>
+      <xsl:apply-templates select="/" mode="M440"/>
+      <xsl:apply-templates select="/" mode="M441"/>
+      <xsl:apply-templates select="/" mode="M442"/>
+      <xsl:apply-templates select="/" mode="M443"/>
+      <xsl:apply-templates select="/" mode="M444"/>
+      <xsl:apply-templates select="/" mode="M445"/>
+      <xsl:apply-templates select="/" mode="M446"/>
+      <xsl:apply-templates select="/" mode="M447"/>
+      <xsl:apply-templates select="/" mode="M448"/>
+      <xsl:apply-templates select="/" mode="M449"/>
+      <xsl:apply-templates select="/" mode="M450"/>
+      <xsl:apply-templates select="/" mode="M451"/>
+      <xsl:apply-templates select="/" mode="M452"/>
+      <xsl:apply-templates select="/" mode="M453"/>
+      <xsl:apply-templates select="/" mode="M454"/>
+      <xsl:apply-templates select="/" mode="M455"/>
+      <xsl:apply-templates select="/" mode="M456"/>
+      <xsl:apply-templates select="/" mode="M457"/>
+      <xsl:apply-templates select="/" mode="M458"/>
+      <xsl:apply-templates select="/" mode="M459"/>
+      <xsl:apply-templates select="/" mode="M460"/>
+      <xsl:apply-templates select="/" mode="M461"/>
+      <xsl:apply-templates select="/" mode="M462"/>
+      <xsl:apply-templates select="/" mode="M463"/>
+      <xsl:apply-templates select="/" mode="M464"/>
+      <xsl:apply-templates select="/" mode="M465"/>
+      <xsl:apply-templates select="/" mode="M466"/>
+      <xsl:apply-templates select="/" mode="M467"/>
+      <xsl:apply-templates select="/" mode="M468"/>
+      <xsl:apply-templates select="/" mode="M469"/>
+      <xsl:apply-templates select="/" mode="M470"/>
+      <xsl:apply-templates select="/" mode="M471"/>
+      <xsl:apply-templates select="/" mode="M472"/>
+      <xsl:apply-templates select="/" mode="M473"/>
+      <xsl:apply-templates select="/" mode="M474"/>
+      <xsl:apply-templates select="/" mode="M475"/>
+      <xsl:apply-templates select="/" mode="M476"/>
+      <xsl:apply-templates select="/" mode="M477"/>
+      <xsl:apply-templates select="/" mode="M478"/>
+      <xsl:apply-templates select="/" mode="M479"/>
+      <xsl:apply-templates select="/" mode="M480"/>
+      <xsl:apply-templates select="/" mode="M481"/>
+      <xsl:apply-templates select="/" mode="M482"/>
+      <xsl:apply-templates select="/" mode="M483"/>
+      <xsl:apply-templates select="/" mode="M484"/>
+      <xsl:apply-templates select="/" mode="M485"/>
+      <xsl:apply-templates select="/" mode="M486"/>
+      <xsl:apply-templates select="/" mode="M487"/>
+      <xsl:apply-templates select="/" mode="M488"/>
+      <xsl:apply-templates select="/" mode="M489"/>
+      <xsl:apply-templates select="/" mode="M490"/>
+      <xsl:apply-templates select="/" mode="M491"/>
+      <xsl:apply-templates select="/" mode="M492"/>
+      <xsl:apply-templates select="/" mode="M493"/>
+      <xsl:apply-templates select="/" mode="M494"/>
+      <xsl:apply-templates select="/" mode="M495"/>
+      <xsl:apply-templates select="/" mode="M496"/>
+      <xsl:apply-templates select="/" mode="M497"/>
+      <xsl:apply-templates select="/" mode="M498"/>
+      <xsl:apply-templates select="/" mode="M499"/>
+      <xsl:apply-templates select="/" mode="M500"/>
+      <xsl:apply-templates select="/" mode="M501"/>
+      <xsl:apply-templates select="/" mode="M502"/>
+      <xsl:apply-templates select="/" mode="M503"/>
+      <xsl:apply-templates select="/" mode="M504"/>
+      <xsl:apply-templates select="/" mode="M505"/>
+      <xsl:apply-templates select="/" mode="M506"/>
+      <xsl:apply-templates select="/" mode="M507"/>
+      <xsl:apply-templates select="/" mode="M508"/>
+      <xsl:apply-templates select="/" mode="M509"/>
+      <xsl:apply-templates select="/" mode="M510"/>
+      <xsl:apply-templates select="/" mode="M511"/>
+      <xsl:apply-templates select="/" mode="M512"/>
+      <xsl:apply-templates select="/" mode="M513"/>
+      <xsl:apply-templates select="/" mode="M514"/>
+      <xsl:apply-templates select="/" mode="M515"/>
+      <xsl:apply-templates select="/" mode="M516"/>
+      <xsl:apply-templates select="/" mode="M517"/>
+      <xsl:apply-templates select="/" mode="M518"/>
+      <xsl:apply-templates select="/" mode="M519"/>
+      <xsl:apply-templates select="/" mode="M520"/>
+      <xsl:apply-templates select="/" mode="M521"/>
+      <xsl:apply-templates select="/" mode="M522"/>
+      <xsl:apply-templates select="/" mode="M523"/>
+      <xsl:apply-templates select="/" mode="M524"/>
+      <xsl:apply-templates select="/" mode="M525"/>
+      <xsl:apply-templates select="/" mode="M526"/>
+      <xsl:apply-templates select="/" mode="M527"/>
+      <xsl:apply-templates select="/" mode="M528"/>
+      <xsl:apply-templates select="/" mode="M529"/>
+      <xsl:apply-templates select="/" mode="M530"/>
+      <xsl:apply-templates select="/" mode="M531"/>
+      <xsl:apply-templates select="/" mode="M532"/>
+      <xsl:apply-templates select="/" mode="M533"/>
+      <xsl:apply-templates select="/" mode="M534"/>
+      <xsl:apply-templates select="/" mode="M535"/>
+      <xsl:apply-templates select="/" mode="M536"/>
+      <xsl:apply-templates select="/" mode="M537"/>
+      <xsl:apply-templates select="/" mode="M538"/>
+      <xsl:apply-templates select="/" mode="M539"/>
+      <xsl:apply-templates select="/" mode="M540"/>
+      <xsl:apply-templates select="/" mode="M541"/>
+      <xsl:apply-templates select="/" mode="M542"/>
+      <xsl:apply-templates select="/" mode="M543"/>
+      <xsl:apply-templates select="/" mode="M544"/>
+      <xsl:apply-templates select="/" mode="M545"/>
+      <xsl:apply-templates select="/" mode="M546"/>
+      <xsl:apply-templates select="/" mode="M547"/>
+      <xsl:apply-templates select="/" mode="M548"/>
+      <xsl:apply-templates select="/" mode="M549"/>
+      <xsl:apply-templates select="/" mode="M550"/>
+      <xsl:apply-templates select="/" mode="M551"/>
+      <xsl:apply-templates select="/" mode="M552"/>
+      <xsl:apply-templates select="/" mode="M553"/>
+      <xsl:apply-templates select="/" mode="M554"/>
+      <xsl:apply-templates select="/" mode="M555"/>
+      <xsl:apply-templates select="/" mode="M556"/>
+      <xsl:apply-templates select="/" mode="M557"/>
+      <xsl:apply-templates select="/" mode="M558"/>
+      <xsl:apply-templates select="/" mode="M559"/>
+      <xsl:apply-templates select="/" mode="M560"/>
+      <xsl:apply-templates select="/" mode="M561"/>
+      <xsl:apply-templates select="/" mode="M562"/>
+      <xsl:apply-templates select="/" mode="M563"/>
+      <xsl:apply-templates select="/" mode="M564"/>
+      <xsl:apply-templates select="/" mode="M565"/>
+      <xsl:apply-templates select="/" mode="M566"/>
+      <xsl:apply-templates select="/" mode="M567"/>
+      <xsl:apply-templates select="/" mode="M568"/>
+      <xsl:apply-templates select="/" mode="M569"/>
+      <xsl:apply-templates select="/" mode="M570"/>
+      <xsl:apply-templates select="/" mode="M571"/>
+      <xsl:apply-templates select="/" mode="M572"/>
+      <xsl:apply-templates select="/" mode="M573"/>
+      <xsl:apply-templates select="/" mode="M574"/>
+      <xsl:apply-templates select="/" mode="M575"/>
+      <xsl:apply-templates select="/" mode="M576"/>
+      <xsl:apply-templates select="/" mode="M577"/>
+      <xsl:apply-templates select="/" mode="M578"/>
+      <xsl:apply-templates select="/" mode="M579"/>
+      <xsl:apply-templates select="/" mode="M580"/>
+      <xsl:apply-templates select="/" mode="M581"/>
+      <xsl:apply-templates select="/" mode="M582"/>
+      <xsl:apply-templates select="/" mode="M583"/>
+      <xsl:apply-templates select="/" mode="M584"/>
+      <xsl:apply-templates select="/" mode="M585"/>
+      <xsl:apply-templates select="/" mode="M586"/>
+      <xsl:apply-templates select="/" mode="M587"/>
+      <xsl:apply-templates select="/" mode="M588"/>
+      <xsl:apply-templates select="/" mode="M589"/>
+      <xsl:apply-templates select="/" mode="M590"/>
+      <xsl:apply-templates select="/" mode="M591"/>
+      <xsl:apply-templates select="/" mode="M592"/>
+      <xsl:apply-templates select="/" mode="M593"/>
+      <xsl:apply-templates select="/" mode="M594"/>
+      <xsl:apply-templates select="/" mode="M595"/>
+      <xsl:apply-templates select="/" mode="M596"/>
+      <xsl:apply-templates select="/" mode="M597"/>
+      <xsl:apply-templates select="/" mode="M598"/>
+      <xsl:apply-templates select="/" mode="M599"/>
+      <xsl:apply-templates select="/" mode="M600"/>
+      <xsl:apply-templates select="/" mode="M601"/>
+      <xsl:apply-templates select="/" mode="M602"/>
+      <xsl:apply-templates select="/" mode="M603"/>
+      <xsl:apply-templates select="/" mode="M604"/>
+      <xsl:apply-templates select="/" mode="M605"/>
+      <xsl:apply-templates select="/" mode="M606"/>
+      <xsl:apply-templates select="/" mode="M607"/>
+      <xsl:apply-templates select="/" mode="M608"/>
+      <xsl:apply-templates select="/" mode="M609"/>
+      <xsl:apply-templates select="/" mode="M610"/>
+      <xsl:apply-templates select="/" mode="M611"/>
+      <xsl:apply-templates select="/" mode="M612"/>
+      <xsl:apply-templates select="/" mode="M613"/>
+      <xsl:apply-templates select="/" mode="M614"/>
+      <xsl:apply-templates select="/" mode="M615"/>
+      <xsl:apply-templates select="/" mode="M616"/>
+      <xsl:apply-templates select="/" mode="M617"/>
+      <xsl:apply-templates select="/" mode="M618"/>
+      <xsl:apply-templates select="/" mode="M619"/>
+      <xsl:apply-templates select="/" mode="M620"/>
+      <xsl:apply-templates select="/" mode="M621"/>
+      <xsl:apply-templates select="/" mode="M622"/>
+      <xsl:apply-templates select="/" mode="M623"/>
+      <xsl:apply-templates select="/" mode="M624"/>
+      <xsl:apply-templates select="/" mode="M625"/>
+      <xsl:apply-templates select="/" mode="M626"/>
+      <xsl:apply-templates select="/" mode="M627"/>
+      <xsl:apply-templates select="/" mode="M628"/>
+      <xsl:apply-templates select="/" mode="M629"/>
+      <xsl:apply-templates select="/" mode="M630"/>
+      <xsl:apply-templates select="/" mode="M631"/>
+      <xsl:apply-templates select="/" mode="M632"/>
+      <xsl:apply-templates select="/" mode="M633"/>
+      <xsl:apply-templates select="/" mode="M634"/>
+      <xsl:apply-templates select="/" mode="M635"/>
+      <xsl:apply-templates select="/" mode="M636"/>
+      <xsl:apply-templates select="/" mode="M637"/>
+      <xsl:apply-templates select="/" mode="M638"/>
+      <xsl:apply-templates select="/" mode="M639"/>
+      <xsl:apply-templates select="/" mode="M640"/>
+      <xsl:apply-templates select="/" mode="M641"/>
+      <xsl:apply-templates select="/" mode="M642"/>
+      <xsl:apply-templates select="/" mode="M643"/>
+      <xsl:apply-templates select="/" mode="M644"/>
+      <xsl:apply-templates select="/" mode="M645"/>
+      <xsl:apply-templates select="/" mode="M646"/>
+      <xsl:apply-templates select="/" mode="M647"/>
+      <xsl:apply-templates select="/" mode="M648"/>
+      <xsl:apply-templates select="/" mode="M649"/>
+      <xsl:apply-templates select="/" mode="M650"/>
+      <xsl:apply-templates select="/" mode="M651"/>
+      <xsl:apply-templates select="/" mode="M652"/>
+      <xsl:apply-templates select="/" mode="M653"/>
+      <xsl:apply-templates select="/" mode="M654"/>
+      <xsl:apply-templates select="/" mode="M655"/>
+      <xsl:apply-templates select="/" mode="M656"/>
+      <xsl:apply-templates select="/" mode="M657"/>
+      <xsl:apply-templates select="/" mode="M658"/>
+      <xsl:apply-templates select="/" mode="M659"/>
+      <xsl:apply-templates select="/" mode="M660"/>
+      <xsl:apply-templates select="/" mode="M661"/>
+      <xsl:apply-templates select="/" mode="M662"/>
+      <xsl:apply-templates select="/" mode="M663"/>
+      <xsl:apply-templates select="/" mode="M664"/>
+      <xsl:apply-templates select="/" mode="M665"/>
+      <xsl:apply-templates select="/" mode="M666"/>
+      <xsl:apply-templates select="/" mode="M667"/>
+      <xsl:apply-templates select="/" mode="M668"/>
+      <xsl:apply-templates select="/" mode="M669"/>
+      <xsl:apply-templates select="/" mode="M670"/>
+      <xsl:apply-templates select="/" mode="M671"/>
+      <xsl:apply-templates select="/" mode="M672"/>
+      <xsl:apply-templates select="/" mode="M673"/>
+      <xsl:apply-templates select="/" mode="M674"/>
+      <xsl:apply-templates select="/" mode="M675"/>
+      <xsl:apply-templates select="/" mode="M676"/>
+      <xsl:apply-templates select="/" mode="M677"/>
+      <xsl:apply-templates select="/" mode="M678"/>
+      <xsl:apply-templates select="/" mode="M679"/>
+      <xsl:apply-templates select="/" mode="M680"/>
+      <xsl:apply-templates select="/" mode="M681"/>
+      <xsl:apply-templates select="/" mode="M682"/>
+      <xsl:apply-templates select="/" mode="M683"/>
+      <xsl:apply-templates select="/" mode="M684"/>
+      <xsl:apply-templates select="/" mode="M685"/>
+      <xsl:apply-templates select="/" mode="M686"/>
+      <xsl:apply-templates select="/" mode="M687"/>
+      <xsl:apply-templates select="/" mode="M688"/>
+      <xsl:apply-templates select="/" mode="M689"/>
+      <xsl:apply-templates select="/" mode="M690"/>
+      <xsl:apply-templates select="/" mode="M691"/>
+      <xsl:apply-templates select="/" mode="M692"/>
+      <xsl:apply-templates select="/" mode="M693"/>
+      <xsl:apply-templates select="/" mode="M694"/>
+      <xsl:apply-templates select="/" mode="M695"/>
+      <xsl:apply-templates select="/" mode="M696"/>
+      <xsl:apply-templates select="/" mode="M697"/>
+      <xsl:apply-templates select="/" mode="M698"/>
+      <xsl:apply-templates select="/" mode="M699"/>
+      <xsl:apply-templates select="/" mode="M700"/>
+      <xsl:apply-templates select="/" mode="M701"/>
+      <xsl:apply-templates select="/" mode="M702"/>
+      <xsl:apply-templates select="/" mode="M703"/>
+      <xsl:apply-templates select="/" mode="M704"/>
+      <xsl:apply-templates select="/" mode="M705"/>
+      <xsl:apply-templates select="/" mode="M706"/>
+      <xsl:apply-templates select="/" mode="M707"/>
+      <xsl:apply-templates select="/" mode="M708"/>
+      <xsl:apply-templates select="/" mode="M709"/>
+      <xsl:apply-templates select="/" mode="M710"/>
+      <xsl:apply-templates select="/" mode="M711"/>
+      <xsl:apply-templates select="/" mode="M712"/>
+      <xsl:apply-templates select="/" mode="M713"/>
+      <xsl:apply-templates select="/" mode="M714"/>
+      <xsl:apply-templates select="/" mode="M715"/>
+      <xsl:apply-templates select="/" mode="M716"/>
+      <xsl:apply-templates select="/" mode="M717"/>
+      <xsl:apply-templates select="/" mode="M718"/>
+      <xsl:apply-templates select="/" mode="M719"/>
+      <xsl:apply-templates select="/" mode="M720"/>
+      <xsl:apply-templates select="/" mode="M721"/>
+      <xsl:apply-templates select="/" mode="M722"/>
+      <xsl:apply-templates select="/" mode="M723"/>
+      <xsl:apply-templates select="/" mode="M724"/>
+      <xsl:apply-templates select="/" mode="M725"/>
+      <xsl:apply-templates select="/" mode="M726"/>
+      <xsl:apply-templates select="/" mode="M727"/>
+      <xsl:apply-templates select="/" mode="M728"/>
+      <xsl:apply-templates select="/" mode="M729"/>
+      <xsl:apply-templates select="/" mode="M730"/>
+      <xsl:apply-templates select="/" mode="M731"/>
+      <xsl:apply-templates select="/" mode="M732"/>
+      <xsl:apply-templates select="/" mode="M733"/>
+      <xsl:apply-templates select="/" mode="M734"/>
+      <xsl:apply-templates select="/" mode="M735"/>
+      <xsl:apply-templates select="/" mode="M736"/>
+      <xsl:apply-templates select="/" mode="M737"/>
+      <xsl:apply-templates select="/" mode="M738"/>
+      <xsl:apply-templates select="/" mode="M739"/>
+      <xsl:apply-templates select="/" mode="M740"/>
+      <xsl:apply-templates select="/" mode="M741"/>
+      <xsl:apply-templates select="/" mode="M742"/>
+      <xsl:apply-templates select="/" mode="M743"/>
+      <xsl:apply-templates select="/" mode="M744"/>
+      <xsl:apply-templates select="/" mode="M745"/>
+      <xsl:apply-templates select="/" mode="M746"/>
+      <xsl:apply-templates select="/" mode="M747"/>
+      <xsl:apply-templates select="/" mode="M748"/>
+      <xsl:apply-templates select="/" mode="M749"/>
+      <xsl:apply-templates select="/" mode="M750"/>
+      <xsl:apply-templates select="/" mode="M751"/>
+      <xsl:apply-templates select="/" mode="M752"/>
+      <xsl:apply-templates select="/" mode="M753"/>
+      <xsl:apply-templates select="/" mode="M754"/>
+      <xsl:apply-templates select="/" mode="M755"/>
+      <xsl:apply-templates select="/" mode="M756"/>
+      <xsl:apply-templates select="/" mode="M757"/>
+      <xsl:apply-templates select="/" mode="M758"/>
+      <xsl:apply-templates select="/" mode="M759"/>
+      <xsl:apply-templates select="/" mode="M760"/>
+      <xsl:apply-templates select="/" mode="M761"/>
+      <xsl:apply-templates select="/" mode="M762"/>
+      <xsl:apply-templates select="/" mode="M763"/>
+      <xsl:apply-templates select="/" mode="M764"/>
+      <xsl:apply-templates select="/" mode="M765"/>
+      <xsl:apply-templates select="/" mode="M766"/>
+      <xsl:apply-templates select="/" mode="M767"/>
+      <xsl:apply-templates select="/" mode="M768"/>
+      <xsl:apply-templates select="/" mode="M769"/>
+      <xsl:apply-templates select="/" mode="M770"/>
+      <xsl:apply-templates select="/" mode="M771"/>
+      <xsl:apply-templates select="/" mode="M772"/>
+      <xsl:apply-templates select="/" mode="M773"/>
+      <xsl:apply-templates select="/" mode="M774"/>
+      <xsl:apply-templates select="/" mode="M775"/>
+      <xsl:apply-templates select="/" mode="M776"/>
+      <xsl:apply-templates select="/" mode="M777"/>
+      <xsl:apply-templates select="/" mode="M778"/>
+      <xsl:apply-templates select="/" mode="M779"/>
+      <xsl:apply-templates select="/" mode="M780"/>
+      <xsl:apply-templates select="/" mode="M781"/>
+      <xsl:apply-templates select="/" mode="M782"/>
+      <xsl:apply-templates select="/" mode="M783"/>
+      <xsl:apply-templates select="/" mode="M784"/>
+      <xsl:apply-templates select="/" mode="M785"/>
+      <xsl:apply-templates select="/" mode="M786"/>
+      <xsl:apply-templates select="/" mode="M787"/>
+      <xsl:apply-templates select="/" mode="M788"/>
+      <xsl:apply-templates select="/" mode="M789"/>
+      <xsl:apply-templates select="/" mode="M790"/>
+      <xsl:apply-templates select="/" mode="M791"/>
+      <xsl:apply-templates select="/" mode="M792"/>
+      <xsl:apply-templates select="/" mode="M793"/>
+      <xsl:apply-templates select="/" mode="M794"/>
+      <xsl:apply-templates select="/" mode="M795"/>
+      <xsl:apply-templates select="/" mode="M796"/>
+      <xsl:apply-templates select="/" mode="M797"/>
+      <xsl:apply-templates select="/" mode="M798"/>
+      <xsl:apply-templates select="/" mode="M799"/>
+      <xsl:apply-templates select="/" mode="M800"/>
+      <xsl:apply-templates select="/" mode="M801"/>
+      <xsl:apply-templates select="/" mode="M802"/>
+      <xsl:apply-templates select="/" mode="M803"/>
+      <xsl:apply-templates select="/" mode="M804"/>
+      <xsl:apply-templates select="/" mode="M805"/>
+      <xsl:apply-templates select="/" mode="M806"/>
+      <xsl:apply-templates select="/" mode="M807"/>
+      <xsl:apply-templates select="/" mode="M808"/>
+      <xsl:apply-templates select="/" mode="M809"/>
+      <xsl:apply-templates select="/" mode="M810"/>
+      <xsl:apply-templates select="/" mode="M811"/>
+      <xsl:apply-templates select="/" mode="M812"/>
+      <xsl:apply-templates select="/" mode="M813"/>
+      <xsl:apply-templates select="/" mode="M814"/>
+      <xsl:apply-templates select="/" mode="M815"/>
+      <xsl:apply-templates select="/" mode="M816"/>
+      <xsl:apply-templates select="/" mode="M817"/>
+      <xsl:apply-templates select="/" mode="M818"/>
+      <xsl:apply-templates select="/" mode="M819"/>
+      <xsl:apply-templates select="/" mode="M820"/>
+      <xsl:apply-templates select="/" mode="M821"/>
+      <xsl:apply-templates select="/" mode="M822"/>
+      <xsl:apply-templates select="/" mode="M823"/>
+      <xsl:apply-templates select="/" mode="M824"/>
+      <xsl:apply-templates select="/" mode="M825"/>
+      <xsl:apply-templates select="/" mode="M826"/>
+      <xsl:apply-templates select="/" mode="M827"/>
+      <xsl:apply-templates select="/" mode="M828"/>
+      <xsl:apply-templates select="/" mode="M829"/>
+      <xsl:apply-templates select="/" mode="M830"/>
+      <xsl:apply-templates select="/" mode="M831"/>
+      <xsl:apply-templates select="/" mode="M832"/>
+      <xsl:apply-templates select="/" mode="M833"/>
+      <xsl:apply-templates select="/" mode="M834"/>
+      <xsl:apply-templates select="/" mode="M835"/>
+      <xsl:apply-templates select="/" mode="M836"/>
+      <xsl:apply-templates select="/" mode="M837"/>
+      <xsl:apply-templates select="/" mode="M838"/>
+      <xsl:apply-templates select="/" mode="M839"/>
+      <xsl:apply-templates select="/" mode="M840"/>
+      <xsl:apply-templates select="/" mode="M841"/>
+      <xsl:apply-templates select="/" mode="M842"/>
+      <xsl:apply-templates select="/" mode="M843"/>
+      <xsl:apply-templates select="/" mode="M844"/>
+      <xsl:apply-templates select="/" mode="M845"/>
+      <xsl:apply-templates select="/" mode="M846"/>
+      <xsl:apply-templates select="/" mode="M847"/>
+      <xsl:apply-templates select="/" mode="M848"/>
+      <xsl:apply-templates select="/" mode="M849"/>
+      <xsl:apply-templates select="/" mode="M850"/>
+      <xsl:apply-templates select="/" mode="M851"/>
+      <xsl:apply-templates select="/" mode="M852"/>
+      <xsl:apply-templates select="/" mode="M853"/>
+      <xsl:apply-templates select="/" mode="M854"/>
+      <xsl:apply-templates select="/" mode="M855"/>
+      <xsl:apply-templates select="/" mode="M856"/>
+      <xsl:apply-templates select="/" mode="M857"/>
+      <xsl:apply-templates select="/" mode="M858"/>
+      <xsl:apply-templates select="/" mode="M859"/>
+      <xsl:apply-templates select="/" mode="M860"/>
+      <xsl:apply-templates select="/" mode="M861"/>
+      <xsl:apply-templates select="/" mode="M862"/>
+      <xsl:apply-templates select="/" mode="M863"/>
+      <xsl:apply-templates select="/" mode="M864"/>
+      <xsl:apply-templates select="/" mode="M865"/>
+      <xsl:apply-templates select="/" mode="M866"/>
+      <xsl:apply-templates select="/" mode="M867"/>
+      <xsl:apply-templates select="/" mode="M868"/>
+      <xsl:apply-templates select="/" mode="M869"/>
+      <xsl:apply-templates select="/" mode="M870"/>
+      <xsl:apply-templates select="/" mode="M871"/>
+      <xsl:apply-templates select="/" mode="M872"/>
+      <xsl:apply-templates select="/" mode="M873"/>
+      <xsl:apply-templates select="/" mode="M874"/>
+      <xsl:apply-templates select="/" mode="M875"/>
+      <xsl:apply-templates select="/" mode="M876"/>
+      <xsl:apply-templates select="/" mode="M877"/>
+      <xsl:apply-templates select="/" mode="M878"/>
+      <xsl:apply-templates select="/" mode="M879"/>
+      <xsl:apply-templates select="/" mode="M880"/>
+      <xsl:apply-templates select="/" mode="M881"/>
+      <xsl:apply-templates select="/" mode="M882"/>
+      <xsl:apply-templates select="/" mode="M883"/>
+      <xsl:apply-templates select="/" mode="M884"/>
+      <xsl:apply-templates select="/" mode="M885"/>
+      <xsl:apply-templates select="/" mode="M886"/>
+      <xsl:apply-templates select="/" mode="M887"/>
+      <xsl:apply-templates select="/" mode="M888"/>
+      <xsl:apply-templates select="/" mode="M889"/>
+      <xsl:apply-templates select="/" mode="M890"/>
+      <xsl:apply-templates select="/" mode="M891"/>
+      <xsl:apply-templates select="/" mode="M892"/>
+      <xsl:apply-templates select="/" mode="M893"/>
+      <xsl:apply-templates select="/" mode="M894"/>
+      <xsl:apply-templates select="/" mode="M895"/>
+      <xsl:apply-templates select="/" mode="M896"/>
+      <xsl:apply-templates select="/" mode="M897"/>
+      <xsl:apply-templates select="/" mode="M898"/>
+      <xsl:apply-templates select="/" mode="M899"/>
+      <xsl:apply-templates select="/" mode="M900"/>
+      <xsl:apply-templates select="/" mode="M901"/>
+      <xsl:apply-templates select="/" mode="M902"/>
+      <xsl:apply-templates select="/" mode="M903"/>
+      <xsl:apply-templates select="/" mode="M904"/>
+      <xsl:apply-templates select="/" mode="M905"/>
+      <xsl:apply-templates select="/" mode="M906"/>
+      <xsl:apply-templates select="/" mode="M907"/>
+      <xsl:apply-templates select="/" mode="M908"/>
+      <xsl:apply-templates select="/" mode="M909"/>
+      <xsl:apply-templates select="/" mode="M910"/>
+      <xsl:apply-templates select="/" mode="M911"/>
+   </xsl:template>
+
+   <!--SCHEMATRON PATTERNS-->
+
+
+<!--PATTERN empty_def_doc-->
+
+
+	<!--RULE -->
+<xsl:template match="oval-def:oval_definitions" priority="4000" mode="M17">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="oval-def:definitions or oval-def:tests or oval-def:objects or oval-def:states or oval-def:variables"/>
+         <xsl:otherwise>A valid OVAL Definition document must contain at least one definitions, tests, objects, states, or variables element. The optional definitions, tests, objects, states, and variables sections define the specific characteristics that should be evaluated on a system to determine the truth values of the OVAL Definition Document. To be valid though, at least one definitions, tests, objects, states, or variables element must be present.<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M17"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M17"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M17">
+      <xsl:apply-templates select="@*|node()" mode="M17"/>
+   </xsl:template>
+
+   <!--PATTERN required_criteria-->
+
+
+	<!--RULE -->
+<xsl:template match="/oval-def:oval_definitions/oval-def:definitions/oval-def:definition[@deprecated='false' or not(@deprecated)]"
+                 priority="4000"
+                 mode="M18">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="oval-def:criteria"/>
+         <xsl:otherwise>A valid OVAL Definition document must contain a criteria unless the definition is a deprecated definition.<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M18"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M18"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M18">
+      <xsl:apply-templates select="@*|node()" mode="M18"/>
+   </xsl:template>
+
+   <!--PATTERN test_type-->
+
+
+	<!--RULE -->
+<xsl:template match="/oval-def:oval_definitions/oval-def:tests/*[@check_existence='none_exist']"
+                 priority="4000"
+                 mode="M19">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(*[name()='state'])"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="@id"/>
+            <xsl:text/> - No state should be referenced when check_existence has a value of 'none_exist'.<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M19"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M19"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M19">
+      <xsl:apply-templates select="@*|node()" mode="M19"/>
+   </xsl:template>
+
+   <!--PATTERN setobjref-->
+
+
+	<!--RULE -->
+<xsl:template match="/oval-def:oval_definitions/oval-def:objects/*/oval-def:set/oval-def:object_reference"
+                 priority="4000"
+                 mode="M20">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="name(./../..) = name(/oval-def:oval_definitions/oval-def:objects/*[@id=current()])"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../../@id"/>
+            <xsl:text/> - Each object referenced by the set must be of the same type as parent object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M20"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="/oval-def:oval_definitions/oval-def:objects/*/oval-def:set/oval-def:set/oval-def:object_reference"
+                 priority="3999"
+                 mode="M20">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="name(./../../..) = name(/oval-def:oval_definitions/oval-def:objects/*[@id=current()])"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../../../@id"/>
+            <xsl:text/> - Each object referenced by the set must be of the same type as parent object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M20"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="/oval-def:oval_definitions/oval-def:objects/*/oval-def:set/oval-def:set/oval-def:set/oval-def:object_reference"
+                 priority="3998"
+                 mode="M20">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="name(./../../../..) = name(/oval-def:oval_definitions/oval-def:objects/*[@id=current()])"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../../../../@id"/>
+            <xsl:text/> - Each object referenced by the set must be of the same type as parent object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M20"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M20"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M20">
+      <xsl:apply-templates select="@*|node()" mode="M20"/>
+   </xsl:template>
+
+   <!--PATTERN value-->
+
+
+	<!--RULE -->
+<xsl:template match="oval-def:constant_variable/oval-def:value" priority="4000" mode="M21">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test=".!=''"/>
+         <xsl:otherwise>The value element of the constant_variable <xsl:text/>
+            <xsl:value-of select="../../@id"/>
+            <xsl:text/> can not be empty.<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M21"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M21"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M21">
+      <xsl:apply-templates select="@*|node()" mode="M21"/>
+   </xsl:template>
+
+   <!--PATTERN literal_component-->
+
+
+	<!--RULE -->
+<xsl:template match="oval-def:literal_component" priority="4000" mode="M22">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test=".!=''"/>
+         <xsl:otherwise>The literal_component of variable <xsl:text/>
+            <xsl:value-of select="../../@id"/>
+            <xsl:text/> can not be empty.<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M22"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M22"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M22">
+      <xsl:apply-templates select="@*|node()" mode="M22"/>
+   </xsl:template>
+
+   <!--PATTERN item_field-->
+
+
+	<!--RULE -->
+<xsl:template match="oval-def:object_component" priority="4000" mode="M23">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@item_field!=''"/>
+         <xsl:otherwise>The item_field attribute of an object_component of variable <xsl:text/>
+            <xsl:value-of select="../../@id"/>
+            <xsl:text/> can not be empty.<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M23"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M23"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M23">
+      <xsl:apply-templates select="@*|node()" mode="M23"/>
+   </xsl:template>
+
+   <!--PATTERN entityrules-->
+
+
+	<!--RULE -->
+<xsl:template match="oval-def:objects/*/*|oval-def:states/*/*" priority="4000" mode="M24">
+      <xsl:variable name="var_ref" select="@var_ref"/>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="((not(@datatype) and (not(@operation) or @operation='equals' or @operation='not equal' or @operation='case insensitive equals' or @operation='case insensitive not equal' or @operation='pattern match')) or (@datatype='binary' and (not(@operation) or @operation='equals' or @operation='not equal')) or (@datatype='boolean' and (not(@operation) or @operation='equals' or @operation='not equal')) or (@datatype='evr_string' and (not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal')) or (@datatype='fileset_revision' and (not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal')) or (@datatype='float' and (not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal')) or (@datatype='ios_version' and (not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal')) or (@datatype='int' and (not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal' or @operation='bitwise and' or @operation='bitwise or')) or (@datatype='string' and (not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match')) or (@datatype='version' and (not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal')))"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the supplied operation attribute for the <xsl:text/>
+            <xsl:value-of select="name()"/>
+            <xsl:text/> entity is not valid given a datatype of '<xsl:text/>
+            <xsl:value-of select="@datatype"/>
+            <xsl:text/>'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@var_ref) or .=''"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - a var-ref has been supplied for the <xsl:text/>
+            <xsl:value-of select="name()"/>
+            <xsl:text/> entity so no value should be provided<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="if (@var_ref) then (if (@datatype) then (@datatype=/oval-def:oval_definitions/oval-def:variables/*[@id=$var_ref]/@datatype) else ('string' = /oval-def:oval_definitions/oval-def:variables/*[@id=$var_ref]/@datatype)) else (1=1)"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="$var_ref"/>
+            <xsl:text/> - inconsistent datatype between the variable and an associated var_ref<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M24"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M24"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M24">
+      <xsl:apply-templates select="@*|node()" mode="M24"/>
+   </xsl:template>
+
+   <!--PATTERN famtst-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:family_test/ind-def:object" priority="4000" mode="M25">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ind-def:family_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a family_test must reference a family_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M25"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="ind-def:family_test/ind-def:state" priority="3999" mode="M25">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/ind-def:family_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a family_test must reference a family_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M25"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M25"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M25">
+      <xsl:apply-templates select="@*|node()" mode="M25"/>
+   </xsl:template>
+
+   <!--PATTERN famstefamily-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:family_state/ind-def:family" priority="4000" mode="M26">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the family entity of a family_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M26"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M26"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M26">
+      <xsl:apply-templates select="@*|node()" mode="M26"/>
+   </xsl:template>
+
+   <!--PATTERN md5tst-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:filemd5_test/ind-def:object" priority="4000" mode="M27">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ind-def:filemd5_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a filemd5_test must reference a filemd5_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M27"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="ind-def:filemd5_test/ind-def:state" priority="3999" mode="M27">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/ind-def:filemd5_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a filemd5_test must reference a filemd5_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M27"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M27"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M27">
+      <xsl:apply-templates select="@*|node()" mode="M27"/>
+   </xsl:template>
+
+   <!--PATTERN md5objpath-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:filemd5_object/ind-def:path" priority="4000" mode="M28">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a filemd5_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M28"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M28"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M28">
+      <xsl:apply-templates select="@*|node()" mode="M28"/>
+   </xsl:template>
+
+   <!--PATTERN md5objfilename-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:filemd5_object/ind-def:filename" priority="4000" mode="M29">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filename entity of a filemd5_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M29"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M29"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M29">
+      <xsl:apply-templates select="@*|node()" mode="M29"/>
+   </xsl:template>
+
+   <!--PATTERN md5stepath-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:filemd5_state/ind-def:path" priority="4000" mode="M30">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a filemd5_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M30"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M30"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M30">
+      <xsl:apply-templates select="@*|node()" mode="M30"/>
+   </xsl:template>
+
+   <!--PATTERN md5stefilename-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:filemd5_state/ind-def:filename" priority="4000" mode="M31">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filename entity of a filemd5_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M31"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M31"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M31">
+      <xsl:apply-templates select="@*|node()" mode="M31"/>
+   </xsl:template>
+
+   <!--PATTERN md5stemd5-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:filemd5_state/ind-def:md5" priority="4000" mode="M32">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the md5 entity of a filemd5_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M32"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M32"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M32">
+      <xsl:apply-templates select="@*|node()" mode="M32"/>
+   </xsl:template>
+
+   <!--PATTERN hashtst-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:filehash_test/ind-def:object" priority="4000" mode="M33">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ind-def:filehash_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a filehash_test must reference a filesha1_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M33"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="ind-def:filehash_test/ind-def:state" priority="3999" mode="M33">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/ind-def:filehash_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a filehash_test must reference a filesha1_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M33"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M33"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M33">
+      <xsl:apply-templates select="@*|node()" mode="M33"/>
+   </xsl:template>
+
+   <!--PATTERN hashobjpath-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:filehash_object/ind-def:path" priority="4000" mode="M34">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a filehash_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M34"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M34"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M34">
+      <xsl:apply-templates select="@*|node()" mode="M34"/>
+   </xsl:template>
+
+   <!--PATTERN hashobjfilename-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:filehash_object/ind-def:filename" priority="4000" mode="M35">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filename entity of a filehash_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M35"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M35"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M35">
+      <xsl:apply-templates select="@*|node()" mode="M35"/>
+   </xsl:template>
+
+   <!--PATTERN hashstepath-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:filehash_state/ind-def:path" priority="4000" mode="M36">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a filehash_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M36"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M36"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M36">
+      <xsl:apply-templates select="@*|node()" mode="M36"/>
+   </xsl:template>
+
+   <!--PATTERN hashstefilename-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:filehash_state/ind-def:filename" priority="4000" mode="M37">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filename entity of a filehash_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M37"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M37"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M37">
+      <xsl:apply-templates select="@*|node()" mode="M37"/>
+   </xsl:template>
+
+   <!--PATTERN hashstemd5-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:filehash_state/ind-def:md5" priority="4000" mode="M38">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the md5 entity of a filehash_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M38"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M38"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M38">
+      <xsl:apply-templates select="@*|node()" mode="M38"/>
+   </xsl:template>
+
+   <!--PATTERN hashstesha1-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:filehash_state/ind-def:sha1" priority="4000" mode="M39">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the sha1 entity of a filehash_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M39"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M39"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M39">
+      <xsl:apply-templates select="@*|node()" mode="M39"/>
+   </xsl:template>
+
+   <!--PATTERN envtst-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:environmentvariable_test/ind-def:object" priority="4000"
+                 mode="M40">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ind-def:environmentvariable_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of an environmentvariable_test must reference a environmentvariable_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M40"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="ind-def:environmentvariable_test/ind-def:state" priority="3999"
+                 mode="M40">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/ind-def:environmentvariable_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of an environmentvariable_test must reference a environmentvariable_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M40"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M40"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M40">
+      <xsl:apply-templates select="@*|node()" mode="M40"/>
+   </xsl:template>
+
+   <!--PATTERN envobjname-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:environmentvariable_object/ind-def:name" priority="4000"
+                 mode="M41">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the name entity of an environmentvariable_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M41"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M41"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M41">
+      <xsl:apply-templates select="@*|node()" mode="M41"/>
+   </xsl:template>
+
+   <!--PATTERN envstename-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:environmentvariable_state/ind-def:name" priority="4000"
+                 mode="M42">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the name entity of an environmentvariable_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M42"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M42"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M42">
+      <xsl:apply-templates select="@*|node()" mode="M42"/>
+   </xsl:template>
+
+   <!--PATTERN envstevalue-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:environmentvariable_state/ind-def:value" priority="4000"
+                 mode="M43">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - The datatype has been set to 'int' but the value is not an integer.<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M43"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M43"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M43">
+      <xsl:apply-templates select="@*|node()" mode="M43"/>
+   </xsl:template>
+
+   <!--PATTERN sqltst-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:sql_test/ind-def:object" priority="4000" mode="M44">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ind-def:sql_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a sql_test must reference a sql_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M44"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="ind-def:sql_test/ind-def:state" priority="3999" mode="M44">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/ind-def:sql_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a sql_test must reference a sql_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M44"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M44"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M44">
+      <xsl:apply-templates select="@*|node()" mode="M44"/>
+   </xsl:template>
+
+   <!--PATTERN sqlobjdengine-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:sql_object/ind-def:engine" priority="4000" mode="M45">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the engine entity of an sql_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M45"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M45"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M45">
+      <xsl:apply-templates select="@*|node()" mode="M45"/>
+   </xsl:template>
+
+   <!--PATTERN sqlobjversion-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:sql_object/ind-def:version" priority="4000" mode="M46">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the version entity of an sql_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M46"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M46"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M46">
+      <xsl:apply-templates select="@*|node()" mode="M46"/>
+   </xsl:template>
+
+   <!--PATTERN sqlobjconnection_string-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:sql_object/ind-def:connection_string" priority="4000" mode="M47">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the connection_string entity of an sql_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M47"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M47"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M47">
+      <xsl:apply-templates select="@*|node()" mode="M47"/>
+   </xsl:template>
+
+   <!--PATTERN sqlobjsql-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:sql_object/ind-def:sql" priority="4000" mode="M48">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the sql entity of a sql_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M48"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M48"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M48">
+      <xsl:apply-templates select="@*|node()" mode="M48"/>
+   </xsl:template>
+
+   <!--PATTERN sqlsteengine-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:sql_state/ind-def:engine" priority="4000" mode="M49">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the engine entity of an sql_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M49"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M49"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M49">
+      <xsl:apply-templates select="@*|node()" mode="M49"/>
+   </xsl:template>
+
+   <!--PATTERN sqlsteversion-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:sql_state/ind-def:version" priority="4000" mode="M50">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the version entity of an sql_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M50"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M50"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M50">
+      <xsl:apply-templates select="@*|node()" mode="M50"/>
+   </xsl:template>
+
+   <!--PATTERN sqlsteconnection_string-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:sql_state/ind-def:connection_string" priority="4000" mode="M51">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the connection_string entity of an sql_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M51"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M51"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M51">
+      <xsl:apply-templates select="@*|node()" mode="M51"/>
+   </xsl:template>
+
+   <!--PATTERN sqlstesql-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:sql_state/ind-def:sql" priority="4000" mode="M52">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the sql entity of a sql_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M52"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M52"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M52">
+      <xsl:apply-templates select="@*|node()" mode="M52"/>
+   </xsl:template>
+
+   <!--PATTERN sqlsteresult-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:sql_state/ind-def:result" priority="4000" mode="M53">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - The datatype has been set to 'int' but the value is not an integer.<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M53"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M53"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M53">
+      <xsl:apply-templates select="@*|node()" mode="M53"/>
+   </xsl:template>
+
+   <!--PATTERN txt54tst-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:textfilecontent54_test/ind-def:object" priority="4000"
+                 mode="M54">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ind-def:textfilecontent54_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a textfilecontent54_test must reference a textfilecontent54_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M54"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="ind-def:textfilecontent54_test/ind-def:state" priority="3999" mode="M54">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/ind-def:textfilecontent54_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a textfilecontent54_test must reference a textfilecontent54_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M54"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M54"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M54">
+      <xsl:apply-templates select="@*|node()" mode="M54"/>
+   </xsl:template>
+
+   <!--PATTERN txt54objpath-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:textfilecontent54_object/ind-def:path" priority="4000"
+                 mode="M55">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a textfilecontent54_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M55"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M55"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M55">
+      <xsl:apply-templates select="@*|node()" mode="M55"/>
+   </xsl:template>
+
+   <!--PATTERN txt54objfilename-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:textfilecontent54_object/ind-def:filename" priority="4000"
+                 mode="M56">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filename entity of a textfilecontent54_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M56"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M56"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M56">
+      <xsl:apply-templates select="@*|node()" mode="M56"/>
+   </xsl:template>
+
+   <!--PATTERN txt54objpattern-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:textfilecontent54_object/ind-def:pattern" priority="4000"
+                 mode="M57">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the pattern entity of a textfilecontent54_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M57"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M57"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M57">
+      <xsl:apply-templates select="@*|node()" mode="M57"/>
+   </xsl:template>
+
+   <!--PATTERN txt54objinstance-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:textfilecontent54_object/ind-def:instance" priority="4000"
+                 mode="M58">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the instance entity of a textfilecontent54_object should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M58"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M58"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M58">
+      <xsl:apply-templates select="@*|node()" mode="M58"/>
+   </xsl:template>
+
+   <!--PATTERN txt54stepath-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:textfilecontent54_state/ind-def:path" priority="4000" mode="M59">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a textfilecontent_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M59"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M59"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M59">
+      <xsl:apply-templates select="@*|node()" mode="M59"/>
+   </xsl:template>
+
+   <!--PATTERN txt54stefilename-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:textfilecontent54_state/ind-def:filename" priority="4000"
+                 mode="M60">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filename entity of a textfilecontent54_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M60"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M60"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M60">
+      <xsl:apply-templates select="@*|node()" mode="M60"/>
+   </xsl:template>
+
+   <!--PATTERN txt54stepattern-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:textfilecontent54_state/ind-def:pattern" priority="4000"
+                 mode="M61">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the pattern entity of a textfilecontent54_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M61"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M61"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M61">
+      <xsl:apply-templates select="@*|node()" mode="M61"/>
+   </xsl:template>
+
+   <!--PATTERN txt54steinstance-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:textfilecontent54_state/ind-def:instance" priority="4000"
+                 mode="M62">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the instance entity of a textfilecontent54_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M62"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M62"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M62">
+      <xsl:apply-templates select="@*|node()" mode="M62"/>
+   </xsl:template>
+
+   <!--PATTERN txt54stesubexpression-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:textfilecontent54_state/ind-def:subexpression" priority="4000"
+                 mode="M63">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - The datatype has been set to 'int' but the value is not an integer.<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M63"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M63"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M63">
+      <xsl:apply-templates select="@*|node()" mode="M63"/>
+   </xsl:template>
+
+   <!--PATTERN txttst-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:textfilecontent_test/ind-def:object" priority="4000" mode="M64">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ind-def:textfilecontent_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a textfilecontent_test must reference a textfilecontent_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M64"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="ind-def:textfilecontent_test/ind-def:state" priority="3999" mode="M64">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/ind-def:textfilecontent_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a textfilecontent_test must reference a textfilecontent_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M64"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M64"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M64">
+      <xsl:apply-templates select="@*|node()" mode="M64"/>
+   </xsl:template>
+
+   <!--PATTERN txtobjpath-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:textfilecontent_object/ind-def:path" priority="4000" mode="M65">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a textfilecontent_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M65"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M65"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M65">
+      <xsl:apply-templates select="@*|node()" mode="M65"/>
+   </xsl:template>
+
+   <!--PATTERN txtobjfilename-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:textfilecontent_object/ind-def:filename" priority="4000"
+                 mode="M66">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filename entity of a textfilecontent_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M66"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M66"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M66">
+      <xsl:apply-templates select="@*|node()" mode="M66"/>
+   </xsl:template>
+
+   <!--PATTERN txtobjline-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:textfilecontent_object/ind-def:line" priority="4000" mode="M67">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the line entity of a textfilecontent_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M67"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M67"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M67">
+      <xsl:apply-templates select="@*|node()" mode="M67"/>
+   </xsl:template>
+
+   <!--PATTERN txtstepath-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:textfilecontent_state/ind-def:path" priority="4000" mode="M68">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a textfilecontent_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M68"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M68"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M68">
+      <xsl:apply-templates select="@*|node()" mode="M68"/>
+   </xsl:template>
+
+   <!--PATTERN txtstefilename-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:textfilecontent_state/ind-def:filename" priority="4000"
+                 mode="M69">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filename entity of a textfilecontent_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M69"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M69"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M69">
+      <xsl:apply-templates select="@*|node()" mode="M69"/>
+   </xsl:template>
+
+   <!--PATTERN txtsteline-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:textfilecontent_state/ind-def:line" priority="4000" mode="M70">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the line entity of a textfilecontent_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M70"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M70"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M70">
+      <xsl:apply-templates select="@*|node()" mode="M70"/>
+   </xsl:template>
+
+   <!--PATTERN txtstesubexpression-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:textfilecontent_state/ind-def:subexpression" priority="4000"
+                 mode="M71">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - The datatype has been set to 'int' but the value is not an integer.<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M71"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M71"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M71">
+      <xsl:apply-templates select="@*|node()" mode="M71"/>
+   </xsl:template>
+
+   <!--PATTERN vattst-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:variable_test/ind-def:object" priority="4000" mode="M72">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ind-def:variable_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a variable_test must reference a variable_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M72"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="ind-def:variable_test/ind-def:state" priority="3999" mode="M72">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/ind-def:variable_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a variable_test must reference a variable_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M72"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M72"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M72">
+      <xsl:apply-templates select="@*|node()" mode="M72"/>
+   </xsl:template>
+
+   <!--PATTERN varobjvar_ref-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:variable_object/ind-def:var_ref" priority="4000" mode="M73">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the var_ref entity of a variable_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M73"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M73"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M73">
+      <xsl:apply-templates select="@*|node()" mode="M73"/>
+   </xsl:template>
+
+   <!--PATTERN varstevar_ref-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:variable_state/ind-def:var_ref" priority="4000" mode="M74">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the var_ref entity of a variable_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M74"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M74"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M74">
+      <xsl:apply-templates select="@*|node()" mode="M74"/>
+   </xsl:template>
+
+   <!--PATTERN varstevalue-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:variable_state/ind-def:value" priority="4000" mode="M75">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - The datatype has been set to 'int' but the value is not an integer.<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M75"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M75"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M75">
+      <xsl:apply-templates select="@*|node()" mode="M75"/>
+   </xsl:template>
+
+   <!--PATTERN xmltst-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:xmlfilecontent_test/ind-def:object" priority="4000" mode="M76">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ind-def:xmlfilecontent_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a xmlfilecontent_test must reference a xmlfilecontent_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M76"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="ind-def:xmlfilecontent_test/ind-def:state" priority="3999" mode="M76">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/ind-def:xmlfilecontent_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a xmlfilecontent_test must reference a xmlfilecontent_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M76"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M76"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M76">
+      <xsl:apply-templates select="@*|node()" mode="M76"/>
+   </xsl:template>
+
+   <!--PATTERN xmlobjpath-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:xmlfilecontent_object/ind-def:path" priority="4000" mode="M77">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a xmlfilecontent_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M77"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M77"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M77">
+      <xsl:apply-templates select="@*|node()" mode="M77"/>
+   </xsl:template>
+
+   <!--PATTERN xmlobjfilename-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:xmlfilecontent_object/ind-def:filename" priority="4000"
+                 mode="M78">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filename entity of a xmlfilecontent_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M78"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M78"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M78">
+      <xsl:apply-templates select="@*|node()" mode="M78"/>
+   </xsl:template>
+
+   <!--PATTERN xmlobjxpath-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:xmlfilecontent_object/ind-def:xpath" priority="4000" mode="M79">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the xpath entity of a xmlfilecontent_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M79"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M79"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M79">
+      <xsl:apply-templates select="@*|node()" mode="M79"/>
+   </xsl:template>
+
+   <!--PATTERN xmlstepath-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:xmlfilecontent_state/ind-def:path" priority="4000" mode="M80">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a xmlfilecontent_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M80"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M80"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M80">
+      <xsl:apply-templates select="@*|node()" mode="M80"/>
+   </xsl:template>
+
+   <!--PATTERN xmlstefilename-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:xmlfilecontent_state/ind-def:filename" priority="4000"
+                 mode="M81">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filename entity of a xmlfilecontent_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M81"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M81"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M81">
+      <xsl:apply-templates select="@*|node()" mode="M81"/>
+   </xsl:template>
+
+   <!--PATTERN xmlstexpath-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:xmlfilecontent_state/ind-def:xpath" priority="4000" mode="M82">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the xpath entity of a xmlfilecontent_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M82"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M82"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M82">
+      <xsl:apply-templates select="@*|node()" mode="M82"/>
+   </xsl:template>
+
+   <!--PATTERN xmlstevalue_of-->
+
+
+	<!--RULE -->
+<xsl:template match="ind-def:xmlfilecontent_state/ind-def:value_of" priority="4000"
+                 mode="M83">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the value_of entity of a xmlfilecontent_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M83"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M83"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M83">
+      <xsl:apply-templates select="@*|node()" mode="M83"/>
+   </xsl:template>
+
+   <!--PATTERN filesetobjflstinst-->
+
+
+	<!--RULE -->
+<xsl:template match="aix-def:fileset_object/aix-def:flstinst" priority="4000" mode="M84">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the flstinst entity of a fileset_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M84"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M84"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M84">
+      <xsl:apply-templates select="@*|node()" mode="M84"/>
+   </xsl:template>
+
+   <!--PATTERN filesetsteflstinst-->
+
+
+	<!--RULE -->
+<xsl:template match="aix-def:fileset_state/aix-def:flstinst" priority="4000" mode="M85">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the flstinst entity of a fileset_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M85"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M85"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M85">
+      <xsl:apply-templates select="@*|node()" mode="M85"/>
+   </xsl:template>
+
+   <!--PATTERN filesetstelevel-->
+
+
+	<!--RULE -->
+<xsl:template match="aix-def:fileset_state/aix-def:level" priority="4000" mode="M86">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='version'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the level entity of a fileset_state should be 'version'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M86"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M86"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M86">
+      <xsl:apply-templates select="@*|node()" mode="M86"/>
+   </xsl:template>
+
+   <!--PATTERN filesetstestate-->
+
+
+	<!--RULE -->
+<xsl:template match="aix-def:fileset_state/aix-def:state" priority="4000" mode="M87">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the state entity of a fileset_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M87"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M87"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M87">
+      <xsl:apply-templates select="@*|node()" mode="M87"/>
+   </xsl:template>
+
+   <!--PATTERN filesetstedescription-->
+
+
+	<!--RULE -->
+<xsl:template match="aix-def:fileset_state/aix-def:description" priority="4000" mode="M88">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the description entity of a fileset_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M88"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M88"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M88">
+      <xsl:apply-templates select="@*|node()" mode="M88"/>
+   </xsl:template>
+
+   <!--PATTERN fixobjapar_number-->
+
+
+	<!--RULE -->
+<xsl:template match="aix-def:fix_object/aix-def:apar_number" priority="4000" mode="M89">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the apar_number entity of a fix_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M89"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M89"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M89">
+      <xsl:apply-templates select="@*|node()" mode="M89"/>
+   </xsl:template>
+
+   <!--PATTERN fixsteapar_number-->
+
+
+	<!--RULE -->
+<xsl:template match="aix-def:fix_state/aix-def:apar_number" priority="4000" mode="M90">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the apar_number entity of a fix_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M90"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M90"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M90">
+      <xsl:apply-templates select="@*|node()" mode="M90"/>
+   </xsl:template>
+
+   <!--PATTERN fixsteabstract-->
+
+
+	<!--RULE -->
+<xsl:template match="aix-def:fix_state/aix-def:abstract" priority="4000" mode="M91">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the abstract entity of a fix_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M91"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M91"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M91">
+      <xsl:apply-templates select="@*|node()" mode="M91"/>
+   </xsl:template>
+
+   <!--PATTERN fixstesymptom-->
+
+
+	<!--RULE -->
+<xsl:template match="aix-def:fix_state/aix-def:symptom" priority="4000" mode="M92">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the symptom entity of a fix_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M92"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M92"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M92">
+      <xsl:apply-templates select="@*|node()" mode="M92"/>
+   </xsl:template>
+
+   <!--PATTERN fixsteinstallation_status-->
+
+
+	<!--RULE -->
+<xsl:template match="aix-def:fix_state/aix-def:installation_status" priority="4000"
+                 mode="M93">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the installation_status entity of a fix_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M93"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M93"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M93">
+      <xsl:apply-templates select="@*|node()" mode="M93"/>
+   </xsl:template>
+
+   <!--PATTERN oslevelstemaintenance_level-->
+
+
+	<!--RULE -->
+<xsl:template match="aix-def:oslevel_state/aix-def:maintenance_level" priority="4000"
+                 mode="M94">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='version'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the maintenance_level entity of an oslevel_state should be 'version'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M94"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M94"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M94">
+      <xsl:apply-templates select="@*|node()" mode="M94"/>
+   </xsl:template>
+
+   <!--PATTERN httpdtst-->
+
+
+	<!--RULE -->
+<xsl:template match="apache-def:httpd_test/apache-def:object" priority="4000" mode="M95">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/apache-def:httpd_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a httpd_test must reference a httpd_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M95"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="apache-def:httpd_test/apache-def:state" priority="3999" mode="M95">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/apache-def:httpd_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a httpd_test must reference a httpd_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M95"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M95"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M95">
+      <xsl:apply-templates select="@*|node()" mode="M95"/>
+   </xsl:template>
+
+   <!--PATTERN httpdstepath-->
+
+
+	<!--RULE -->
+<xsl:template match="apache-def:httpd_state/apache-def:path" priority="4000" mode="M96">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a httpd_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M96"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M96"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M96">
+      <xsl:apply-templates select="@*|node()" mode="M96"/>
+   </xsl:template>
+
+   <!--PATTERN httpdstebinaryname-->
+
+
+	<!--RULE -->
+<xsl:template match="apache-def:httpd_state/apache-def:binary_name" priority="4000"
+                 mode="M97">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the binary_name entity of a httpd_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M97"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M97"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M97">
+      <xsl:apply-templates select="@*|node()" mode="M97"/>
+   </xsl:template>
+
+   <!--PATTERN httpdsteversion-->
+
+
+	<!--RULE -->
+<xsl:template match="apache-def:httpd_state/apache-def:version" priority="4000" mode="M98">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='version'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the version entity of a httpd_state should be 'version'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M98"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M98"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M98">
+      <xsl:apply-templates select="@*|node()" mode="M98"/>
+   </xsl:template>
+
+   <!--PATTERN apachevertst-->
+
+
+	<!--RULE -->
+<xsl:template match="apache-def:version_test/apache-def:object" priority="4000" mode="M99">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/apache-def:version_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a version_test must reference a version_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M99"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="apache-def:version_test/apache-def:state" priority="3999" mode="M99">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/apache-def:version_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a version_test must reference a version_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M99"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M99"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M99">
+      <xsl:apply-templates select="@*|node()" mode="M99"/>
+   </xsl:template>
+
+   <!--PATTERN apcheversteversion-->
+
+
+	<!--RULE -->
+<xsl:template match="apache-def:version_state/apache-def:version" priority="4000" mode="M100">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='version'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the version entity of an version_state should be 'version'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M100"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M100"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M100">
+      <xsl:apply-templates select="@*|node()" mode="M100"/>
+   </xsl:template>
+
+   <!--PATTERN catosmoduletst-->
+
+
+	<!--RULE -->
+<xsl:template match="catos-def:module_test/catos-def:object" priority="4000" mode="M101">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/catos-def:module_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a module_test must reference a module_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M101"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="catos-def:module_test/catos-def:state" priority="3999" mode="M101">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/catos-def:module_number/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a module_test must reference a module_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M101"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M101"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M101">
+      <xsl:apply-templates select="@*|node()" mode="M101"/>
+   </xsl:template>
+
+   <!--PATTERN moduleobjmodule_number-->
+
+
+	<!--RULE -->
+<xsl:template match="catos-def:module_object/catos-def:module_number" priority="4000"
+                 mode="M102">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the module_number entity of a module_object should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the module_number entity of a module_object should be 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', or 'less than or equal'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M102"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M102"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M102">
+      <xsl:apply-templates select="@*|node()" mode="M102"/>
+   </xsl:template>
+
+   <!--PATTERN catosmodulestemodule_number-->
+
+
+	<!--RULE -->
+<xsl:template match="catos-def:module_state/catos-def:module_number" priority="4000"
+                 mode="M103">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the module_number entity of a module_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M103"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M103"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M103">
+      <xsl:apply-templates select="@*|node()" mode="M103"/>
+   </xsl:template>
+
+   <!--PATTERN catosmodulestetype-->
+
+
+	<!--RULE -->
+<xsl:template match="catos-def:module_state/catos-def:type" priority="4000" mode="M104">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the type entity of a module_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M104"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M104"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M104">
+      <xsl:apply-templates select="@*|node()" mode="M104"/>
+   </xsl:template>
+
+   <!--PATTERN catosmodulestemodel-->
+
+
+	<!--RULE -->
+<xsl:template match="catos-def:module_state/catos-def:model" priority="4000" mode="M105">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the model entity of a module_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M105"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M105"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M105">
+      <xsl:apply-templates select="@*|node()" mode="M105"/>
+   </xsl:template>
+
+   <!--PATTERN catosmodulestesoftware_major_release-->
+
+
+	<!--RULE -->
+<xsl:template match="catos-def:module_state/catos-def:software_major_release" priority="4000"
+                 mode="M106">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='version'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the software_major_release entity of a module_state should be 'version'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M106"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M106"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M106">
+      <xsl:apply-templates select="@*|node()" mode="M106"/>
+   </xsl:template>
+
+   <!--PATTERN catosmodulestesoftware_individual_release-->
+
+
+	<!--RULE -->
+<xsl:template match="catos-def:module_state/catos-def:software_individual_release"
+                 priority="4000"
+                 mode="M107">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the software_individual_release entity of a module_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M107"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M107"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M107">
+      <xsl:apply-templates select="@*|node()" mode="M107"/>
+   </xsl:template>
+
+   <!--PATTERN catosmodulestesoftware_version_id-->
+
+
+	<!--RULE -->
+<xsl:template match="catos-def:module_state/catos-def:software_version_id" priority="4000"
+                 mode="M108">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the software_version_id entity of a module_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M108"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M108"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M108">
+      <xsl:apply-templates select="@*|node()" mode="M108"/>
+   </xsl:template>
+
+   <!--PATTERN catosmodulestehardware_major_release-->
+
+
+	<!--RULE -->
+<xsl:template match="catos-def:module_state/catos-def:hardware_major_release" priority="4000"
+                 mode="M109">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='version'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the hardware_major_release entity of a module_state should be 'version'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M109"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M109"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M109">
+      <xsl:apply-templates select="@*|node()" mode="M109"/>
+   </xsl:template>
+
+   <!--PATTERN catosmodulestehardware_individual_release-->
+
+
+	<!--RULE -->
+<xsl:template match="catos-def:module_state/catos-def:hardware_individual_release"
+                 priority="4000"
+                 mode="M110">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the hardware_individual_release entity of a module_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M110"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M110"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M110">
+      <xsl:apply-templates select="@*|node()" mode="M110"/>
+   </xsl:template>
+
+   <!--PATTERN catosmodulestefirmware_major_release-->
+
+
+	<!--RULE -->
+<xsl:template match="catos-def:module_state/catos-def:firmware_major_release" priority="4000"
+                 mode="M111">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='version'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the firmware_major_release entity of a module_state should be 'version'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M111"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M111"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M111">
+      <xsl:apply-templates select="@*|node()" mode="M111"/>
+   </xsl:template>
+
+   <!--PATTERN catosmodulestefirmware_individual_release-->
+
+
+	<!--RULE -->
+<xsl:template match="catos-def:module_state/catos-def:firmware_individual_release"
+                 priority="4000"
+                 mode="M112">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the firmware_individual_release entity of a module_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M112"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M112"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M112">
+      <xsl:apply-templates select="@*|node()" mode="M112"/>
+   </xsl:template>
+
+   <!--PATTERN catosverstedevice_series-->
+
+
+	<!--RULE -->
+<xsl:template match="catos-def:version_state/catos-def:swtich_series" priority="4000"
+                 mode="M113">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the swtich_series entity of a version_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M113"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M113"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M113">
+      <xsl:apply-templates select="@*|node()" mode="M113"/>
+   </xsl:template>
+
+   <!--PATTERN catosversteimage_name-->
+
+
+	<!--RULE -->
+<xsl:template match="catos-def:version_state/catos-def:image_name" priority="4000"
+                 mode="M114">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the image_name entity of a version_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M114"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M114"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M114">
+      <xsl:apply-templates select="@*|node()" mode="M114"/>
+   </xsl:template>
+
+   <!--PATTERN catosverstecatos_major_release-->
+
+
+	<!--RULE -->
+<xsl:template match="catos-def:version_state/catos-def:catos_major_release" priority="4000"
+                 mode="M115">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='version'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the catos_major_release entity of a version_state should be 'version'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M115"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M115"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M115">
+      <xsl:apply-templates select="@*|node()" mode="M115"/>
+   </xsl:template>
+
+   <!--PATTERN catosverstecatos_individual_release-->
+
+
+	<!--RULE -->
+<xsl:template match="catos-def:version_state/catos-def:catos_individual_release"
+                 priority="4000"
+                 mode="M116">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the catos_individual_release entity of a version_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M116"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M116"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M116">
+      <xsl:apply-templates select="@*|node()" mode="M116"/>
+   </xsl:template>
+
+   <!--PATTERN catosverstecatos_version_id-->
+
+
+	<!--RULE -->
+<xsl:template match="catos-def:version_state/catos-def:catos_version_id" priority="4000"
+                 mode="M117">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the catos_version_id entity of a version_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M117"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M117"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M117">
+      <xsl:apply-templates select="@*|node()" mode="M117"/>
+   </xsl:template>
+
+   <!--PATTERN esxpatchobjpatch_number-->
+
+
+	<!--RULE -->
+<xsl:template match="esx-def:patch_object/esx-def:patch_number" priority="4000" mode="M118">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the patch_number entity of a patch_object should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M118"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M118"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M118">
+      <xsl:apply-templates select="@*|node()" mode="M118"/>
+   </xsl:template>
+
+   <!--PATTERN esxpatchstepatch_number-->
+
+
+	<!--RULE -->
+<xsl:template match="esx-def:patch_state/esx-def:patch_number" priority="4000" mode="M119">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the patch_number entity of a patch_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M119"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M119"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M119">
+      <xsl:apply-templates select="@*|node()" mode="M119"/>
+   </xsl:template>
+
+   <!--PATTERN esxpatchstestatus-->
+
+
+	<!--RULE -->
+<xsl:template match="esx-def:patch_state/esx-def:status" priority="4000" mode="M120">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the status entity of a patch_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M120"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M120"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M120">
+      <xsl:apply-templates select="@*|node()" mode="M120"/>
+   </xsl:template>
+
+   <!--PATTERN versionsterelease-->
+
+
+	<!--RULE -->
+<xsl:template match="esx-def:version_state/esx-def:release" priority="4000" mode="M121">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='version'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the release entity of an version_state should be 'version'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M121"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M121"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M121">
+      <xsl:apply-templates select="@*|node()" mode="M121"/>
+   </xsl:template>
+
+   <!--PATTERN versionstebuild-->
+
+
+	<!--RULE -->
+<xsl:template match="esx-def:version_state/esx-def:build" priority="4000" mode="M122">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the build entity of an version_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M122"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M122"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M122">
+      <xsl:apply-templates select="@*|node()" mode="M122"/>
+   </xsl:template>
+
+   <!--PATTERN portinfotst-->
+
+
+	<!--RULE -->
+<xsl:template match="freebsd-def:portinfo_test/freebsd-def:object" priority="4000"
+                 mode="M123">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/freebsd-def:portinfo_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a portinfo_test must reference an portinfo_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M123"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="freebsd-def:portinfo_test/freebsd-def:state" priority="3999" mode="M123">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/freebsd-def:portinfo_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a portinfo_test must reference an portinfo_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M123"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M123"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M123">
+      <xsl:apply-templates select="@*|node()" mode="M123"/>
+   </xsl:template>
+
+   <!--PATTERN portinfoobjpkginst-->
+
+
+	<!--RULE -->
+<xsl:template match="freebsd-def:portinfo_object/freebsd-def:pkginst" priority="4000"
+                 mode="M124">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the pkginst entity of a portinfo_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M124"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M124"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M124">
+      <xsl:apply-templates select="@*|node()" mode="M124"/>
+   </xsl:template>
+
+   <!--PATTERN portinfostepkginst-->
+
+
+	<!--RULE -->
+<xsl:template match="freebsd-def:portinfo_state/freebsd-def:pkginst" priority="4000"
+                 mode="M125">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the pkginst entity of a portinfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M125"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M125"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M125">
+      <xsl:apply-templates select="@*|node()" mode="M125"/>
+   </xsl:template>
+
+   <!--PATTERN portinfostename-->
+
+
+	<!--RULE -->
+<xsl:template match="freebsd-def:portinfo_state/freebsd-def:name" priority="4000" mode="M126">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the name entity of a portinfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M126"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M126"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M126">
+      <xsl:apply-templates select="@*|node()" mode="M126"/>
+   </xsl:template>
+
+   <!--PATTERN portinfostecategory-->
+
+
+	<!--RULE -->
+<xsl:template match="freebsd-def:portinfo_state/freebsd-def:category" priority="4000"
+                 mode="M127">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the category entity of a portinfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M127"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M127"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M127">
+      <xsl:apply-templates select="@*|node()" mode="M127"/>
+   </xsl:template>
+
+   <!--PATTERN portinfosteversion-->
+
+
+	<!--RULE -->
+<xsl:template match="freebsd-def:portinfo_state/freebsd-def:version" priority="4000"
+                 mode="M128">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the version entity of a portinfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M128"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M128"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M128">
+      <xsl:apply-templates select="@*|node()" mode="M128"/>
+   </xsl:template>
+
+   <!--PATTERN portinfostevendor-->
+
+
+	<!--RULE -->
+<xsl:template match="freebsd-def:portinfo_state/freebsd-def:vendor" priority="4000"
+                 mode="M129">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the vendor entity of a portinfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M129"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M129"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M129">
+      <xsl:apply-templates select="@*|node()" mode="M129"/>
+   </xsl:template>
+
+   <!--PATTERN portinfostedescription-->
+
+
+	<!--RULE -->
+<xsl:template match="freebsd-def:portinfo_state/freebsd-def:description" priority="4000"
+                 mode="M130">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the description entity of a portinfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M130"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M130"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M130">
+      <xsl:apply-templates select="@*|node()" mode="M130"/>
+   </xsl:template>
+
+   <!--PATTERN gcobjparameter_name-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:getconf_object/hpux-def:parameter_name" priority="4000"
+                 mode="M131">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the parameter_name entity of a getconf_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M131"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M131"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M131">
+      <xsl:apply-templates select="@*|node()" mode="M131"/>
+   </xsl:template>
+
+   <!--PATTERN gcobjpathname-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:getconf_object/hpux-def:pathname" priority="4000" mode="M132">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the pathname entity of a getconf_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M132"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M132"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M132">
+      <xsl:apply-templates select="@*|node()" mode="M132"/>
+   </xsl:template>
+
+   <!--PATTERN gcsteparameter_name-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:getconf_state/hpux-def:parameter_name" priority="4000"
+                 mode="M133">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the parameter_name entity of a getconf_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M133"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M133"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M133">
+      <xsl:apply-templates select="@*|node()" mode="M133"/>
+   </xsl:template>
+
+   <!--PATTERN gcstepathname-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:getconf_state/hpux-def:pathname" priority="4000" mode="M134">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the pathname entity of a getconf_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M134"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M134"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M134">
+      <xsl:apply-templates select="@*|node()" mode="M134"/>
+   </xsl:template>
+
+   <!--PATTERN gcsteoutput-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:getconf_state/hpux-def:output" priority="4000" mode="M135">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the output entity of a getconf_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M135"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M135"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M135">
+      <xsl:apply-templates select="@*|node()" mode="M135"/>
+   </xsl:template>
+
+   <!--PATTERN patch53objswtype-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:patch53_object/hpux-def:swtype" priority="4000" mode="M136">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the swtype entity of a patch53_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M136"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M136"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M136">
+      <xsl:apply-templates select="@*|node()" mode="M136"/>
+   </xsl:template>
+
+   <!--PATTERN patch53objarea_patched-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:patch_object/hpux-def:area_patched" priority="4000" mode="M137">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the area_patched entity of a patch53_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M137"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M137"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M137">
+      <xsl:apply-templates select="@*|node()" mode="M137"/>
+   </xsl:template>
+
+   <!--PATTERN patch53objpatch_base-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:patch_object/hpux-def:patch_base" priority="4000" mode="M138">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the patch_base entity of a patch53_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M138"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M138"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M138">
+      <xsl:apply-templates select="@*|node()" mode="M138"/>
+   </xsl:template>
+
+   <!--PATTERN patch53steswtype-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:patch53_state/hpux-def:swtype" priority="4000" mode="M139">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the swtype entity of a patch53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M139"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M139"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M139">
+      <xsl:apply-templates select="@*|node()" mode="M139"/>
+   </xsl:template>
+
+   <!--PATTERN patch53stearea_patched-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:patch53_state/hpux-def:area_patched" priority="4000"
+                 mode="M140">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the area_patched entity of a patch53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M140"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M140"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M140">
+      <xsl:apply-templates select="@*|node()" mode="M140"/>
+   </xsl:template>
+
+   <!--PATTERN patch53stepatch_base-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:patch53_state/hpux-def:patch_base" priority="4000" mode="M141">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the patch_base entity of a patch53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M141"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M141"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M141">
+      <xsl:apply-templates select="@*|node()" mode="M141"/>
+   </xsl:template>
+
+   <!--PATTERN patchobjpatch_name-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:patch_object/hpux-def:patch_name" priority="4000" mode="M142">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the patch_name entity of a patch_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M142"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M142"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M142">
+      <xsl:apply-templates select="@*|node()" mode="M142"/>
+   </xsl:template>
+
+   <!--PATTERN patchstepatch_name-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:patch_state/hpux-def:patch_name" priority="4000" mode="M143">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the patch_name entity of a patch_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M143"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M143"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M143">
+      <xsl:apply-templates select="@*|node()" mode="M143"/>
+   </xsl:template>
+
+   <!--PATTERN patchsteswtype-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:patch_state/hpux-def:swtype" priority="4000" mode="M144">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the swtype entity of a patch_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M144"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M144"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M144">
+      <xsl:apply-templates select="@*|node()" mode="M144"/>
+   </xsl:template>
+
+   <!--PATTERN patchstearea_patched-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:patch_state/hpux-def:area_patched" priority="4000" mode="M145">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the area_patched entity of a patch_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M145"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M145"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M145">
+      <xsl:apply-templates select="@*|node()" mode="M145"/>
+   </xsl:template>
+
+   <!--PATTERN patchstepatch_base-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:patch_state/hpux-def:patch_base" priority="4000" mode="M146">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the patch_base entity of a patch_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M146"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M146"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M146">
+      <xsl:apply-templates select="@*|node()" mode="M146"/>
+   </xsl:template>
+
+   <!--PATTERN swlistobjswlist-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:swlist_object/hpux-def:swlist" priority="4000" mode="M147">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the swlist entity of a swlist_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M147"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M147"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M147">
+      <xsl:apply-templates select="@*|node()" mode="M147"/>
+   </xsl:template>
+
+   <!--PATTERN swliststeswlist-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:swlist_state/hpux-def:swlist" priority="4000" mode="M148">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the swlist entity of a swlist_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M148"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M148"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M148">
+      <xsl:apply-templates select="@*|node()" mode="M148"/>
+   </xsl:template>
+
+   <!--PATTERN swliststebundle-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:swlist_state/hpux-def:bundle" priority="4000" mode="M149">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the bundle entity of a swlist_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M149"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M149"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M149">
+      <xsl:apply-templates select="@*|node()" mode="M149"/>
+   </xsl:template>
+
+   <!--PATTERN swliststefileset-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:swlist_state/hpux-def:fileset" priority="4000" mode="M150">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the fileset entity of a swlist_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M150"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M150"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M150">
+      <xsl:apply-templates select="@*|node()" mode="M150"/>
+   </xsl:template>
+
+   <!--PATTERN swliststeversion-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:swlist_state/hpux-def:version" priority="4000" mode="M151">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='fileset_revision'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the version entity of a swlist_state should be 'fileset_revision'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M151"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M151"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M151">
+      <xsl:apply-templates select="@*|node()" mode="M151"/>
+   </xsl:template>
+
+   <!--PATTERN swliststetitle-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:swlist_state/hpux-def:title" priority="4000" mode="M152">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the title entity of a swlist_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M152"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M152"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M152">
+      <xsl:apply-templates select="@*|node()" mode="M152"/>
+   </xsl:template>
+
+   <!--PATTERN swliststevendor-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:swlist_state/hpux-def:vendor" priority="4000" mode="M153">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the vendor entity of a swlist_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M153"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M153"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M153">
+      <xsl:apply-templates select="@*|node()" mode="M153"/>
+   </xsl:template>
+
+   <!--PATTERN trustobjusername-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_object/hpux-def:username" priority="4000" mode="M154">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the username entity of a trusted_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M154"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M154"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M154">
+      <xsl:apply-templates select="@*|node()" mode="M154"/>
+   </xsl:template>
+
+   <!--PATTERN truststeusername-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:username" priority="4000" mode="M155">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the username entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M155"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M155"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M155">
+      <xsl:apply-templates select="@*|node()" mode="M155"/>
+   </xsl:template>
+
+   <!--PATTERN truststeuid-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:uid" priority="4000" mode="M156">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the uid entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M156"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M156"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M156">
+      <xsl:apply-templates select="@*|node()" mode="M156"/>
+   </xsl:template>
+
+   <!--PATTERN truststepassword-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:password" priority="4000" mode="M157">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the password entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M157"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M157"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M157">
+      <xsl:apply-templates select="@*|node()" mode="M157"/>
+   </xsl:template>
+
+   <!--PATTERN truststeaccount_owner-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:account_owner" priority="4000"
+                 mode="M158">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the account_owner entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M158"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M158"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M158">
+      <xsl:apply-templates select="@*|node()" mode="M158"/>
+   </xsl:template>
+
+   <!--PATTERN truststeboot_auth-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:boot_auth" priority="4000" mode="M159">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the boot_auth entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M159"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M159"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M159">
+      <xsl:apply-templates select="@*|node()" mode="M159"/>
+   </xsl:template>
+
+   <!--PATTERN truststeaudit_id-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:audit_id" priority="4000" mode="M160">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the audit_id entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M160"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M160"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M160">
+      <xsl:apply-templates select="@*|node()" mode="M160"/>
+   </xsl:template>
+
+   <!--PATTERN truststeaudit_flag-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:audit_flag" priority="4000" mode="M161">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the audit_flag entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M161"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M161"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M161">
+      <xsl:apply-templates select="@*|node()" mode="M161"/>
+   </xsl:template>
+
+   <!--PATTERN truststepw_change_min-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:pw_change_min" priority="4000"
+                 mode="M162">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the pw_change_min entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M162"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M162"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M162">
+      <xsl:apply-templates select="@*|node()" mode="M162"/>
+   </xsl:template>
+
+   <!--PATTERN truststepw_max_size-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:pw_max_size" priority="4000" mode="M163">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the pw_max_size entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M163"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M163"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M163">
+      <xsl:apply-templates select="@*|node()" mode="M163"/>
+   </xsl:template>
+
+   <!--PATTERN truststepw_expiration-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:pw_expiration" priority="4000"
+                 mode="M164">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the pw_expiration entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M164"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M164"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M164">
+      <xsl:apply-templates select="@*|node()" mode="M164"/>
+   </xsl:template>
+
+   <!--PATTERN truststepw_life-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:pw_life" priority="4000" mode="M165">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the pw_life entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M165"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M165"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M165">
+      <xsl:apply-templates select="@*|node()" mode="M165"/>
+   </xsl:template>
+
+   <!--PATTERN truststepw_change_s-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:pw_change_s" priority="4000" mode="M166">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the pw_change_s entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M166"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M166"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M166">
+      <xsl:apply-templates select="@*|node()" mode="M166"/>
+   </xsl:template>
+
+   <!--PATTERN truststepw_change_u-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:pw_change_u" priority="4000" mode="M167">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the pw_change_u entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M167"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M167"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M167">
+      <xsl:apply-templates select="@*|node()" mode="M167"/>
+   </xsl:template>
+
+   <!--PATTERN truststeacct_expire-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:acct_expire" priority="4000" mode="M168">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the acct_expire entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M168"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M168"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M168">
+      <xsl:apply-templates select="@*|node()" mode="M168"/>
+   </xsl:template>
+
+   <!--PATTERN truststemax_llogin-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:max_llogin" priority="4000" mode="M169">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the max_llogin entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M169"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M169"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M169">
+      <xsl:apply-templates select="@*|node()" mode="M169"/>
+   </xsl:template>
+
+   <!--PATTERN truststeexp_warning-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:exp_warning" priority="4000" mode="M170">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the exp_warning entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M170"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M170"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M170">
+      <xsl:apply-templates select="@*|node()" mode="M170"/>
+   </xsl:template>
+
+   <!--PATTERN truststeusr_chg_pw-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:usr_chg_pw" priority="4000" mode="M171">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the usr_chg_pw entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M171"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M171"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M171">
+      <xsl:apply-templates select="@*|node()" mode="M171"/>
+   </xsl:template>
+
+   <!--PATTERN truststegen_pw-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:gen_pw" priority="4000" mode="M172">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the gen_pw entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M172"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M172"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M172">
+      <xsl:apply-templates select="@*|node()" mode="M172"/>
+   </xsl:template>
+
+   <!--PATTERN truststepw_restrict-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:pw_restrict" priority="4000" mode="M173">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the pw_restrict entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M173"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M173"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M173">
+      <xsl:apply-templates select="@*|node()" mode="M173"/>
+   </xsl:template>
+
+   <!--PATTERN truststepw_null-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:pw_null" priority="4000" mode="M174">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the pw_null entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M174"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M174"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M174">
+      <xsl:apply-templates select="@*|node()" mode="M174"/>
+   </xsl:template>
+
+   <!--PATTERN truststepw_gen_char-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:pw_gen_char" priority="4000" mode="M175">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the pw_gen_char entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M175"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M175"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M175">
+      <xsl:apply-templates select="@*|node()" mode="M175"/>
+   </xsl:template>
+
+   <!--PATTERN truststepw_gen_let-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:pw_gen_let" priority="4000" mode="M176">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the pw_gen_let entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M176"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M176"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M176">
+      <xsl:apply-templates select="@*|node()" mode="M176"/>
+   </xsl:template>
+
+   <!--PATTERN truststelogin_time-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:login_time" priority="4000" mode="M177">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the login_time entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M177"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M177"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M177">
+      <xsl:apply-templates select="@*|node()" mode="M177"/>
+   </xsl:template>
+
+   <!--PATTERN truststepw_changer-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:pw_changer" priority="4000" mode="M178">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the pw_changer entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M178"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M178"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M178">
+      <xsl:apply-templates select="@*|node()" mode="M178"/>
+   </xsl:template>
+
+   <!--PATTERN truststelogin_time_s-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:login_time_s" priority="4000"
+                 mode="M179">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the login_time_s entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M179"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M179"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M179">
+      <xsl:apply-templates select="@*|node()" mode="M179"/>
+   </xsl:template>
+
+   <!--PATTERN truststelogin_time_u-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:login_time_u" priority="4000"
+                 mode="M180">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the login_time_u entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M180"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M180"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M180">
+      <xsl:apply-templates select="@*|node()" mode="M180"/>
+   </xsl:template>
+
+   <!--PATTERN truststelogin_tty_s-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:login_tty_s" priority="4000" mode="M181">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the login_tty_s entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M181"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M181"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M181">
+      <xsl:apply-templates select="@*|node()" mode="M181"/>
+   </xsl:template>
+
+   <!--PATTERN truststelogin_tty_u-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:login_tty_u" priority="4000" mode="M182">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the login_tty_u entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M182"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M182"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M182">
+      <xsl:apply-templates select="@*|node()" mode="M182"/>
+   </xsl:template>
+
+   <!--PATTERN truststenum_u_logins-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:num_u_logins" priority="4000"
+                 mode="M183">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the num_u_logins entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M183"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M183"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M183">
+      <xsl:apply-templates select="@*|node()" mode="M183"/>
+   </xsl:template>
+
+   <!--PATTERN truststemax_u_logins-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:max_u_logins" priority="4000"
+                 mode="M184">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the max_u_logins entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M184"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M184"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M184">
+      <xsl:apply-templates select="@*|node()" mode="M184"/>
+   </xsl:template>
+
+   <!--PATTERN truststelock_flag-->
+
+
+	<!--RULE -->
+<xsl:template match="hpux-def:trusted_state/hpux-def:lock_flag" priority="4000" mode="M185">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the lock_flag entity of a trusted_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M185"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M185"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M185">
+      <xsl:apply-templates select="@*|node()" mode="M185"/>
+   </xsl:template>
+
+   <!--PATTERN globaltst-->
+
+
+	<!--RULE -->
+<xsl:template match="ios-def:global_test/ios-def:object" priority="4000" mode="M186">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ios-def:global_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a global_test must reference a global_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M186"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="ios-def:global_test/ios-def:state" priority="3999" mode="M186">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/ios-def:global_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a global_test must reference a global_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M186"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M186"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M186">
+      <xsl:apply-templates select="@*|node()" mode="M186"/>
+   </xsl:template>
+
+   <!--PATTERN globalobjglobal_command-->
+
+
+	<!--RULE -->
+<xsl:template match="ios-def:global_object/ios-def:global_command" priority="4000"
+                 mode="M187">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the global_command entity of a global_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M187"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M187"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M187">
+      <xsl:apply-templates select="@*|node()" mode="M187"/>
+   </xsl:template>
+
+   <!--PATTERN globalsteglobal_command-->
+
+
+	<!--RULE -->
+<xsl:template match="ios-def:global_state/ios-def:global_command" priority="4000" mode="M188">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the global_command entity of a global_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M188"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M188"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M188">
+      <xsl:apply-templates select="@*|node()" mode="M188"/>
+   </xsl:template>
+
+   <!--PATTERN iosinterfacetst-->
+
+
+	<!--RULE -->
+<xsl:template match="ios-def:interface_test/ios-def:object" priority="4000" mode="M189">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ios-def:interface_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of an interface_test must reference an interface_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M189"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="ios-def:interface_test/ios-def:state" priority="3999" mode="M189">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/ios-def:interface_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of an interface_test must reference an interface_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M189"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M189"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M189">
+      <xsl:apply-templates select="@*|node()" mode="M189"/>
+   </xsl:template>
+
+   <!--PATTERN iosinterfaceobjname-->
+
+
+	<!--RULE -->
+<xsl:template match="ios-def:interface_object/ios-def:name" priority="4000" mode="M190">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the name entity of an interface_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M190"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M190"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M190">
+      <xsl:apply-templates select="@*|node()" mode="M190"/>
+   </xsl:template>
+
+   <!--PATTERN iosinterfacestename-->
+
+
+	<!--RULE -->
+<xsl:template match="ios-def:interface_state/ios-def:name" priority="4000" mode="M191">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the name entity of an interface_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M191"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M191"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M191">
+      <xsl:apply-templates select="@*|node()" mode="M191"/>
+   </xsl:template>
+
+   <!--PATTERN iosinterfacesteip_directed_broadcast_command-->
+
+
+	<!--RULE -->
+<xsl:template match="ios-def:interface_state/ios-def:ip_directed_broadcast_command"
+                 priority="4000"
+                 mode="M192">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the ip_directed_broadcast_command entity of an interface_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M192"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M192"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M192">
+      <xsl:apply-templates select="@*|node()" mode="M192"/>
+   </xsl:template>
+
+   <!--PATTERN iosinterfacesteno_ip_directed_broadcast_command-->
+
+
+	<!--RULE -->
+<xsl:template match="ios-def:interface_state/ios-def:no_ip_directed_broadcast_command"
+                 priority="4000"
+                 mode="M193">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the no_ip_directed_broadcast_command entity of an interface_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M193"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M193"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M193">
+      <xsl:apply-templates select="@*|node()" mode="M193"/>
+   </xsl:template>
+
+   <!--PATTERN iosinterfacesteproxy_arp_command-->
+
+
+	<!--RULE -->
+<xsl:template match="ios-def:interface_state/ios-def:proxy_arp_command" priority="4000"
+                 mode="M194">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the proxy_arp_command entity of an interface_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M194"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M194"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M194">
+      <xsl:apply-templates select="@*|node()" mode="M194"/>
+   </xsl:template>
+
+   <!--PATTERN iosinterfacesteshutdown_command-->
+
+
+	<!--RULE -->
+<xsl:template match="ios-def:interface_state/ios-def:shutdown_command" priority="4000"
+                 mode="M195">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the shutdown_command entity of an interface_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M195"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M195"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M195">
+      <xsl:apply-templates select="@*|node()" mode="M195"/>
+   </xsl:template>
+
+   <!--PATTERN linetst-->
+
+
+	<!--RULE -->
+<xsl:template match="ios-def:line_test/ios-def:object" priority="4000" mode="M196">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ios-def:line_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a line_test must reference a line_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M196"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="ios-def:line_test/ios-def:state" priority="3999" mode="M196">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/ios-def:line_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a line_test must reference a line_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M196"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M196"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M196">
+      <xsl:apply-templates select="@*|node()" mode="M196"/>
+   </xsl:template>
+
+   <!--PATTERN lineobjshow_subcommand-->
+
+
+	<!--RULE -->
+<xsl:template match="ios-def:line_object/ios-def:show_subcommand" priority="4000" mode="M197">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the show_subcommand entity of a line_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M197"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M197"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M197">
+      <xsl:apply-templates select="@*|node()" mode="M197"/>
+   </xsl:template>
+
+   <!--PATTERN linesteshow_subcommand-->
+
+
+	<!--RULE -->
+<xsl:template match="ios-def:line_state/ios-def:show_subcommand" priority="4000" mode="M198">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the show_subcommand entity of a line_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M198"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M198"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M198">
+      <xsl:apply-templates select="@*|node()" mode="M198"/>
+   </xsl:template>
+
+   <!--PATTERN linesteconfig_line-->
+
+
+	<!--RULE -->
+<xsl:template match="ios-def:line_state/ios-def:config_line" priority="4000" mode="M199">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the config_line entity of a line_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M199"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M199"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M199">
+      <xsl:apply-templates select="@*|node()" mode="M199"/>
+   </xsl:template>
+
+   <!--PATTERN snmptst-->
+
+
+	<!--RULE -->
+<xsl:template match="ios-def:snmp_test/ios-def:object" priority="4000" mode="M200">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ios-def:snmp_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a snmp_test must reference a snmp_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M200"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="ios-def:snmp_test/ios-def:state" priority="3999" mode="M200">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/ios-def:snmp_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a snmp_test must reference a snmp_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M200"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M200"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M200">
+      <xsl:apply-templates select="@*|node()" mode="M200"/>
+   </xsl:template>
+
+   <!--PATTERN snmpsteaccess_list-->
+
+
+	<!--RULE -->
+<xsl:template match="ios-def:snmp_state/ios-def:access_list" priority="4000" mode="M201">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the access_list entity of a snmp_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M201"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M201"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M201">
+      <xsl:apply-templates select="@*|node()" mode="M201"/>
+   </xsl:template>
+
+   <!--PATTERN snmpstecommunity_name-->
+
+
+	<!--RULE -->
+<xsl:template match="ios-def:snmp_state/ios-def:community_name" priority="4000" mode="M202">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the community_name entity of a snmp_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M202"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M202"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M202">
+      <xsl:apply-templates select="@*|node()" mode="M202"/>
+   </xsl:template>
+
+   <!--PATTERN tclshtst-->
+
+
+	<!--RULE -->
+<xsl:template match="ios-def:tclsh_test/ios-def:object" priority="4000" mode="M203">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ios-def:tclsh_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a tclsh_test must reference a tclsh_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M203"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="ios-def:tclsh_test/ios-def:state" priority="3999" mode="M203">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/ios-def:tclsh_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a tclsh_test must reference a tclsh_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M203"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M203"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M203">
+      <xsl:apply-templates select="@*|node()" mode="M203"/>
+   </xsl:template>
+
+   <!--PATTERN tclshsteavailable-->
+
+
+	<!--RULE -->
+<xsl:template match="ios-def:tclsh_state/ios-def:available" priority="4000" mode="M204">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the available entity of a tclsh_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M204"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M204"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M204">
+      <xsl:apply-templates select="@*|node()" mode="M204"/>
+   </xsl:template>
+
+   <!--PATTERN iosvertst-->
+
+
+	<!--RULE -->
+<xsl:template match="ios-def:version_test/ios-def:object" priority="4000" mode="M205">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/ios-def:version_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a version_test must reference a version_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M205"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="ios-def:version_test/ios-def:state" priority="3999" mode="M205">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/ios-def:version_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a version_test must reference a version_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M205"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M205"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M205">
+      <xsl:apply-templates select="@*|node()" mode="M205"/>
+   </xsl:template>
+
+   <!--PATTERN iosverstemajor_release-->
+
+
+	<!--RULE -->
+<xsl:template match="ios-def:version_state/ios-def:major_release" priority="4000" mode="M206">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the major_release entity of a version_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M206"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M206"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M206">
+      <xsl:apply-templates select="@*|node()" mode="M206"/>
+   </xsl:template>
+
+   <!--PATTERN iosverstetrain_number-->
+
+
+	<!--RULE -->
+<xsl:template match="ios-def:version_state/ios-def:train_number" priority="4000" mode="M207">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the train_number entity of a version_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M207"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M207"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M207">
+      <xsl:apply-templates select="@*|node()" mode="M207"/>
+   </xsl:template>
+
+   <!--PATTERN iosverstetrain_identifier-->
+
+
+	<!--RULE -->
+<xsl:template match="ios-def:version_state/ios-def:train_identifier" priority="4000"
+                 mode="M208">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the train_identifier entity of a version_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M208"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M208"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M208">
+      <xsl:apply-templates select="@*|node()" mode="M208"/>
+   </xsl:template>
+
+   <!--PATTERN iosversteversion_string-->
+
+
+	<!--RULE -->
+<xsl:template match="ios-def:version_state/ios-def:version_string" priority="4000"
+                 mode="M209">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='ios_version'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the version_string entity of a version_state should be 'ios_version'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M209"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M209"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M209">
+      <xsl:apply-templates select="@*|node()" mode="M209"/>
+   </xsl:template>
+
+   <!--PATTERN dpkgobjname-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:dpkginfo_object/linux-def:name" priority="4000" mode="M210">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the name entity of a dpkginfo_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the name entity of a dpkginfo_object should be 'equals', 'not equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M210"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M210"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M210">
+      <xsl:apply-templates select="@*|node()" mode="M210"/>
+   </xsl:template>
+
+   <!--PATTERN dpkgstename-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:dpkginfo_state/linux-def:name" priority="4000" mode="M211">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the name entity of a dpkginfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the name entity of a dpkginfo_state should be 'equals', 'not equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M211"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M211"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M211">
+      <xsl:apply-templates select="@*|node()" mode="M211"/>
+   </xsl:template>
+
+   <!--PATTERN dpkgstearch-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:dpkginfo_state/linux-def:arch" priority="4000" mode="M212">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the arch entity of a dpkginfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the arch entity of a dpkginfo_state should be 'equals', 'not equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M212"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M212"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M212">
+      <xsl:apply-templates select="@*|node()" mode="M212"/>
+   </xsl:template>
+
+   <!--PATTERN dpkgsteepoch-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:dpkginfo_state/linux-def:epoch" priority="4000" mode="M213">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the epoch entity of a dpkginfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal' or 'pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the epoch entity of a dpkginfo_state should be 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', 'less than or equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M213"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M213"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M213">
+      <xsl:apply-templates select="@*|node()" mode="M213"/>
+   </xsl:template>
+
+   <!--PATTERN dpkgsterelease-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:dpkginfo_state/linux-def:release" priority="4000" mode="M214">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the release entity of a dpkginfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal' or 'pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the release entity of a dpkginfo_state should be 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', 'less than or equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M214"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M214"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M214">
+      <xsl:apply-templates select="@*|node()" mode="M214"/>
+   </xsl:template>
+
+   <!--PATTERN dpkgsteversion-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:dpkginfo_state/linux-def:version" priority="4000" mode="M215">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the version entity of a dpkginfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal' or 'pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the version entity of a dpkginfo_state should be 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', 'less than or equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M215"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M215"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M215">
+      <xsl:apply-templates select="@*|node()" mode="M215"/>
+   </xsl:template>
+
+   <!--PATTERN dpkgsteevr-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:dpkginfo_state/linux-def:evr" priority="4000" mode="M216">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='evr_string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the evr entity of a dpkginfo_state should be 'evr_string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal' or 'pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the evr entity of a dpkginfo_state should be 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', 'less than or equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M216"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M216"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M216">
+      <xsl:apply-templates select="@*|node()" mode="M216"/>
+   </xsl:template>
+
+   <!--PATTERN ilsobjprotocol-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:inetlisteningservers_object/linux-def:protocol"
+                 priority="4000"
+                 mode="M217">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the protocol entity of an inetlisteningservers_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the protocol entity of an inetlisteningservers_object should be 'equals', 'not equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M217"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M217"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M217">
+      <xsl:apply-templates select="@*|node()" mode="M217"/>
+   </xsl:template>
+
+   <!--PATTERN ilsobjlocal_address-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:inetlisteningservers_object/linux-def:local_address"
+                 priority="4000"
+                 mode="M218">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the local_address entity of an inetlisteningservers_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the local_address entity of an inetlisteningservers_object should be 'equals', 'not equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M218"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M218"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M218">
+      <xsl:apply-templates select="@*|node()" mode="M218"/>
+   </xsl:template>
+
+   <!--PATTERN ilsobjlocal_port-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:inetlisteningservers_object/linux-def:local_port"
+                 priority="4000"
+                 mode="M219">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the local_port entity of an inetlisteningservers_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the local_port entity of an inetlisteningservers_object should be 'equals', 'not equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M219"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M219"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M219">
+      <xsl:apply-templates select="@*|node()" mode="M219"/>
+   </xsl:template>
+
+   <!--PATTERN ilssteprotocol-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:inetlisteningservers_state/linux-def:protocol" priority="4000"
+                 mode="M220">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the protocol entity of an inetlisteningservers_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the protocol entity of an inetlisteningservers_state should be 'equals', 'not equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M220"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M220"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M220">
+      <xsl:apply-templates select="@*|node()" mode="M220"/>
+   </xsl:template>
+
+   <!--PATTERN ilsstelocal_address-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:inetlisteningservers_state/linux-def:local_address"
+                 priority="4000"
+                 mode="M221">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the local_address entity of an inetlisteningservers_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the local_address entity of an inetlisteningservers_state should be 'equals', 'not equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M221"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M221"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M221">
+      <xsl:apply-templates select="@*|node()" mode="M221"/>
+   </xsl:template>
+
+   <!--PATTERN ilsstelocal_port-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:inetlisteningservers_state/linux-def:local_port"
+                 priority="4000"
+                 mode="M222">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the local_port entity of an inetlisteningservers_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the local_port entity of an inetlisteningservers_state should be 'equals', 'not equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M222"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M222"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M222">
+      <xsl:apply-templates select="@*|node()" mode="M222"/>
+   </xsl:template>
+
+   <!--PATTERN ilsstelocal_full_address-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:inetlisteningservers_state/linux-def:local_full_address"
+                 priority="4000"
+                 mode="M223">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the local_full_address entity of an inetlisteningservers_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the local_full_address entity of an inetlisteningservers_state should be 'equals', 'not equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M223"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M223"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M223">
+      <xsl:apply-templates select="@*|node()" mode="M223"/>
+   </xsl:template>
+
+   <!--PATTERN ilssteprogram_name-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:inetlisteningservers_state/linux-def:program_name"
+                 priority="4000"
+                 mode="M224">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the program_name entity of an inetlisteningservers_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the program_name entity of an inetlisteningservers_state should be 'equals', 'not equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M224"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M224"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M224">
+      <xsl:apply-templates select="@*|node()" mode="M224"/>
+   </xsl:template>
+
+   <!--PATTERN ilssteforeign_address-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:inetlisteningservers_state/linux-def:foreign_address"
+                 priority="4000"
+                 mode="M225">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the foreign_address entity of an inetlisteningservers_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the foreign_address entity of an inetlisteningservers_state should be 'equals', 'not equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M225"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M225"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M225">
+      <xsl:apply-templates select="@*|node()" mode="M225"/>
+   </xsl:template>
+
+   <!--PATTERN ilssteforeign_port-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:inetlisteningservers_state/linux-def:foreign_port"
+                 priority="4000"
+                 mode="M226">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the foreign_port entity of an inetlisteningservers_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the foreign_port entity of an inetlisteningservers_state should be 'equals', 'not equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M226"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M226"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M226">
+      <xsl:apply-templates select="@*|node()" mode="M226"/>
+   </xsl:template>
+
+   <!--PATTERN ilssteforeign_full_address-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:inetlisteningservers_state/linux-def:foreign_full_address"
+                 priority="4000"
+                 mode="M227">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the foreign_full_address entity of an inetlisteningservers_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the foreign_full_address entity of an inetlisteningservers_state should be 'equals', 'not equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M227"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M227"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M227">
+      <xsl:apply-templates select="@*|node()" mode="M227"/>
+   </xsl:template>
+
+   <!--PATTERN ilsstepid-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:inetlisteningservers_state/linux-def:pid" priority="4000"
+                 mode="M228">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the pid entity of an inetlisteningservers_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the pid entity of an inetlisteningservers_state should be 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', or 'less than or equal'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M228"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M228"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M228">
+      <xsl:apply-templates select="@*|node()" mode="M228"/>
+   </xsl:template>
+
+   <!--PATTERN ilssteuser_id-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:inetlisteningservers_state/linux-def:user_id" priority="4000"
+                 mode="M229">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the user_id entity of an inetlisteningservers_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the user_id entity of an inetlisteningservers_state should be 'equals', 'not equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M229"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M229"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M229">
+      <xsl:apply-templates select="@*|node()" mode="M229"/>
+   </xsl:template>
+
+   <!--PATTERN rpmobjname-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:rpminfo_object/linux-def:name" priority="4000" mode="M230">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the name entity of a rpminfo_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the name entity of a rpminfo_object should be 'equals', 'not equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M230"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M230"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M230">
+      <xsl:apply-templates select="@*|node()" mode="M230"/>
+   </xsl:template>
+
+   <!--PATTERN rpmstename-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:rpminfo_state/linux-def:name" priority="4000" mode="M231">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the name entity of a rpminfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the name entity of a rpminfo_state should be 'equals', 'not equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M231"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M231"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M231">
+      <xsl:apply-templates select="@*|node()" mode="M231"/>
+   </xsl:template>
+
+   <!--PATTERN rpmstearch-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:rpminfo_state/linux-def:arch" priority="4000" mode="M232">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the arch entity of a rpminfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the arch entity of a rpminfo_state should be 'equals', 'not equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M232"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M232"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M232">
+      <xsl:apply-templates select="@*|node()" mode="M232"/>
+   </xsl:template>
+
+   <!--PATTERN rpmsteepoch-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:rpminfo_state/linux-def:epoch" priority="4000" mode="M233">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the epoch entity of a rpminfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the epoch entity of a rpminfo_state should be 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', 'less than or equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M233"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M233"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M233">
+      <xsl:apply-templates select="@*|node()" mode="M233"/>
+   </xsl:template>
+
+   <!--PATTERN rpmsterelease-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:rpminfo_state/linux-def:release" priority="4000" mode="M234">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string' or @datatype='version'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the release entity of a rpminfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the release entity of a rpminfo_state should be 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', 'less than or equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M234"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M234"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M234">
+      <xsl:apply-templates select="@*|node()" mode="M234"/>
+   </xsl:template>
+
+   <!--PATTERN rpmsteversion-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:rpminfo_state/linux-def:version" priority="4000" mode="M235">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string' or @datatype='version'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the version entity of a rpminfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the version entity of a rpminfo_state should be 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', 'less than or equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M235"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M235"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M235">
+      <xsl:apply-templates select="@*|node()" mode="M235"/>
+   </xsl:template>
+
+   <!--PATTERN rpmsteevr-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:rpminfo_state/linux-def:evr" priority="4000" mode="M236">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='evr_string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the evr entity of a rpminfo_state should be 'evr_string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='greater than' or @operation='greater than or equal' or @operation='less than' or @operation='less than or equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the evr entity of a rpminfo_state should be 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', 'less than or equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M236"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M236"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M236">
+      <xsl:apply-templates select="@*|node()" mode="M236"/>
+   </xsl:template>
+
+   <!--PATTERN rpmstesignaturekeyid-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:rpminfo_state/linux-def:signature_keyid" priority="4000"
+                 mode="M237">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the signature_keyid entity of a rpminfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the signature_keyid entity of a rpminfo_state should be 'equals', 'not equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M237"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M237"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M237">
+      <xsl:apply-templates select="@*|node()" mode="M237"/>
+   </xsl:template>
+
+   <!--PATTERN spkginfoobjname-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:slackwarepkginfo_object/linux-def:name" priority="4000"
+                 mode="M238">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the name entity of a slackwarepkginfo_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the name entity of a slackwarepkginfo_object should be 'equals', 'not equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M238"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M238"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M238">
+      <xsl:apply-templates select="@*|node()" mode="M238"/>
+   </xsl:template>
+
+   <!--PATTERN spkginfostename-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:slackwarepkginfo_state/linux-def:name" priority="4000"
+                 mode="M239">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the name entity of a slackwarepkginfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the name entity of a slackwarepkginfo_state should be 'equals', 'not equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M239"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M239"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M239">
+      <xsl:apply-templates select="@*|node()" mode="M239"/>
+   </xsl:template>
+
+   <!--PATTERN spkginfosteversion-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:slackwarepkginfo_state/linux-def:version" priority="4000"
+                 mode="M240">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the version entity of a slackwarepkginfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the version entity of a slackwarepkginfo_state should be 'equals', 'not equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M240"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M240"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M240">
+      <xsl:apply-templates select="@*|node()" mode="M240"/>
+   </xsl:template>
+
+   <!--PATTERN spkginfostearch-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:slackwarepkginfo_state/linux-def:architecture" priority="4000"
+                 mode="M241">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the architecture entity of a slackwarepkginfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the architecture entity of a slackwarepkginfo_state should be 'equals', 'not equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M241"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M241"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M241">
+      <xsl:apply-templates select="@*|node()" mode="M241"/>
+   </xsl:template>
+
+   <!--PATTERN spkginfosterevision-->
+
+
+	<!--RULE -->
+<xsl:template match="linux-def:slackwarepkginfo_state/linux-def:revision" priority="4000"
+                 mode="M242">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the revision entity of a slackwarepkginfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@operation) or @operation='equals' or @operation='not equal' or @operation='pattern match'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - operation attribute for the revision entity of a slackwarepkginfo_state should be 'equals', 'not equal', or 'pattern match'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M242"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M242"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M242">
+      <xsl:apply-templates select="@*|node()" mode="M242"/>
+   </xsl:template>
+
+   <!--PATTERN accountobjusername-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:accountinfo_object/macos-def:username" priority="4000"
+                 mode="M243">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the username entity of an accountinfo_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M243"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M243"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M243">
+      <xsl:apply-templates select="@*|node()" mode="M243"/>
+   </xsl:template>
+
+   <!--PATTERN accountsteusername-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:accountinfo_state/macos-def:username" priority="4000"
+                 mode="M244">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the username entity of an accountinfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M244"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M244"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M244">
+      <xsl:apply-templates select="@*|node()" mode="M244"/>
+   </xsl:template>
+
+   <!--PATTERN accountstepassword-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:accountinfo_state/macos-def:password" priority="4000"
+                 mode="M245">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the password entity of an accountinfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M245"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M245"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M245">
+      <xsl:apply-templates select="@*|node()" mode="M245"/>
+   </xsl:template>
+
+   <!--PATTERN accountsteuid-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:accountinfo_state/macos-def:uid" priority="4000" mode="M246">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the uid entity of an accountinfo_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M246"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M246"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M246">
+      <xsl:apply-templates select="@*|node()" mode="M246"/>
+   </xsl:template>
+
+   <!--PATTERN accountstegid-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:accountinfo_state/macos-def:gid" priority="4000" mode="M247">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the gid entity of an accountinfo_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M247"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M247"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M247">
+      <xsl:apply-templates select="@*|node()" mode="M247"/>
+   </xsl:template>
+
+   <!--PATTERN accountsterealname-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:accountinfo_state/macos-def:realname" priority="4000"
+                 mode="M248">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the realname entity of an accountinfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M248"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M248"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M248">
+      <xsl:apply-templates select="@*|node()" mode="M248"/>
+   </xsl:template>
+
+   <!--PATTERN accountstehome_dir-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:accountinfo_state/macos-def:home_dir" priority="4000"
+                 mode="M249">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the home_dir entity of an accountinfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M249"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M249"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M249">
+      <xsl:apply-templates select="@*|node()" mode="M249"/>
+   </xsl:template>
+
+   <!--PATTERN accountstelogin_shell-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:accountinfo_state/macos-def:login_shell" priority="4000"
+                 mode="M250">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the login_shell entity of an accountinfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M250"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M250"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M250">
+      <xsl:apply-templates select="@*|node()" mode="M250"/>
+   </xsl:template>
+
+   <!--PATTERN macosilsobjprogram_name-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:inetlisteningservers_object/macos-def:program_name"
+                 priority="4000"
+                 mode="M251">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the program_name entity of an inetlisteningservers_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M251"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M251"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M251">
+      <xsl:apply-templates select="@*|node()" mode="M251"/>
+   </xsl:template>
+
+   <!--PATTERN macosilssteprogram_name-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:inetlisteningservers_state/macos-def:program_name"
+                 priority="4000"
+                 mode="M252">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the program_name entity of an inetlisteningservers_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M252"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M252"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M252">
+      <xsl:apply-templates select="@*|node()" mode="M252"/>
+   </xsl:template>
+
+   <!--PATTERN macosilsstelocal_address-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:inetlisteningservers_state/macos-def:local_address"
+                 priority="4000"
+                 mode="M253">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the local_address entity of an inetlisteningservers_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M253"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M253"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M253">
+      <xsl:apply-templates select="@*|node()" mode="M253"/>
+   </xsl:template>
+
+   <!--PATTERN macosilsstelocal_full_address-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:inetlisteningservers_state/macos-def:local_full_address"
+                 priority="4000"
+                 mode="M254">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the local_full_address entity of an inetlisteningservers_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M254"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M254"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M254">
+      <xsl:apply-templates select="@*|node()" mode="M254"/>
+   </xsl:template>
+
+   <!--PATTERN macosilsstelocal_port-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:inetlisteningservers_state/macos-def:local_port"
+                 priority="4000"
+                 mode="M255">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the local_port entity of an inetlisteningservers_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M255"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M255"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M255">
+      <xsl:apply-templates select="@*|node()" mode="M255"/>
+   </xsl:template>
+
+   <!--PATTERN macosilssteforeign_address-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:inetlisteningservers_state/macos-def:foreign_address"
+                 priority="4000"
+                 mode="M256">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the foreign_address entity of an inetlisteningservers_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M256"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M256"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M256">
+      <xsl:apply-templates select="@*|node()" mode="M256"/>
+   </xsl:template>
+
+   <!--PATTERN macosilssteforeign_full_address-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:inetlisteningservers_state/macos-def:foreign_full_address"
+                 priority="4000"
+                 mode="M257">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the foreign_full_address entity of an inetlisteningservers_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M257"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M257"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M257">
+      <xsl:apply-templates select="@*|node()" mode="M257"/>
+   </xsl:template>
+
+   <!--PATTERN macosilssteforeign_port-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:inetlisteningservers_state/macos-def:foreign_port"
+                 priority="4000"
+                 mode="M258">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the foreign_port entity of an inetlisteningservers_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M258"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M258"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M258">
+      <xsl:apply-templates select="@*|node()" mode="M258"/>
+   </xsl:template>
+
+   <!--PATTERN macosilsstepid-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:inetlisteningservers_state/macos-def:pid" priority="4000"
+                 mode="M259">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the pid entity of an inetlisteningservers_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M259"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M259"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M259">
+      <xsl:apply-templates select="@*|node()" mode="M259"/>
+   </xsl:template>
+
+   <!--PATTERN macosilssteprotocol-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:inetlisteningservers_state/macos-def:protocol" priority="4000"
+                 mode="M260">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the protocol entity of an inetlisteningservers_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M260"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M260"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M260">
+      <xsl:apply-templates select="@*|node()" mode="M260"/>
+   </xsl:template>
+
+   <!--PATTERN macosilssteuser_id-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:inetlisteningservers_state/macos-def:user_id" priority="4000"
+                 mode="M261">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the user_id entity of an inetlisteningservers_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M261"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M261"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M261">
+      <xsl:apply-templates select="@*|node()" mode="M261"/>
+   </xsl:template>
+
+   <!--PATTERN nvramobjnvram_var-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:nvram_object/macos-def:nvram_var" priority="4000" mode="M262">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the nvram_var entity of a nvram_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M262"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M262"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M262">
+      <xsl:apply-templates select="@*|node()" mode="M262"/>
+   </xsl:template>
+
+   <!--PATTERN nvramstenvram_var-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:nvram_state/macos-def:nvram_var" priority="4000" mode="M263">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the nvram_var entity of a nvram_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M263"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M263"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M263">
+      <xsl:apply-templates select="@*|node()" mode="M263"/>
+   </xsl:template>
+
+   <!--PATTERN nvramstenvram_value-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:nvram_state/macos-def:nvram_value" priority="4000" mode="M264">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the nvram_value entity of a nvram_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M264"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M264"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M264">
+      <xsl:apply-templates select="@*|node()" mode="M264"/>
+   </xsl:template>
+
+   <!--PATTERN pwpobjusername-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:pwpolicy_object/macos-def:username" priority="4000"
+                 mode="M265">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the username entity of a pwpolicy_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M265"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M265"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M265">
+      <xsl:apply-templates select="@*|node()" mode="M265"/>
+   </xsl:template>
+
+   <!--PATTERN pwpobjuserpass-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:pwpolicy_object/macos-def:userpass" priority="4000"
+                 mode="M266">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the userpass entity of a pwpolicy_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M266"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M266"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M266">
+      <xsl:apply-templates select="@*|node()" mode="M266"/>
+   </xsl:template>
+
+   <!--PATTERN pwpobjdirectory_node-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:pwpolicy_object/macos-def:directory_node" priority="4000"
+                 mode="M267">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the directory_node entity of a pwpolicy_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M267"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M267"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M267">
+      <xsl:apply-templates select="@*|node()" mode="M267"/>
+   </xsl:template>
+
+   <!--PATTERN pwpsteusername-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:pwpolicy_state/macos-def:username" priority="4000" mode="M268">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the username entity of a pwpolicy_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M268"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M268"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M268">
+      <xsl:apply-templates select="@*|node()" mode="M268"/>
+   </xsl:template>
+
+   <!--PATTERN pwpsteuserpass-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:pwpolicy_state/macos-def:userpass" priority="4000" mode="M269">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the userpass entity of a pwpolicy_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M269"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M269"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M269">
+      <xsl:apply-templates select="@*|node()" mode="M269"/>
+   </xsl:template>
+
+   <!--PATTERN pwpstedirectory_node-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:pwpolicy_state/macos-def:directory_node" priority="4000"
+                 mode="M270">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the directory_node entity of a pwpolicy_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M270"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M270"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M270">
+      <xsl:apply-templates select="@*|node()" mode="M270"/>
+   </xsl:template>
+
+   <!--PATTERN pwpstemaxChars-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:pwpolicy_state/macos-def:maxChars" priority="4000" mode="M271">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the maxChars entity of a pwpolicy_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M271"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M271"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M271">
+      <xsl:apply-templates select="@*|node()" mode="M271"/>
+   </xsl:template>
+
+   <!--PATTERN pwpstemaxFailedLoginAttempts-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:pwpolicy_state/macos-def:maxFailedLoginAttempts"
+                 priority="4000"
+                 mode="M272">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the maxFailedLoginAttempts entity of a pwpolicy_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M272"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M272"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M272">
+      <xsl:apply-templates select="@*|node()" mode="M272"/>
+   </xsl:template>
+
+   <!--PATTERN pwpsteminChars-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:pwpolicy_state/macos-def:minChars" priority="4000" mode="M273">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the minChars entity of a pwpolicy_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M273"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M273"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M273">
+      <xsl:apply-templates select="@*|node()" mode="M273"/>
+   </xsl:template>
+
+   <!--PATTERN pwpstepasswordCannotBeName-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:pwpolicy_state/macos-def:passwordCannotBeName" priority="4000"
+                 mode="M274">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the passwordCannotBeName entity of a pwpolicy_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M274"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M274"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M274">
+      <xsl:apply-templates select="@*|node()" mode="M274"/>
+   </xsl:template>
+
+   <!--PATTERN pwpsterequiresAlpha-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:pwpolicy_state/macos-def:requiresAlpha" priority="4000"
+                 mode="M275">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the requiresAlpha entity of a pwpolicy_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M275"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M275"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M275">
+      <xsl:apply-templates select="@*|node()" mode="M275"/>
+   </xsl:template>
+
+   <!--PATTERN pwpsterequiresNumeric-->
+
+
+	<!--RULE -->
+<xsl:template match="macos-def:pwpolicy_state/macos-def:requiresNumeric" priority="4000"
+                 mode="M276">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the requiresNumeric entity of a pwpolicy_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M276"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M276"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M276">
+      <xsl:apply-templates select="@*|node()" mode="M276"/>
+   </xsl:template>
+
+   <!--PATTERN isainfotst-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:isainfo_test/sol-def:object" priority="4000" mode="M277">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/sol-def:smf_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of an isainfo_test must reference an isainfo_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M277"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="sol-def:isainfo_test/sol-def:state" priority="3999" mode="M277">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/sol-def:smf_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of an isainfo_test must reference an isainfo_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M277"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M277"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M277">
+      <xsl:apply-templates select="@*|node()" mode="M277"/>
+   </xsl:template>
+
+   <!--PATTERN isastebits-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:isainfo_state/sol-def:bits" priority="4000" mode="M278">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the bits entity of an isainfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M278"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M278"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M278">
+      <xsl:apply-templates select="@*|node()" mode="M278"/>
+   </xsl:template>
+
+   <!--PATTERN isastekernel_isa-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:isainfo_state/sol-def:kernel_isa" priority="4000" mode="M279">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the kernel_isa entity of an isainfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M279"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M279"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M279">
+      <xsl:apply-templates select="@*|node()" mode="M279"/>
+   </xsl:template>
+
+   <!--PATTERN isasteapplication_isa-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:isainfo_state/sol-def:application_isa" priority="4000"
+                 mode="M280">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the application_isa entity of an isainfo_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M280"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M280"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M280">
+      <xsl:apply-templates select="@*|node()" mode="M280"/>
+   </xsl:template>
+
+   <!--PATTERN packagetst-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:package_test/sol-def:object" priority="4000" mode="M281">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/sol-def:package_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a package_test must reference a package_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M281"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="sol-def:package_test/sol-def:state" priority="3999" mode="M281">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/sol-def:package_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a package_test must reference a package_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M281"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M281"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M281">
+      <xsl:apply-templates select="@*|node()" mode="M281"/>
+   </xsl:template>
+
+   <!--PATTERN packageobjpkginst-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:package_object/sol-def:pkginst" priority="4000" mode="M282">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the pkginst entity of a package_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M282"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M282"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M282">
+      <xsl:apply-templates select="@*|node()" mode="M282"/>
+   </xsl:template>
+
+   <!--PATTERN packagestepkginst-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:package_state/sol-def:pkginst" priority="4000" mode="M283">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the pkginst entity of a package_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M283"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M283"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M283">
+      <xsl:apply-templates select="@*|node()" mode="M283"/>
+   </xsl:template>
+
+   <!--PATTERN packagestename-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:package_state/sol-def:name" priority="4000" mode="M284">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the name entity of a package_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M284"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M284"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M284">
+      <xsl:apply-templates select="@*|node()" mode="M284"/>
+   </xsl:template>
+
+   <!--PATTERN packagestecategory-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:package_state/sol-def:category" priority="4000" mode="M285">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the category entity of a package_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M285"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M285"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M285">
+      <xsl:apply-templates select="@*|node()" mode="M285"/>
+   </xsl:template>
+
+   <!--PATTERN packagesteversion-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:package_state/sol-def:version" priority="4000" mode="M286">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the version entity of a package_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M286"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M286"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M286">
+      <xsl:apply-templates select="@*|node()" mode="M286"/>
+   </xsl:template>
+
+   <!--PATTERN packagestevendor-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:package_state/sol-def:vendor" priority="4000" mode="M287">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the vendor entity of a package_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M287"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M287"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M287">
+      <xsl:apply-templates select="@*|node()" mode="M287"/>
+   </xsl:template>
+
+   <!--PATTERN packagestedescription-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:package_state/sol-def:description" priority="4000" mode="M288">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the description entity of a package_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M288"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M288"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M288">
+      <xsl:apply-templates select="@*|node()" mode="M288"/>
+   </xsl:template>
+
+   <!--PATTERN patch54tst-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:patch54_test/sol-def:object" priority="4000" mode="M289">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/sol-def:patch54_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a patch54_test must reference a patch54_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M289"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="sol-def:patch54_test/sol-def:state" priority="3999" mode="M289">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/sol-def:patch_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a patch54_test must reference a patch_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M289"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M289"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M289">
+      <xsl:apply-templates select="@*|node()" mode="M289"/>
+   </xsl:template>
+
+   <!--PATTERN patchtst-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:patch_test/sol-def:object" priority="4000" mode="M290">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/sol-def:patch_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a patch_test must reference a patch_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M290"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="sol-def:patch_test/sol-def:state" priority="3999" mode="M290">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/sol-def:patch_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a patch_test must reference a patch_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M290"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M290"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M290">
+      <xsl:apply-templates select="@*|node()" mode="M290"/>
+   </xsl:template>
+
+   <!--PATTERN patch54objbase-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:patch54_object/sol-def:base" priority="4000" mode="M291">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the base entity of a patch54_object should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M291"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M291"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M291">
+      <xsl:apply-templates select="@*|node()" mode="M291"/>
+   </xsl:template>
+
+   <!--PATTERN patch54objversion-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:patch54_object/sol-def:version" priority="4000" mode="M292">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the version entity of a patch54_object should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M292"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M292"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M292">
+      <xsl:apply-templates select="@*|node()" mode="M292"/>
+   </xsl:template>
+
+   <!--PATTERN patchobjbase-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:patch_object/sol-def:base" priority="4000" mode="M293">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the base entity of a patch_object should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M293"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M293"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M293">
+      <xsl:apply-templates select="@*|node()" mode="M293"/>
+   </xsl:template>
+
+   <!--PATTERN patchstebase-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:patch_state/sol-def:base" priority="4000" mode="M294">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the base entity of a patch_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M294"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M294"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M294">
+      <xsl:apply-templates select="@*|node()" mode="M294"/>
+   </xsl:template>
+
+   <!--PATTERN patchsteversion-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:patch_state/sol-def:version" priority="4000" mode="M295">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the version entity of a patch_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M295"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M295"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M295">
+      <xsl:apply-templates select="@*|node()" mode="M295"/>
+   </xsl:template>
+
+   <!--PATTERN smftst-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:smf_test/sol-def:object" priority="4000" mode="M296">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/sol-def:smf_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a smf_test must reference a smf_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M296"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="sol-def:smf_test/sol-def:state" priority="3999" mode="M296">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/sol-def:smf_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a smf_test must reference a smf_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M296"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M296"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M296">
+      <xsl:apply-templates select="@*|node()" mode="M296"/>
+   </xsl:template>
+
+   <!--PATTERN fmriobjbase-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:smf_object/sol-def:fmri" priority="4000" mode="M297">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the fmri entity of a smf_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M297"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M297"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M297">
+      <xsl:apply-templates select="@*|node()" mode="M297"/>
+   </xsl:template>
+
+   <!--PATTERN fmristebase-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:smf_state/sol-def:fmri" priority="4000" mode="M298">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the fmri entity of a smf_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M298"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M298"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M298">
+      <xsl:apply-templates select="@*|node()" mode="M298"/>
+   </xsl:template>
+
+   <!--PATTERN srvnamestebase-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:smf_state/sol-def:service_name" priority="4000" mode="M299">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the service_name entity of a smf_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M299"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M299"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M299">
+      <xsl:apply-templates select="@*|node()" mode="M299"/>
+   </xsl:template>
+
+   <!--PATTERN srvstatestebase-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:smf_state/sol-def:service_state" priority="4000" mode="M300">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the service_state entity of a smf_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M300"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M300"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M300">
+      <xsl:apply-templates select="@*|node()" mode="M300"/>
+   </xsl:template>
+
+   <!--PATTERN protocolstebase-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:smf_state/sol-def:protocol" priority="4000" mode="M301">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the protocol entity of a smf_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M301"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M301"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M301">
+      <xsl:apply-templates select="@*|node()" mode="M301"/>
+   </xsl:template>
+
+   <!--PATTERN srvexestebase-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:smf_state/sol-def:server_executable" priority="4000" mode="M302">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the server_executable entity of a smf_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M302"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M302"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M302">
+      <xsl:apply-templates select="@*|node()" mode="M302"/>
+   </xsl:template>
+
+   <!--PATTERN srvargsstebase-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:smf_state/sol-def:server_arguements" priority="4000" mode="M303">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the server_arguements entity of a smf_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M303"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M303"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M303">
+      <xsl:apply-templates select="@*|node()" mode="M303"/>
+   </xsl:template>
+
+   <!--PATTERN execasuserstebase-->
+
+
+	<!--RULE -->
+<xsl:template match="sol-def:smf_state/sol-def:exec_as_user" priority="4000" mode="M304">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the exec_as_user entity of a smf_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M304"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M304"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M304">
+      <xsl:apply-templates select="@*|node()" mode="M304"/>
+   </xsl:template>
+
+   <!--PATTERN unixfileobjpath-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_object/unix-def:path" priority="4000" mode="M305">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a file_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M305"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M305"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M305">
+      <xsl:apply-templates select="@*|node()" mode="M305"/>
+   </xsl:template>
+
+   <!--PATTERN unixfileobjfilename-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_object/unix-def:filename" priority="4000" mode="M306">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filename entity of a file_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M306"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M306"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M306">
+      <xsl:apply-templates select="@*|node()" mode="M306"/>
+   </xsl:template>
+
+   <!--PATTERN unixfilestepath-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_state/unix-def:path" priority="4000" mode="M307">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a file_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M307"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M307"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M307">
+      <xsl:apply-templates select="@*|node()" mode="M307"/>
+   </xsl:template>
+
+   <!--PATTERN unixfilestefilename-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_state/unix-def:filename" priority="4000" mode="M308">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filename entity of a file_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M308"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M308"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M308">
+      <xsl:apply-templates select="@*|node()" mode="M308"/>
+   </xsl:template>
+
+   <!--PATTERN unixfilestetype-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_state/unix-def:type" priority="4000" mode="M309">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the type entity of a file_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M309"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M309"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M309">
+      <xsl:apply-templates select="@*|node()" mode="M309"/>
+   </xsl:template>
+
+   <!--PATTERN unixfilestegroup_id-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_state/unix-def:group_id" priority="4000" mode="M310">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the group_id entity of a file_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M310"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M310"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M310">
+      <xsl:apply-templates select="@*|node()" mode="M310"/>
+   </xsl:template>
+
+   <!--PATTERN unixfilesteuser_id-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_state/unix-def:user_id" priority="4000" mode="M311">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the user_id entity of a file_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M311"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M311"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M311">
+      <xsl:apply-templates select="@*|node()" mode="M311"/>
+   </xsl:template>
+
+   <!--PATTERN unixfilestea_time-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_state/unix-def:a_time" priority="4000" mode="M312">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the a_time entity of a file_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M312"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M312"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M312">
+      <xsl:apply-templates select="@*|node()" mode="M312"/>
+   </xsl:template>
+
+   <!--PATTERN unixfilestec_time-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_state/unix-def:c_time" priority="4000" mode="M313">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the c_time entity of a file_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M313"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M313"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M313">
+      <xsl:apply-templates select="@*|node()" mode="M313"/>
+   </xsl:template>
+
+   <!--PATTERN unixfilestem_time-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_state/unix-def:m_time" priority="4000" mode="M314">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the m_time entity of a file_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M314"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M314"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M314">
+      <xsl:apply-templates select="@*|node()" mode="M314"/>
+   </xsl:template>
+
+   <!--PATTERN unixfilestesize-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_state/unix-def:size" priority="4000" mode="M315">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the size entity of a file_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M315"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M315"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M315">
+      <xsl:apply-templates select="@*|node()" mode="M315"/>
+   </xsl:template>
+
+   <!--PATTERN unixfilestesuid-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_state/unix-def:suid" priority="4000" mode="M316">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the suid entity of a file_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M316"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M316"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M316">
+      <xsl:apply-templates select="@*|node()" mode="M316"/>
+   </xsl:template>
+
+   <!--PATTERN unixfilestesgid-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_state/unix-def:sgid" priority="4000" mode="M317">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the sgid entity of a file_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M317"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M317"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M317">
+      <xsl:apply-templates select="@*|node()" mode="M317"/>
+   </xsl:template>
+
+   <!--PATTERN unixfilestesticky-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_state/unix-def:sticky" priority="4000" mode="M318">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the sticky entity of a file_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M318"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M318"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M318">
+      <xsl:apply-templates select="@*|node()" mode="M318"/>
+   </xsl:template>
+
+   <!--PATTERN unixfilesteuread-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_state/unix-def:uread" priority="4000" mode="M319">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the uread entity of a file_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M319"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M319"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M319">
+      <xsl:apply-templates select="@*|node()" mode="M319"/>
+   </xsl:template>
+
+   <!--PATTERN unixfilesteuwrite-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_state/unix-def:uwrite" priority="4000" mode="M320">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the uwrite entity of a file_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M320"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M320"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M320">
+      <xsl:apply-templates select="@*|node()" mode="M320"/>
+   </xsl:template>
+
+   <!--PATTERN unixfilesteuexec-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_state/unix-def:uexec" priority="4000" mode="M321">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the uexec entity of a file_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M321"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M321"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M321">
+      <xsl:apply-templates select="@*|node()" mode="M321"/>
+   </xsl:template>
+
+   <!--PATTERN unixfilestegread-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_state/unix-def:gread" priority="4000" mode="M322">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the gread entity of a file_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M322"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M322"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M322">
+      <xsl:apply-templates select="@*|node()" mode="M322"/>
+   </xsl:template>
+
+   <!--PATTERN unixfilestegwrite-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_state/unix-def:gwrite" priority="4000" mode="M323">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the gwrite entity of a file_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M323"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M323"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M323">
+      <xsl:apply-templates select="@*|node()" mode="M323"/>
+   </xsl:template>
+
+   <!--PATTERN unixfilestegexec-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_state/unix-def:gexec" priority="4000" mode="M324">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the gexec entity of a file_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M324"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M324"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M324">
+      <xsl:apply-templates select="@*|node()" mode="M324"/>
+   </xsl:template>
+
+   <!--PATTERN unixfilesteoread-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_state/unix-def:oread" priority="4000" mode="M325">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the oread entity of a file_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M325"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M325"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M325">
+      <xsl:apply-templates select="@*|node()" mode="M325"/>
+   </xsl:template>
+
+   <!--PATTERN unixfilesteowrite-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_state/unix-def:owrite" priority="4000" mode="M326">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the owrite entity of a file_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M326"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M326"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M326">
+      <xsl:apply-templates select="@*|node()" mode="M326"/>
+   </xsl:template>
+
+   <!--PATTERN unixfilesteoexec-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_state/unix-def:oexec" priority="4000" mode="M327">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the oexec entity of a file_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M327"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M327"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M327">
+      <xsl:apply-templates select="@*|node()" mode="M327"/>
+   </xsl:template>
+
+   <!--PATTERN inetdobjprotocol-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:inetd_object/unix-def:protocol" priority="4000" mode="M328">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the protocol entity of an inetd_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M328"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M328"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M328">
+      <xsl:apply-templates select="@*|node()" mode="M328"/>
+   </xsl:template>
+
+   <!--PATTERN inetdobjservice_name-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:inetd_object/unix-def:service_name" priority="4000" mode="M329">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the service_name entity of an inetd_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M329"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M329"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M329">
+      <xsl:apply-templates select="@*|node()" mode="M329"/>
+   </xsl:template>
+
+   <!--PATTERN inetdsteprotocol-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:inetd_state/unix-def:protocol" priority="4000" mode="M330">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the protocol entity of an inetd_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M330"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M330"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M330">
+      <xsl:apply-templates select="@*|node()" mode="M330"/>
+   </xsl:template>
+
+   <!--PATTERN inetdsteservice_name-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:inetd_state/unix-def:service_name" priority="4000" mode="M331">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the service_name entity of an inetd_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M331"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M331"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M331">
+      <xsl:apply-templates select="@*|node()" mode="M331"/>
+   </xsl:template>
+
+   <!--PATTERN inetdsteserver_program-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:inetd_state/unix-def:server_program" priority="4000"
+                 mode="M332">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the server_program entity of an inetd_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M332"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M332"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M332">
+      <xsl:apply-templates select="@*|node()" mode="M332"/>
+   </xsl:template>
+
+   <!--PATTERN inetdsteserver_arguments-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:inetd_state/unix-def:server_arguments" priority="4000"
+                 mode="M333">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the server_arguments entity of an inetd_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M333"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M333"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M333">
+      <xsl:apply-templates select="@*|node()" mode="M333"/>
+   </xsl:template>
+
+   <!--PATTERN inetdsteendpoint_type-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:inetd_state/unix-def:endpoint_type" priority="4000" mode="M334">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the endpoint_type entity of an inetd_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M334"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M334"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M334">
+      <xsl:apply-templates select="@*|node()" mode="M334"/>
+   </xsl:template>
+
+   <!--PATTERN inetdsteexec_as_user-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:inetd_state/unix-def:exec_as_user" priority="4000" mode="M335">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the exec_as_user entity of an inetd_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M335"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M335"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M335">
+      <xsl:apply-templates select="@*|node()" mode="M335"/>
+   </xsl:template>
+
+   <!--PATTERN inetdstewait_status-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:inetd_state/unix-def:wait_status" priority="4000" mode="M336">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the wait_status entity of an inetd_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M336"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M336"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M336">
+      <xsl:apply-templates select="@*|node()" mode="M336"/>
+   </xsl:template>
+
+   <!--PATTERN unixinterfaceobjname-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:interface_object/unix-def:name" priority="4000" mode="M337">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the name entity of an interface_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M337"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M337"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M337">
+      <xsl:apply-templates select="@*|node()" mode="M337"/>
+   </xsl:template>
+
+   <!--PATTERN unixinterfacestename-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:interface_state/unix-def:name" priority="4000" mode="M338">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the name entity of an interface_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M338"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M338"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M338">
+      <xsl:apply-templates select="@*|node()" mode="M338"/>
+   </xsl:template>
+
+   <!--PATTERN unixinterfacestehardware_addr-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:interface_state/unix-def:hardware_addr" priority="4000"
+                 mode="M339">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the hardware_addr entity of an interface_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M339"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M339"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M339">
+      <xsl:apply-templates select="@*|node()" mode="M339"/>
+   </xsl:template>
+
+   <!--PATTERN unixinterfacesteinet_addr-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:interface_state/unix-def:inet_addr" priority="4000" mode="M340">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the inet_addr entity of an interface_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M340"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M340"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M340">
+      <xsl:apply-templates select="@*|node()" mode="M340"/>
+   </xsl:template>
+
+   <!--PATTERN unixinterfacestebroadcast_addr-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:interface_state/unix-def:broadcast_addr" priority="4000"
+                 mode="M341">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the broadcast_addr entity of an interface_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M341"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M341"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M341">
+      <xsl:apply-templates select="@*|node()" mode="M341"/>
+   </xsl:template>
+
+   <!--PATTERN unixinterfacestenetmask-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:interface_state/unix-def:netmask" priority="4000" mode="M342">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the netmask entity of an interface_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M342"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M342"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M342">
+      <xsl:apply-templates select="@*|node()" mode="M342"/>
+   </xsl:template>
+
+   <!--PATTERN unixinterfacesteflag-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:interface_state/unix-def:flag" priority="4000" mode="M343">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for a flag entity of an interface_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M343"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M343"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M343">
+      <xsl:apply-templates select="@*|node()" mode="M343"/>
+   </xsl:template>
+
+   <!--PATTERN passwordobjusername-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:password_object/unix-def:username" priority="4000" mode="M344">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the username entity of a password_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M344"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M344"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M344">
+      <xsl:apply-templates select="@*|node()" mode="M344"/>
+   </xsl:template>
+
+   <!--PATTERN passwordsteusername-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:package_state/unix-def:username" priority="4000" mode="M345">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the username entity of a password_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M345"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M345"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M345">
+      <xsl:apply-templates select="@*|node()" mode="M345"/>
+   </xsl:template>
+
+   <!--PATTERN passwordstepassword-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:package_state/unix-def:password" priority="4000" mode="M346">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the password entity of a password_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M346"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M346"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M346">
+      <xsl:apply-templates select="@*|node()" mode="M346"/>
+   </xsl:template>
+
+   <!--PATTERN passwordsteuser_id-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:package_state/unix-def:user_id" priority="4000" mode="M347">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the user_id entity of a password_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M347"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M347"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M347">
+      <xsl:apply-templates select="@*|node()" mode="M347"/>
+   </xsl:template>
+
+   <!--PATTERN passwordstegroup_id-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:package_state/unix-def:group_id" priority="4000" mode="M348">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the group_id entity of a password_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M348"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M348"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M348">
+      <xsl:apply-templates select="@*|node()" mode="M348"/>
+   </xsl:template>
+
+   <!--PATTERN passwordstegcos-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:package_state/unix-def:gcos" priority="4000" mode="M349">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the gcos entity of a password_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M349"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M349"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M349">
+      <xsl:apply-templates select="@*|node()" mode="M349"/>
+   </xsl:template>
+
+   <!--PATTERN passwordstehome_dir-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:package_state/unix-def:home_dir" priority="4000" mode="M350">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the home_dir entity of a password_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M350"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M350"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M350">
+      <xsl:apply-templates select="@*|node()" mode="M350"/>
+   </xsl:template>
+
+   <!--PATTERN passwordstelogin_shell-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:package_state/unix-def:login_shell" priority="4000" mode="M351">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the login_shell entity of a password_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M351"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M351"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M351">
+      <xsl:apply-templates select="@*|node()" mode="M351"/>
+   </xsl:template>
+
+   <!--PATTERN unixprocessobjcommand-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:process_object/unix-def:command" priority="4000" mode="M352">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the command entity of a process_object be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M352"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M352"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M352">
+      <xsl:apply-templates select="@*|node()" mode="M352"/>
+   </xsl:template>
+
+   <!--PATTERN unixprocessstecommand-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:process_state/unix-def:command" priority="4000" mode="M353">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the command entity of a process_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M353"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M353"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M353">
+      <xsl:apply-templates select="@*|node()" mode="M353"/>
+   </xsl:template>
+
+   <!--PATTERN unixprocesssteexec_time-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:process_state/unix-def:exec_time" priority="4000" mode="M354">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the exec_time entity of a process_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M354"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M354"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M354">
+      <xsl:apply-templates select="@*|node()" mode="M354"/>
+   </xsl:template>
+
+   <!--PATTERN unixprocessstepid-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:process_state/unix-def:pid" priority="4000" mode="M355">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the pid entity of a process_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M355"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M355"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M355">
+      <xsl:apply-templates select="@*|node()" mode="M355"/>
+   </xsl:template>
+
+   <!--PATTERN unixprocesssteppid-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:process_state/unix-def:ppid" priority="4000" mode="M356">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the ppid entity of a process_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M356"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M356"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M356">
+      <xsl:apply-templates select="@*|node()" mode="M356"/>
+   </xsl:template>
+
+   <!--PATTERN unixprocessstepriority-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:process_state/unix-def:priority" priority="4000" mode="M357">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the priority entity of a process_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M357"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M357"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M357">
+      <xsl:apply-templates select="@*|node()" mode="M357"/>
+   </xsl:template>
+
+   <!--PATTERN unixprocessstescheduling_class-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:process_state/unix-def:scheduling_class" priority="4000"
+                 mode="M358">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the scheduling_class entity of a process_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M358"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M358"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M358">
+      <xsl:apply-templates select="@*|node()" mode="M358"/>
+   </xsl:template>
+
+   <!--PATTERN unixprocessstestart_time-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:process_state/unix-def:start_time" priority="4000" mode="M359">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the start_time entity of a process_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M359"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M359"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M359">
+      <xsl:apply-templates select="@*|node()" mode="M359"/>
+   </xsl:template>
+
+   <!--PATTERN unixprocessstetty-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:process_state/unix-def:tty" priority="4000" mode="M360">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the tty entity of a process_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M360"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M360"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M360">
+      <xsl:apply-templates select="@*|node()" mode="M360"/>
+   </xsl:template>
+
+   <!--PATTERN unixprocesssteuser_id-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:process_state/unix-def:user_id" priority="4000" mode="M361">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the user_id entity of a process_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M361"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M361"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M361">
+      <xsl:apply-templates select="@*|node()" mode="M361"/>
+   </xsl:template>
+
+   <!--PATTERN unixrlobjservice_name-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:runlevel_object/unix-def:service_name" priority="4000"
+                 mode="M362">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the service_name entity of a runlevel_object be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M362"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M362"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M362">
+      <xsl:apply-templates select="@*|node()" mode="M362"/>
+   </xsl:template>
+
+   <!--PATTERN unixrlobjrunlevel-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:runlevel_object/unix-def:runlevel" priority="4000" mode="M363">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the runlevel entity of a runlevel_object be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M363"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M363"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M363">
+      <xsl:apply-templates select="@*|node()" mode="M363"/>
+   </xsl:template>
+
+   <!--PATTERN unixrlsteservice_name-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:runlevel_state/unix-def:service_name" priority="4000"
+                 mode="M364">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the service_name entity of a runlevel_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M364"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M364"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M364">
+      <xsl:apply-templates select="@*|node()" mode="M364"/>
+   </xsl:template>
+
+   <!--PATTERN unixrlsterunlevel-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:runlevel_state/unix-def:runlevel" priority="4000" mode="M365">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the runlevel entity of a runlevel_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M365"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M365"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M365">
+      <xsl:apply-templates select="@*|node()" mode="M365"/>
+   </xsl:template>
+
+   <!--PATTERN unixrlstestart-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:runlevel_state/unix-def:start" priority="4000" mode="M366">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the start entity of a runlevel_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M366"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M366"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M366">
+      <xsl:apply-templates select="@*|node()" mode="M366"/>
+   </xsl:template>
+
+   <!--PATTERN unixrlstekill-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:runlevel_state/unix-def:kill" priority="4000" mode="M367">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the kill entity of a runlevel_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M367"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M367"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M367">
+      <xsl:apply-templates select="@*|node()" mode="M367"/>
+   </xsl:template>
+
+   <!--PATTERN sccsobjpath-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_object/unix-def:path" priority="4000" mode="M368">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a sccs_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M368"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M368"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M368">
+      <xsl:apply-templates select="@*|node()" mode="M368"/>
+   </xsl:template>
+
+   <!--PATTERN sccsobjfilename-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:file_object/unix-def:filename" priority="4000" mode="M369">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filename entity of a sccs_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M369"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M369"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M369">
+      <xsl:apply-templates select="@*|node()" mode="M369"/>
+   </xsl:template>
+
+   <!--PATTERN sccsstepath-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:sccs_state/unix-def:path" priority="4000" mode="M370">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a sccs_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M370"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M370"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M370">
+      <xsl:apply-templates select="@*|node()" mode="M370"/>
+   </xsl:template>
+
+   <!--PATTERN sccsstefilename-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:sccs_state/unix-def:filename" priority="4000" mode="M371">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filename entity of a sccs_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M371"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M371"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M371">
+      <xsl:apply-templates select="@*|node()" mode="M371"/>
+   </xsl:template>
+
+   <!--PATTERN sccsstemodule_name-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:sccs_state/unix-def:module_name" priority="4000" mode="M372">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the module_name entity of a sccs_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M372"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M372"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M372">
+      <xsl:apply-templates select="@*|node()" mode="M372"/>
+   </xsl:template>
+
+   <!--PATTERN sccsstemodule_type-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:sccs_state/unix-def:module_type" priority="4000" mode="M373">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the module_type entity of a sccs_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M373"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M373"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M373">
+      <xsl:apply-templates select="@*|node()" mode="M373"/>
+   </xsl:template>
+
+   <!--PATTERN sccssterelease-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:sccs_state/unix-def:release" priority="4000" mode="M374">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the release entity of a sccs_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M374"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M374"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M374">
+      <xsl:apply-templates select="@*|node()" mode="M374"/>
+   </xsl:template>
+
+   <!--PATTERN sccsstelevel-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:sccs_state/unix-def:level" priority="4000" mode="M375">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the level entity of a sccs_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M375"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M375"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M375">
+      <xsl:apply-templates select="@*|node()" mode="M375"/>
+   </xsl:template>
+
+   <!--PATTERN sccsstebranch-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:sccs_state/unix-def:branch" priority="4000" mode="M376">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the branch entity of a sccs_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M376"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M376"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M376">
+      <xsl:apply-templates select="@*|node()" mode="M376"/>
+   </xsl:template>
+
+   <!--PATTERN sccsstesequence-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:sccs_state/unix-def:sequence" priority="4000" mode="M377">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the sequence entity of a sccs_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M377"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M377"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M377">
+      <xsl:apply-templates select="@*|node()" mode="M377"/>
+   </xsl:template>
+
+   <!--PATTERN sccsstewhat_string-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:sccs_state/unix-def:what_string" priority="4000" mode="M378">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the what_string entity of a sccs_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M378"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M378"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M378">
+      <xsl:apply-templates select="@*|node()" mode="M378"/>
+   </xsl:template>
+
+   <!--PATTERN shadowobjusername-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:shadow_object/unix-def:username" priority="4000" mode="M379">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the username entity of a shadow_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M379"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M379"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M379">
+      <xsl:apply-templates select="@*|node()" mode="M379"/>
+   </xsl:template>
+
+   <!--PATTERN shadowsteusername-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:shadow_state/unix-def:username" priority="4000" mode="M380">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the username entity of a shadow_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M380"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M380"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M380">
+      <xsl:apply-templates select="@*|node()" mode="M380"/>
+   </xsl:template>
+
+   <!--PATTERN shadowstepassword-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:shadow_state/unix-def:password" priority="4000" mode="M381">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the password entity of a shadow_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M381"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M381"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M381">
+      <xsl:apply-templates select="@*|node()" mode="M381"/>
+   </xsl:template>
+
+   <!--PATTERN shadowstechg_lst-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:shadow_state/unix-def:chg_lst" priority="4000" mode="M382">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the chg_lst entity of a shadow_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M382"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M382"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M382">
+      <xsl:apply-templates select="@*|node()" mode="M382"/>
+   </xsl:template>
+
+   <!--PATTERN shadowstechg_allow-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:shadow_state/unix-def:chg_allow" priority="4000" mode="M383">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the chg_allow entity of a shadow_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M383"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M383"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M383">
+      <xsl:apply-templates select="@*|node()" mode="M383"/>
+   </xsl:template>
+
+   <!--PATTERN shadowstechg_req-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:shadow_state/unix-def:chg_req" priority="4000" mode="M384">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the chg_req entity of a shadow_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M384"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M384"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M384">
+      <xsl:apply-templates select="@*|node()" mode="M384"/>
+   </xsl:template>
+
+   <!--PATTERN shadowsteexp_warn-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:shadow_state/unix-def:exp_warn" priority="4000" mode="M385">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the exp_warn entity of a shadow_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M385"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M385"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M385">
+      <xsl:apply-templates select="@*|node()" mode="M385"/>
+   </xsl:template>
+
+   <!--PATTERN shadowsteexp_inact-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:shadow_state/unix-def:exp_inact" priority="4000" mode="M386">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the exp_inact entity of a shadow_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M386"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M386"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M386">
+      <xsl:apply-templates select="@*|node()" mode="M386"/>
+   </xsl:template>
+
+   <!--PATTERN shadowsteexp_date-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:shadow_state/unix-def:exp_date" priority="4000" mode="M387">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the exp_date entity of a shadow_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M387"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M387"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M387">
+      <xsl:apply-templates select="@*|node()" mode="M387"/>
+   </xsl:template>
+
+   <!--PATTERN shadowsteflag-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:shadow_state/unix-def:flag" priority="4000" mode="M388">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the flag entity of a shadow_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M388"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M388"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M388">
+      <xsl:apply-templates select="@*|node()" mode="M388"/>
+   </xsl:template>
+
+   <!--PATTERN unamestemachine_class-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:uname_state/unix-def:machine_class" priority="4000" mode="M389">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the machine_class entity of a uname_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M389"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M389"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M389">
+      <xsl:apply-templates select="@*|node()" mode="M389"/>
+   </xsl:template>
+
+   <!--PATTERN unamestenode_name-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:uname_state/unix-def:node_name" priority="4000" mode="M390">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the node_name entity of a uname_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M390"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M390"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M390">
+      <xsl:apply-templates select="@*|node()" mode="M390"/>
+   </xsl:template>
+
+   <!--PATTERN unamesteos_name-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:uname_state/unix-def:os_name" priority="4000" mode="M391">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the os_name entity of a uname_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M391"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M391"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M391">
+      <xsl:apply-templates select="@*|node()" mode="M391"/>
+   </xsl:template>
+
+   <!--PATTERN unamesteos_release-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:uname_state/unix-def:os_release" priority="4000" mode="M392">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the os_release entity of a uname_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M392"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M392"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M392">
+      <xsl:apply-templates select="@*|node()" mode="M392"/>
+   </xsl:template>
+
+   <!--PATTERN unamesteos_version-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:uname_state/unix-def:os_version" priority="4000" mode="M393">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the os_version entity of a uname_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M393"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M393"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M393">
+      <xsl:apply-templates select="@*|node()" mode="M393"/>
+   </xsl:template>
+
+   <!--PATTERN unamesteprocessor_type-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:uname_state/unix-def:processor_type" priority="4000"
+                 mode="M394">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the processor_type entity of a uname_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M394"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M394"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M394">
+      <xsl:apply-templates select="@*|node()" mode="M394"/>
+   </xsl:template>
+
+   <!--PATTERN xinetdobjprotocol-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:xinetd_object/unix-def:protocol" priority="4000" mode="M395">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the protocol entity of an xinetd_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M395"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M395"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M395">
+      <xsl:apply-templates select="@*|node()" mode="M395"/>
+   </xsl:template>
+
+   <!--PATTERN xinetdobjservice_name-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:xinetd_object/unix-def:service_name" priority="4000"
+                 mode="M396">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the service_name entity of an xinetd_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M396"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M396"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M396">
+      <xsl:apply-templates select="@*|node()" mode="M396"/>
+   </xsl:template>
+
+   <!--PATTERN xinetdsteprotocol-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:xinetd_state/unix-def:protocol" priority="4000" mode="M397">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the protocol entity of an xinetd_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M397"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M397"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M397">
+      <xsl:apply-templates select="@*|node()" mode="M397"/>
+   </xsl:template>
+
+   <!--PATTERN xinetdsteservice_name-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:xinetd_state/unix-def:service_name" priority="4000" mode="M398">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the service_name entity of an xinetd_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M398"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M398"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M398">
+      <xsl:apply-templates select="@*|node()" mode="M398"/>
+   </xsl:template>
+
+   <!--PATTERN xinetdsteflags-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:xinetd_state/unix-def:flags" priority="4000" mode="M399">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the flags entity of an xinetd_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M399"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M399"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M399">
+      <xsl:apply-templates select="@*|node()" mode="M399"/>
+   </xsl:template>
+
+   <!--PATTERN xinetdstenoaccess-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:xinetd_state/unix-def:no_access" priority="4000" mode="M400">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the no_access entity of an xinetd_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M400"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M400"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M400">
+      <xsl:apply-templates select="@*|node()" mode="M400"/>
+   </xsl:template>
+
+   <!--PATTERN xinetdsteonlyfrom-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:xinetd_state/unix-def:only_from" priority="4000" mode="M401">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the only_from entity of an xinetd_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M401"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M401"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M401">
+      <xsl:apply-templates select="@*|node()" mode="M401"/>
+   </xsl:template>
+
+   <!--PATTERN xinetdsteport-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:xinetd_state/unix-def:port" priority="4000" mode="M402">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the port entity of an xinetd_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M402"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M402"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M402">
+      <xsl:apply-templates select="@*|node()" mode="M402"/>
+   </xsl:template>
+
+   <!--PATTERN xinetdsteserver-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:xinetd_state/unix-def:server" priority="4000" mode="M403">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the server entity of an xinetd_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M403"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M403"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M403">
+      <xsl:apply-templates select="@*|node()" mode="M403"/>
+   </xsl:template>
+
+   <!--PATTERN xinetdsteserverarguments-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:xinetd_state/unix-def:server_arguments" priority="4000"
+                 mode="M404">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the server_arguments entity of an xinetd_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M404"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M404"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M404">
+      <xsl:apply-templates select="@*|node()" mode="M404"/>
+   </xsl:template>
+
+   <!--PATTERN xinetdstesockettype-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:xinetd_state/unix-def:socket_type" priority="4000" mode="M405">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the socket_type entity of an xinetd_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M405"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M405"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M405">
+      <xsl:apply-templates select="@*|node()" mode="M405"/>
+   </xsl:template>
+
+   <!--PATTERN xinetdstetype-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:xinetd_state/unix-def:type" priority="4000" mode="M406">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the type entity of an xinetd_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M406"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M406"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M406">
+      <xsl:apply-templates select="@*|node()" mode="M406"/>
+   </xsl:template>
+
+   <!--PATTERN xinetdsteuser-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:xinetd_state/unix-def:user" priority="4000" mode="M407">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the user entity of an xinetd_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M407"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M407"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M407">
+      <xsl:apply-templates select="@*|node()" mode="M407"/>
+   </xsl:template>
+
+   <!--PATTERN xinetdstewait-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:xinetd_state/unix-def:wait" priority="4000" mode="M408">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the wait entity of an xinetd_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M408"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M408"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M408">
+      <xsl:apply-templates select="@*|node()" mode="M408"/>
+   </xsl:template>
+
+   <!--PATTERN xinetdstedisabled-->
+
+
+	<!--RULE -->
+<xsl:template match="unix-def:xinetd_state/unix-def:disabled" priority="4000" mode="M409">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the disabled entity of an xinetd_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M409"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M409"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M409">
+      <xsl:apply-templates select="@*|node()" mode="M409"/>
+   </xsl:template>
+
+   <!--PATTERN affected_platform-->
+
+
+	<!--RULE -->
+<xsl:template match="oval-def:affected[@family='windows']" priority="4000" mode="M410">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(oval-def:platform) or oval-def:platform='Microsoft Windows 95' or oval-def:platform='Microsoft Windows 98' or oval-def:platform='Microsoft Windows ME' or oval-def:platform='Microsoft Windows NT' or oval-def:platform='Microsoft Windows 2000' or oval-def:platform='Microsoft Windows XP' or oval-def:platform='Microsoft Windows Server 2003' or oval-def:platform='Microsoft Windows Vista' or oval-def:platform='Microsoft Windows Server 2008'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../../@id"/>
+            <xsl:text/> - the value "<xsl:text/>
+            <xsl:value-of select="oval-def:platform"/>
+            <xsl:text/>" found in platform element as part of the affected element is not a valid windows platform.<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M410"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M410"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M410">
+      <xsl:apply-templates select="@*|node()" mode="M410"/>
+   </xsl:template>
+
+   <!--PATTERN attst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_test/win-def:object" priority="4000" mode="M411">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:accesstoken_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of an accesstoken_test must reference an accesstoken_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M411"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:accesstoken_test/win-def:state" priority="3999" mode="M411">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:accesstoken_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of an accesstoken_test must reference an accesstoken_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M411"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M411"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M411">
+      <xsl:apply-templates select="@*|node()" mode="M411"/>
+   </xsl:template>
+
+   <!--PATTERN atobjsecurity_principle-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_object/win-def:security_principle" priority="4000"
+                 mode="M412">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the security_principle entity of an accesstoken_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M412"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M412"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M412">
+      <xsl:apply-templates select="@*|node()" mode="M412"/>
+   </xsl:template>
+
+   <!--PATTERN atstesecurity_principle-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:security_principle" priority="4000"
+                 mode="M413">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the security_principle entity of an accesstoken_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M413"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M413"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M413">
+      <xsl:apply-templates select="@*|node()" mode="M413"/>
+   </xsl:template>
+
+   <!--PATTERN atsteseassignprimarytokenprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:seassignprimarytokenprivilege"
+                 priority="4000"
+                 mode="M414">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the seassignprimarytokenprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M414"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M414"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M414">
+      <xsl:apply-templates select="@*|node()" mode="M414"/>
+   </xsl:template>
+
+   <!--PATTERN atsteseauditprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:seauditprivilege" priority="4000"
+                 mode="M415">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the seauditprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M415"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M415"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M415">
+      <xsl:apply-templates select="@*|node()" mode="M415"/>
+   </xsl:template>
+
+   <!--PATTERN atstesebackupprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:sebackupprivilege" priority="4000"
+                 mode="M416">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the sebackupprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M416"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M416"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M416">
+      <xsl:apply-templates select="@*|node()" mode="M416"/>
+   </xsl:template>
+
+   <!--PATTERN atstesechangenotifyprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:sechangenotifyprivilege"
+                 priority="4000"
+                 mode="M417">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the sechangenotifyprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M417"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M417"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M417">
+      <xsl:apply-templates select="@*|node()" mode="M417"/>
+   </xsl:template>
+
+   <!--PATTERN atstesecreateglobalprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:secreateglobalprivilege"
+                 priority="4000"
+                 mode="M418">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the secreateglobalprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M418"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M418"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M418">
+      <xsl:apply-templates select="@*|node()" mode="M418"/>
+   </xsl:template>
+
+   <!--PATTERN atstesecreatepagefileprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:secreatepagefileprivilege"
+                 priority="4000"
+                 mode="M419">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the secreatepagefileprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M419"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M419"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M419">
+      <xsl:apply-templates select="@*|node()" mode="M419"/>
+   </xsl:template>
+
+   <!--PATTERN atstesecreatepermanentprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:secreatepermanentprivilege"
+                 priority="4000"
+                 mode="M420">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the secreatepermanentprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M420"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M420"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M420">
+      <xsl:apply-templates select="@*|node()" mode="M420"/>
+   </xsl:template>
+
+   <!--PATTERN atstesecreatesymboliclinkprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:secreatesymboliclinkprivilege"
+                 priority="4000"
+                 mode="M421">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the secreatesymboliclinkprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M421"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M421"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M421">
+      <xsl:apply-templates select="@*|node()" mode="M421"/>
+   </xsl:template>
+
+   <!--PATTERN atstesecreatetokenprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:secreatetokenprivilege"
+                 priority="4000"
+                 mode="M422">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the secreatetokenprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M422"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M422"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M422">
+      <xsl:apply-templates select="@*|node()" mode="M422"/>
+   </xsl:template>
+
+   <!--PATTERN atstesedebugprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:sedebugprivilege" priority="4000"
+                 mode="M423">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the sedebugprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M423"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M423"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M423">
+      <xsl:apply-templates select="@*|node()" mode="M423"/>
+   </xsl:template>
+
+   <!--PATTERN atsteseenabledelegationprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:seenabledelegationprivilege"
+                 priority="4000"
+                 mode="M424">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the seenabledelegationprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M424"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M424"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M424">
+      <xsl:apply-templates select="@*|node()" mode="M424"/>
+   </xsl:template>
+
+   <!--PATTERN atsteseimpersonateprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:seimpersonateprivilege"
+                 priority="4000"
+                 mode="M425">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the seimpersonateprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M425"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M425"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M425">
+      <xsl:apply-templates select="@*|node()" mode="M425"/>
+   </xsl:template>
+
+   <!--PATTERN atsteseincreasebasepriorityprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:seincreasebasepriorityprivilege"
+                 priority="4000"
+                 mode="M426">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the seincreasebasepriorityprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M426"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M426"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M426">
+      <xsl:apply-templates select="@*|node()" mode="M426"/>
+   </xsl:template>
+
+   <!--PATTERN atsteseincreasequotaprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:seincreasequotaprivilege"
+                 priority="4000"
+                 mode="M427">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the seincreasequotaprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M427"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M427"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M427">
+      <xsl:apply-templates select="@*|node()" mode="M427"/>
+   </xsl:template>
+
+   <!--PATTERN atsteseincreaseworkingsetprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:seincreaseworkingsetprivilege"
+                 priority="4000"
+                 mode="M428">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the seincreaseworkingsetprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M428"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M428"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M428">
+      <xsl:apply-templates select="@*|node()" mode="M428"/>
+   </xsl:template>
+
+   <!--PATTERN atsteseloaddriverprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:seloaddriverprivilege" priority="4000"
+                 mode="M429">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the seloaddriverprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M429"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M429"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M429">
+      <xsl:apply-templates select="@*|node()" mode="M429"/>
+   </xsl:template>
+
+   <!--PATTERN atsteselockmemoryprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:selockmemoryprivilege" priority="4000"
+                 mode="M430">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the selockmemoryprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M430"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M430"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M430">
+      <xsl:apply-templates select="@*|node()" mode="M430"/>
+   </xsl:template>
+
+   <!--PATTERN atstesemachineaccountprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:semachineaccountprivilege"
+                 priority="4000"
+                 mode="M431">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the semachineaccountprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M431"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M431"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M431">
+      <xsl:apply-templates select="@*|node()" mode="M431"/>
+   </xsl:template>
+
+   <!--PATTERN atstesemanagevolumeprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:semanagevolumeprivilege"
+                 priority="4000"
+                 mode="M432">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the semanagevolumeprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M432"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M432"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M432">
+      <xsl:apply-templates select="@*|node()" mode="M432"/>
+   </xsl:template>
+
+   <!--PATTERN atsteseprofilesingleprocessprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:seprofilesingleprocessprivilege"
+                 priority="4000"
+                 mode="M433">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the seprofilesingleprocessprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M433"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M433"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M433">
+      <xsl:apply-templates select="@*|node()" mode="M433"/>
+   </xsl:template>
+
+   <!--PATTERN atsteserelabelprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:serelabelprivilege" priority="4000"
+                 mode="M434">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the serelabelprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M434"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M434"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M434">
+      <xsl:apply-templates select="@*|node()" mode="M434"/>
+   </xsl:template>
+
+   <!--PATTERN atsteseremoteshutdownprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:seremoteshutdownprivilege"
+                 priority="4000"
+                 mode="M435">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the seremoteshutdownprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M435"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M435"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M435">
+      <xsl:apply-templates select="@*|node()" mode="M435"/>
+   </xsl:template>
+
+   <!--PATTERN atsteserestoreprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:serestoreprivilege" priority="4000"
+                 mode="M436">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the serestoreprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M436"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M436"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M436">
+      <xsl:apply-templates select="@*|node()" mode="M436"/>
+   </xsl:template>
+
+   <!--PATTERN atstesesecurityprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:sesecurityprivilege" priority="4000"
+                 mode="M437">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the sesecurityprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M437"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M437"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M437">
+      <xsl:apply-templates select="@*|node()" mode="M437"/>
+   </xsl:template>
+
+   <!--PATTERN atsteseshutdownprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:seshutdownprivilege" priority="4000"
+                 mode="M438">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the seshutdownprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M438"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M438"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M438">
+      <xsl:apply-templates select="@*|node()" mode="M438"/>
+   </xsl:template>
+
+   <!--PATTERN atstesesyncagentprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:sesyncagentprivilege" priority="4000"
+                 mode="M439">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the sesyncagentprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M439"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M439"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M439">
+      <xsl:apply-templates select="@*|node()" mode="M439"/>
+   </xsl:template>
+
+   <!--PATTERN atstesesystemenvironmentprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:sesystemenvironmentprivilege"
+                 priority="4000"
+                 mode="M440">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the sesystemenvironmentprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M440"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M440"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M440">
+      <xsl:apply-templates select="@*|node()" mode="M440"/>
+   </xsl:template>
+
+   <!--PATTERN atstesesystemprofileprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:sesystemprofileprivilege"
+                 priority="4000"
+                 mode="M441">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the sesystemprofileprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M441"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M441"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M441">
+      <xsl:apply-templates select="@*|node()" mode="M441"/>
+   </xsl:template>
+
+   <!--PATTERN atstesesystemtimeprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:sesystemtimeprivilege" priority="4000"
+                 mode="M442">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the sesystemtimeprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M442"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M442"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M442">
+      <xsl:apply-templates select="@*|node()" mode="M442"/>
+   </xsl:template>
+
+   <!--PATTERN atstesetakeownershipprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:setakeownershipprivilege"
+                 priority="4000"
+                 mode="M443">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the setakeownershipprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M443"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M443"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M443">
+      <xsl:apply-templates select="@*|node()" mode="M443"/>
+   </xsl:template>
+
+   <!--PATTERN atstesetcbprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:setcbprivilege" priority="4000"
+                 mode="M444">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the setcbprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M444"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M444"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M444">
+      <xsl:apply-templates select="@*|node()" mode="M444"/>
+   </xsl:template>
+
+   <!--PATTERN atstesetimezoneprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:setimezoneprivilege" priority="4000"
+                 mode="M445">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the setimezoneprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M445"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M445"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M445">
+      <xsl:apply-templates select="@*|node()" mode="M445"/>
+   </xsl:template>
+
+   <!--PATTERN atsteseundockprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:seundockprivilege" priority="4000"
+                 mode="M446">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the seundockprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M446"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M446"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M446">
+      <xsl:apply-templates select="@*|node()" mode="M446"/>
+   </xsl:template>
+
+   <!--PATTERN atsteseunsolicitedinputprivilege-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:seunsolicitedinputprivilege"
+                 priority="4000"
+                 mode="M447">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the seunsolicitedinputprivilege entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M447"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M447"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M447">
+      <xsl:apply-templates select="@*|node()" mode="M447"/>
+   </xsl:template>
+
+   <!--PATTERN atstesebatchlogonright-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:sebatchlogonright" priority="4000"
+                 mode="M448">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the sebatchlogonright entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M448"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M448"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M448">
+      <xsl:apply-templates select="@*|node()" mode="M448"/>
+   </xsl:template>
+
+   <!--PATTERN atsteseinteractivelogonright-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:seinteractivelogonright"
+                 priority="4000"
+                 mode="M449">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the seinteractivelogonright entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M449"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M449"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M449">
+      <xsl:apply-templates select="@*|node()" mode="M449"/>
+   </xsl:template>
+
+   <!--PATTERN atstesenetworklogonright-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:senetworklogonright" priority="4000"
+                 mode="M450">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the senetworklogonright entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M450"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M450"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M450">
+      <xsl:apply-templates select="@*|node()" mode="M450"/>
+   </xsl:template>
+
+   <!--PATTERN atsteseremoteinteractivelogonright-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:seremoteinteractivelogonright"
+                 priority="4000"
+                 mode="M451">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the seremoteinteractivelogonright entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M451"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M451"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M451">
+      <xsl:apply-templates select="@*|node()" mode="M451"/>
+   </xsl:template>
+
+   <!--PATTERN atsteseservicelogonright-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:seservicelogonright" priority="4000"
+                 mode="M452">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the seservicelogonright entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M452"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M452"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M452">
+      <xsl:apply-templates select="@*|node()" mode="M452"/>
+   </xsl:template>
+
+   <!--PATTERN atstesedenybatchLogonright-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:sedenybatchLogonright" priority="4000"
+                 mode="M453">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the sedenybatchLogonright entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M453"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M453"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M453">
+      <xsl:apply-templates select="@*|node()" mode="M453"/>
+   </xsl:template>
+
+   <!--PATTERN atstesedenyinteractivelogonright-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:sedenyinteractivelogonright"
+                 priority="4000"
+                 mode="M454">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the sedenyinteractivelogonright entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M454"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M454"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M454">
+      <xsl:apply-templates select="@*|node()" mode="M454"/>
+   </xsl:template>
+
+   <!--PATTERN atstesedenynetworklogonright-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:sedenynetworklogonright"
+                 priority="4000"
+                 mode="M455">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the sedenynetworklogonright entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M455"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M455"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M455">
+      <xsl:apply-templates select="@*|node()" mode="M455"/>
+   </xsl:template>
+
+   <!--PATTERN atstesedenyremoteInteractivelogonright-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:sedenyremoteInteractivelogonright"
+                 priority="4000"
+                 mode="M456">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the sedenyremoteInteractivelogonright entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M456"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M456"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M456">
+      <xsl:apply-templates select="@*|node()" mode="M456"/>
+   </xsl:template>
+
+   <!--PATTERN atstesedenyservicelogonright-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:accesstoken_state/win-def:sedenyservicelogonright"
+                 priority="4000"
+                 mode="M457">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the sedenyservicelogonright entity of an accesstoken_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M457"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M457"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M457">
+      <xsl:apply-templates select="@*|node()" mode="M457"/>
+   </xsl:template>
+
+   <!--PATTERN adtst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:activedirectory_test/win-def:object" priority="4000" mode="M458">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:activedirectory_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of an activedirectory_test must reference an activedirectory_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M458"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:activedirectory_test/win-def:state" priority="3999" mode="M458">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:activedirectory_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of an activedirectory_test must reference an activedirectory_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M458"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M458"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M458">
+      <xsl:apply-templates select="@*|node()" mode="M458"/>
+   </xsl:template>
+
+   <!--PATTERN adobjnaming_context-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:activedirectory_object/win-def:naming_context" priority="4000"
+                 mode="M459">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the naming_context entity of an activedirectory_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M459"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M459"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M459">
+      <xsl:apply-templates select="@*|node()" mode="M459"/>
+   </xsl:template>
+
+   <!--PATTERN adobjrelative_dn-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:activedirectory_object/win-def:relative_dn" priority="4000"
+                 mode="M460">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the relative_dn entity of an activedirectory_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@xsi:nil='true') or ../win-def:attribute/@xsi:nil='true'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - attribute entity must be nil when relative_dn is nil<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M460"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M460"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M460">
+      <xsl:apply-templates select="@*|node()" mode="M460"/>
+   </xsl:template>
+
+   <!--PATTERN adobjattribute-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:activedirectory_object/win-def:attribute" priority="4000"
+                 mode="M461">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the attribute entity of an activedirectory_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M461"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M461"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M461">
+      <xsl:apply-templates select="@*|node()" mode="M461"/>
+   </xsl:template>
+
+   <!--PATTERN adstenaming_context-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:activedirectory_state/win-def:naming_context" priority="4000"
+                 mode="M462">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the naming_context entity of an activedirectory_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M462"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M462"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M462">
+      <xsl:apply-templates select="@*|node()" mode="M462"/>
+   </xsl:template>
+
+   <!--PATTERN adsterelative_dn-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:activedirectory_state/win-def:relative_dn" priority="4000"
+                 mode="M463">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the relative_dn entity of an activedirectory_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M463"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M463"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M463">
+      <xsl:apply-templates select="@*|node()" mode="M463"/>
+   </xsl:template>
+
+   <!--PATTERN adsteattribute-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:activedirectory_state/win-def:attribute" priority="4000"
+                 mode="M464">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the attribute entity of an activedirectory_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M464"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M464"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M464">
+      <xsl:apply-templates select="@*|node()" mode="M464"/>
+   </xsl:template>
+
+   <!--PATTERN adsteobject_class-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:activedirectory_state/win-def:object_class" priority="4000"
+                 mode="M465">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the object_class entity of an activedirectory_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M465"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M465"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M465">
+      <xsl:apply-templates select="@*|node()" mode="M465"/>
+   </xsl:template>
+
+   <!--PATTERN adsteadstype-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:activedirectory_state/win-def:adstype" priority="4000"
+                 mode="M466">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the adstype entity of an activedirectory_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M466"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M466"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M466">
+      <xsl:apply-templates select="@*|node()" mode="M466"/>
+   </xsl:template>
+
+   <!--PATTERN adstevalue-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:activedirectory_state/win-def:value" priority="4000" mode="M467">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - The datatype has been set to 'int' but the value is not an integer.<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M467"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M467"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M467">
+      <xsl:apply-templates select="@*|node()" mode="M467"/>
+   </xsl:template>
+
+   <!--PATTERN aeptst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicy_test/win-def:object" priority="4000"
+                 mode="M468">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:auditeventpolicy_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of an auditeventpolicy_test must reference an auditeventpolicy_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M468"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:auditeventpolicy_test/win-def:state" priority="3999" mode="M468">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:auditeventpolicy_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of an auditeventpolicy_test must reference an auditeventpolicy_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M468"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M468"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M468">
+      <xsl:apply-templates select="@*|node()" mode="M468"/>
+   </xsl:template>
+
+   <!--PATTERN aepsteaccount_logon-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicy_state/win-def:account_logon" priority="4000"
+                 mode="M469">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the account_logon entity of an auditeventpolicy_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M469"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M469"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M469">
+      <xsl:apply-templates select="@*|node()" mode="M469"/>
+   </xsl:template>
+
+   <!--PATTERN aepsteaccount_management-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicy_state/win-def:account_management"
+                 priority="4000"
+                 mode="M470">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the account_management entity of an auditeventpolicy_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M470"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M470"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M470">
+      <xsl:apply-templates select="@*|node()" mode="M470"/>
+   </xsl:template>
+
+   <!--PATTERN aepstedetailed_tracking-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicy_state/win-def:detailed_tracking"
+                 priority="4000"
+                 mode="M471">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the detailed_tracking entity of an auditeventpolicy_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M471"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M471"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M471">
+      <xsl:apply-templates select="@*|node()" mode="M471"/>
+   </xsl:template>
+
+   <!--PATTERN aepstedirectory_service_access-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicy_state/win-def:directory_service_access"
+                 priority="4000"
+                 mode="M472">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the directory_service_access entity of an auditeventpolicy_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M472"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M472"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M472">
+      <xsl:apply-templates select="@*|node()" mode="M472"/>
+   </xsl:template>
+
+   <!--PATTERN aepstelogon-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicy_state/win-def:logon" priority="4000"
+                 mode="M473">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the logon entity of an auditeventpolicy_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M473"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M473"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M473">
+      <xsl:apply-templates select="@*|node()" mode="M473"/>
+   </xsl:template>
+
+   <!--PATTERN aepsteobject_access-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicy_state/win-def:object_access" priority="4000"
+                 mode="M474">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the object_access entity of an auditeventpolicy_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M474"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M474"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M474">
+      <xsl:apply-templates select="@*|node()" mode="M474"/>
+   </xsl:template>
+
+   <!--PATTERN aepstepolicy_change-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicy_state/win-def:policy_change" priority="4000"
+                 mode="M475">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the policy_change entity of an auditeventpolicy_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M475"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M475"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M475">
+      <xsl:apply-templates select="@*|node()" mode="M475"/>
+   </xsl:template>
+
+   <!--PATTERN aepsteprivilege_use-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicy_state/win-def:privilege_use" priority="4000"
+                 mode="M476">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the privilege_use entity of an auditeventpolicy_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M476"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M476"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M476">
+      <xsl:apply-templates select="@*|node()" mode="M476"/>
+   </xsl:template>
+
+   <!--PATTERN aepstesystem-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicy_state/win-def:system" priority="4000"
+                 mode="M477">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the system entity of an auditeventpolicy_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M477"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M477"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M477">
+      <xsl:apply-templates select="@*|node()" mode="M477"/>
+   </xsl:template>
+
+   <!--PATTERN aepstst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_test/win-def:object"
+                 priority="4000"
+                 mode="M478">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:auditeventpolicysubcategories_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of an auditeventpolicysubcategories_test must reference an auditeventpolicysubcategories_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M478"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_test/win-def:state"
+                 priority="3999"
+                 mode="M478">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:auditeventpolicysubcategories_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of an auditeventpolicysubcategories_test must reference an auditeventpolicysubcategories_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M478"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M478"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M478">
+      <xsl:apply-templates select="@*|node()" mode="M478"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstecredentialvalidation-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:credential_validation"
+                 priority="4000"
+                 mode="M479">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the credential_validation entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M479"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M479"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M479">
+      <xsl:apply-templates select="@*|node()" mode="M479"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstekerberosticketevents-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:kerberos_ticket_events"
+                 priority="4000"
+                 mode="M480">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the kerberos_ticket_events entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M480"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M480"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M480">
+      <xsl:apply-templates select="@*|node()" mode="M480"/>
+   </xsl:template>
+
+   <!--PATTERN aepssteotheraccountlogonevents-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:other_account_logon_events"
+                 priority="4000"
+                 mode="M481">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the other_account_logon_events entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M481"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M481"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M481">
+      <xsl:apply-templates select="@*|node()" mode="M481"/>
+   </xsl:template>
+
+   <!--PATTERN aepssteapplicationgroupmanagement-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:application_group_management"
+                 priority="4000"
+                 mode="M482">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the application_group_management entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M482"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M482"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M482">
+      <xsl:apply-templates select="@*|node()" mode="M482"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstecomputeraccountmanagement-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:computer_account_management"
+                 priority="4000"
+                 mode="M483">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the computer_account_management entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M483"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M483"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M483">
+      <xsl:apply-templates select="@*|node()" mode="M483"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstedistributiongroupmanagement-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:distribution_group_management"
+                 priority="4000"
+                 mode="M484">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the distribution_group_management entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M484"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M484"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M484">
+      <xsl:apply-templates select="@*|node()" mode="M484"/>
+   </xsl:template>
+
+   <!--PATTERN aepssteotheraccountmanagementevents-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:other_account_management_events"
+                 priority="4000"
+                 mode="M485">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the other_account_management_events entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M485"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M485"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M485">
+      <xsl:apply-templates select="@*|node()" mode="M485"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstesecuritygroupmanagement-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:security_group_management"
+                 priority="4000"
+                 mode="M486">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the security_group_management entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M486"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M486"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M486">
+      <xsl:apply-templates select="@*|node()" mode="M486"/>
+   </xsl:template>
+
+   <!--PATTERN aepssteuseraccountmanagement-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:user_account_management"
+                 priority="4000"
+                 mode="M487">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the user_account_management entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M487"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M487"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M487">
+      <xsl:apply-templates select="@*|node()" mode="M487"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstedpapiactivity-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:dpapi_activity"
+                 priority="4000"
+                 mode="M488">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the dpapi_activity entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M488"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M488"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M488">
+      <xsl:apply-templates select="@*|node()" mode="M488"/>
+   </xsl:template>
+
+   <!--PATTERN aepssteprocesscreation-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:process_creation"
+                 priority="4000"
+                 mode="M489">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the process_creation entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M489"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M489"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M489">
+      <xsl:apply-templates select="@*|node()" mode="M489"/>
+   </xsl:template>
+
+   <!--PATTERN aepssteprocesstermination-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:process_termination"
+                 priority="4000"
+                 mode="M490">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the process_termination entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M490"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M490"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M490">
+      <xsl:apply-templates select="@*|node()" mode="M490"/>
+   </xsl:template>
+
+   <!--PATTERN aepssterpcevents-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:rpc_events"
+                 priority="4000"
+                 mode="M491">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the rpc_events entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M491"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M491"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M491">
+      <xsl:apply-templates select="@*|node()" mode="M491"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstedirectoryserviceaccess-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:directory_service_access"
+                 priority="4000"
+                 mode="M492">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the directory_service_access entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M492"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M492"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M492">
+      <xsl:apply-templates select="@*|node()" mode="M492"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstedirectoryservicechanges-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:directory_service_changes"
+                 priority="4000"
+                 mode="M493">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the directory_service_changes entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M493"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M493"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M493">
+      <xsl:apply-templates select="@*|node()" mode="M493"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstedirectoryservicereplication-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:directory_service_replication"
+                 priority="4000"
+                 mode="M494">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the directory_service_replication entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M494"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M494"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M494">
+      <xsl:apply-templates select="@*|node()" mode="M494"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstedetaileddirectoryservicereplication-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:detailed_directory_service_replication"
+                 priority="4000"
+                 mode="M495">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the detailed_directory_service_replication entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M495"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M495"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M495">
+      <xsl:apply-templates select="@*|node()" mode="M495"/>
+   </xsl:template>
+
+   <!--PATTERN aepssteaccountlockout-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:account_lockout"
+                 priority="4000"
+                 mode="M496">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the account_lockout entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M496"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M496"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M496">
+      <xsl:apply-templates select="@*|node()" mode="M496"/>
+   </xsl:template>
+
+   <!--PATTERN aepssteipsecextendedmode-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:ipsec_extended_mode"
+                 priority="4000"
+                 mode="M497">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the ipsec_extended_mode entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M497"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M497"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M497">
+      <xsl:apply-templates select="@*|node()" mode="M497"/>
+   </xsl:template>
+
+   <!--PATTERN aepssteipsecmainmode-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:ipsec_main_mode"
+                 priority="4000"
+                 mode="M498">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the ipsec_main_mode entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M498"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M498"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M498">
+      <xsl:apply-templates select="@*|node()" mode="M498"/>
+   </xsl:template>
+
+   <!--PATTERN aepssteipsec_quick_mode-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:ipsec_quick_mode"
+                 priority="4000"
+                 mode="M499">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the ipsec_quick_mode entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M499"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M499"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M499">
+      <xsl:apply-templates select="@*|node()" mode="M499"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstelogoff-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:logoff"
+                 priority="4000"
+                 mode="M500">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the logoff entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M500"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M500"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M500">
+      <xsl:apply-templates select="@*|node()" mode="M500"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstelogon-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:logon"
+                 priority="4000"
+                 mode="M501">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the logon entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M501"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M501"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M501">
+      <xsl:apply-templates select="@*|node()" mode="M501"/>
+   </xsl:template>
+
+   <!--PATTERN aepssteotherlogonlogoffevents-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:other_logon_logoff_events"
+                 priority="4000"
+                 mode="M502">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the other_logon_logoff_events entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M502"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M502"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M502">
+      <xsl:apply-templates select="@*|node()" mode="M502"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstespeciallogon-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:special_logon"
+                 priority="4000"
+                 mode="M503">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the special_logon entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M503"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M503"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M503">
+      <xsl:apply-templates select="@*|node()" mode="M503"/>
+   </xsl:template>
+
+   <!--PATTERN aepssteapplicationgenerated-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:application_generated"
+                 priority="4000"
+                 mode="M504">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the application_generated entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M504"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M504"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M504">
+      <xsl:apply-templates select="@*|node()" mode="M504"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstecertificationservices-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:certification_services"
+                 priority="4000"
+                 mode="M505">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the certification_services entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M505"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M505"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M505">
+      <xsl:apply-templates select="@*|node()" mode="M505"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstefileshare-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:file_share"
+                 priority="4000"
+                 mode="M506">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_share entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M506"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M506"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M506">
+      <xsl:apply-templates select="@*|node()" mode="M506"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstefilesystem-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:file_system"
+                 priority="4000"
+                 mode="M507">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_system entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M507"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M507"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M507">
+      <xsl:apply-templates select="@*|node()" mode="M507"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstefilteringplatformconnection-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:filtering_platform_connection"
+                 priority="4000"
+                 mode="M508">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filtering_platform_connection entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M508"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M508"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M508">
+      <xsl:apply-templates select="@*|node()" mode="M508"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstefilteringplatformpacketdrop-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:filtering_platform_packet_drop"
+                 priority="4000"
+                 mode="M509">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filtering_platform_packet_drop entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M509"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M509"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M509">
+      <xsl:apply-templates select="@*|node()" mode="M509"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstehandlemanipulation-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:handle_manipulation"
+                 priority="4000"
+                 mode="M510">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the handle_manipulation entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M510"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M510"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M510">
+      <xsl:apply-templates select="@*|node()" mode="M510"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstekernelobject-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:kernel_object"
+                 priority="4000"
+                 mode="M511">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the kernel_object entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M511"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M511"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M511">
+      <xsl:apply-templates select="@*|node()" mode="M511"/>
+   </xsl:template>
+
+   <!--PATTERN aepssteotherobjectaccessevents-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:other_object_access_events"
+                 priority="4000"
+                 mode="M512">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the other_object_access_events entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M512"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M512"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M512">
+      <xsl:apply-templates select="@*|node()" mode="M512"/>
+   </xsl:template>
+
+   <!--PATTERN aepssteregistry-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:registry"
+                 priority="4000"
+                 mode="M513">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the registry entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M513"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M513"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M513">
+      <xsl:apply-templates select="@*|node()" mode="M513"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstesam-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:sam" priority="4000"
+                 mode="M514">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the sam entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M514"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M514"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M514">
+      <xsl:apply-templates select="@*|node()" mode="M514"/>
+   </xsl:template>
+
+   <!--PATTERN aepssteauditpolicychange-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:audit_policy_change"
+                 priority="4000"
+                 mode="M515">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the audit_policy_change entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M515"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M515"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M515">
+      <xsl:apply-templates select="@*|node()" mode="M515"/>
+   </xsl:template>
+
+   <!--PATTERN aepssteauthenticationpolicychange-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:authentication_policy_change"
+                 priority="4000"
+                 mode="M516">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the authentication_policy_change entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M516"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M516"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M516">
+      <xsl:apply-templates select="@*|node()" mode="M516"/>
+   </xsl:template>
+
+   <!--PATTERN aepssteauthorizationpolicychange-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:authorization_policy_change"
+                 priority="4000"
+                 mode="M517">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the authorization_policy_change entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M517"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M517"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M517">
+      <xsl:apply-templates select="@*|node()" mode="M517"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstefilteringplatformpolicychange-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:filtering_platform_policy_change"
+                 priority="4000"
+                 mode="M518">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filtering_platform_policy_change entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M518"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M518"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M518">
+      <xsl:apply-templates select="@*|node()" mode="M518"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstempssvcrulelevelpolicychange-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:mpssvc_rule_level_policy_change"
+                 priority="4000"
+                 mode="M519">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the mpssvc_rule_level_policy_change entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M519"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M519"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M519">
+      <xsl:apply-templates select="@*|node()" mode="M519"/>
+   </xsl:template>
+
+   <!--PATTERN aepssteotherpolicychangeevents-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:other_policy_change_events"
+                 priority="4000"
+                 mode="M520">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the other_policy_change_events entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M520"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M520"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M520">
+      <xsl:apply-templates select="@*|node()" mode="M520"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstenonsensitiveprivilegeuse-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:non_sensitive_privilege_use"
+                 priority="4000"
+                 mode="M521">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the non_sensitive_privilege_use entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M521"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M521"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M521">
+      <xsl:apply-templates select="@*|node()" mode="M521"/>
+   </xsl:template>
+
+   <!--PATTERN aepssteotherprivilegeuseevents-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:other_privilege_use_events"
+                 priority="4000"
+                 mode="M522">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the other_privilege_use_events entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M522"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M522"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M522">
+      <xsl:apply-templates select="@*|node()" mode="M522"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstesensitive_privilege_use-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:sensitive_privilege_use"
+                 priority="4000"
+                 mode="M523">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the sensitive_privilege_use entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M523"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M523"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M523">
+      <xsl:apply-templates select="@*|node()" mode="M523"/>
+   </xsl:template>
+
+   <!--PATTERN aepssteipsecdriver-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:ipsec_driver"
+                 priority="4000"
+                 mode="M524">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the ipsec_driver entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M524"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M524"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M524">
+      <xsl:apply-templates select="@*|node()" mode="M524"/>
+   </xsl:template>
+
+   <!--PATTERN aepssteothersystemevents-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:other_system_events"
+                 priority="4000"
+                 mode="M525">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the other_system_events entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M525"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M525"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M525">
+      <xsl:apply-templates select="@*|node()" mode="M525"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstesecuritystatechange-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:security_state_change"
+                 priority="4000"
+                 mode="M526">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the security_state_change entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M526"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M526"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M526">
+      <xsl:apply-templates select="@*|node()" mode="M526"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstesecuritysystemextension-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:security_system_extension"
+                 priority="4000"
+                 mode="M527">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the security_system_extension entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M527"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M527"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M527">
+      <xsl:apply-templates select="@*|node()" mode="M527"/>
+   </xsl:template>
+
+   <!--PATTERN aepsstesystemintegrity-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:auditeventpolicysubcategories_state/win-def:system_integrity"
+                 priority="4000"
+                 mode="M528">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the system_integrity entity of an auditeventpolicysubcategories_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M528"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M528"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M528">
+      <xsl:apply-templates select="@*|node()" mode="M528"/>
+   </xsl:template>
+
+   <!--PATTERN filetst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:file_test/win-def:object" priority="4000" mode="M529">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:file_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a file_test must reference a file_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M529"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:file_test/win-def:state" priority="3999" mode="M529">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:file_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a file_test must reference a file_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M529"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M529"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M529">
+      <xsl:apply-templates select="@*|node()" mode="M529"/>
+   </xsl:template>
+
+   <!--PATTERN fileobjpath-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:file_object/win-def:path" priority="4000" mode="M530">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a file_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M530"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M530"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M530">
+      <xsl:apply-templates select="@*|node()" mode="M530"/>
+   </xsl:template>
+
+   <!--PATTERN fileobjfilename-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:file_object/win-def:filename" priority="4000" mode="M531">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filename entity of a file_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="if (not(@operation) or @operation='equals' or @operation='not equal') then (not(contains(.,'\') or contains(.,'/') or contains(.,':') or contains(.,'*') or contains(.,'?') or contains(.,'&gt;') or contains(.,'|'))) else (1=1)"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - filename entity can not contain the characters / \ : * ? &gt; | <xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M531"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M531"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M531">
+      <xsl:apply-templates select="@*|node()" mode="M531"/>
+   </xsl:template>
+
+   <!--PATTERN filestepath-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:file_state/win-def:path" priority="4000" mode="M532">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a file_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M532"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M532"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M532">
+      <xsl:apply-templates select="@*|node()" mode="M532"/>
+   </xsl:template>
+
+   <!--PATTERN filestefilename-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:file_state/win-def:filename" priority="4000" mode="M533">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filename entity of a file_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="if (not(@operation) or @operation='equals' or @operation='not equal') then (not(contains(.,'\') or contains(.,'/') or contains(.,':') or contains(.,'*') or contains(.,'?') or contains(.,'&gt;') or contains(.,'|'))) else (1=1)"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - filename entity can not contain the characters / \ : * ? &gt; | <xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M533"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M533"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M533">
+      <xsl:apply-templates select="@*|node()" mode="M533"/>
+   </xsl:template>
+
+   <!--PATTERN filesteowner-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:file_state/win-def:owner" priority="4000" mode="M534">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the owner entity of a file_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M534"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M534"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M534">
+      <xsl:apply-templates select="@*|node()" mode="M534"/>
+   </xsl:template>
+
+   <!--PATTERN filestesize-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:file_state/win-def:size" priority="4000" mode="M535">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the size entity of a file_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M535"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M535"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M535">
+      <xsl:apply-templates select="@*|node()" mode="M535"/>
+   </xsl:template>
+
+   <!--PATTERN filestea_time-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:file_state/win-def:a_time" priority="4000" mode="M536">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the a_time entity of a file_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M536"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M536"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M536">
+      <xsl:apply-templates select="@*|node()" mode="M536"/>
+   </xsl:template>
+
+   <!--PATTERN filestec_time-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:file_state/win-def:c_time" priority="4000" mode="M537">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the c_time entity of a file_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M537"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M537"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M537">
+      <xsl:apply-templates select="@*|node()" mode="M537"/>
+   </xsl:template>
+
+   <!--PATTERN filestem_time-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:file_state/win-def:m_time" priority="4000" mode="M538">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the m_time entity of a file_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M538"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M538"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M538">
+      <xsl:apply-templates select="@*|node()" mode="M538"/>
+   </xsl:template>
+
+   <!--PATTERN filestems_checksum-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:file_state/win-def:ms_checksum" priority="4000" mode="M539">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the ms_checksum entity of a file_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M539"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M539"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M539">
+      <xsl:apply-templates select="@*|node()" mode="M539"/>
+   </xsl:template>
+
+   <!--PATTERN filesteversion-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:file_state/win-def:version" priority="4000" mode="M540">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='version'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the version entity of a file_state should be 'version'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M540"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M540"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M540">
+      <xsl:apply-templates select="@*|node()" mode="M540"/>
+   </xsl:template>
+
+   <!--PATTERN filestetype-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:file_state/win-def:type" priority="4000" mode="M541">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the type entity of a file_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M541"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M541"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M541">
+      <xsl:apply-templates select="@*|node()" mode="M541"/>
+   </xsl:template>
+
+   <!--PATTERN filestedevelopment_class-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:file_state/win-def:development_class" priority="4000"
+                 mode="M542">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the development_class entity of a file_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M542"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M542"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M542">
+      <xsl:apply-templates select="@*|node()" mode="M542"/>
+   </xsl:template>
+
+   <!--PATTERN filestecompany-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:file_state/win-def:company" priority="4000" mode="M543">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the company entity of a file_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M543"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M543"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M543">
+      <xsl:apply-templates select="@*|node()" mode="M543"/>
+   </xsl:template>
+
+   <!--PATTERN filesteinternalname-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:file_state/win-def:internal_name" priority="4000" mode="M544">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the internal_name entity of a file_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M544"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M544"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M544">
+      <xsl:apply-templates select="@*|node()" mode="M544"/>
+   </xsl:template>
+
+   <!--PATTERN filestelanguage-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:file_state/win-def:language" priority="4000" mode="M545">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the language entity of a file_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M545"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M545"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M545">
+      <xsl:apply-templates select="@*|node()" mode="M545"/>
+   </xsl:template>
+
+   <!--PATTERN filesteoriginalfilename-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:file_state/win-def:original_filename" priority="4000"
+                 mode="M546">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the original_filename entity of a file_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M546"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M546"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M546">
+      <xsl:apply-templates select="@*|node()" mode="M546"/>
+   </xsl:template>
+
+   <!--PATTERN filesteproductname-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:file_state/win-def:product_name" priority="4000" mode="M547">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the product_name entity of a file_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M547"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M547"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M547">
+      <xsl:apply-templates select="@*|node()" mode="M547"/>
+   </xsl:template>
+
+   <!--PATTERN filesteproductversion-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:file_state/win-def:product_version" priority="4000" mode="M548">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='version'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the product_version entity of a file_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M548"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M548"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M548">
+      <xsl:apply-templates select="@*|node()" mode="M548"/>
+   </xsl:template>
+
+   <!--PATTERN fap53tst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_test/win-def:object" priority="4000"
+                 mode="M549">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:fileauditedpermissions53_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a fileauditedpermissions53_test must reference a fileauditedpermissions53_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M549"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_test/win-def:state" priority="3999"
+                 mode="M549">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:fileauditedpermissions53_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a fileauditedpermissions53_test must reference a fileauditedpermissions53_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M549"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M549"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M549">
+      <xsl:apply-templates select="@*|node()" mode="M549"/>
+   </xsl:template>
+
+   <!--PATTERN fap53objpath-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_object/win-def:path" priority="4000"
+                 mode="M550">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a fileauditedpermissions53_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M550"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M550"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M550">
+      <xsl:apply-templates select="@*|node()" mode="M550"/>
+   </xsl:template>
+
+   <!--PATTERN fap53objfilename-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_object/win-def:filename"
+                 priority="4000"
+                 mode="M551">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filename entity of a fileauditedpermissions53_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="if (not(@operation) or @operation='equals' or @operation='not equal') then (not(contains(.,'\') or contains(.,'/') or contains(.,':') or contains(.,'*') or contains(.,'?') or contains(.,'&gt;') or contains(.,'|'))) else (1=1)"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - filename entity can not contain the characters / \ : * ? &gt; | <xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M551"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M551"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M551">
+      <xsl:apply-templates select="@*|node()" mode="M551"/>
+   </xsl:template>
+
+   <!--PATTERN fap53objtrustee_sid-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_object/win-def:trustee_sid"
+                 priority="4000"
+                 mode="M552">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_sid entity of a fileauditedpermissions53_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M552"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M552"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M552">
+      <xsl:apply-templates select="@*|node()" mode="M552"/>
+   </xsl:template>
+
+   <!--PATTERN fap53stepath-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_state/win-def:path" priority="4000"
+                 mode="M553">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a fileauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M553"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M553"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M553">
+      <xsl:apply-templates select="@*|node()" mode="M553"/>
+   </xsl:template>
+
+   <!--PATTERN fap53stefilename-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_state/win-def:filename" priority="4000"
+                 mode="M554">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filename entity of a fileauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="if (not(@operation) or @operation='equals' or @operation='not equal') then (not(contains(.,'\') or contains(.,'/') or contains(.,':') or contains(.,'*') or contains(.,'?') or contains(.,'&gt;') or contains(.,'|'))) else (1=1)"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - filename entity can not contain the characters / \ : * ? &gt; | <xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M554"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M554"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M554">
+      <xsl:apply-templates select="@*|node()" mode="M554"/>
+   </xsl:template>
+
+   <!--PATTERN fap53stetrustee_sid-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_state/win-def:trustee_sid"
+                 priority="4000"
+                 mode="M555">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_sid entity of a fileauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M555"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M555"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M555">
+      <xsl:apply-templates select="@*|node()" mode="M555"/>
+   </xsl:template>
+
+   <!--PATTERN fap53stestandard_delete-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_state/win-def:standard_delete"
+                 priority="4000"
+                 mode="M556">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_delete entity of a fileauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M556"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M556"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M556">
+      <xsl:apply-templates select="@*|node()" mode="M556"/>
+   </xsl:template>
+
+   <!--PATTERN fap53stestandard_read_control-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_state/win-def:standard_read_control"
+                 priority="4000"
+                 mode="M557">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_read_control entity of a fileauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M557"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M557"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M557">
+      <xsl:apply-templates select="@*|node()" mode="M557"/>
+   </xsl:template>
+
+   <!--PATTERN fap53stestandard_write_dac-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_state/win-def:standard_write_dac"
+                 priority="4000"
+                 mode="M558">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_write_dac entity of a fileauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M558"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M558"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M558">
+      <xsl:apply-templates select="@*|node()" mode="M558"/>
+   </xsl:template>
+
+   <!--PATTERN fap53stestandard_write_owner-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_state/win-def:standard_write_owner"
+                 priority="4000"
+                 mode="M559">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_write_owner entity of a fileauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M559"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M559"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M559">
+      <xsl:apply-templates select="@*|node()" mode="M559"/>
+   </xsl:template>
+
+   <!--PATTERN fap53stestandard_synchronize-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_state/win-def:standard_synchronize"
+                 priority="4000"
+                 mode="M560">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_synchronize entity of a fileauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M560"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M560"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M560">
+      <xsl:apply-templates select="@*|node()" mode="M560"/>
+   </xsl:template>
+
+   <!--PATTERN fap53steaccess_system_security-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_state/win-def:access_system_security"
+                 priority="4000"
+                 mode="M561">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the access_system_security entity of a fileauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M561"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M561"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M561">
+      <xsl:apply-templates select="@*|node()" mode="M561"/>
+   </xsl:template>
+
+   <!--PATTERN fap53stegeneric_read-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_state/win-def:generic_read"
+                 priority="4000"
+                 mode="M562">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_read entity of a fileauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M562"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M562"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M562">
+      <xsl:apply-templates select="@*|node()" mode="M562"/>
+   </xsl:template>
+
+   <!--PATTERN fap53stegeneric_write-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_state/win-def:generic_write"
+                 priority="4000"
+                 mode="M563">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_write entity of a fileauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M563"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M563"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M563">
+      <xsl:apply-templates select="@*|node()" mode="M563"/>
+   </xsl:template>
+
+   <!--PATTERN fap53stegeneric_execute-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_state/win-def:generic_execute"
+                 priority="4000"
+                 mode="M564">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_execute entity of a fileauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M564"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M564"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M564">
+      <xsl:apply-templates select="@*|node()" mode="M564"/>
+   </xsl:template>
+
+   <!--PATTERN fap53stegeneric_all-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_state/win-def:generic_all"
+                 priority="4000"
+                 mode="M565">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_all entity of a fileauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M565"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M565"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M565">
+      <xsl:apply-templates select="@*|node()" mode="M565"/>
+   </xsl:template>
+
+   <!--PATTERN fap53stefile_read_data-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_state/win-def:file_read_data"
+                 priority="4000"
+                 mode="M566">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_read_data entity of a fileauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M566"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M566"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M566">
+      <xsl:apply-templates select="@*|node()" mode="M566"/>
+   </xsl:template>
+
+   <!--PATTERN fap53stefile_write_data-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_state/win-def:file_write_data"
+                 priority="4000"
+                 mode="M567">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_write_data entity of a fileauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M567"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M567"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M567">
+      <xsl:apply-templates select="@*|node()" mode="M567"/>
+   </xsl:template>
+
+   <!--PATTERN fap53stefile_append_data-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_state/win-def:file_append_data"
+                 priority="4000"
+                 mode="M568">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_append_data entity of a fileauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M568"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M568"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M568">
+      <xsl:apply-templates select="@*|node()" mode="M568"/>
+   </xsl:template>
+
+   <!--PATTERN fap53stefile_read_ea-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_state/win-def:file_read_ea"
+                 priority="4000"
+                 mode="M569">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_read_ea entity of a fileauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M569"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M569"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M569">
+      <xsl:apply-templates select="@*|node()" mode="M569"/>
+   </xsl:template>
+
+   <!--PATTERN fap53stefile_write_ea-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_state/win-def:file_write_ea"
+                 priority="4000"
+                 mode="M570">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_write_ea entity of a fileauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M570"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M570"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M570">
+      <xsl:apply-templates select="@*|node()" mode="M570"/>
+   </xsl:template>
+
+   <!--PATTERN fap53stefile_execute-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_state/win-def:file_execute"
+                 priority="4000"
+                 mode="M571">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_execute entity of a fileauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M571"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M571"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M571">
+      <xsl:apply-templates select="@*|node()" mode="M571"/>
+   </xsl:template>
+
+   <!--PATTERN fap53stefile_delete_child-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_state/win-def:file_delete_child"
+                 priority="4000"
+                 mode="M572">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_delete_child entity of a fileauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M572"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M572"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M572">
+      <xsl:apply-templates select="@*|node()" mode="M572"/>
+   </xsl:template>
+
+   <!--PATTERN fap53stefile_read_attributes-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_state/win-def:file_read_attributes"
+                 priority="4000"
+                 mode="M573">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_read_attributes entity of a fileauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M573"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M573"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M573">
+      <xsl:apply-templates select="@*|node()" mode="M573"/>
+   </xsl:template>
+
+   <!--PATTERN fap53stefile_write_attributes-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions53_state/win-def:file_write_attributes"
+                 priority="4000"
+                 mode="M574">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_write_attributes entity of a fileauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M574"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M574"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M574">
+      <xsl:apply-templates select="@*|node()" mode="M574"/>
+   </xsl:template>
+
+   <!--PATTERN faptst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_test/win-def:object" priority="4000"
+                 mode="M575">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:fileauditedpermissions_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a fileauditedpermissions_test must reference a fileauditedpermissions_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M575"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_test/win-def:state" priority="3999"
+                 mode="M575">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:fileauditedpermissions_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a fileauditedpermissions_test must reference a fileauditedpermissions_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M575"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M575"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M575">
+      <xsl:apply-templates select="@*|node()" mode="M575"/>
+   </xsl:template>
+
+   <!--PATTERN fapobjpath-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_object/win-def:path" priority="4000"
+                 mode="M576">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a fileauditedpermissions_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M576"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M576"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M576">
+      <xsl:apply-templates select="@*|node()" mode="M576"/>
+   </xsl:template>
+
+   <!--PATTERN fapobjfilename-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_object/win-def:filename" priority="4000"
+                 mode="M577">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filename entity of a fileauditedpermissions_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="if (not(@operation) or @operation='equals' or @operation='not equal') then (not(contains(.,'\') or contains(.,'/') or contains(.,':') or contains(.,'*') or contains(.,'?') or contains(.,'&gt;') or contains(.,'|'))) else (1=1)"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - filename entity can not contain the characters / \ : * ? &gt; | <xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M577"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M577"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M577">
+      <xsl:apply-templates select="@*|node()" mode="M577"/>
+   </xsl:template>
+
+   <!--PATTERN fapobjtrustee_name-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_object/win-def:trustee_name"
+                 priority="4000"
+                 mode="M578">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_name entity of a fileauditedpermissions_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M578"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M578"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M578">
+      <xsl:apply-templates select="@*|node()" mode="M578"/>
+   </xsl:template>
+
+   <!--PATTERN fapstepath-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_state/win-def:path" priority="4000"
+                 mode="M579">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a fileauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M579"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M579"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M579">
+      <xsl:apply-templates select="@*|node()" mode="M579"/>
+   </xsl:template>
+
+   <!--PATTERN fapstefilename-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_state/win-def:filename" priority="4000"
+                 mode="M580">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filename entity of a fileauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="if (not(@operation) or @operation='equals' or @operation='not equal') then (not(contains(.,'\') or contains(.,'/') or contains(.,':') or contains(.,'*') or contains(.,'?') or contains(.,'&gt;') or contains(.,'|'))) else (1=1)"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - filename entity can not contain the characters / \ : * ? &gt; | <xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M580"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M580"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M580">
+      <xsl:apply-templates select="@*|node()" mode="M580"/>
+   </xsl:template>
+
+   <!--PATTERN fapstetrustee_name-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_state/win-def:trustee_name"
+                 priority="4000"
+                 mode="M581">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_name entity of a fileauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M581"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M581"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M581">
+      <xsl:apply-templates select="@*|node()" mode="M581"/>
+   </xsl:template>
+
+   <!--PATTERN fapstestandard_delete-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_state/win-def:standard_delete"
+                 priority="4000"
+                 mode="M582">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_delete entity of a fileauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M582"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M582"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M582">
+      <xsl:apply-templates select="@*|node()" mode="M582"/>
+   </xsl:template>
+
+   <!--PATTERN fapstestandard_read_control-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_state/win-def:standard_read_control"
+                 priority="4000"
+                 mode="M583">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_read_control entity of a fileauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M583"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M583"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M583">
+      <xsl:apply-templates select="@*|node()" mode="M583"/>
+   </xsl:template>
+
+   <!--PATTERN fapstestandard_write_dac-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_state/win-def:standard_write_dac"
+                 priority="4000"
+                 mode="M584">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_write_dac entity of a fileauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M584"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M584"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M584">
+      <xsl:apply-templates select="@*|node()" mode="M584"/>
+   </xsl:template>
+
+   <!--PATTERN fapstestandard_write_owner-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_state/win-def:standard_write_owner"
+                 priority="4000"
+                 mode="M585">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_write_owner entity of a fileauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M585"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M585"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M585">
+      <xsl:apply-templates select="@*|node()" mode="M585"/>
+   </xsl:template>
+
+   <!--PATTERN fapstestandard_synchronize-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_state/win-def:standard_synchronize"
+                 priority="4000"
+                 mode="M586">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_synchronize entity of a fileauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M586"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M586"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M586">
+      <xsl:apply-templates select="@*|node()" mode="M586"/>
+   </xsl:template>
+
+   <!--PATTERN fapsteaccess_system_security-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_state/win-def:access_system_security"
+                 priority="4000"
+                 mode="M587">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the access_system_security entity of a fileauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M587"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M587"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M587">
+      <xsl:apply-templates select="@*|node()" mode="M587"/>
+   </xsl:template>
+
+   <!--PATTERN fapstegeneric_read-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_state/win-def:generic_read"
+                 priority="4000"
+                 mode="M588">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_read entity of a fileauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M588"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M588"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M588">
+      <xsl:apply-templates select="@*|node()" mode="M588"/>
+   </xsl:template>
+
+   <!--PATTERN fapstegeneric_write-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_state/win-def:generic_write"
+                 priority="4000"
+                 mode="M589">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_write entity of a fileauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M589"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M589"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M589">
+      <xsl:apply-templates select="@*|node()" mode="M589"/>
+   </xsl:template>
+
+   <!--PATTERN fapstegeneric_execute-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_state/win-def:generic_execute"
+                 priority="4000"
+                 mode="M590">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_execute entity of a fileauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M590"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M590"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M590">
+      <xsl:apply-templates select="@*|node()" mode="M590"/>
+   </xsl:template>
+
+   <!--PATTERN fapstegeneric_all-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_state/win-def:generic_all"
+                 priority="4000"
+                 mode="M591">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_all entity of a fileauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M591"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M591"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M591">
+      <xsl:apply-templates select="@*|node()" mode="M591"/>
+   </xsl:template>
+
+   <!--PATTERN fapstefile_read_data-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_state/win-def:file_read_data"
+                 priority="4000"
+                 mode="M592">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_read_data entity of a fileauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M592"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M592"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M592">
+      <xsl:apply-templates select="@*|node()" mode="M592"/>
+   </xsl:template>
+
+   <!--PATTERN fapstefile_write_data-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_state/win-def:file_write_data"
+                 priority="4000"
+                 mode="M593">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_write_data entity of a fileauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M593"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M593"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M593">
+      <xsl:apply-templates select="@*|node()" mode="M593"/>
+   </xsl:template>
+
+   <!--PATTERN fapstefile_append_data-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_state/win-def:file_append_data"
+                 priority="4000"
+                 mode="M594">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_append_data entity of a fileauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M594"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M594"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M594">
+      <xsl:apply-templates select="@*|node()" mode="M594"/>
+   </xsl:template>
+
+   <!--PATTERN fapstefile_read_ea-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_state/win-def:file_read_ea"
+                 priority="4000"
+                 mode="M595">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_read_ea entity of a fileauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M595"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M595"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M595">
+      <xsl:apply-templates select="@*|node()" mode="M595"/>
+   </xsl:template>
+
+   <!--PATTERN fapstefile_write_ea-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_state/win-def:file_write_ea"
+                 priority="4000"
+                 mode="M596">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_write_ea entity of a fileauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M596"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M596"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M596">
+      <xsl:apply-templates select="@*|node()" mode="M596"/>
+   </xsl:template>
+
+   <!--PATTERN fapstefile_execute-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_state/win-def:file_execute"
+                 priority="4000"
+                 mode="M597">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_execute entity of a fileauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M597"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M597"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M597">
+      <xsl:apply-templates select="@*|node()" mode="M597"/>
+   </xsl:template>
+
+   <!--PATTERN fapstefile_delete_child-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_state/win-def:file_delete_child"
+                 priority="4000"
+                 mode="M598">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_delete_child entity of a fileauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M598"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M598"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M598">
+      <xsl:apply-templates select="@*|node()" mode="M598"/>
+   </xsl:template>
+
+   <!--PATTERN fapstefile_read_attributes-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_state/win-def:file_read_attributes"
+                 priority="4000"
+                 mode="M599">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_read_attributes entity of a fileauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M599"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M599"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M599">
+      <xsl:apply-templates select="@*|node()" mode="M599"/>
+   </xsl:template>
+
+   <!--PATTERN fapstefile_write_attributes-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileauditedpermissions_state/win-def:file_write_attributes"
+                 priority="4000"
+                 mode="M600">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_write_attributes entity of a fileauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M600"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M600"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M600">
+      <xsl:apply-templates select="@*|node()" mode="M600"/>
+   </xsl:template>
+
+   <!--PATTERN fer53tst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_test/win-def:object" priority="4000"
+                 mode="M601">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:fileeffectiverights53_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a fileeffectiverights53_test must reference a fileeffectiverights53_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M601"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_test/win-def:state" priority="3999"
+                 mode="M601">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:fileeffectiverights53_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a fileeffectiverights53_test must reference a fileeffectiverights53_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M601"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M601"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M601">
+      <xsl:apply-templates select="@*|node()" mode="M601"/>
+   </xsl:template>
+
+   <!--PATTERN fer53objpath-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_object/win-def:path" priority="4000"
+                 mode="M602">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a fileeffectiverights53_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M602"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M602"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M602">
+      <xsl:apply-templates select="@*|node()" mode="M602"/>
+   </xsl:template>
+
+   <!--PATTERN fer53objfilename-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_object/win-def:filename" priority="4000"
+                 mode="M603">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filename entity of a fileeffectiverights53_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="if (not(@operation) or @operation='equals' or @operation='not equal') then (not(contains(.,'\') or contains(.,'/') or contains(.,':') or contains(.,'*') or contains(.,'?') or contains(.,'&gt;') or contains(.,'|'))) else (1=1)"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - filename entity can not contain the characters / \ : * ? &gt; | <xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M603"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M603"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M603">
+      <xsl:apply-templates select="@*|node()" mode="M603"/>
+   </xsl:template>
+
+   <!--PATTERN fer53objtrustee_sid-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_object/win-def:trustee_sid"
+                 priority="4000"
+                 mode="M604">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_sid entity of a fileeffectiverights53_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M604"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M604"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M604">
+      <xsl:apply-templates select="@*|node()" mode="M604"/>
+   </xsl:template>
+
+   <!--PATTERN fer53stepath-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_state/win-def:path" priority="4000"
+                 mode="M605">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a fileeffectiverights53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M605"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M605"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M605">
+      <xsl:apply-templates select="@*|node()" mode="M605"/>
+   </xsl:template>
+
+   <!--PATTERN fer53stefilename-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_state/win-def:filename" priority="4000"
+                 mode="M606">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filename entity of a fileeffectiverights53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="if (not(@operation) or @operation='equals' or @operation='not equal') then (not(contains(.,'\') or contains(.,'/') or contains(.,':') or contains(.,'*') or contains(.,'?') or contains(.,'&gt;') or contains(.,'|'))) else (1=1)"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - filename entity can not contain the characters / \ : * ? &gt; | <xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M606"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M606"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M606">
+      <xsl:apply-templates select="@*|node()" mode="M606"/>
+   </xsl:template>
+
+   <!--PATTERN fer53stetrustee_sid-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_state/win-def:trustee_sid" priority="4000"
+                 mode="M607">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_sid entity of a fileeffectiverights53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M607"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M607"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M607">
+      <xsl:apply-templates select="@*|node()" mode="M607"/>
+   </xsl:template>
+
+   <!--PATTERN fer53stestandard_delete-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_state/win-def:standard_delete"
+                 priority="4000"
+                 mode="M608">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_delete entity of a fileeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M608"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M608"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M608">
+      <xsl:apply-templates select="@*|node()" mode="M608"/>
+   </xsl:template>
+
+   <!--PATTERN fer53stestandard_read_control-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_state/win-def:standard_read_control"
+                 priority="4000"
+                 mode="M609">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_read_control entity of a fileeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M609"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M609"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M609">
+      <xsl:apply-templates select="@*|node()" mode="M609"/>
+   </xsl:template>
+
+   <!--PATTERN fer53stestandard_write_dac-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_state/win-def:standard_write_dac"
+                 priority="4000"
+                 mode="M610">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_write_dac entity of a fileeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M610"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M610"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M610">
+      <xsl:apply-templates select="@*|node()" mode="M610"/>
+   </xsl:template>
+
+   <!--PATTERN fer53stestandard_write_owner-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_state/win-def:standard_write_owner"
+                 priority="4000"
+                 mode="M611">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_write_owner entity of a fileeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M611"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M611"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M611">
+      <xsl:apply-templates select="@*|node()" mode="M611"/>
+   </xsl:template>
+
+   <!--PATTERN fer53stestandard_synchronize-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_state/win-def:standard_synchronize"
+                 priority="4000"
+                 mode="M612">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_synchronize entity of a fileeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M612"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M612"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M612">
+      <xsl:apply-templates select="@*|node()" mode="M612"/>
+   </xsl:template>
+
+   <!--PATTERN fer53steaccess_system_security-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_state/win-def:access_system_security"
+                 priority="4000"
+                 mode="M613">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the access_system_security entity of a fileeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M613"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M613"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M613">
+      <xsl:apply-templates select="@*|node()" mode="M613"/>
+   </xsl:template>
+
+   <!--PATTERN fer53stegeneric_read-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_state/win-def:generic_read"
+                 priority="4000"
+                 mode="M614">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_read entity of a fileeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M614"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M614"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M614">
+      <xsl:apply-templates select="@*|node()" mode="M614"/>
+   </xsl:template>
+
+   <!--PATTERN fer53stegeneric_write-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_state/win-def:generic_write"
+                 priority="4000"
+                 mode="M615">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_write entity of a fileeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M615"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M615"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M615">
+      <xsl:apply-templates select="@*|node()" mode="M615"/>
+   </xsl:template>
+
+   <!--PATTERN fer53stegeneric_execute-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_state/win-def:generic_execute"
+                 priority="4000"
+                 mode="M616">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_execute entity of a fileeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M616"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M616"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M616">
+      <xsl:apply-templates select="@*|node()" mode="M616"/>
+   </xsl:template>
+
+   <!--PATTERN fer53stegeneric_all-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_state/win-def:generic_all" priority="4000"
+                 mode="M617">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_all entity of a fileeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M617"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M617"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M617">
+      <xsl:apply-templates select="@*|node()" mode="M617"/>
+   </xsl:template>
+
+   <!--PATTERN fer53stefile_read_data-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_state/win-def:file_read_data"
+                 priority="4000"
+                 mode="M618">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_read_data entity of a fileeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M618"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M618"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M618">
+      <xsl:apply-templates select="@*|node()" mode="M618"/>
+   </xsl:template>
+
+   <!--PATTERN fer53stefile_write_data-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_state/win-def:file_write_data"
+                 priority="4000"
+                 mode="M619">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_write_data entity of a fileeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M619"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M619"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M619">
+      <xsl:apply-templates select="@*|node()" mode="M619"/>
+   </xsl:template>
+
+   <!--PATTERN fer53stefile_append_data-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_state/win-def:file_append_data"
+                 priority="4000"
+                 mode="M620">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_append_data entity of a fileeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M620"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M620"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M620">
+      <xsl:apply-templates select="@*|node()" mode="M620"/>
+   </xsl:template>
+
+   <!--PATTERN fer53stefile_read_ea-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_state/win-def:file_read_ea"
+                 priority="4000"
+                 mode="M621">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_read_ea entity of a fileeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M621"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M621"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M621">
+      <xsl:apply-templates select="@*|node()" mode="M621"/>
+   </xsl:template>
+
+   <!--PATTERN fer53stefile_write_ea-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_state/win-def:file_write_ea"
+                 priority="4000"
+                 mode="M622">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_write_ea entity of a fileeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M622"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M622"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M622">
+      <xsl:apply-templates select="@*|node()" mode="M622"/>
+   </xsl:template>
+
+   <!--PATTERN fer53stefile_execute-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_state/win-def:file_execute"
+                 priority="4000"
+                 mode="M623">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_execute entity of a fileeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M623"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M623"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M623">
+      <xsl:apply-templates select="@*|node()" mode="M623"/>
+   </xsl:template>
+
+   <!--PATTERN fer53stefile_delete_child-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_state/win-def:file_delete_child"
+                 priority="4000"
+                 mode="M624">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_delete_child entity of a fileeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M624"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M624"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M624">
+      <xsl:apply-templates select="@*|node()" mode="M624"/>
+   </xsl:template>
+
+   <!--PATTERN fer53stefile_read_attributes-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_state/win-def:file_read_attributes"
+                 priority="4000"
+                 mode="M625">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_read_attributes entity of a fileeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M625"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M625"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M625">
+      <xsl:apply-templates select="@*|node()" mode="M625"/>
+   </xsl:template>
+
+   <!--PATTERN fer53stefile_write_attributes-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights53_state/win-def:file_write_attributes"
+                 priority="4000"
+                 mode="M626">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_write_attributes entity of a fileeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M626"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M626"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M626">
+      <xsl:apply-templates select="@*|node()" mode="M626"/>
+   </xsl:template>
+
+   <!--PATTERN fertst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_test/win-def:object" priority="4000"
+                 mode="M627">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:fileeffectiverights_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a fileeffectiverights_test must reference a fileeffectiverights_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M627"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_test/win-def:state" priority="3999"
+                 mode="M627">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:fileeffectiverights_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a fileeffectiverights_test must reference a fileeffectiverights_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M627"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M627"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M627">
+      <xsl:apply-templates select="@*|node()" mode="M627"/>
+   </xsl:template>
+
+   <!--PATTERN fefobjpath-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_object/win-def:path" priority="4000"
+                 mode="M628">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a fileeffectiverights_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M628"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M628"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M628">
+      <xsl:apply-templates select="@*|node()" mode="M628"/>
+   </xsl:template>
+
+   <!--PATTERN fefobjfilename-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_object/win-def:filename" priority="4000"
+                 mode="M629">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filename entity of a fileeffectiverights_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="if (not(@operation) or @operation='equals' or @operation='not equal') then (not(contains(.,'\') or contains(.,'/') or contains(.,':') or contains(.,'*') or contains(.,'?') or contains(.,'&gt;') or contains(.,'|'))) else (1=1)"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - filename entity can not contain the characters / \ : * ? &gt; | <xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M629"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M629"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M629">
+      <xsl:apply-templates select="@*|node()" mode="M629"/>
+   </xsl:template>
+
+   <!--PATTERN fefobjtrustee_name-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_object/win-def:trustee_name" priority="4000"
+                 mode="M630">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_name entity of a fileeffectiverights_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M630"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M630"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M630">
+      <xsl:apply-templates select="@*|node()" mode="M630"/>
+   </xsl:template>
+
+   <!--PATTERN ferstepath-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_state/win-def:path" priority="4000"
+                 mode="M631">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the path entity of a fileeffectiverights_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M631"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M631"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M631">
+      <xsl:apply-templates select="@*|node()" mode="M631"/>
+   </xsl:template>
+
+   <!--PATTERN ferstefilename-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_state/win-def:filename" priority="4000"
+                 mode="M632">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the filename entity of a fileeffectiverights_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="if (not(@operation) or @operation='equals' or @operation='not equal') then (not(contains(.,'\') or contains(.,'/') or contains(.,':') or contains(.,'*') or contains(.,'?') or contains(.,'&gt;') or contains(.,'|'))) else (1=1)"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - filename entity can not contain the characters / \ : * ? &gt; | <xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M632"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M632"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M632">
+      <xsl:apply-templates select="@*|node()" mode="M632"/>
+   </xsl:template>
+
+   <!--PATTERN ferstetrustee_name-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_state/win-def:trustee_name" priority="4000"
+                 mode="M633">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_name entity of a fileeffectiverights_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M633"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M633"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M633">
+      <xsl:apply-templates select="@*|node()" mode="M633"/>
+   </xsl:template>
+
+   <!--PATTERN ferstestandard_delete-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_state/win-def:standard_delete"
+                 priority="4000"
+                 mode="M634">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_delete entity of a fileeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M634"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M634"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M634">
+      <xsl:apply-templates select="@*|node()" mode="M634"/>
+   </xsl:template>
+
+   <!--PATTERN ferstestandard_read_control-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_state/win-def:standard_read_control"
+                 priority="4000"
+                 mode="M635">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_read_control entity of a fileeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M635"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M635"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M635">
+      <xsl:apply-templates select="@*|node()" mode="M635"/>
+   </xsl:template>
+
+   <!--PATTERN ferstestandard_write_dac-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_state/win-def:standard_write_dac"
+                 priority="4000"
+                 mode="M636">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_write_dac entity of a fileeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M636"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M636"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M636">
+      <xsl:apply-templates select="@*|node()" mode="M636"/>
+   </xsl:template>
+
+   <!--PATTERN ferstestandard_write_owner-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_state/win-def:standard_write_owner"
+                 priority="4000"
+                 mode="M637">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_write_owner entity of a fileeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M637"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M637"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M637">
+      <xsl:apply-templates select="@*|node()" mode="M637"/>
+   </xsl:template>
+
+   <!--PATTERN ferstestandard_synchronize-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_state/win-def:standard_synchronize"
+                 priority="4000"
+                 mode="M638">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_synchronize entity of a fileeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M638"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M638"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M638">
+      <xsl:apply-templates select="@*|node()" mode="M638"/>
+   </xsl:template>
+
+   <!--PATTERN fersteaccess_system_security-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_state/win-def:access_system_security"
+                 priority="4000"
+                 mode="M639">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the access_system_security entity of a fileeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M639"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M639"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M639">
+      <xsl:apply-templates select="@*|node()" mode="M639"/>
+   </xsl:template>
+
+   <!--PATTERN ferstegeneric_read-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_state/win-def:generic_read" priority="4000"
+                 mode="M640">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_read entity of a fileeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M640"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M640"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M640">
+      <xsl:apply-templates select="@*|node()" mode="M640"/>
+   </xsl:template>
+
+   <!--PATTERN ferstegeneric_write-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_state/win-def:generic_write" priority="4000"
+                 mode="M641">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_write entity of a fileeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M641"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M641"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M641">
+      <xsl:apply-templates select="@*|node()" mode="M641"/>
+   </xsl:template>
+
+   <!--PATTERN ferstegeneric_execute-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_state/win-def:generic_execute"
+                 priority="4000"
+                 mode="M642">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_execute entity of a fileeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M642"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M642"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M642">
+      <xsl:apply-templates select="@*|node()" mode="M642"/>
+   </xsl:template>
+
+   <!--PATTERN ferstegeneric_all-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_state/win-def:generic_all" priority="4000"
+                 mode="M643">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_all entity of a fileeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M643"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M643"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M643">
+      <xsl:apply-templates select="@*|node()" mode="M643"/>
+   </xsl:template>
+
+   <!--PATTERN ferstefile_read_data-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_state/win-def:file_read_data"
+                 priority="4000"
+                 mode="M644">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_read_data entity of a fileeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M644"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M644"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M644">
+      <xsl:apply-templates select="@*|node()" mode="M644"/>
+   </xsl:template>
+
+   <!--PATTERN ferstefile_write_data-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_state/win-def:file_write_data"
+                 priority="4000"
+                 mode="M645">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_write_data entity of a fileeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M645"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M645"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M645">
+      <xsl:apply-templates select="@*|node()" mode="M645"/>
+   </xsl:template>
+
+   <!--PATTERN ferstefile_append_data-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_state/win-def:file_append_data"
+                 priority="4000"
+                 mode="M646">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_append_data entity of a fileeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M646"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M646"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M646">
+      <xsl:apply-templates select="@*|node()" mode="M646"/>
+   </xsl:template>
+
+   <!--PATTERN ferstefile_read_ea-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_state/win-def:file_read_ea" priority="4000"
+                 mode="M647">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_read_ea entity of a fileeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M647"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M647"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M647">
+      <xsl:apply-templates select="@*|node()" mode="M647"/>
+   </xsl:template>
+
+   <!--PATTERN ferstefile_write_ea-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_state/win-def:file_write_ea" priority="4000"
+                 mode="M648">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_write_ea entity of a fileeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M648"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M648"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M648">
+      <xsl:apply-templates select="@*|node()" mode="M648"/>
+   </xsl:template>
+
+   <!--PATTERN ferstefile_execute-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_state/win-def:file_execute" priority="4000"
+                 mode="M649">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_execute entity of a fileeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M649"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M649"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M649">
+      <xsl:apply-templates select="@*|node()" mode="M649"/>
+   </xsl:template>
+
+   <!--PATTERN ferstefile_delete_child-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_state/win-def:file_delete_child"
+                 priority="4000"
+                 mode="M650">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_delete_child entity of a fileeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M650"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M650"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M650">
+      <xsl:apply-templates select="@*|node()" mode="M650"/>
+   </xsl:template>
+
+   <!--PATTERN ferstefile_read_attributes-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_state/win-def:file_read_attributes"
+                 priority="4000"
+                 mode="M651">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_read_attributes entity of a fileeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M651"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M651"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M651">
+      <xsl:apply-templates select="@*|node()" mode="M651"/>
+   </xsl:template>
+
+   <!--PATTERN ferstefile_write_attributes-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:fileeffectiverights_state/win-def:file_write_attributes"
+                 priority="4000"
+                 mode="M652">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_write_attributes entity of a fileeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M652"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M652"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M652">
+      <xsl:apply-templates select="@*|node()" mode="M652"/>
+   </xsl:template>
+
+   <!--PATTERN grouptst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:group_test/win-def:object" priority="4000" mode="M653">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:group_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a group_test must reference a group_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M653"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:group_test/win-def:state" priority="3999" mode="M653">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:group_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a group_test must reference a group_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M653"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M653"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M653">
+      <xsl:apply-templates select="@*|node()" mode="M653"/>
+   </xsl:template>
+
+   <!--PATTERN groupobjgroup-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:group_object/win-def:group" priority="4000" mode="M654">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the group entity of a group_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M654"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M654"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M654">
+      <xsl:apply-templates select="@*|node()" mode="M654"/>
+   </xsl:template>
+
+   <!--PATTERN groupstegroup-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:group_state/win-def:group" priority="4000" mode="M655">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the group entity of a group_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M655"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M655"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M655">
+      <xsl:apply-templates select="@*|node()" mode="M655"/>
+   </xsl:template>
+
+   <!--PATTERN groupsteuser-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:group_state/win-def:user" priority="4000" mode="M656">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the user entity of a group_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M656"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M656"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M656">
+      <xsl:apply-templates select="@*|node()" mode="M656"/>
+   </xsl:template>
+
+   <!--PATTERN groupsidtst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:group_sid_test/win-def:object" priority="4000" mode="M657">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:group_sid_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a group_sid_test must reference a group_sid_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M657"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:group_sid_test/win-def:state" priority="3999" mode="M657">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:group_sid_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a group_sid_test must reference a group_sid_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M657"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M657"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M657">
+      <xsl:apply-templates select="@*|node()" mode="M657"/>
+   </xsl:template>
+
+   <!--PATTERN groupsidobjgroup-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:group_sid_object/win-def:group_sid" priority="4000" mode="M658">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the group_sid entity of a group_sid_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M658"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M658"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M658">
+      <xsl:apply-templates select="@*|node()" mode="M658"/>
+   </xsl:template>
+
+   <!--PATTERN groupsidstegroup-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:group_sid_state/win-def:group_sid" priority="4000" mode="M659">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the group_sid entity of a group_sid_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M659"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M659"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M659">
+      <xsl:apply-templates select="@*|node()" mode="M659"/>
+   </xsl:template>
+
+   <!--PATTERN groupsidsteuser-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:group_sid_state/win-def:user_sid" priority="4000" mode="M660">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the user_sid entity of a group_sid_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M660"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M660"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M660">
+      <xsl:apply-templates select="@*|node()" mode="M660"/>
+   </xsl:template>
+
+   <!--PATTERN wininterfacetst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:interface_test/win-def:object" priority="4000" mode="M661">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:interface_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of an interface_test must reference an interface_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M661"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:interface_test/win-def:state" priority="3999" mode="M661">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:interface_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of an interface_test must reference an interface_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M661"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M661"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M661">
+      <xsl:apply-templates select="@*|node()" mode="M661"/>
+   </xsl:template>
+
+   <!--PATTERN wininterfaceobjname-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:interface_object/win-def:name" priority="4000" mode="M662">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the name entity of a interface_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M662"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M662"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M662">
+      <xsl:apply-templates select="@*|node()" mode="M662"/>
+   </xsl:template>
+
+   <!--PATTERN wininterfacestename-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:interface_state/win-def:name" priority="4000" mode="M663">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the name entity of an interface_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M663"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M663"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M663">
+      <xsl:apply-templates select="@*|node()" mode="M663"/>
+   </xsl:template>
+
+   <!--PATTERN wininterfacesteindex-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:interface_state/win-def:index" priority="4000" mode="M664">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the index entity of an interface_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M664"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M664"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M664">
+      <xsl:apply-templates select="@*|node()" mode="M664"/>
+   </xsl:template>
+
+   <!--PATTERN wininterfacestetype-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:interface_state/win-def:type" priority="4000" mode="M665">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the type entity of an interface_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M665"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M665"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M665">
+      <xsl:apply-templates select="@*|node()" mode="M665"/>
+   </xsl:template>
+
+   <!--PATTERN wininterfacestehardware_addr-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:interface_state/win-def:hardware_addr" priority="4000"
+                 mode="M666">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the hardware_addr entity of an interface_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M666"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M666"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M666">
+      <xsl:apply-templates select="@*|node()" mode="M666"/>
+   </xsl:template>
+
+   <!--PATTERN wininterfacesteinet_addr-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:interface_state/win-def:inet_addr" priority="4000" mode="M667">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the inet_addr entity of an interface_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M667"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M667"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M667">
+      <xsl:apply-templates select="@*|node()" mode="M667"/>
+   </xsl:template>
+
+   <!--PATTERN wininterfacestebroadcast_addr-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:interface_state/win-def:broadcast_addr" priority="4000"
+                 mode="M668">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the broadcast_addr entity of an interface_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M668"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M668"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M668">
+      <xsl:apply-templates select="@*|node()" mode="M668"/>
+   </xsl:template>
+
+   <!--PATTERN wininterfacestenetmask-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:interface_state/win-def:netmask" priority="4000" mode="M669">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the netmask entity of an interface_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M669"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M669"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M669">
+      <xsl:apply-templates select="@*|node()" mode="M669"/>
+   </xsl:template>
+
+   <!--PATTERN wininterfacesteaddr_type-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:interface_state/win-def:addr_type" priority="4000" mode="M670">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the addr_type entity of an interface_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M670"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M670"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M670">
+      <xsl:apply-templates select="@*|node()" mode="M670"/>
+   </xsl:template>
+
+   <!--PATTERN lptst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:lockoutpolicy_test/win-def:object" priority="4000" mode="M671">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:lockoutpolicy_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a lockoutpolicy_test must reference a lockoutpolicy_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M671"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:lockoutpolicy_test/win-def:state" priority="3999" mode="M671">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:lockoutpolicy_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a lockoutpolicy_test must reference a lockoutpolicy_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M671"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M671"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M671">
+      <xsl:apply-templates select="@*|node()" mode="M671"/>
+   </xsl:template>
+
+   <!--PATTERN lpsteforce_logoff-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:lockoutpolicy_state/win-def:force_logoff" priority="4000"
+                 mode="M672">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the force_logoff entity of a lockoutpolicy_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M672"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M672"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M672">
+      <xsl:apply-templates select="@*|node()" mode="M672"/>
+   </xsl:template>
+
+   <!--PATTERN lpstelockout_duration-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:lockoutpolicy_state/win-def:lockout_duration" priority="4000"
+                 mode="M673">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the lockout_duration entity of a lockoutpolicy_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M673"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M673"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M673">
+      <xsl:apply-templates select="@*|node()" mode="M673"/>
+   </xsl:template>
+
+   <!--PATTERN lpstelockout_observation_window-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:lockoutpolicy_state/win-def:lockout_observation_window"
+                 priority="4000"
+                 mode="M674">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the lockout_observation_window entity of a lockoutpolicy_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M674"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M674"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M674">
+      <xsl:apply-templates select="@*|node()" mode="M674"/>
+   </xsl:template>
+
+   <!--PATTERN lpstelockout_threshold-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:lockoutpolicy_state/win-def:lockout_threshold" priority="4000"
+                 mode="M675">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the lockout_threshold entity of a lockoutpolicy_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M675"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M675"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M675">
+      <xsl:apply-templates select="@*|node()" mode="M675"/>
+   </xsl:template>
+
+   <!--PATTERN metabasetst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:metabase_test/win-def:object" priority="4000" mode="M676">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:metabase_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a metabase_test must reference a metabase_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M676"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:metabase_test/win-def:state" priority="3999" mode="M676">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:metabase_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a metabase_test must reference a metabase_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M676"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M676"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M676">
+      <xsl:apply-templates select="@*|node()" mode="M676"/>
+   </xsl:template>
+
+   <!--PATTERN metabaseobjkey-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:metabase_object/win-def:key" priority="4000" mode="M677">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key entity of a metabase_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M677"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M677"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M677">
+      <xsl:apply-templates select="@*|node()" mode="M677"/>
+   </xsl:template>
+
+   <!--PATTERN metabaseobjid-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:metabase_object/win-def:id" priority="4000" mode="M678">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the id entity of a metabase_object should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M678"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M678"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M678">
+      <xsl:apply-templates select="@*|node()" mode="M678"/>
+   </xsl:template>
+
+   <!--PATTERN metabasestekey-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:metabase_state/win-def:key" priority="4000" mode="M679">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key entity of a metabase_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M679"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M679"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M679">
+      <xsl:apply-templates select="@*|node()" mode="M679"/>
+   </xsl:template>
+
+   <!--PATTERN metabasesteid-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:metabase_state/win-def:id" priority="4000" mode="M680">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the id entity of a metabase_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M680"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M680"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M680">
+      <xsl:apply-templates select="@*|node()" mode="M680"/>
+   </xsl:template>
+
+   <!--PATTERN metabasestename-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:metabase_state/win-def:name" priority="4000" mode="M681">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the name entity of a metabase_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M681"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M681"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M681">
+      <xsl:apply-templates select="@*|node()" mode="M681"/>
+   </xsl:template>
+
+   <!--PATTERN metabasesteuser_type-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:metabase_state/win-def:user_type" priority="4000" mode="M682">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the user_type entity of a metabase_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M682"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M682"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M682">
+      <xsl:apply-templates select="@*|node()" mode="M682"/>
+   </xsl:template>
+
+   <!--PATTERN metabasestedata_type-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:metabase_state/win-def:data_type" priority="4000" mode="M683">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the data_type entity of a metabase_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M683"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M683"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M683">
+      <xsl:apply-templates select="@*|node()" mode="M683"/>
+   </xsl:template>
+
+   <!--PATTERN metabasestedata-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:metabase_state/win-def:data" priority="4000" mode="M684">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - The datatype has been set to 'int' but the value is not an integer.<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M684"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M684"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M684">
+      <xsl:apply-templates select="@*|node()" mode="M684"/>
+   </xsl:template>
+
+   <!--PATTERN pptst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:passwordpolicy_test/win-def:object" priority="4000" mode="M685">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:passwordpolicy_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a passwordpolicy_test must reference a passwordpolicy_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M685"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:passwordpolicy_test/win-def:state" priority="3999" mode="M685">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:passwordpolicy_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a passwordpolicy_test must reference a passwordpolicy_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M685"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M685"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M685">
+      <xsl:apply-templates select="@*|node()" mode="M685"/>
+   </xsl:template>
+
+   <!--PATTERN ppstemax_passwd_age-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:passwordpolicy_state/win-def:max_passwd_age" priority="4000"
+                 mode="M686">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the max_passwd_age entity of a passwordpolicy_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M686"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M686"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M686">
+      <xsl:apply-templates select="@*|node()" mode="M686"/>
+   </xsl:template>
+
+   <!--PATTERN ppstemin_passwd_age-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:passwordpolicy_state/win-def:min_passwd_age" priority="4000"
+                 mode="M687">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the min_passwd_age entity of a passwordpolicy_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M687"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M687"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M687">
+      <xsl:apply-templates select="@*|node()" mode="M687"/>
+   </xsl:template>
+
+   <!--PATTERN ppstemin_passwd_len-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:passwordpolicy_state/win-def:min_passwd_len" priority="4000"
+                 mode="M688">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the min_passwd_len entity of a passwordpolicy_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M688"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M688"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M688">
+      <xsl:apply-templates select="@*|node()" mode="M688"/>
+   </xsl:template>
+
+   <!--PATTERN ppstepassword_hist_len-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:passwordpolicy_state/win-def:password_hist_len" priority="4000"
+                 mode="M689">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the password_hist_len entity of a passwordpolicy_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M689"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M689"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M689">
+      <xsl:apply-templates select="@*|node()" mode="M689"/>
+   </xsl:template>
+
+   <!--PATTERN ppstepassword_complexity-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:passwordpolicy_state/win-def:password_complexity"
+                 priority="4000"
+                 mode="M690">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the password_complexity entity of an passwordpolicy_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M690"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M690"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M690">
+      <xsl:apply-templates select="@*|node()" mode="M690"/>
+   </xsl:template>
+
+   <!--PATTERN ppstereversible_encryption-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:passwordpolicy_state/win-def:reversible_encryption"
+                 priority="4000"
+                 mode="M691">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the reversible_encryption entity of an passwordpolicy_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M691"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M691"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M691">
+      <xsl:apply-templates select="@*|node()" mode="M691"/>
+   </xsl:template>
+
+   <!--PATTERN winporttst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:port_test/win-def:object" priority="4000" mode="M692">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:port_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a port_test must reference a port_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M692"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:port_test/win-def:state" priority="3999" mode="M692">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:port_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a port_test must reference a port_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M692"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M692"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M692">
+      <xsl:apply-templates select="@*|node()" mode="M692"/>
+   </xsl:template>
+
+   <!--PATTERN winportobjlocal_address-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:port_object/win-def:local_address" priority="4000" mode="M693">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the local_address entity of a port_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M693"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M693"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M693">
+      <xsl:apply-templates select="@*|node()" mode="M693"/>
+   </xsl:template>
+
+   <!--PATTERN winportobjlocal_port-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:port_object/win-def:local_port" priority="4000" mode="M694">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the local_port entity of a port_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M694"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M694"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M694">
+      <xsl:apply-templates select="@*|node()" mode="M694"/>
+   </xsl:template>
+
+   <!--PATTERN winportobjprotocol-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:port_object/win-def:protocol" priority="4000" mode="M695">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the protocol entity of a port_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M695"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M695"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M695">
+      <xsl:apply-templates select="@*|node()" mode="M695"/>
+   </xsl:template>
+
+   <!--PATTERN winportstelocal_address-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:port_state/win-def:local_address" priority="4000" mode="M696">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the local_address entity of a port_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M696"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M696"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M696">
+      <xsl:apply-templates select="@*|node()" mode="M696"/>
+   </xsl:template>
+
+   <!--PATTERN winportstelocal_port-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:port_state/win-def:local_port" priority="4000" mode="M697">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the local_port entity of a port_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M697"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M697"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M697">
+      <xsl:apply-templates select="@*|node()" mode="M697"/>
+   </xsl:template>
+
+   <!--PATTERN winportsteprotocol-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:port_state/win-def:protocol" priority="4000" mode="M698">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the protocol entity of a port_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M698"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M698"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M698">
+      <xsl:apply-templates select="@*|node()" mode="M698"/>
+   </xsl:template>
+
+   <!--PATTERN winportstepid-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:port_state/win-def:pid" priority="4000" mode="M699">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the pid entity of a port_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M699"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M699"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M699">
+      <xsl:apply-templates select="@*|node()" mode="M699"/>
+   </xsl:template>
+
+   <!--PATTERN pertst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:printereffectiverights_test/win-def:object" priority="4000"
+                 mode="M700">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:printereffectiverights_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a printereffectiverights_test must reference a printereffectiverights_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M700"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:printereffectiverights_test/win-def:state" priority="3999"
+                 mode="M700">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:printereffectiverights_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a printereffectiverights_test must reference a printereffectiverights_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M700"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M700"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M700">
+      <xsl:apply-templates select="@*|node()" mode="M700"/>
+   </xsl:template>
+
+   <!--PATTERN perobjprinter_name-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:printereffectiverights_object/win-def:printer_name"
+                 priority="4000"
+                 mode="M701">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the kprinter_nameey entity of a printereffectiverights_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M701"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M701"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M701">
+      <xsl:apply-templates select="@*|node()" mode="M701"/>
+   </xsl:template>
+
+   <!--PATTERN perobjtrustee_sid-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:printereffectiverights_object/win-def:trustee_sid"
+                 priority="4000"
+                 mode="M702">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_sid entity of a printereffectiverights_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M702"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M702"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M702">
+      <xsl:apply-templates select="@*|node()" mode="M702"/>
+   </xsl:template>
+
+   <!--PATTERN rersteprinter_name-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_state/win-def:printer_name"
+                 priority="4000"
+                 mode="M703">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the printer_name entity of a printereffectiverights_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M703"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M703"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M703">
+      <xsl:apply-templates select="@*|node()" mode="M703"/>
+   </xsl:template>
+
+   <!--PATTERN perstetrustee_sid-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:printereffectiverights_state/win-def:trustee_sid"
+                 priority="4000"
+                 mode="M704">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_sid entity of a printereffectiverights_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M704"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M704"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M704">
+      <xsl:apply-templates select="@*|node()" mode="M704"/>
+   </xsl:template>
+
+   <!--PATTERN perstestandard_delete-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:printereffectiverights_state/win-def:standard_delete"
+                 priority="4000"
+                 mode="M705">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_delete entity of a printereffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M705"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M705"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M705">
+      <xsl:apply-templates select="@*|node()" mode="M705"/>
+   </xsl:template>
+
+   <!--PATTERN perstestandard_read_control-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:printereffectiverights_state/win-def:standard_read_control"
+                 priority="4000"
+                 mode="M706">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_read_control entity of a printereffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M706"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M706"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M706">
+      <xsl:apply-templates select="@*|node()" mode="M706"/>
+   </xsl:template>
+
+   <!--PATTERN perstestandard_write_dac-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:printereffectiverights_state/win-def:standard_write_dac"
+                 priority="4000"
+                 mode="M707">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_write_dac entity of a printereffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M707"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M707"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M707">
+      <xsl:apply-templates select="@*|node()" mode="M707"/>
+   </xsl:template>
+
+   <!--PATTERN perstestandard_write_owner-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:printereffectiverights_state/win-def:standard_write_owner"
+                 priority="4000"
+                 mode="M708">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_write_owner entity of a printereffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M708"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M708"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M708">
+      <xsl:apply-templates select="@*|node()" mode="M708"/>
+   </xsl:template>
+
+   <!--PATTERN perstestandard_synchronize-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:printereffectiverights_state/win-def:standard_synchronize"
+                 priority="4000"
+                 mode="M709">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_synchronize entity of a printereffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M709"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M709"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M709">
+      <xsl:apply-templates select="@*|node()" mode="M709"/>
+   </xsl:template>
+
+   <!--PATTERN persteaccess_system_security-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:printereffectiverights_state/win-def:access_system_security"
+                 priority="4000"
+                 mode="M710">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the access_system_security entity of a printereffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M710"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M710"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M710">
+      <xsl:apply-templates select="@*|node()" mode="M710"/>
+   </xsl:template>
+
+   <!--PATTERN perstegeneric_read-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:printereffectiverights_state/win-def:generic_read"
+                 priority="4000"
+                 mode="M711">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_read entity of a printereffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M711"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M711"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M711">
+      <xsl:apply-templates select="@*|node()" mode="M711"/>
+   </xsl:template>
+
+   <!--PATTERN perstegeneric_write-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:printereffectiverights_state/win-def:generic_write"
+                 priority="4000"
+                 mode="M712">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_write entity of a printereffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M712"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M712"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M712">
+      <xsl:apply-templates select="@*|node()" mode="M712"/>
+   </xsl:template>
+
+   <!--PATTERN perstegeneric_execute-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:printereffectiverights_state/win-def:generic_execute"
+                 priority="4000"
+                 mode="M713">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_execute entity of a printereffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M713"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M713"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M713">
+      <xsl:apply-templates select="@*|node()" mode="M713"/>
+   </xsl:template>
+
+   <!--PATTERN perstegeneric_all-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:printereffectiverights_state/win-def:generic_all"
+                 priority="4000"
+                 mode="M714">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_all entity of a printereffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M714"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M714"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M714">
+      <xsl:apply-templates select="@*|node()" mode="M714"/>
+   </xsl:template>
+
+   <!--PATTERN persteprinter_access_administer-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:printereffectiverights_state/win-def:printer_access_administer"
+                 priority="4000"
+                 mode="M715">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the printer_access_administer entity of a printereffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M715"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M715"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M715">
+      <xsl:apply-templates select="@*|node()" mode="M715"/>
+   </xsl:template>
+
+   <!--PATTERN persteprinter_access_use-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:printereffectiverights_state/win-def:printer_access_use"
+                 priority="4000"
+                 mode="M716">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the printer_access_use entity of a printereffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M716"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M716"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M716">
+      <xsl:apply-templates select="@*|node()" mode="M716"/>
+   </xsl:template>
+
+   <!--PATTERN perstejob_access_administer-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:printereffectiverights_state/win-def:job_access_administer"
+                 priority="4000"
+                 mode="M717">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the job_access_administer entity of a printereffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M717"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M717"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M717">
+      <xsl:apply-templates select="@*|node()" mode="M717"/>
+   </xsl:template>
+
+   <!--PATTERN perstejob_access_read-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:printereffectiverights_state/win-def:job_access_read"
+                 priority="4000"
+                 mode="M718">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the job_access_read entity of a printereffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M718"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M718"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M718">
+      <xsl:apply-templates select="@*|node()" mode="M718"/>
+   </xsl:template>
+
+   <!--PATTERN processtst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:process_test/win-def:object" priority="4000" mode="M719">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:process_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a process_test must reference a process_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M719"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:process_test/win-def:state" priority="3999" mode="M719">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:process_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a process_test must reference a process_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M719"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M719"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M719">
+      <xsl:apply-templates select="@*|node()" mode="M719"/>
+   </xsl:template>
+
+   <!--PATTERN processobjcommand_line-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:process_object/win-def:command_line" priority="4000" mode="M720">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the command_line entity of a process_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M720"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M720"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M720">
+      <xsl:apply-templates select="@*|node()" mode="M720"/>
+   </xsl:template>
+
+   <!--PATTERN processstecommand_line-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:process_state/win-def:command_line" priority="4000" mode="M721">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the command_line entity of a process_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M721"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M721"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M721">
+      <xsl:apply-templates select="@*|node()" mode="M721"/>
+   </xsl:template>
+
+   <!--PATTERN processstepid-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:port_state/win-def:pid" priority="4000" mode="M722">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the pid entity of a port_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M722"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M722"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M722">
+      <xsl:apply-templates select="@*|node()" mode="M722"/>
+   </xsl:template>
+
+   <!--PATTERN processsteppid-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:port_state/win-def:ppid" priority="4000" mode="M723">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the ppid entity of a port_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M723"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M723"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M723">
+      <xsl:apply-templates select="@*|node()" mode="M723"/>
+   </xsl:template>
+
+   <!--PATTERN processstepriority-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:process_state/win-def:priority" priority="4000" mode="M724">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the priority entity of a process_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M724"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M724"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M724">
+      <xsl:apply-templates select="@*|node()" mode="M724"/>
+   </xsl:template>
+
+   <!--PATTERN processsteimage_path-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:process_state/win-def:image_path" priority="4000" mode="M725">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the image_path entity of a process_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M725"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M725"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M725">
+      <xsl:apply-templates select="@*|node()" mode="M725"/>
+   </xsl:template>
+
+   <!--PATTERN processstecurrent_dir-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:process_state/win-def:current_dir" priority="4000" mode="M726">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the current_dir entity of a process_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M726"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M726"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M726">
+      <xsl:apply-templates select="@*|node()" mode="M726"/>
+   </xsl:template>
+
+   <!--PATTERN regtst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:registry_test/win-def:object" priority="4000" mode="M727">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:registry_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a registry_test must reference a registry_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M727"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:registry_test/win-def:state" priority="3999" mode="M727">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:registry_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a registry_test must reference a registry_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M727"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M727"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M727">
+      <xsl:apply-templates select="@*|node()" mode="M727"/>
+   </xsl:template>
+
+   <!--PATTERN regobjhive-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:registry_object/win-def:hive" priority="4000" mode="M728">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the hive entity of a registry_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M728"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M728"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M728">
+      <xsl:apply-templates select="@*|node()" mode="M728"/>
+   </xsl:template>
+
+   <!--PATTERN regobjkey-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:registry_object/win-def:key" priority="4000" mode="M729">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key entity of a registry_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+
+		    <!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@xsi:nil='true') or ../win-def:name/@xsi:nil='true'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - name entity must be nil when key is nil<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M729"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M729"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M729">
+      <xsl:apply-templates select="@*|node()" mode="M729"/>
+   </xsl:template>
+
+   <!--PATTERN regobjname-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:registry_object/win-def:name" priority="4000" mode="M730">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the name entity of a registry_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M730"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M730"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M730">
+      <xsl:apply-templates select="@*|node()" mode="M730"/>
+   </xsl:template>
+
+   <!--PATTERN regstehive-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:registry_state/win-def:hive" priority="4000" mode="M731">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the hive entity of a registry_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M731"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M731"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M731">
+      <xsl:apply-templates select="@*|node()" mode="M731"/>
+   </xsl:template>
+
+   <!--PATTERN regstekey-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:registry_state/win-def:key" priority="4000" mode="M732">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key entity of a registry_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M732"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M732"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M732">
+      <xsl:apply-templates select="@*|node()" mode="M732"/>
+   </xsl:template>
+
+   <!--PATTERN regstename-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:registry_state/win-def:name" priority="4000" mode="M733">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the name entity of a registry_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M733"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M733"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M733">
+      <xsl:apply-templates select="@*|node()" mode="M733"/>
+   </xsl:template>
+
+   <!--PATTERN regstetype-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:registry_state/win-def:type" priority="4000" mode="M734">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the type entity of a registry_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M734"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M734"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M734">
+      <xsl:apply-templates select="@*|node()" mode="M734"/>
+   </xsl:template>
+
+   <!--PATTERN regstevalue-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:registry_state/win-def:value" priority="4000" mode="M735">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - The datatype has been set to 'int' but the value is not an integer.<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M735"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M735"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M735">
+      <xsl:apply-templates select="@*|node()" mode="M735"/>
+   </xsl:template>
+
+   <!--PATTERN rap53tst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_test/win-def:object" priority="4000"
+                 mode="M736">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:regkeyauditedpermissions53_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a regkeyauditedpermissions53_test must reference a regkeyauditedpermissions53_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M736"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_test/win-def:state" priority="3999"
+                 mode="M736">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:regkeyauditedpermissions53_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a regkeyauditedpermissions53_test must reference a regkeyauditedpermissions53_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M736"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M736"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M736">
+      <xsl:apply-templates select="@*|node()" mode="M736"/>
+   </xsl:template>
+
+   <!--PATTERN rap53objhive-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_object/win-def:hive" priority="4000"
+                 mode="M737">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the hive entity of a regkeyauditedpermissions53_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M737"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M737"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M737">
+      <xsl:apply-templates select="@*|node()" mode="M737"/>
+   </xsl:template>
+
+   <!--PATTERN rap53objkey-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_object/win-def:key" priority="4000"
+                 mode="M738">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key entity of a regkeyauditedpermissions53_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M738"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M738"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M738">
+      <xsl:apply-templates select="@*|node()" mode="M738"/>
+   </xsl:template>
+
+   <!--PATTERN rap53objtrustee_sid-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_object/win-def:trustee_sid"
+                 priority="4000"
+                 mode="M739">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_sid entity of a regkeyauditedpermissions53_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M739"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M739"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M739">
+      <xsl:apply-templates select="@*|node()" mode="M739"/>
+   </xsl:template>
+
+   <!--PATTERN rap53stehive-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_state/win-def:hive" priority="4000"
+                 mode="M740">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the hive entity of a regkeyauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M740"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M740"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M740">
+      <xsl:apply-templates select="@*|node()" mode="M740"/>
+   </xsl:template>
+
+   <!--PATTERN rap53stekey-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_state/win-def:key" priority="4000"
+                 mode="M741">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key entity of a regkeyauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M741"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M741"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M741">
+      <xsl:apply-templates select="@*|node()" mode="M741"/>
+   </xsl:template>
+
+   <!--PATTERN rap53stetrustee_sid-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_state/win-def:trustee_sid"
+                 priority="4000"
+                 mode="M742">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_sid entity of a regkeyauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M742"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M742"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M742">
+      <xsl:apply-templates select="@*|node()" mode="M742"/>
+   </xsl:template>
+
+   <!--PATTERN rap53stestandard_delete-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_state/win-def:standard_delete"
+                 priority="4000"
+                 mode="M743">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_delete entity of a regkeyauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M743"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M743"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M743">
+      <xsl:apply-templates select="@*|node()" mode="M743"/>
+   </xsl:template>
+
+   <!--PATTERN rap53stestandard_read_control-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_state/win-def:standard_read_control"
+                 priority="4000"
+                 mode="M744">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_read_control entity of a regkeyauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M744"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M744"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M744">
+      <xsl:apply-templates select="@*|node()" mode="M744"/>
+   </xsl:template>
+
+   <!--PATTERN rap53stestandard_write_dac-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_state/win-def:standard_write_dac"
+                 priority="4000"
+                 mode="M745">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_write_dac entity of a regkeyauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M745"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M745"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M745">
+      <xsl:apply-templates select="@*|node()" mode="M745"/>
+   </xsl:template>
+
+   <!--PATTERN rap53stestandard_write_owner-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_state/win-def:standard_write_owner"
+                 priority="4000"
+                 mode="M746">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_write_owner entity of a regkeyauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M746"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M746"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M746">
+      <xsl:apply-templates select="@*|node()" mode="M746"/>
+   </xsl:template>
+
+   <!--PATTERN rap53stestandard_synchronize-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_state/win-def:standard_synchronize"
+                 priority="4000"
+                 mode="M747">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_synchronize entity of a regkeyauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M747"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M747"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M747">
+      <xsl:apply-templates select="@*|node()" mode="M747"/>
+   </xsl:template>
+
+   <!--PATTERN rap53steaccess_system_security-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_state/win-def:access_system_security"
+                 priority="4000"
+                 mode="M748">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the access_system_security entity of a regkeyauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M748"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M748"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M748">
+      <xsl:apply-templates select="@*|node()" mode="M748"/>
+   </xsl:template>
+
+   <!--PATTERN rap53stegeneric_read-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_state/win-def:generic_read"
+                 priority="4000"
+                 mode="M749">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_read entity of a regkeyauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M749"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M749"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M749">
+      <xsl:apply-templates select="@*|node()" mode="M749"/>
+   </xsl:template>
+
+   <!--PATTERN rap53stegeneric_write-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_state/win-def:generic_write"
+                 priority="4000"
+                 mode="M750">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_write entity of a regkeyauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M750"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M750"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M750">
+      <xsl:apply-templates select="@*|node()" mode="M750"/>
+   </xsl:template>
+
+   <!--PATTERN rap53stegeneric_execute-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_state/win-def:generic_execute"
+                 priority="4000"
+                 mode="M751">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_execute entity of a regkeyauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M751"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M751"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M751">
+      <xsl:apply-templates select="@*|node()" mode="M751"/>
+   </xsl:template>
+
+   <!--PATTERN rap53stegeneric_all-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_state/win-def:generic_all"
+                 priority="4000"
+                 mode="M752">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_all entity of a regkeyauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M752"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M752"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M752">
+      <xsl:apply-templates select="@*|node()" mode="M752"/>
+   </xsl:template>
+
+   <!--PATTERN rap53stekey_query_value-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_state/win-def:key_query_value"
+                 priority="4000"
+                 mode="M753">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_query_value entity of a regkeyauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M753"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M753"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M753">
+      <xsl:apply-templates select="@*|node()" mode="M753"/>
+   </xsl:template>
+
+   <!--PATTERN rap53stekey_set_value-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_state/win-def:key_set_value"
+                 priority="4000"
+                 mode="M754">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_set_value entity of a regkeyauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M754"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M754"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M754">
+      <xsl:apply-templates select="@*|node()" mode="M754"/>
+   </xsl:template>
+
+   <!--PATTERN rap53stekey_create_sub_key-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_state/win-def:key_create_sub_key"
+                 priority="4000"
+                 mode="M755">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_create_sub_key entity of a regkeyauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M755"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M755"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M755">
+      <xsl:apply-templates select="@*|node()" mode="M755"/>
+   </xsl:template>
+
+   <!--PATTERN rap53stekey_enumerate_sub_keys-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_state/win-def:key_enumerate_sub_keys"
+                 priority="4000"
+                 mode="M756">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_enumerate_sub_keys entity of a regkeyauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M756"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M756"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M756">
+      <xsl:apply-templates select="@*|node()" mode="M756"/>
+   </xsl:template>
+
+   <!--PATTERN rap53stekey_notify-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_state/win-def:key_notify"
+                 priority="4000"
+                 mode="M757">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_notify entity of a regkeyauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M757"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M757"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M757">
+      <xsl:apply-templates select="@*|node()" mode="M757"/>
+   </xsl:template>
+
+   <!--PATTERN rap53stekey_create_link-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_state/win-def:key_create_link"
+                 priority="4000"
+                 mode="M758">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_create_link entity of a regkeyauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M758"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M758"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M758">
+      <xsl:apply-templates select="@*|node()" mode="M758"/>
+   </xsl:template>
+
+   <!--PATTERN rap53stekey_wow64_64key-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_state/win-def:key_wow64_64key"
+                 priority="4000"
+                 mode="M759">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_wow64_64key entity of a regkeyauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M759"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M759"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M759">
+      <xsl:apply-templates select="@*|node()" mode="M759"/>
+   </xsl:template>
+
+   <!--PATTERN rap53stekey_wow64_32key-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_state/win-def:key_wow64_32key"
+                 priority="4000"
+                 mode="M760">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_wow64_32key entity of a regkeyauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M760"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M760"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M760">
+      <xsl:apply-templates select="@*|node()" mode="M760"/>
+   </xsl:template>
+
+   <!--PATTERN rap53stekey_wow64_res-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions53_state/win-def:key_wow64_res"
+                 priority="4000"
+                 mode="M761">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_wow64_res entity of a regkeyauditedpermissions53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M761"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M761"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M761">
+      <xsl:apply-templates select="@*|node()" mode="M761"/>
+   </xsl:template>
+
+   <!--PATTERN raptst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_test/win-def:object" priority="4000"
+                 mode="M762">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:regkeyauditedpermissions_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a regkeyauditedpermissions_test must reference a regkeyauditedpermissions_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M762"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_test/win-def:state" priority="3999"
+                 mode="M762">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:regkeyauditedpermissions_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a regkeyauditedpermissions_test must reference a regkeyauditedpermissions_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M762"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M762"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M762">
+      <xsl:apply-templates select="@*|node()" mode="M762"/>
+   </xsl:template>
+
+   <!--PATTERN rapobjhive-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_object/win-def:hive" priority="4000"
+                 mode="M763">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the hive entity of a regkeyauditedpermissions_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M763"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M763"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M763">
+      <xsl:apply-templates select="@*|node()" mode="M763"/>
+   </xsl:template>
+
+   <!--PATTERN rapobjkey-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_object/win-def:key" priority="4000"
+                 mode="M764">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key entity of a regkeyauditedpermissions_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M764"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M764"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M764">
+      <xsl:apply-templates select="@*|node()" mode="M764"/>
+   </xsl:template>
+
+   <!--PATTERN rapobjtrustee_name-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_object/win-def:trustee_name"
+                 priority="4000"
+                 mode="M765">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_name entity of a regkeyauditedpermissions_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M765"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M765"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M765">
+      <xsl:apply-templates select="@*|node()" mode="M765"/>
+   </xsl:template>
+
+   <!--PATTERN rapstehive-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_state/win-def:hive" priority="4000"
+                 mode="M766">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the hive entity of a regkeyauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M766"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M766"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M766">
+      <xsl:apply-templates select="@*|node()" mode="M766"/>
+   </xsl:template>
+
+   <!--PATTERN rapstekey-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_state/win-def:key" priority="4000"
+                 mode="M767">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key entity of a regkeyauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M767"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M767"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M767">
+      <xsl:apply-templates select="@*|node()" mode="M767"/>
+   </xsl:template>
+
+   <!--PATTERN rapstetrustee_name-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_state/win-def:trustee_name"
+                 priority="4000"
+                 mode="M768">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_name entity of a regkeyauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M768"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M768"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M768">
+      <xsl:apply-templates select="@*|node()" mode="M768"/>
+   </xsl:template>
+
+   <!--PATTERN rapstestandard_delete-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_state/win-def:standard_delete"
+                 priority="4000"
+                 mode="M769">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_delete entity of a regkeyauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M769"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M769"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M769">
+      <xsl:apply-templates select="@*|node()" mode="M769"/>
+   </xsl:template>
+
+   <!--PATTERN rapstestandard_read_control-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_state/win-def:standard_read_control"
+                 priority="4000"
+                 mode="M770">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_read_control entity of a regkeyauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M770"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M770"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M770">
+      <xsl:apply-templates select="@*|node()" mode="M770"/>
+   </xsl:template>
+
+   <!--PATTERN rapstestandard_write_dac-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_state/win-def:standard_write_dac"
+                 priority="4000"
+                 mode="M771">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_write_dac entity of a regkeyauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M771"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M771"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M771">
+      <xsl:apply-templates select="@*|node()" mode="M771"/>
+   </xsl:template>
+
+   <!--PATTERN rapstestandard_write_owner-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_state/win-def:standard_write_owner"
+                 priority="4000"
+                 mode="M772">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_write_owner entity of a regkeyauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M772"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M772"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M772">
+      <xsl:apply-templates select="@*|node()" mode="M772"/>
+   </xsl:template>
+
+   <!--PATTERN rapstestandard_synchronize-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_state/win-def:standard_synchronize"
+                 priority="4000"
+                 mode="M773">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_synchronize entity of a regkeyauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M773"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M773"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M773">
+      <xsl:apply-templates select="@*|node()" mode="M773"/>
+   </xsl:template>
+
+   <!--PATTERN rapsteaccess_system_security-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_state/win-def:access_system_security"
+                 priority="4000"
+                 mode="M774">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the access_system_security entity of a regkeyauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M774"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M774"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M774">
+      <xsl:apply-templates select="@*|node()" mode="M774"/>
+   </xsl:template>
+
+   <!--PATTERN rapstegeneric_read-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_state/win-def:generic_read"
+                 priority="4000"
+                 mode="M775">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_read entity of a regkeyauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M775"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M775"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M775">
+      <xsl:apply-templates select="@*|node()" mode="M775"/>
+   </xsl:template>
+
+   <!--PATTERN rapstegeneric_write-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_state/win-def:generic_write"
+                 priority="4000"
+                 mode="M776">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_write entity of a regkeyauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M776"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M776"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M776">
+      <xsl:apply-templates select="@*|node()" mode="M776"/>
+   </xsl:template>
+
+   <!--PATTERN rapstegeneric_execute-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_state/win-def:generic_execute"
+                 priority="4000"
+                 mode="M777">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_execute entity of a regkeyauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M777"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M777"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M777">
+      <xsl:apply-templates select="@*|node()" mode="M777"/>
+   </xsl:template>
+
+   <!--PATTERN rapstegeneric_all-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_state/win-def:generic_all"
+                 priority="4000"
+                 mode="M778">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_all entity of a regkeyauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M778"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M778"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M778">
+      <xsl:apply-templates select="@*|node()" mode="M778"/>
+   </xsl:template>
+
+   <!--PATTERN rapstekey_query_value-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_state/win-def:key_query_value"
+                 priority="4000"
+                 mode="M779">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_query_value entity of a regkeyauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M779"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M779"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M779">
+      <xsl:apply-templates select="@*|node()" mode="M779"/>
+   </xsl:template>
+
+   <!--PATTERN rapstekey_set_value-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_state/win-def:key_set_value"
+                 priority="4000"
+                 mode="M780">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_set_value entity of a regkeyauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M780"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M780"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M780">
+      <xsl:apply-templates select="@*|node()" mode="M780"/>
+   </xsl:template>
+
+   <!--PATTERN rapstekey_create_sub_key-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_state/win-def:key_create_sub_key"
+                 priority="4000"
+                 mode="M781">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_create_sub_key entity of a regkeyauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M781"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M781"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M781">
+      <xsl:apply-templates select="@*|node()" mode="M781"/>
+   </xsl:template>
+
+   <!--PATTERN rapstekey_enumerate_sub_keys-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_state/win-def:key_enumerate_sub_keys"
+                 priority="4000"
+                 mode="M782">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_enumerate_sub_keys entity of a regkeyauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M782"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M782"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M782">
+      <xsl:apply-templates select="@*|node()" mode="M782"/>
+   </xsl:template>
+
+   <!--PATTERN rapstekey_notify-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_state/win-def:key_notify"
+                 priority="4000"
+                 mode="M783">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_notify entity of a regkeyauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M783"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M783"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M783">
+      <xsl:apply-templates select="@*|node()" mode="M783"/>
+   </xsl:template>
+
+   <!--PATTERN rapstekey_create_link-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_state/win-def:key_create_link"
+                 priority="4000"
+                 mode="M784">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_create_link entity of a regkeyauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M784"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M784"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M784">
+      <xsl:apply-templates select="@*|node()" mode="M784"/>
+   </xsl:template>
+
+   <!--PATTERN rapstekey_wow64_64key-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_state/win-def:key_wow64_64key"
+                 priority="4000"
+                 mode="M785">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_wow64_64key entity of a regkeyauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M785"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M785"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M785">
+      <xsl:apply-templates select="@*|node()" mode="M785"/>
+   </xsl:template>
+
+   <!--PATTERN rapstekey_wow64_32key-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_state/win-def:key_wow64_32key"
+                 priority="4000"
+                 mode="M786">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_wow64_32key entity of a regkeyauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M786"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M786"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M786">
+      <xsl:apply-templates select="@*|node()" mode="M786"/>
+   </xsl:template>
+
+   <!--PATTERN rapstekey_wow64_res-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyauditedpermissions_state/win-def:key_wow64_res"
+                 priority="4000"
+                 mode="M787">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_wow64_res entity of a regkeyauditedpermissions_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M787"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M787"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M787">
+      <xsl:apply-templates select="@*|node()" mode="M787"/>
+   </xsl:template>
+
+   <!--PATTERN rer53tst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_test/win-def:object" priority="4000"
+                 mode="M788">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:regkeyeffectiverights53_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a regkeyeffectiverights53_test must reference a regkeyeffectiverights53_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M788"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_test/win-def:state" priority="3999"
+                 mode="M788">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:regkeyeffectiverights53_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a regkeyeffectiverights53_test must reference a regkeyeffectiverights53_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M788"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M788"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M788">
+      <xsl:apply-templates select="@*|node()" mode="M788"/>
+   </xsl:template>
+
+   <!--PATTERN rer53objhive-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_object/win-def:hive" priority="4000"
+                 mode="M789">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the hive entity of a regkeyeffectiverights53_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M789"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M789"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M789">
+      <xsl:apply-templates select="@*|node()" mode="M789"/>
+   </xsl:template>
+
+   <!--PATTERN rer53objkey-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_object/win-def:key" priority="4000"
+                 mode="M790">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key entity of a regkeyeffectiverights53_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M790"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M790"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M790">
+      <xsl:apply-templates select="@*|node()" mode="M790"/>
+   </xsl:template>
+
+   <!--PATTERN rer53objtrustee_sid-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_object/win-def:trustee_sid"
+                 priority="4000"
+                 mode="M791">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_sid entity of a regkeyeffectiverights53_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M791"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M791"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M791">
+      <xsl:apply-templates select="@*|node()" mode="M791"/>
+   </xsl:template>
+
+   <!--PATTERN rer53stehive-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_state/win-def:hive" priority="4000"
+                 mode="M792">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the hive entity of a regkeyeffectiverights53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M792"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M792"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M792">
+      <xsl:apply-templates select="@*|node()" mode="M792"/>
+   </xsl:template>
+
+   <!--PATTERN rer53stekey-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_state/win-def:key" priority="4000"
+                 mode="M793">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key entity of a regkeyeffectiverights53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M793"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M793"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M793">
+      <xsl:apply-templates select="@*|node()" mode="M793"/>
+   </xsl:template>
+
+   <!--PATTERN rer53stetrustee_sid-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_state/win-def:trustee_sid"
+                 priority="4000"
+                 mode="M794">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_sid entity of a regkeyeffectiverights53_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M794"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M794"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M794">
+      <xsl:apply-templates select="@*|node()" mode="M794"/>
+   </xsl:template>
+
+   <!--PATTERN rer53stestandard_delete-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_state/win-def:standard_delete"
+                 priority="4000"
+                 mode="M795">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_delete entity of a regkeyeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M795"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M795"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M795">
+      <xsl:apply-templates select="@*|node()" mode="M795"/>
+   </xsl:template>
+
+   <!--PATTERN rer53stestandard_read_control-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_state/win-def:standard_read_control"
+                 priority="4000"
+                 mode="M796">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_read_control entity of a regkeyeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M796"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M796"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M796">
+      <xsl:apply-templates select="@*|node()" mode="M796"/>
+   </xsl:template>
+
+   <!--PATTERN rer53stestandard_write_dac-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_state/win-def:standard_write_dac"
+                 priority="4000"
+                 mode="M797">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_write_dac entity of a regkeyeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M797"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M797"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M797">
+      <xsl:apply-templates select="@*|node()" mode="M797"/>
+   </xsl:template>
+
+   <!--PATTERN rer53stestandard_write_owner-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_state/win-def:standard_write_owner"
+                 priority="4000"
+                 mode="M798">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_write_owner entity of a regkeyeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M798"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M798"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M798">
+      <xsl:apply-templates select="@*|node()" mode="M798"/>
+   </xsl:template>
+
+   <!--PATTERN rer53stestandard_synchronize-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_state/win-def:standard_synchronize"
+                 priority="4000"
+                 mode="M799">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_synchronize entity of a regkeyeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M799"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M799"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M799">
+      <xsl:apply-templates select="@*|node()" mode="M799"/>
+   </xsl:template>
+
+   <!--PATTERN rer53steaccess_system_security-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_state/win-def:access_system_security"
+                 priority="4000"
+                 mode="M800">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the access_system_security entity of a regkeyeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M800"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M800"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M800">
+      <xsl:apply-templates select="@*|node()" mode="M800"/>
+   </xsl:template>
+
+   <!--PATTERN rer53stegeneric_read-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_state/win-def:generic_read"
+                 priority="4000"
+                 mode="M801">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_read entity of a regkeyeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M801"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M801"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M801">
+      <xsl:apply-templates select="@*|node()" mode="M801"/>
+   </xsl:template>
+
+   <!--PATTERN rer53stegeneric_write-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_state/win-def:generic_write"
+                 priority="4000"
+                 mode="M802">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_write entity of a regkeyeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M802"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M802"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M802">
+      <xsl:apply-templates select="@*|node()" mode="M802"/>
+   </xsl:template>
+
+   <!--PATTERN rer53stegeneric_execute-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_state/win-def:generic_execute"
+                 priority="4000"
+                 mode="M803">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_execute entity of a regkeyeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M803"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M803"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M803">
+      <xsl:apply-templates select="@*|node()" mode="M803"/>
+   </xsl:template>
+
+   <!--PATTERN rer53stegeneric_all-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_state/win-def:generic_all"
+                 priority="4000"
+                 mode="M804">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_all entity of a regkeyeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M804"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M804"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M804">
+      <xsl:apply-templates select="@*|node()" mode="M804"/>
+   </xsl:template>
+
+   <!--PATTERN rer53stekey_query_value-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_state/win-def:key_query_value"
+                 priority="4000"
+                 mode="M805">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_query_value entity of a regkeyeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M805"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M805"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M805">
+      <xsl:apply-templates select="@*|node()" mode="M805"/>
+   </xsl:template>
+
+   <!--PATTERN rer53stekey_set_value-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_state/win-def:key_set_value"
+                 priority="4000"
+                 mode="M806">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_set_value entity of a regkeyeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M806"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M806"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M806">
+      <xsl:apply-templates select="@*|node()" mode="M806"/>
+   </xsl:template>
+
+   <!--PATTERN rer53stekey_create_sub_key-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_state/win-def:key_create_sub_key"
+                 priority="4000"
+                 mode="M807">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_create_sub_key entity of a regkeyeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M807"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M807"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M807">
+      <xsl:apply-templates select="@*|node()" mode="M807"/>
+   </xsl:template>
+
+   <!--PATTERN rer53stekey_enumerate_sub_keys-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_state/win-def:key_enumerate_sub_keys"
+                 priority="4000"
+                 mode="M808">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_enumerate_sub_keys entity of a regkeyeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M808"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M808"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M808">
+      <xsl:apply-templates select="@*|node()" mode="M808"/>
+   </xsl:template>
+
+   <!--PATTERN rer53stekey_notify-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_state/win-def:key_notify"
+                 priority="4000"
+                 mode="M809">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_notify entity of a regkeyeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M809"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M809"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M809">
+      <xsl:apply-templates select="@*|node()" mode="M809"/>
+   </xsl:template>
+
+   <!--PATTERN rer53stekey_create_link-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_state/win-def:key_create_link"
+                 priority="4000"
+                 mode="M810">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_create_link entity of a regkeyeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M810"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M810"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M810">
+      <xsl:apply-templates select="@*|node()" mode="M810"/>
+   </xsl:template>
+
+   <!--PATTERN rer53stekey_wow64_64key-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_state/win-def:key_wow64_64key"
+                 priority="4000"
+                 mode="M811">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_wow64_64key entity of a regkeyeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M811"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M811"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M811">
+      <xsl:apply-templates select="@*|node()" mode="M811"/>
+   </xsl:template>
+
+   <!--PATTERN rer53stekey_wow64_32key-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_state/win-def:key_wow64_32key"
+                 priority="4000"
+                 mode="M812">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_wow64_32key entity of a regkeyeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M812"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M812"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M812">
+      <xsl:apply-templates select="@*|node()" mode="M812"/>
+   </xsl:template>
+
+   <!--PATTERN rer53stekey_wow64_res-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights53_state/win-def:key_wow64_res"
+                 priority="4000"
+                 mode="M813">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_wow64_res entity of a regkeyeffectiverights53_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M813"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M813"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M813">
+      <xsl:apply-templates select="@*|node()" mode="M813"/>
+   </xsl:template>
+
+   <!--PATTERN rertst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_test/win-def:object" priority="4000"
+                 mode="M814">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:regkeyeffectiverights_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a regkeyeffectiverights_test must reference a regkeyeffectiverights_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M814"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_test/win-def:state" priority="3999"
+                 mode="M814">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:regkeyeffectiverights_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a regkeyeffectiverights_test must reference a regkeyeffectiverights_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M814"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M814"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M814">
+      <xsl:apply-templates select="@*|node()" mode="M814"/>
+   </xsl:template>
+
+   <!--PATTERN rerobjhive-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_object/win-def:hive" priority="4000"
+                 mode="M815">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the hive entity of a regkeyeffectiverights_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M815"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M815"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M815">
+      <xsl:apply-templates select="@*|node()" mode="M815"/>
+   </xsl:template>
+
+   <!--PATTERN rerobjkey-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_object/win-def:key" priority="4000"
+                 mode="M816">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key entity of a regkeyeffectiverights_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M816"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M816"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M816">
+      <xsl:apply-templates select="@*|node()" mode="M816"/>
+   </xsl:template>
+
+   <!--PATTERN rerobjtrustee_name-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_object/win-def:trustee_name"
+                 priority="4000"
+                 mode="M817">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_name entity of a regkeyeffectiverights_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M817"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M817"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M817">
+      <xsl:apply-templates select="@*|node()" mode="M817"/>
+   </xsl:template>
+
+   <!--PATTERN rerstehive-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_state/win-def:hive" priority="4000"
+                 mode="M818">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the hive entity of a regkeyeffectiverights_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M818"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M818"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M818">
+      <xsl:apply-templates select="@*|node()" mode="M818"/>
+   </xsl:template>
+
+   <!--PATTERN rerstekey-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_state/win-def:key" priority="4000"
+                 mode="M819">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key entity of a regkeyeffectiverights_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M819"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M819"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M819">
+      <xsl:apply-templates select="@*|node()" mode="M819"/>
+   </xsl:template>
+
+   <!--PATTERN rerstetrustee_name-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_state/win-def:trustee_name"
+                 priority="4000"
+                 mode="M820">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_name entity of a regkeyeffectiverights_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M820"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M820"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M820">
+      <xsl:apply-templates select="@*|node()" mode="M820"/>
+   </xsl:template>
+
+   <!--PATTERN rerstestandard_delete-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_state/win-def:standard_delete"
+                 priority="4000"
+                 mode="M821">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_delete entity of a regkeyeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M821"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M821"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M821">
+      <xsl:apply-templates select="@*|node()" mode="M821"/>
+   </xsl:template>
+
+   <!--PATTERN rerstestandard_read_control-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_state/win-def:standard_read_control"
+                 priority="4000"
+                 mode="M822">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_read_control entity of a regkeyeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M822"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M822"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M822">
+      <xsl:apply-templates select="@*|node()" mode="M822"/>
+   </xsl:template>
+
+   <!--PATTERN rerstestandard_write_dac-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_state/win-def:standard_write_dac"
+                 priority="4000"
+                 mode="M823">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_write_dac entity of a regkeyeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M823"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M823"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M823">
+      <xsl:apply-templates select="@*|node()" mode="M823"/>
+   </xsl:template>
+
+   <!--PATTERN rerstestandard_write_owner-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_state/win-def:standard_write_owner"
+                 priority="4000"
+                 mode="M824">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_write_owner entity of a regkeyeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M824"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M824"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M824">
+      <xsl:apply-templates select="@*|node()" mode="M824"/>
+   </xsl:template>
+
+   <!--PATTERN rerstestandard_synchronize-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_state/win-def:standard_synchronize"
+                 priority="4000"
+                 mode="M825">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the standard_synchronize entity of a regkeyeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M825"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M825"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M825">
+      <xsl:apply-templates select="@*|node()" mode="M825"/>
+   </xsl:template>
+
+   <!--PATTERN rersteaccess_system_security-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_state/win-def:access_system_security"
+                 priority="4000"
+                 mode="M826">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the access_system_security entity of a regkeyeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M826"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M826"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M826">
+      <xsl:apply-templates select="@*|node()" mode="M826"/>
+   </xsl:template>
+
+   <!--PATTERN rerstegeneric_read-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_state/win-def:generic_read"
+                 priority="4000"
+                 mode="M827">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_read entity of a regkeyeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M827"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M827"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M827">
+      <xsl:apply-templates select="@*|node()" mode="M827"/>
+   </xsl:template>
+
+   <!--PATTERN rerstegeneric_write-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_state/win-def:generic_write"
+                 priority="4000"
+                 mode="M828">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_write entity of a regkeyeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M828"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M828"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M828">
+      <xsl:apply-templates select="@*|node()" mode="M828"/>
+   </xsl:template>
+
+   <!--PATTERN rerstegeneric_execute-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_state/win-def:generic_execute"
+                 priority="4000"
+                 mode="M829">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_execute entity of a regkeyeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M829"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M829"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M829">
+      <xsl:apply-templates select="@*|node()" mode="M829"/>
+   </xsl:template>
+
+   <!--PATTERN rerstegeneric_all-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_state/win-def:generic_all" priority="4000"
+                 mode="M830">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the generic_all entity of a regkeyeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M830"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M830"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M830">
+      <xsl:apply-templates select="@*|node()" mode="M830"/>
+   </xsl:template>
+
+   <!--PATTERN rerstekey_query_value-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_state/win-def:key_query_value"
+                 priority="4000"
+                 mode="M831">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_query_value entity of a regkeyeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M831"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M831"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M831">
+      <xsl:apply-templates select="@*|node()" mode="M831"/>
+   </xsl:template>
+
+   <!--PATTERN rerstekey_set_value-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_state/win-def:key_set_value"
+                 priority="4000"
+                 mode="M832">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_set_value entity of a regkeyeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M832"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M832"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M832">
+      <xsl:apply-templates select="@*|node()" mode="M832"/>
+   </xsl:template>
+
+   <!--PATTERN rerstekey_create_sub_key-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_state/win-def:key_create_sub_key"
+                 priority="4000"
+                 mode="M833">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_create_sub_key entity of a regkeyeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M833"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M833"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M833">
+      <xsl:apply-templates select="@*|node()" mode="M833"/>
+   </xsl:template>
+
+   <!--PATTERN rerstekey_enumerate_sub_keys-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_state/win-def:key_enumerate_sub_keys"
+                 priority="4000"
+                 mode="M834">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_enumerate_sub_keys entity of a regkeyeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M834"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M834"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M834">
+      <xsl:apply-templates select="@*|node()" mode="M834"/>
+   </xsl:template>
+
+   <!--PATTERN rerstekey_notify-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_state/win-def:key_notify" priority="4000"
+                 mode="M835">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_notify entity of a regkeyeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M835"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M835"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M835">
+      <xsl:apply-templates select="@*|node()" mode="M835"/>
+   </xsl:template>
+
+   <!--PATTERN rerstekey_create_link-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_state/win-def:key_create_link"
+                 priority="4000"
+                 mode="M836">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_create_link entity of a regkeyeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M836"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M836"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M836">
+      <xsl:apply-templates select="@*|node()" mode="M836"/>
+   </xsl:template>
+
+   <!--PATTERN rerstekey_wow64_64key-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_state/win-def:key_wow64_64key"
+                 priority="4000"
+                 mode="M837">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_wow64_64key entity of a regkeyeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M837"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M837"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M837">
+      <xsl:apply-templates select="@*|node()" mode="M837"/>
+   </xsl:template>
+
+   <!--PATTERN rerstekey_wow64_32key-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_state/win-def:key_wow64_32key"
+                 priority="4000"
+                 mode="M838">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_wow64_32key entity of a regkeyeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M838"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M838"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M838">
+      <xsl:apply-templates select="@*|node()" mode="M838"/>
+   </xsl:template>
+
+   <!--PATTERN rerstekey_wow64_res-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:regkeyeffectiverights_state/win-def:key_wow64_res"
+                 priority="4000"
+                 mode="M839">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the key_wow64_res entity of a regkeyeffectiverights_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M839"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M839"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M839">
+      <xsl:apply-templates select="@*|node()" mode="M839"/>
+   </xsl:template>
+
+   <!--PATTERN srtst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sharedresource_test/win-def:object" priority="4000" mode="M840">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:sharedresource_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a sharedresource_test must reference a sharedresource_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M840"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:sharedresource_test/win-def:state" priority="3999" mode="M840">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:sharedresource_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a sharedresource_test must reference a sharedresource_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M840"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M840"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M840">
+      <xsl:apply-templates select="@*|node()" mode="M840"/>
+   </xsl:template>
+
+   <!--PATTERN srobjnetname-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sharedresource_object/win-def:netname" priority="4000"
+                 mode="M841">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the netname entity of a sharedresource_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M841"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M841"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M841">
+      <xsl:apply-templates select="@*|node()" mode="M841"/>
+   </xsl:template>
+
+   <!--PATTERN srstenetname-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sharedresource_state/win-def:netname" priority="4000"
+                 mode="M842">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the netname entity of a sharedresource_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M842"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M842"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M842">
+      <xsl:apply-templates select="@*|node()" mode="M842"/>
+   </xsl:template>
+
+   <!--PATTERN srsteshared_type-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sharedresource_state/win-def:shared_type" priority="4000"
+                 mode="M843">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the shared_type entity of a sharedresource_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M843"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M843"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M843">
+      <xsl:apply-templates select="@*|node()" mode="M843"/>
+   </xsl:template>
+
+   <!--PATTERN srstemax_uses-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sharedresource_state/win-def:max_uses" priority="4000"
+                 mode="M844">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the max_uses entity of a sharedresource_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M844"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M844"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M844">
+      <xsl:apply-templates select="@*|node()" mode="M844"/>
+   </xsl:template>
+
+   <!--PATTERN srstecurrent_uses-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sharedresource_state/win-def:current_uses" priority="4000"
+                 mode="M845">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the current_uses entity of a sharedresource_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M845"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M845"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M845">
+      <xsl:apply-templates select="@*|node()" mode="M845"/>
+   </xsl:template>
+
+   <!--PATTERN srstelocal_path-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sharedresource_state/win-def:local_path" priority="4000"
+                 mode="M846">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the local_path entity of a sharedresource_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M846"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M846"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M846">
+      <xsl:apply-templates select="@*|node()" mode="M846"/>
+   </xsl:template>
+
+   <!--PATTERN srsteaccess_read_permission-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sharedresource_state/win-def:access_read_permission"
+                 priority="4000"
+                 mode="M847">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='bool'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the access_read_permission entity of a sharedresource_state should be 'bool'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M847"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M847"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M847">
+      <xsl:apply-templates select="@*|node()" mode="M847"/>
+   </xsl:template>
+
+   <!--PATTERN srsteaccess_write_permission-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sharedresource_state/win-def:access_write_permission"
+                 priority="4000"
+                 mode="M848">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='bool'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the access_write_permission entity of a sharedresource_state should be 'bool'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M848"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M848"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M848">
+      <xsl:apply-templates select="@*|node()" mode="M848"/>
+   </xsl:template>
+
+   <!--PATTERN srsteaccess_create_permission-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sharedresource_state/win-def:access_create_permission"
+                 priority="4000"
+                 mode="M849">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='bool'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the access_create_permission entity of a sharedresource_state should be 'bool'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M849"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M849"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M849">
+      <xsl:apply-templates select="@*|node()" mode="M849"/>
+   </xsl:template>
+
+   <!--PATTERN srsteaccess_exec_permission-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sharedresource_state/win-def:access_exec_permission"
+                 priority="4000"
+                 mode="M850">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='bool'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the access_exec_permission entity of a sharedresource_state should be 'bool'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M850"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M850"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M850">
+      <xsl:apply-templates select="@*|node()" mode="M850"/>
+   </xsl:template>
+
+   <!--PATTERN srsteaccess_delete_permission-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sharedresource_state/win-def:access_delete_permission"
+                 priority="4000"
+                 mode="M851">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='bool'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the access_delete_permission entity of a sharedresource_state should be 'bool'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M851"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M851"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M851">
+      <xsl:apply-templates select="@*|node()" mode="M851"/>
+   </xsl:template>
+
+   <!--PATTERN srsteaccess_atrib_permission-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sharedresource_state/win-def:access_atrib_permission"
+                 priority="4000"
+                 mode="M852">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='bool'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the access_atrib_permission entity of a sharedresource_state should be 'bool'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M852"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M852"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M852">
+      <xsl:apply-templates select="@*|node()" mode="M852"/>
+   </xsl:template>
+
+   <!--PATTERN srsteaccess_perm_permission-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sharedresource_state/win-def:access_perm_permission"
+                 priority="4000"
+                 mode="M853">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='bool'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the access_perm_permission entity of a sharedresource_state should be 'bool'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M853"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M853"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M853">
+      <xsl:apply-templates select="@*|node()" mode="M853"/>
+   </xsl:template>
+
+   <!--PATTERN srsteaccess_all_permission-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sharedresource_state/win-def:access_all_permission"
+                 priority="4000"
+                 mode="M854">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='bool'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the access_all_permission entity of a sharedresource_state should be 'bool'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M854"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M854"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M854">
+      <xsl:apply-templates select="@*|node()" mode="M854"/>
+   </xsl:template>
+
+   <!--PATTERN sidtst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sid_test/win-def:object" priority="4000" mode="M855">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:sid_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a sid_test must reference a sid_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M855"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:sid_test/win-def:state" priority="3999" mode="M855">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:sid_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a sid_test must reference a sid_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M855"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M855"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M855">
+      <xsl:apply-templates select="@*|node()" mode="M855"/>
+   </xsl:template>
+
+   <!--PATTERN sidobjtrustee_name-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sid_object/win-def:trustee_name" priority="4000" mode="M856">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_name entity of a sid_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M856"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M856"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M856">
+      <xsl:apply-templates select="@*|node()" mode="M856"/>
+   </xsl:template>
+
+   <!--PATTERN sidstetrustee_name-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sid_state/win-def:trustee_name" priority="4000" mode="M857">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_name entity of a sid_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M857"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M857"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M857">
+      <xsl:apply-templates select="@*|node()" mode="M857"/>
+   </xsl:template>
+
+   <!--PATTERN sidstetrustee_sid-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sid_state/win-def:trustee_sid" priority="4000" mode="M858">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_sid entity of a sid_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M858"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M858"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M858">
+      <xsl:apply-templates select="@*|node()" mode="M858"/>
+   </xsl:template>
+
+   <!--PATTERN sidstetrustee_domain-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sid_state/win-def:trustee_domain" priority="4000" mode="M859">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_domain entity of a sid_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M859"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M859"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M859">
+      <xsl:apply-templates select="@*|node()" mode="M859"/>
+   </xsl:template>
+
+   <!--PATTERN sidsidtst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sid_sid_test/win-def:object" priority="4000" mode="M860">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:sid_sid_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a sid_sid_test must reference a sid_sid_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M860"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:sid_sid_test/win-def:state" priority="3999" mode="M860">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:sid_sid_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a sid_sid_test must reference a sid_sid_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M860"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M860"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M860">
+      <xsl:apply-templates select="@*|node()" mode="M860"/>
+   </xsl:template>
+
+   <!--PATTERN sidsidobjtrustee_name-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sid_sid_object/win-def:trustee_sid" priority="4000" mode="M861">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_sid entity of a sid_sid_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M861"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M861"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M861">
+      <xsl:apply-templates select="@*|node()" mode="M861"/>
+   </xsl:template>
+
+   <!--PATTERN sidsidstetrustee_sid-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sid_sid_state/win-def:trustee_sid" priority="4000" mode="M862">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_sid entity of a sid_sid_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M862"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M862"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M862">
+      <xsl:apply-templates select="@*|node()" mode="M862"/>
+   </xsl:template>
+
+   <!--PATTERN sidsidstetrustee_name-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sid_sid_state/win-def:trustee_name" priority="4000" mode="M863">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_name entity of a sid_sid_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M863"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M863"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M863">
+      <xsl:apply-templates select="@*|node()" mode="M863"/>
+   </xsl:template>
+
+   <!--PATTERN sidsidstetrustee_domain-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:sid_sid_state/win-def:trustee_domain" priority="4000"
+                 mode="M864">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the trustee_domain entity of a sid_sid_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M864"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M864"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M864">
+      <xsl:apply-templates select="@*|node()" mode="M864"/>
+   </xsl:template>
+
+   <!--PATTERN uactst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:uac_test/win-def:object" priority="4000" mode="M865">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:uac_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a uac_test must reference a uac_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M865"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:uac_test/win-def:state" priority="3999" mode="M865">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:uac_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a uac_test must reference a uac_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M865"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M865"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M865">
+      <xsl:apply-templates select="@*|node()" mode="M865"/>
+   </xsl:template>
+
+   <!--PATTERN uacsteadminapprovalmode-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:uac_state/win-def:admin_approval_mode" priority="4000"
+                 mode="M866">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the admin_approval_mode entity of a uac_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M866"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M866"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M866">
+      <xsl:apply-templates select="@*|node()" mode="M866"/>
+   </xsl:template>
+
+   <!--PATTERN uacstebehaviorelevationadmin-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:uac_state/win-def:elevation_prompt_admin" priority="4000"
+                 mode="M867">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the elevation_prompt_admin entity of a uac_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M867"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M867"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M867">
+      <xsl:apply-templates select="@*|node()" mode="M867"/>
+   </xsl:template>
+
+   <!--PATTERN uacsteelevationpromptstandard-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:uac_state/win-def:elevation_prompt_standard" priority="4000"
+                 mode="M868">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the elevation_prompt_standard entity of a uac_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M868"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M868"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M868">
+      <xsl:apply-templates select="@*|node()" mode="M868"/>
+   </xsl:template>
+
+   <!--PATTERN uacstedetectinstallations-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:uac_state/win-def:detect_installations" priority="4000"
+                 mode="M869">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the detect_installations entity of a uac_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M869"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M869"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M869">
+      <xsl:apply-templates select="@*|node()" mode="M869"/>
+   </xsl:template>
+
+   <!--PATTERN uacsteelevatesignedexecutables-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:uac_state/win-def:elevate_signed_executables" priority="4000"
+                 mode="M870">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the elevate_signed_executables entity of a uac_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M870"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M870"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M870">
+      <xsl:apply-templates select="@*|node()" mode="M870"/>
+   </xsl:template>
+
+   <!--PATTERN uacsteelevateuiaccess-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:uac_state/win-def:elevate_uiaccess" priority="4000" mode="M871">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the elevate_uiaccess entity of a uac_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M871"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M871"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M871">
+      <xsl:apply-templates select="@*|node()" mode="M871"/>
+   </xsl:template>
+
+   <!--PATTERN uacsterunadminsaam-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:uac_state/win-def:run_admins_aam" priority="4000" mode="M872">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the run_admins_aam entity of a uac_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M872"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M872"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M872">
+      <xsl:apply-templates select="@*|node()" mode="M872"/>
+   </xsl:template>
+
+   <!--PATTERN uacstesecuredesktop-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:uac_state/win-def:secure_desktop" priority="4000" mode="M873">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the secure_desktop entity of a uac_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M873"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M873"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M873">
+      <xsl:apply-templates select="@*|node()" mode="M873"/>
+   </xsl:template>
+
+   <!--PATTERN uacstevirtualizewritefailures-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:uac_state/win-def:virtualize_write_failures" priority="4000"
+                 mode="M874">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the virtualize_write_failures entity of a uac_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M874"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M874"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M874">
+      <xsl:apply-templates select="@*|node()" mode="M874"/>
+   </xsl:template>
+
+   <!--PATTERN usertst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:user_test/win-def:object" priority="4000" mode="M875">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:user_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a user_test must reference a user_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M875"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:user_test/win-def:state" priority="3999" mode="M875">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:user_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a user_test must reference a user_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M875"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M875"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M875">
+      <xsl:apply-templates select="@*|node()" mode="M875"/>
+   </xsl:template>
+
+   <!--PATTERN userobjuser-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:user_object/win-def:user" priority="4000" mode="M876">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the user entity of a user_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M876"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M876"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M876">
+      <xsl:apply-templates select="@*|node()" mode="M876"/>
+   </xsl:template>
+
+   <!--PATTERN usersteuser-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:user_state/win-def:user" priority="4000" mode="M877">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the user entity of a user_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M877"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M877"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M877">
+      <xsl:apply-templates select="@*|node()" mode="M877"/>
+   </xsl:template>
+
+   <!--PATTERN usersteenabled-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:user_state/win-def:enabled" priority="4000" mode="M878">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the enabled entity of a user_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M878"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M878"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M878">
+      <xsl:apply-templates select="@*|node()" mode="M878"/>
+   </xsl:template>
+
+   <!--PATTERN userstegroup-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:user_state/win-def:group" priority="4000" mode="M879">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the group entity of a user_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M879"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M879"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M879">
+      <xsl:apply-templates select="@*|node()" mode="M879"/>
+   </xsl:template>
+
+   <!--PATTERN usersidtst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:user_sid_test/win-def:object" priority="4000" mode="M880">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:user_sid_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a user_sid_test must reference a user_sid_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M880"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:user_sid_test/win-def:state" priority="3999" mode="M880">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:user_sid_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a user_sid_test must reference a user_sid_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M880"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M880"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M880">
+      <xsl:apply-templates select="@*|node()" mode="M880"/>
+   </xsl:template>
+
+   <!--PATTERN usersidobjuser-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:user_sid_object/win-def:user_sid" priority="4000" mode="M881">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the user_sid entity of a user_sid_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M881"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M881"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M881">
+      <xsl:apply-templates select="@*|node()" mode="M881"/>
+   </xsl:template>
+
+   <!--PATTERN usersidsteuser-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:user_sid_state/win-def:user_sid" priority="4000" mode="M882">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the user_sid entity of a user_sid_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M882"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M882"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M882">
+      <xsl:apply-templates select="@*|node()" mode="M882"/>
+   </xsl:template>
+
+   <!--PATTERN usersidsteenabled-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:user_sid_state/win-def:enabled" priority="4000" mode="M883">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the enabled entity of a user_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M883"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M883"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M883">
+      <xsl:apply-templates select="@*|node()" mode="M883"/>
+   </xsl:template>
+
+   <!--PATTERN usersidstegroup-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:user_sid_state/win-def:group_sid" priority="4000" mode="M884">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the group_sid entity of a user_sid_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M884"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M884"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M884">
+      <xsl:apply-templates select="@*|node()" mode="M884"/>
+   </xsl:template>
+
+   <!--PATTERN volumetst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:volume_test/win-def:object" priority="4000" mode="M885">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:volume_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a volume_test must reference a volume_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M885"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:volume_test/win-def:state" priority="3999" mode="M885">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:volume_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a volume_test must reference a volume_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M885"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M885"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M885">
+      <xsl:apply-templates select="@*|node()" mode="M885"/>
+   </xsl:template>
+
+   <!--PATTERN volobjrootpath-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:volume_object/win-def:rootpath" priority="4000" mode="M886">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the rootpath entity of a volume_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M886"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M886"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M886">
+      <xsl:apply-templates select="@*|node()" mode="M886"/>
+   </xsl:template>
+
+   <!--PATTERN volumesterootpath-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:volume_state/win-def:rootpath" priority="4000" mode="M887">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the rootpath entity of a volume_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M887"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M887"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M887">
+      <xsl:apply-templates select="@*|node()" mode="M887"/>
+   </xsl:template>
+
+   <!--PATTERN volumestefile_system-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:volume_state/win-def:file_system" priority="4000" mode="M888">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_system entity of a volume_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M888"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M888"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M888">
+      <xsl:apply-templates select="@*|node()" mode="M888"/>
+   </xsl:template>
+
+   <!--PATTERN volumestename-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:volume_state/win-def:name" priority="4000" mode="M889">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the name entity of a volume_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M889"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M889"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M889">
+      <xsl:apply-templates select="@*|node()" mode="M889"/>
+   </xsl:template>
+
+   <!--PATTERN volstevolume_max_component_length-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:volume_state/win-def:volume_max_component_length"
+                 priority="4000"
+                 mode="M890">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the volume_max_component_length entity of a volume_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M890"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M890"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M890">
+      <xsl:apply-templates select="@*|node()" mode="M890"/>
+   </xsl:template>
+
+   <!--PATTERN volsteserial_number-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:volume_state/win-def:serial_number" priority="4000" mode="M891">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='int'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the serial_number entity of a volume_state should be 'int'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M891"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M891"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M891">
+      <xsl:apply-templates select="@*|node()" mode="M891"/>
+   </xsl:template>
+
+   <!--PATTERN volstefile_case_sensitive_search-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:volume_state/win-def:file_case_sensitive_search" priority="4000"
+                 mode="M892">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_case_sensitive_search entity of a volume_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M892"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M892"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M892">
+      <xsl:apply-templates select="@*|node()" mode="M892"/>
+   </xsl:template>
+
+   <!--PATTERN volstefile_case_preserved_names-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:volume_state/win-def:file_case_preserved_names" priority="4000"
+                 mode="M893">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_case_preserved_names entity of a volume_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M893"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M893"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M893">
+      <xsl:apply-templates select="@*|node()" mode="M893"/>
+   </xsl:template>
+
+   <!--PATTERN volstefile_unicode_on_disk-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:volume_state/win-def:file_unicode_on_disk" priority="4000"
+                 mode="M894">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_unicode_on_disk entity of a volume_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M894"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M894"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M894">
+      <xsl:apply-templates select="@*|node()" mode="M894"/>
+   </xsl:template>
+
+   <!--PATTERN volstefile_persistent_acls-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:volume_state/win-def:file_persistent_acls" priority="4000"
+                 mode="M895">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_persistent_acls entity of a volume_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M895"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M895"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M895">
+      <xsl:apply-templates select="@*|node()" mode="M895"/>
+   </xsl:template>
+
+   <!--PATTERN volstefile_file_compression-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:volume_state/win-def:file_file_compression" priority="4000"
+                 mode="M896">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_file_compression entity of a volume_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M896"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M896"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M896">
+      <xsl:apply-templates select="@*|node()" mode="M896"/>
+   </xsl:template>
+
+   <!--PATTERN volstefile_volume_quotas-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:volume_state/win-def:file_volume_quotas" priority="4000"
+                 mode="M897">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_volume_quotas entity of a volume_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M897"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M897"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M897">
+      <xsl:apply-templates select="@*|node()" mode="M897"/>
+   </xsl:template>
+
+   <!--PATTERN volstefile_supports_sparse_files-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:volume_state/win-def:file_supports_sparse_files" priority="4000"
+                 mode="M898">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_supports_sparse_files entity of a volume_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M898"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M898"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M898">
+      <xsl:apply-templates select="@*|node()" mode="M898"/>
+   </xsl:template>
+
+   <!--PATTERN volstefile_supports_reparse_points-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:volume_state/win-def:file_supports_reparse_points"
+                 priority="4000"
+                 mode="M899">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_supports_reparse_points entity of a volume_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M899"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M899"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M899">
+      <xsl:apply-templates select="@*|node()" mode="M899"/>
+   </xsl:template>
+
+   <!--PATTERN volstefile_supports_remote_storage-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:volume_state/win-def:file_supports_remote_storage"
+                 priority="4000"
+                 mode="M900">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_supports_remote_storage entity of a volume_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M900"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M900"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M900">
+      <xsl:apply-templates select="@*|node()" mode="M900"/>
+   </xsl:template>
+
+   <!--PATTERN volstefile_volume_is_compressed-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:volume_state/win-def:file_volume_is_compressed" priority="4000"
+                 mode="M901">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_volume_is_compressed entity of a volume_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M901"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M901"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M901">
+      <xsl:apply-templates select="@*|node()" mode="M901"/>
+   </xsl:template>
+
+   <!--PATTERN volstefile_supports_object_ids-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:volume_state/win-def:file_supports_object_ids" priority="4000"
+                 mode="M902">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_supports_object_ids entity of a volume_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M902"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M902"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M902">
+      <xsl:apply-templates select="@*|node()" mode="M902"/>
+   </xsl:template>
+
+   <!--PATTERN volstefile_supports_encryption-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:volume_state/win-def:file_supports_encryption" priority="4000"
+                 mode="M903">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_supports_encryption entity of a volume_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M903"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M903"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M903">
+      <xsl:apply-templates select="@*|node()" mode="M903"/>
+   </xsl:template>
+
+   <!--PATTERN volstefile_named_streams-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:volume_state/win-def:file_named_streams" priority="4000"
+                 mode="M904">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_named_streams entity of a volume_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M904"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M904"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M904">
+      <xsl:apply-templates select="@*|node()" mode="M904"/>
+   </xsl:template>
+
+   <!--PATTERN volstefile_read_only_volume-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:volume_state/win-def:file_read_only_volume" priority="4000"
+                 mode="M905">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@datatype='boolean'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the file_read_only_volume entity of a volume_state should be 'boolean'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M905"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M905"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M905">
+      <xsl:apply-templates select="@*|node()" mode="M905"/>
+   </xsl:template>
+
+   <!--PATTERN wmitst-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:wmi_test/win-def:object" priority="4000" mode="M906">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:wmi_object/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the object child element of a wmi_test must reference a wmi_object<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M906"/>
+   </xsl:template>
+
+	  <!--RULE -->
+<xsl:template match="win-def:wmi_test/win-def:state" priority="3999" mode="M906">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:wmi_state/@id"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - the state child element of a wmi_test must reference a wmi_state<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M906"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M906"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M906">
+      <xsl:apply-templates select="@*|node()" mode="M906"/>
+   </xsl:template>
+
+   <!--PATTERN wmiobjnamespace-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:wmi_object/win-def:namespace" priority="4000" mode="M907">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the namespace entity of a wmi_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M907"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M907"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M907">
+      <xsl:apply-templates select="@*|node()" mode="M907"/>
+   </xsl:template>
+
+   <!--PATTERN wmiobjwql-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:wmi_object/win-def:wql" priority="4000" mode="M908">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the wql entity of a wmi_object should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M908"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M908"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M908">
+      <xsl:apply-templates select="@*|node()" mode="M908"/>
+   </xsl:template>
+
+   <!--PATTERN wmistenamespace-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:wmi_state/win-def:namespace" priority="4000" mode="M909">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the namespace entity of a wmi_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M909"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M909"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M909">
+      <xsl:apply-templates select="@*|node()" mode="M909"/>
+   </xsl:template>
+
+   <!--PATTERN wmistewql-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:wmi_state/win-def:wql" priority="4000" mode="M910">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="not(@datatype) or @datatype='string'"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - datatype attribute for the wql entity of a wmi_state should be 'string'<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M910"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M910"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M910">
+      <xsl:apply-templates select="@*|node()" mode="M910"/>
+   </xsl:template>
+
+   <!--PATTERN wmisteresult-->
+
+
+	<!--RULE -->
+<xsl:template match="win-def:wmi_state/win-def:result" priority="4000" mode="M911">
+
+		<!--ASSERT -->
+<xsl:choose>
+         <xsl:when test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"/>
+         <xsl:otherwise>
+                        <xsl:text/>
+            <xsl:value-of select="../@id"/>
+            <xsl:text/> - The datatype has been set to 'int' but the value is not an integer.<xsl:value-of select="string('&#xA;')"/>
+         </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M911"/>
+   </xsl:template>
+   <xsl:template match="text()" priority="-1" mode="M911"/>
+   <xsl:template match="@*|node()" priority="-2" mode="M911">
+      <xsl:apply-templates select="@*|node()" mode="M911"/>
+   </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file


Property changes on: trunk/ovaldi/xml/oval-definitions-schematron.xsl
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/oval-results-schema.xsd
===================================================================
--- trunk/ovaldi/xml/oval-results-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/oval-results-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,390 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:oval-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:oval-res="http://oval.mitre.org/XMLSchema/oval-results-5" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-results-5" elementFormDefault="qualified" version="5.4">
+     <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-common-5" schemaLocation="oval-common-schema.xsd"/>
+     <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-definitions-5" schemaLocation="oval-definitions-schema.xsd"/>
+     <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" schemaLocation="oval-system-characteristics-schema.xsd"/>
+     <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>
+     <xsd:annotation>
+          <xsd:documentation>The following is a description of the elements, types, and attributes that compose the core schema for encoding Open Vulnerability and Assessment Language (OVAL) Results. Each of the elements, types, and attributes that make up the Core Results Schema are described in detail and should provide the information necessary to understand what each object represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between these objects is not outlined here.</xsd:documentation>
+          <xsd:documentation>The OVAL Schema is maintained by The MITRE Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+          <xsd:appinfo>
+               <schema>Core Results</schema>
+               <version>5.4</version>
+               <date>4/1/2008 10:41:44 AM</date>
+                <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                <sch:title>schematron validation of the Core portion of an OVAL Results file</sch:title>
+               <sch:ns prefix="oval-res" uri="http://oval.mitre.org/XMLSchema/oval-results-5"/>
+          </xsd:appinfo>
+     </xsd:annotation>
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="oval_results">
+          <xsd:annotation>
+               <xsd:documentation>The oval_results element is the root of an OVAL Results Document. Its purpose is to bind together the four major sections of a results file - generator, directives, oval_definitions, and results - which are the children of the root element. It must contain exactly one generator section, one directives section, and one results section.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:sequence>
+                    <xsd:element name="generator" type="oval:GeneratorType" minOccurs="1" maxOccurs="1">
+                         <xsd:annotation>
+                              <xsd:documentation>The required generator section provides information about when the results file was compiled and under what version.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="directives" type="oval-res:DirectivesType" minOccurs="1" maxOccurs="1">
+                         <xsd:annotation>
+                              <xsd:documentation>The required directives section presents flags describing what information has been included in the results file.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element ref="oval-def:oval_definitions" minOccurs="0" maxOccurs="1">
+                         <xsd:annotation>
+                              <xsd:documentation>The oval_definitions section is optional and dependent on the directives that are set. Its purpose is to provide an exact copy of the definitions evaluated for the results file.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="results" type="oval-res:ResultsType" minOccurs="1" maxOccurs="1">
+                         <xsd:annotation>
+                              <xsd:documentation>The required results section holds all the results of the evaluated definitions.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element ref="ds:Signature" minOccurs="0" maxOccurs="1">
+                         <xsd:annotation>
+                              <xsd:documentation>The optional Signature element allows an XML Signature as defined by the W3C to be attached to the document. This allows authentication and data integrity to be provided to the user. Enveloped signatures are supported. More information about the official W3C Recommendation regarding XML digital signatures can be found at http://www.w3.org/TR/xmldsig-core/.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:element>
+               </xsd:sequence>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =================================  GENERATOR  ================================= -->
+     <!-- =============================================================================== -->
+     <!--
+		The GeneratorType is defined by the oval definition schema.  Please refer to
+		that documentation for a description of the complex type.
+	 -->
+     <!-- =============================================================================== -->
+     <!-- ================================  DIRECTIVES  ================================= -->
+     <!-- =============================================================================== -->
+     <xsd:complexType name="DirectivesType">
+          <xsd:annotation>
+               <xsd:documentation>The DirectivesType complex type presents flags describing what information has been included in the results file. There are six possible results (true, false, unknown, error, not evaluated, and not applicable) for an evaluation of an OVAL Definition. The directives state which of these results are being reported in the results file. For example, a results file dealing with vulnerabilities might only present to the user the definitions that returned a true result meaning the vulnerability exists. A different result file dealing with compliance definitions might want to report the results of all definitions except those not evaluated.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element name="definition_true" type="oval-res:DirectiveType" minOccurs="1" maxOccurs="1"/>
+               <xsd:element name="definition_false" type="oval-res:DirectiveType" minOccurs="1" maxOccurs="1"/>
+               <xsd:element name="definition_unknown" type="oval-res:DirectiveType" minOccurs="1" maxOccurs="1"/>
+               <xsd:element name="definition_error" type="oval-res:DirectiveType" minOccurs="1" maxOccurs="1"/>
+               <xsd:element name="definition_not_evaluated" type="oval-res:DirectiveType" minOccurs="1" maxOccurs="1"/>
+               <xsd:element name="definition_not_applicable" type="oval-res:DirectiveType" minOccurs="1" maxOccurs="1"/>
+          </xsd:sequence>
+     </xsd:complexType>
+     <xsd:complexType name="DirectiveType">
+          <xsd:annotation>
+               <xsd:documentation>Each directive determines whether or not certain results are included in the results file. The required reported attribute controls this by providing a true or false for the specific directive. The optional content attribute controls how much information about the specific result is provided. For example, thin conten would only be the id of the definition and the result, while a full content set would be the definition id with the result along with results for all the individual tests and extended definitions.  Please refer to the contentEnumeration for details about the different content options.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:attribute name="reported" type="xsd:boolean" use="required"/>
+          <xsd:attribute name="content" type="oval-res:ContentEnumeration" use="optional" default="full"/>
+     </xsd:complexType>
+     <!-- =============================================================================== -->
+     <!-- =============================  OVAL DEFINITIONS  ============================== -->
+     <!-- =============================================================================== -->
+     <!--
+		The oval_definitions element is defined by the oval definitions schema.  Please
+		refer to that documentation for a description of the valid elements and types.
+	 -->
+     <!-- =============================================================================== -->
+     <!-- ==================================  RESULTS  ================================== -->
+     <!-- =============================================================================== -->
+     <xsd:complexType name="ResultsType">
+          <xsd:annotation>
+               <xsd:documentation>The ResultsType complex type is a container for one or more system elements. Each system element defines the results associated with an individual system. Please refer to the description of SystemType for more information about an individual system element.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element name="system" type="oval-res:SystemType" minOccurs="1" maxOccurs="unbounded">
+                    <xsd:key name="definitionInstanceKey">
+                         <xsd:annotation>
+                              <xsd:documentation>Enforce uniqueness in the combination of OVAL id, version, and variable_instance in order to differentiate the individual definition elements.</xsd:documentation>
+                         </xsd:annotation>
+                         <xsd:selector xpath="oval-res:definitions/oval-res:definition"/>
+                         <xsd:field xpath="@definition_id"/>
+                         <xsd:field xpath="@version"/>
+                         <xsd:field xpath="@variable_instance"/>
+                    </xsd:key>
+                    <xsd:key name="testVersionKey">
+                         <xsd:annotation>
+                              <xsd:documentation>Enforce uniqueness in the combination of the individual test ids, version, and the variable_instance of the test.</xsd:documentation>
+                         </xsd:annotation>
+                         <xsd:selector xpath="oval-res:tests/oval-res:test"/>
+                         <xsd:field xpath="@test_id"/>
+                         <xsd:field xpath="@version"/>
+                         <xsd:field xpath="@variable_instance"/>
+                    </xsd:key>
+                     <xsd:keyref name="definitionInstanceKeyRef" refer="oval-res:definitionInstanceKey">
+                           <xsd:annotation>
+                                 <xsd:documentation>Requires each definition reference (used by extend_definitions) to refer to a valid definition id.</xsd:documentation>
+                           </xsd:annotation>
+                           <xsd:selector xpath=".//*"/>
+                           <xsd:field xpath="@definition_ref"/>
+                           <xsd:field xpath="@version"/>
+                           <xsd:field xpath="@variable_instance"/>
+                     </xsd:keyref>
+                     <xsd:keyref name="testVersionKeyRef" refer="oval-res:testVersionKey">
+                         <xsd:annotation>
+                              <xsd:documentation>Requires each test reference to refer to a valid test id.</xsd:documentation>
+                         </xsd:annotation>
+                         <xsd:selector xpath=".//*"/>
+                         <xsd:field xpath="@test_ref"/>
+                         <xsd:field xpath="@version"/>
+                         <xsd:field xpath="@variable_instance"/>
+                    </xsd:keyref>
+               </xsd:element>
+          </xsd:sequence>
+     </xsd:complexType>
+     <xsd:complexType name="SystemType">
+          <xsd:annotation>
+               <xsd:documentation>The SystemType complex type holds the evaluation results of the definitions and tests, as well as a copy of the OVAL System Characteristics used to perform the evaluation. The definitions section holds the results of the definitions and the tests section holds the results of the tests. The oval_system_characteristics section is a copy of the system characteristics file used to perform the evaluation of the OVAL Definitions. Note that the oval_definitions part of the system characteristics file should be left out as the definition information has already been included at the top of the results file.</xsd:documentation>
+               <xsd:appinfo>
+                    <sch:pattern id="system">
+                         <sch:rule context="oval-res:system[oval-res:tests]">
+                              <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_true/@content='full' or /oval-res:oval_results/oval-res:directives/oval-res:definition_false/@content='full' or /oval-res:oval_results/oval-res:directives/oval-res:definition_unknown/@content='full' or /oval-res:oval_results/oval-res:directives/oval-res:definition_error/@content='full' or /oval-res:oval_results/oval-res:directives/oval-res:definition_not_evaluated/@content='full' or /oval-res:oval_results/oval-res:directives/oval-res:definition_not_applicable/@content='full'">the tests element should not be included unless full results are to be provided (see directives)</sch:assert>
+                         </sch:rule>
+                         <sch:rule context="oval-res:system[not(oval-res:tests)]">
+                              <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_true/@content='thin' and /oval-res:oval_results/oval-res:directives/oval-res:definition_false/@content='thin' and /oval-res:oval_results/oval-res:directives/oval-res:definition_unknown/@content='thin' and /oval-res:oval_results/oval-res:directives/oval-res:definition_error/@content='thin' and /oval-res:oval_results/oval-res:directives/oval-res:definition_not_evaluated/@content='thin' and /oval-res:oval_results/oval-res:directives/oval-res:definition_not_applicable/@content='thin'">the tests element should be included when full results are specified (see directives)</sch:assert>
+                         </sch:rule>
+                    </sch:pattern>
+               </xsd:appinfo>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element name="definitions" type="oval-res:DefinitionsType" minOccurs="0" maxOccurs="1"/>
+               <xsd:element name="tests" type="oval-res:TestsType" minOccurs="0" maxOccurs="1"/>
+               <xsd:element ref="oval-sc:oval_system_characteristics" minOccurs="1" maxOccurs="1"/>
+          </xsd:sequence>
+     </xsd:complexType>
+     <xsd:complexType name="DefinitionsType">
+          <xsd:annotation>
+               <xsd:documentation>The DefinitionsType complex type is a container for one or more definition elements. Each definition element holds the result of the evaluation of an OVAL Definition. Please refer to the description of DefinitionType for more information about an individual definition element.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element name="definition" type="oval-res:DefinitionType" minOccurs="1" maxOccurs="unbounded"/>
+          </xsd:sequence>
+     </xsd:complexType>
+     <xsd:complexType name="DefinitionType">
+          <xsd:annotation>
+               <xsd:documentation>The DefinitionType complex type holds the result of the evaluation of an OVAL Definition. The message element holds an error message or some other string that the analysis engine wishes to pass along. In addition, the optional criteria element provides the results of the individual pieces of the criteria. Please refer to the description of the CriteriaType for more information.</xsd:documentation>
+               <xsd:documentation>The required definition_id attribute is the OVAL id of the definition. The required version attribute is the specific version of the OVAL Definition used during analysis. The optional variable_instance attrbitue is a unique id that differentiates every unique instance (based on the value of variables used) of a definition in the OVAL Results file. Languages that include OVAL might reference the same definition multiple times. Each time a different set of values is supplied for the variables, a new instance of the definition result must be created. (definitions that do not use variables can only have one unique instance) The inclusion of a unique instance identifier will allow the OVAL results file to report the correct result of a definition for each combination of supplied values. The required result attribute holds the result of the evaluation. Please refer to the description of the resultEnumeration for details about the different result values.</xsd:documentation>
+               <xsd:appinfo>
+                    <sch:pattern id="directives">
+                         <sch:rule context="oval-res:definition[@result='true' and oval-res:criteria]">
+                              <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_true/@reported='true'"><sch:value-of select="@definition_id"/> - definitions with a result of TRUE should not be included (see directives)</sch:assert>
+                              <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_true/@content='full'"><sch:value-of select="@definition_id"/> - definitions with a result of TRUE should contain THIN content (see directives)</sch:assert>
+                         </sch:rule>
+                         <sch:rule context="oval-res:definition[@result='true' and not(oval-res:criteria)]">
+                              <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_true/@reported='true'"><sch:value-of select="@definition_id"/> - definitions with a result of TRUE should not be included (see directives) xx</sch:assert>
+                              <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_true/@content='thin'"><sch:value-of select="@definition_id"/> - definitions with a result of TRUE should contain FULL content (see directives)</sch:assert>
+                         </sch:rule>
+                         <sch:rule context="oval-res:definition[@result='false' and oval-res:criteria]">
+                              <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_false/@reported='true'"><sch:value-of select="@definition_id"/> - definitions with a result of FALSE should not be included (see directives)</sch:assert>
+                              <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_false/@content='full'"><sch:value-of select="@definition_id"/> - definitions with a result of FALSE should contain THIN content (see directives)</sch:assert>
+                         </sch:rule>
+                         <sch:rule context="oval-res:definition[@result='false' and not(oval-res:criteria)]">
+                              <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_false/@reported='true'"><sch:value-of select="@definition_id"/> - definitions with a result of FALSE should not be included (see directives)</sch:assert>
+                              <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_false/@content='thin'"><sch:value-of select="@definition_id"/> - definitions with a result of FALSE should contain FULL content (see directives)</sch:assert>
+                         </sch:rule>
+                         <sch:rule context="oval-res:definition[@result='unknown' and oval-res:criteria]">
+                              <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_unknown/@reported='true'"><sch:value-of select="@definition_id"/> - definitions with a result of UNKNOWN should not be included (see directives)</sch:assert>
+                               <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_unknown/@content='full'"><sch:value-of select="@definition_id"/> - definitions with a result of UNKNOWN should contain THIN content (see directives)</sch:assert>
+                         </sch:rule>
+                         <sch:rule context="oval-res:definition[@result='unknown' and not(oval-res:criteria)]">
+                              <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_unknown/@reported='true'"><sch:value-of select="@definition_id"/> - definitions with a result of UNKNOWN should not be included (see directives)</sch:assert>
+                               <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_unknown/@content='thin'"><sch:value-of select="@definition_id"/> - definitions with a result of UNKNOWN should contain FULL content (see directives)</sch:assert>
+                         </sch:rule>
+                         <sch:rule context="oval-res:definition[@result='error' and oval-res:criteria]">
+                              <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_error/@reported='true'"><sch:value-of select="@definition_id"/> - definitions with a result of ERROR should not be included (see directives)</sch:assert>
+                               <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_error/@content='full'"><sch:value-of select="@definition_id"/> - definitions with a result of ERROR should contain THIN content (see directives)</sch:assert>
+                         </sch:rule>
+                         <sch:rule context="oval-res:definition[@result='error' and not(oval-res:criteria)]">
+                              <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_error/@reported='true'"><sch:value-of select="@definition_id"/> - definitions with a result of ERROR should not be included (see directives)</sch:assert>
+                               <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_error/@content='thin'"><sch:value-of select="@definition_id"/> - definitions with a result of ERROR should contain FULL content (see directives)</sch:assert>
+                         </sch:rule>
+                         <sch:rule context="oval-res:definition[@result='not evaluated' and oval-res:criteria]">
+                              <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_not_evaluated/@reported='true'"><sch:value-of select="@definition_id"/> - definitions with a result of NOT EVALUATED should not be included (see directives)</sch:assert>
+                               <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_not_evaluated/@content='full'"><sch:value-of select="@definition_id"/> - definitions with a result of NOT EVALUATED should contain THIN content (see directives)</sch:assert>
+                         </sch:rule>
+                         <sch:rule context="oval-res:definition[@result='not evaluated' and not(oval-res:criteria)]">
+                              <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_not_evaluated/@reported='true'"><sch:value-of select="@definition_id"/> - definitions with a result of NOT EVALUATED should not be included (see directives)</sch:assert>
+                               <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_not_evaluated/@content='thin'"><sch:value-of select="@definition_id"/> - definitions with a result of NOT EVALUATED should contain FULL content (see directives)</sch:assert>
+                         </sch:rule>
+                         <sch:rule context="oval-res:definition[@result='not applicable' and oval-res:criteria]">
+                              <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_not_applicable/@reported='true'"><sch:value-of select="@definition_id"/> - definitions with a result of NOT APPLICABLE should not be included (see directives)</sch:assert>
+                               <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_not_applicable/@content='full'"><sch:value-of select="@definition_id"/> - definitions with a result of NOT APPLICABLE should contain THIN content (see directives)</sch:assert>
+                         </sch:rule>
+                         <sch:rule context="oval-res:definition[@result='not applicable' and not(oval-res:criteria)]">
+                              <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_not_applicable/@reported='true'"><sch:value-of select="@definition_id"/> - definitions with a result of NOT APPLICABLE should not be included (see directives)</sch:assert>
+                               <sch:assert test="/oval-res:oval_results/oval-res:directives/oval-res:definition_not_applicable/@content='thin'"><sch:value-of select="@definition_id"/> - definitions with a result of NOT APPLICABLE should contain FULL content (see directives)</sch:assert>
+                         </sch:rule>
+                    </sch:pattern>
+               </xsd:appinfo>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element name="message" type="oval:MessageType" minOccurs="0" maxOccurs="unbounded"/>
+               <xsd:element name="criteria" type="oval-res:CriteriaType" minOccurs="0" maxOccurs="1"/>
+          </xsd:sequence>
+          <xsd:attribute name="definition_id" type="oval:DefinitionIDPattern" use="required"/>
+          <xsd:attribute name="version" type="xsd:nonNegativeInteger" use="required"/>
+          <xsd:attribute name="variable_instance" type="xsd:nonNegativeInteger" use="optional" default="1"/>
+          <xsd:attribute name="result" type="oval-res:ResultEnumeration" use="required"/>
+     </xsd:complexType>
+     <xsd:complexType name="CriteriaType">
+          <xsd:annotation>
+               <xsd:documentation>The CriteriaType complex type describes the high level container for all the tests and represents the meat of the definition. Each criteria can contain other criteria elements in a recursive structure allowing complex logical trees to be constructed. Each referenced test is represented by a criterion element. Please refer to the description of the CriterionType for more information about and individual criterion element. The optional extend_definition element allows existing definitions to be included in the criteria. Refer to the description of the ExtendDefinitionType for more information.</xsd:documentation>
+               <xsd:documentation>The required operator attribute provides the logical operator that binds the different statements inside a criteria together. The optional negate attribute signifies that the result of an extended definition should be negated during analysis. For example, consider a definition that evaluates TRUE if a certain software is installed. By negating the definition, it now evaluates to TRUE if the software is NOT installed. The required result attribute holds the result of the evaluation of the criteria. Note that this would be after any negation operation has been applied. Please refer to the description of the resultEnumeration for details about the different result values.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:choice minOccurs="1" maxOccurs="unbounded">
+               <xsd:element name="criteria" type="oval-res:CriteriaType"/>
+               <xsd:element name="criterion" type="oval-res:CriterionType"/>
+               <xsd:element name="extend_definition" type="oval-res:ExtendDefinitionType"/>
+          </xsd:choice>
+          <xsd:attribute name="operator" type="oval:OperatorEnumeration" use="required"/>
+          <xsd:attribute name="negate" type="xsd:boolean" use="optional" default="false"/>
+          <xsd:attribute name="result" type="oval-res:ResultEnumeration" use="required"/>
+     </xsd:complexType>
+     <xsd:complexType name="CriterionType">
+          <xsd:annotation>
+               <xsd:documentation>The CriterionType complex type identifies a specific test that is included in the definition's criteria.</xsd:documentation>
+               <xsd:documentation>The required test_id attribute is the actual id of the included test. The required version attribute is the specific version of the OVAL Test used during analysis. The optional variable_instance attribute differentiates between unique instances of a test. This can happen when a test includes a variable reference and different values for that variable are used by different definitions. The optional negate attribute signifies that the result of an individual test should be negated during analysis. For example, consider a test that evaluates to TRUE if a specific patch is installed. By negating this test, it now evaluates to TRUE if the patch is NOT installed. The required result attribute holds the result of the evaluation. Please refer to the description of the resultEnumeration for details about the different result values.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:attribute name="test_ref" type="oval:TestIDPattern" use="required"/>
+          <xsd:attribute name="version" type="xsd:nonNegativeInteger" use="required"/>
+          <xsd:attribute name="variable_instance" type="xsd:nonNegativeInteger" use="optional" default="1"/>
+          <xsd:attribute name="negate" type="xsd:boolean" use="optional" default="false"/>
+          <xsd:attribute name="result" type="oval-res:ResultEnumeration" use="required"/>
+     </xsd:complexType>
+     <xsd:complexType name="ExtendDefinitionType">
+          <xsd:annotation>
+               <xsd:documentation>The ExtendDefinitionType complex type identifies a specific definition that has been extended by the criteria.</xsd:documentation>
+               <xsd:documentation>The required definition_id attribute is the actual id of the extended definition. The required version attribute is the specific version of the OVAL Definition used during analysis. The optional variable_instance identifier is a unique id that differentiates every unique instance of a definition in the OVAL Results file based on the combination of variable values used. Languages that include OVAL might reference the same definition multiple times. Each time a different set of values is supplied for the variables, a new instance of the definition must be created. (definitions that do not use variables can only have one unique instance) The inclusion of a unique instance identifier will allow the OVAL results file to report the correct result of a definition for each combination of supplied values. The optional negate attribute signifies that the result of an extended definition should be negated during analysis. For example, consider a definition that evaluates TRUE if a certain software is installed. By negating the definition, it now evaluates to TRUE if the software is NOT installed. The required result attribute holds the result of the evaluation. Please refer to the description of the resultEnumeration for details about the different result values.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:attribute name="definition_ref" type="oval:DefinitionIDPattern" use="required"/>
+          <xsd:attribute name="version" type="xsd:nonNegativeInteger" use="required"/>
+          <xsd:attribute name="variable_instance" type="xsd:nonNegativeInteger" use="optional" default="1"/>
+          <xsd:attribute name="negate" type="xsd:boolean" use="optional" default="false"/>
+          <xsd:attribute name="result" type="oval-res:ResultEnumeration" use="required"/>
+     </xsd:complexType>
+     <xsd:complexType name="TestsType">
+          <xsd:annotation>
+               <xsd:documentation>The TestsType complex type is a container for one or more test elements. Each test element holds the result of the evaluation of an OVAL Test. Please refer to the description of TestType for more information about an individual test element.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element name="test" type="oval-res:TestType" minOccurs="1" maxOccurs="unbounded"/>
+          </xsd:sequence>
+     </xsd:complexType>
+     <xsd:complexType name="TestType">
+          <xsd:annotation>
+               <xsd:documentation>The TestType complex type provides a reference to every item that matched the object section of the original test as well as providing an overall test result based on these items. The optional message element holds an error message or some other string that the analysis engine wishes to pass along. The optional tested_variable elements hold the value of each variable used by the test during evaluation. This includes the values used in both OVAL Objects and OVAL States. If a variable represents an array of values, then multiple tested_variable elements would exist with the same variable_id attribute. Please refer to the description of TestedVariableType for more information.</xsd:documentation>
+               <xsd:documentation>The required test_id attribute identifies the test, and must conform to the format specified by the testidPattern simple type. The required version attribute is the specific version of the OVAL Test used during analysis. The optional variable_instance attribute differentiates between unique instances of a test. This can happen when a test includes a variable reference and different values for that variable are used by different definitions. The required check_existance attribute is used in determining the overall result by signifying how many matching items must exist.  The optional check_state attribute is also used in determining the overall result and is used to define how many of the matching items must meet the supplied OVAL State.  (For example: Should the test check that all files match a specified version or that at least one file matches the specified version?) The valid values for both the check_existance and check_state attribute are explained in the simple type declarations found in the common schema.</xsd:documentation>
+               <xsd:documentation> The required result attribute holds the result of the evaluation. Please refer to the description of the resultEnumeration for details about the different result values.  The overall result of the test is determined by the results of each matching item and the different check attributes.  If you are using an OVAL System Characteristics file, then the following rules apply:  If a collected_object is not found the result for the OVAL Test should be "unknown". When the flag attribute of the collected_object is “error” the result for the OVAL Test should be set to “error”.  When the flag attribute is “complete” the result of the test is determined by first evaluating the check_existance attribute on the test and then evaluating the check_state attribute. The check_state attribute only needs to be considered if the result of evaluating the check_existance attribute is “true”.  When the flag attribute is “does not exist” the result of the test is determined by examining the check_existance attribute’s value, if the check_existance attribute is “none_exist” or “any_exist” the Test should evaluate to “true”, for all other values of the check_existance attribute the Test should evaluate to “false”.  When the flag attribute is “not collected” the result of the test should be set to “unknown”.  When the flag attribute is “not applicable” the result for the Test should be set to “not applicable”.  When the flag attribute is “incomplete” it may not be possible to determine a result other than “unknown” for the test. However, in some cases it will be possible to determine a result. These cases are: 1) when the check_existance attribute on a test is set to “none_exist” and the collected object has 1 or more item references with a status of "exists" a result of “false” should be reported  2) when the check_existance attribute is set to “only_one_exists” the collected object has more than 1 item reference with a status of "exists" a result of “false” should be reported  3) if after evaluating the check_existance attribute a non "true" result has not been determined the check_state attribute must be considered. As follows: 3a) if the check_state attribute evaluation results in "false" then the OVAL Test result should be set to "false" 3b) if the check_state attribute is set to "at_least_one_satisfies" and its evaluation results in "true" the OVAL Test result should be set to "true". For all other cases when the collected_object flag is "incompete" the OVAL Test result should be set to "unknown".</xsd:documentation>
+               <xsd:appinfo>
+                    <sch:pattern id="testids">
+                         <sch:rule context="oval-res:test">
+                              <sch:assert test="@test_id = ../../oval-res:definitions//oval-res:criterion/@test_ref"><sch:value-of select="@test_id"/> - the specific test is not used in any definition's criteria</sch:assert>
+                         </sch:rule>
+                    </sch:pattern>
+               </xsd:appinfo>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element name="message" type="oval:MessageType" minOccurs="0" maxOccurs="unbounded"/>
+               <xsd:element name="tested_item" type="oval-res:TestedItemType" minOccurs="0" maxOccurs="unbounded"/>
+               <xsd:element name="tested_variable" type="oval-res:TestedVariableType" minOccurs="0" maxOccurs="unbounded"/>
+          </xsd:sequence>
+          <xsd:attribute name="test_id" type="oval:TestIDPattern" use="required"/>
+          <xsd:attribute name="version" type="xsd:nonNegativeInteger" use="required"/>
+          <xsd:attribute name="variable_instance" type="xsd:nonNegativeInteger" use="optional" default="1"/>
+          <xsd:attribute name="check_existence" type="oval:ExistenceEnumeration" use="optional" default="at_least_one_exists"/>
+          <xsd:attribute name="check" type="oval:CheckEnumeration" use="required"/>
+          <xsd:attribute name="result" type="oval-res:ResultEnumeration" use="required"/>
+     </xsd:complexType>
+     <xsd:complexType name="TestedItemType">
+          <xsd:annotation>
+               <xsd:documentation>The TestedItemType complex type holds a reference to each system characteristic item that matches the object specified in a test. Details of the item can be found in the oval_system_characteristics section of the OVAL Results file by using the required item_id. The optional message element holds an error message or some other string that the analysis engine wishes to pass along. The required result attribute holds the result of the evaluation of the individual item as it relates to the state specified by the test. Please refer to the description of the resultEnumeration for details about the different result values.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element name="message" type="oval:MessageType" minOccurs="0" maxOccurs="unbounded"/>
+          </xsd:sequence>
+          <xsd:attribute name="item_id" type="oval:ItemIDPattern" use="required"/>
+          <xsd:attribute name="result" type="oval-res:ResultEnumeration" use="required"/>
+     </xsd:complexType>
+     <xsd:complexType name="TestedVariableType">
+          <xsd:annotation>
+               <xsd:documentation>The TestedVariableType complex type holds the value to a variable used during the evaluation of a test. Of special importance are the values of any external variables used since these values are not captured in either the definition or system characteristic files. If a variable is represented by an array of values, then multiple elements of TestedVariableType, each with the same variable_id attribute, would exist. The required variable_id attribute is the unique id of the variable that was used.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:extension base="xsd:anySimpleType">
+                    <xsd:attribute name="variable_id" type="oval:VariableIDPattern" use="required"/>
+               </xsd:extension>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <!-- =============================================================================== -->
+     <!-- =================================  SIGNATURE  ================================= -->
+     <!-- =============================================================================== -->
+     <!--
+		The signature element is defined by the xmldsig schema.  Please refer to that
+		documentation for a description of the valid elements and types.  More
+		information about the official W3C Recommendation regarding XML digital
+		signatures can be found at http://www.w3.org/TR/xmldsig-core/.
+	-->
+     <!-- =============================================================================== -->
+     <!-- ===============================  ENUMERATIONS  ================================ -->
+     <!-- =============================================================================== -->
+     <xsd:simpleType name="ContentEnumeration">
+          <xsd:annotation>
+               <xsd:documentation>Defines the valid values for the directives controlling the expected content of the results file. The specific content that is expected with each value is defined by a style sheet that complements the OVAL Results Schema. Please refer to these style sheets for more information.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:restriction base="xsd:string">
+               <xsd:enumeration value="thin">
+                    <xsd:annotation>
+                         <xsd:documentation>A value of 'thin' means only the minimal amount of information will be provided. This is the id associated with an evaluated OVAL Definition and the result of the evaluation. The criteria child element of a definition should not be present when providing thin results. In addition, system characteristic information for the objects used by the given definition should not be presented.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="full">
+                    <xsd:annotation>
+                         <xsd:documentation>A value of 'full' means that very detailed information will be provided allowing in-depth reports to be generated from the results. In addition to the results of the evaluated definition, the results of all extended definitions and tests included in the criteria as well as the actual information collected off the system must be presented.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+          </xsd:restriction>
+     </xsd:simpleType>
+     <xsd:simpleType name="ResultEnumeration">
+          <xsd:annotation>
+               <xsd:documentation>Define acceptable result values for the evaluation of an OVAL Definition or an OVAL Test.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:restriction base="xsd:string">
+               <xsd:enumeration value="true">
+                    <xsd:annotation>
+                         <xsd:documentation>When evaluating a definition or test, a result value of 'true' means that the characteristics being evaluated match the information represented in the system characteristic file.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="false">
+                    <xsd:annotation>
+                         <xsd:documentation>When evaluating a definition or test, a result value of 'false' means that the characteristics being evaluated do not match the information represented in the system characteristic file.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="unknown">
+                    <xsd:annotation>
+                         <xsd:documentation>When evaluating a definition or test, a result value of 'unknown' means that the characteristics being evaluated can not be found in the system characteristic file. (or the characteristics can be found but collected object flag is 'not collected') For example, assume you have a definition that tests a file, but when you look at the system characteristic file, data pertaining to that file can not be found. The lack of an object (in the collected_object section) for this file in the SC file means that no attempt was made to even try and collect information about the file. So you do not know what the result would be if it was collected. Note that finding a collected_object element in the system characteristic file is not the same as finding a matching element of the system. When evaluating an OVAL Test, the lack of a matching object on a system (for example, file not found) does not mean an unknown result since part of a test in OVAL is about existence. In this case the result would be 'false'.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="error">
+                    <xsd:annotation>
+                         <xsd:documentation>When evaluating a definition or test, a result value of 'error' means that the characteristics being evaluated exist in the system characteristic file but there was an error either collecting information or in performing anaylsis. For example, if there was an error returned by an api when trying to determine if an object exists on a system. Another example would be: xsi:nil might be set on an object entity, but then the entity is compared to a state entity with a value, thus producing an error.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="not evaluated">
+                    <xsd:annotation>
+                         <xsd:documentation>When evaluating a definition or test, a result value of 'not evaluated' means that a choice was made not to evaluate the given definition or test. The actual result is in essence unknown since if evaluation had occurred it could have been either true or false.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="not applicable">
+                    <xsd:annotation>
+                         <xsd:documentation>When evaluating a definition or test, a result value of 'not applicable' means that the definition or test being evaluated is not valid on the given platform. For example, trying to collect Linux RPM information on a Windows system.  Another example would be in trying to collect RPM information on a linux system that does not have the RPM packaging system installed.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+          </xsd:restriction>
+     </xsd:simpleType>
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/oval-results-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/oval-system-characteristics-schema.xsd
===================================================================
--- trunk/ovaldi/xml/oval-system-characteristics-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/oval-system-characteristics-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,404 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:oval-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" elementFormDefault="qualified" version="5.4">
+     <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-common-5" schemaLocation="oval-common-schema.xsd"/>
+     <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>
+     <xsd:annotation>
+          <xsd:documentation>The following is a description of the elements, types, and attributes that compose the core schema for encoding Open Vulnerability and Assessment Language (OVAL) System Characteristics. The Core System Characteristics Schema defines all operating system independent objects. These objects are extended and enhanced by individual family schemas, which are described in separate documents. Each of the elements, types, and attributes that make up the Core System Characteristics Schema are described in detail and should provide the information necessary to understand what each object represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between these objects is not outlined here.</xsd:documentation>
+          <xsd:documentation>The OVAL Schema is maintained by The MITRE Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+          <xsd:appinfo>
+               <schema>Core System Characteristics</schema>
+               <version>5.4</version>
+               <date>4/1/2008 10:41:44 AM</date>
+                <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                <sch:title>schematron validation of the Core portion of an OVAL System Characteristics file</sch:title>
+               <sch:ns prefix="oval-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5"/>
+          </xsd:appinfo>
+     </xsd:annotation>
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="oval_system_characteristics">
+          <xsd:annotation>
+               <xsd:documentation>The system_characteristics element is the root of an OVAL System Characteristics Document, and must occur exactly once. Its purpose is to bind together the four major sections of a system characteristics file - generator, system_info, collected_objects, and system_data - which are the children of the oval_system_characteristics element.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:sequence>
+                    <xsd:element name="generator" type="oval:GeneratorType" minOccurs="1" maxOccurs="1">
+                         <xsd:annotation>
+                              <xsd:documentation>The generator section must be present and provides information about when the system characteristics file was compiled and under what version.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="system_info" type="oval-sc:SystemInfoType" minOccurs="1" maxOccurs="1">
+                         <xsd:annotation>
+                              <xsd:documentation>The required system_info element is used to record information about the system being described.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="collected_objects" type="oval-sc:CollectedObjectsType" minOccurs="0" maxOccurs="1">
+                         <xsd:annotation>
+                              <xsd:documentation>The optional collected_objects section is used to associated the ids of the OVAL Objects collected with the system characteristics items that have been defined. The collected_objects section provides a listing of all the objects used to generate this system characteristics file.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="system_data" type="oval-sc:SystemDataType" minOccurs="0" maxOccurs="1">
+                         <xsd:annotation>
+                              <xsd:documentation>The optional system_data section defines the specific characteristics that have been collected from the system.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element ref="ds:Signature" minOccurs="0" maxOccurs="1">
+                         <xsd:annotation>
+                              <xsd:documentation>The optional Signature element allows an XML Signature as defined by the W3C to be attached to the document. This allows authentication and data integrity to be provided to the user. Enveloped signatures are supported. More information about the official W3C Recommendation regarding XML digital signatures can be found at http://www.w3.org/TR/xmldsig-core/.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:element>
+               </xsd:sequence>
+          </xsd:complexType>
+          <xsd:key name="objectKey">
+               <xsd:annotation>
+                    <xsd:documentation>Enforce uniqueness amongst the individual object ids used in the collected object section.</xsd:documentation>
+               </xsd:annotation>
+               <xsd:selector xpath="oval-sc:collected_objects/oval-sc:object"/>
+               <xsd:field xpath="@id"/>
+               <xsd:field xpath="@version"/>
+               <xsd:field xpath="@variable_instance"/>
+          </xsd:key>
+          <xsd:key name="itemKey">
+               <xsd:annotation>
+                    <xsd:documentation>Enforce uniqueness amongst the individual item ids.</xsd:documentation>
+               </xsd:annotation>
+               <xsd:selector xpath="oval-sc:system_data/*"/>
+               <xsd:field xpath="@id"/>
+          </xsd:key>
+          <xsd:keyref name="itemKeyRef" refer="oval-sc:itemKey">
+               <xsd:annotation>
+                    <xsd:documentation>Require that each item reference refers to a valid item id.</xsd:documentation>
+               </xsd:annotation>
+               <xsd:selector xpath="oval-sc:collected_objects/oval-sc:object/oval-sc:reference"/>
+               <xsd:field xpath="@item_ref"/>
+          </xsd:keyref>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =================================  GENERATOR  ================================= -->
+     <!-- =============================================================================== -->
+     <!--
+		The GeneratorType is defined by the oval shared schema.  Please refer to
+		that documentation for a description of the complex type.
+	 -->
+     <!-- =============================================================================== -->
+     <!-- ================================  SYSTEM INFO  ================================ -->
+     <!-- =============================================================================== -->
+     <xsd:complexType name="SystemInfoType">
+          <xsd:annotation>
+               <xsd:documentation>The SystemInfoType complex type specifies general information about the system that data was collected from, including information that can be used to identify the system. See the description of the InterfacesType complex type for more information. Note that the high level interfaces is required due to the inclusion of the xsd:any tag that follows it. The interfaces tag can be empty if no single interface is present.</xsd:documentation>
+               <xsd:documentation>Additional system information is also allowed although it is not part of the official OVAL Schema. Individual organizations can place system information that they feel is important and these will be skipped during the validation. All OVAL really cares about is that the required system information items are there.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element name="os_name" type="xsd:string" minOccurs="1" maxOccurs="1">
+                    <xsd:annotation>
+                         <xsd:documentation>The required os_name elements describes the operating system of the machine the data was collected on.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:element>
+               <xsd:element name="os_version" type="xsd:string" minOccurs="1" maxOccurs="1">
+                    <xsd:annotation>
+                         <xsd:documentation>The required os_version elements describe the operating system version of the machine the data was collected on.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:element>
+               <xsd:element name="architecture" type="xsd:string" minOccurs="1" maxOccurs="1">
+                    <xsd:annotation>
+                         <xsd:documentation>The required architecture element describes the hardware architecture type of the system data was collected on.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:element>
+               <xsd:element name="primary_host_name" type="xsd:string" minOccurs="1" maxOccurs="1">
+                    <xsd:annotation>
+                         <xsd:documentation>The required primary_host_name element is the primary host name of the machine the data was collected on.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:element>
+               <xsd:element name="interfaces" type="oval-sc:InterfacesType" minOccurs="1" maxOccurs="1">
+                    <xsd:annotation>
+                         <xsd:documentation>The required interfaces element outlines the network interfaces that exist on the system.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:element>
+               <xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
+          </xsd:sequence>
+     </xsd:complexType>
+     <xsd:complexType name="InterfacesType">
+          <xsd:annotation>
+               <xsd:documentation>The InterfacesType complex type is a container for zero or more interface elements. Each interface element is used to describe an existing network interface on the system.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element name="interface" type="oval-sc:InterfaceType" minOccurs="0" maxOccurs="unbounded">
+                    <xsd:annotation>
+                         <xsd:documentation>Please refer to the description of the InterfaceType for more information.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:element>
+          </xsd:sequence>
+     </xsd:complexType>
+     <xsd:complexType name="InterfaceType">
+          <xsd:annotation>
+               <xsd:documentation>The InterfaceType complex type is used to describe an existing network interface on the system. This information can help identify a specific system on a given network.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element name="interface_name" type="xsd:string" minOccurs="1" maxOccurs="1">
+                    <xsd:annotation>
+                         <xsd:documentation>The required interface_name element is the name of the interface</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:element>
+               <xsd:element name="ip_address" type="xsd:string" minOccurs="1" maxOccurs="1">
+                    <xsd:annotation>
+                         <xsd:documentation>The reqired ip_address element holds the ip address for the interface.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:element>
+               <xsd:element name="mac_address" type="xsd:string" minOccurs="1" maxOccurs="1">
+                    <xsd:annotation>
+                         <xsd:documentation>The required mac_address element holds teh mac address for the interface.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:element>
+          </xsd:sequence>
+     </xsd:complexType>
+     <!-- =============================================================================== -->
+     <!-- =============================  COLLECTED OBJECTS  ============================= -->
+     <!-- =============================================================================== -->
+     <xsd:complexType name="CollectedObjectsType">
+          <xsd:annotation>
+               <xsd:documentation>The CollectedObjectsType complex type states all the objects that have been collected by the system characteristics file. The details of each object are defined by the global OVAL object that is identified by the id.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element name="object" type="oval-sc:ObjectType" minOccurs="1" maxOccurs="unbounded"/>
+          </xsd:sequence>
+     </xsd:complexType>
+     <xsd:complexType name="ObjectType">
+          <xsd:annotation>
+               <xsd:documentation>The ObjectType complex type provides a reference between items collected and a related global OVAL Object.</xsd:documentation>
+               <xsd:documentation>If an OVAL Object does not exist on the system, then an object element is still provided but with the flag attribute set to 'does not exist' and with no reference child elements. This shows that the object was looked for but not found on the system. If no object element is written in this case, users of the system characteristics file will not know whether the object was not found or no attempt was made to collect it.</xsd:documentation>
+               <xsd:documentation>The required id attribute is the id of the global OVAL Object. The required version attribute is the specific version of the global OVAL Object that was used by the data collection engine. The version is necessary so that analysis using a system characteristics file knows exactly what was collected. The optional variable_instance identifier is a unique id that differentiates every unique instance of an object. Languages that include OVAL might reference the same definition multiple times. Each time a different set of values is supplied for the variables, resulting in multiple instances of an object to be defined by the OVAL System Characteristics file. (definitions that do not use variables can only have one unique instance) The inclusion of a unique instance identifier will allow the OVAL results file to report the correct item associated with an object for each combination of supplied values. The optional comment attribute provides a short description of the object. The required flag attribute holds information regarding the success of the data collection. For example, if there was an error looking for items that match the object specification, then the flag would be 'error'. Please refer to the description of FlagEnumeration for details about the different flag values.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element name="message" type="oval:MessageType" minOccurs="0" maxOccurs="unbounded">
+                    <xsd:annotation>
+                         <xsd:documentation>The optional message element holds an error message or some other string that the data collection engine wishes to pass along.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:element>
+               <xsd:element name="variable_value" type="oval-sc:VariableValueType" minOccurs="0" maxOccurs="unbounded">
+                    <xsd:annotation>
+                         <xsd:documentation>The optional variable_value elements define the actual value(s) used during data collection of any variable referenced by the object (as well as any object referenced via a set element). An OVAL Object that includes a variable maybe have a different set of matching items depending on the value given assigned to the variable. A tool that is given an OVAL System Characteristics file in order to analyze an OVAL Definition needs to be able to determine the exact instance of an object to use based on the variable values supplied. If a variable represents an array of values, then multiple variable_value elements would exist with the same variable_id attribute. </xsd:documentation>
+                    </xsd:annotation>
+               </xsd:element>
+               <xsd:element name="reference" type="oval-sc:ReferenceType" minOccurs="0" maxOccurs="unbounded">
+                    <xsd:annotation>
+                         <xsd:documentation>the optional reference element links the collected item found by the data collection engine and the global OVAL Object. A global OVAL Object my have multiple matching items on a system. For example a global file object that is a pattern match might match 10 different files on a specific system. In this case, there would be 10 reference elements, one for each of the files found on the system.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:element>
+          </xsd:sequence>
+          <xsd:attribute name="id" type="oval:ObjectIDPattern" use="required"/>
+          <xsd:attribute name="version" type="xsd:nonNegativeInteger" use="required"/>
+          <xsd:attribute name="variable_instance" type="xsd:integer" use="optional" default="1"/>
+          <xsd:attribute name="comment" type="xsd:string" use="optional"/>
+          <xsd:attribute name="flag" type="oval-sc:FlagEnumeration" use="required"/>
+     </xsd:complexType>
+     <xsd:complexType name="VariableValueType">
+          <xsd:annotation>
+               <xsd:documentation>The VariableValueType complex type holds the value to a variable used during the collection of an object. The required variable_id attribute is the unique id of the variable being identified.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:extension base="xsd:anySimpleType">
+                    <xsd:attribute name="variable_id" type="oval:VariableIDPattern" use="required"/>
+               </xsd:extension>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="ReferenceType">
+          <xsd:annotation>
+               <xsd:documentation>The ReferenceType complex type specifies an item in the system characteristics file. This reference is used to link global OVAL Objects to specific items.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:attribute name="item_ref" type="oval:ItemIDPattern" use="required"/>
+     </xsd:complexType>
+     <!-- =============================================================================== -->
+     <!-- ================================  SYSTEM DATA  ================================ -->
+     <!-- =============================================================================== -->
+     <xsd:complexType name="SystemDataType">
+          <xsd:annotation>
+               <xsd:documentation>The SystemDataType complex type is a container for one or more item elements. Each item defines a specific piece of data on the system.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element ref="oval-sc:item" minOccurs="1" maxOccurs="unbounded"/>
+          </xsd:sequence>
+     </xsd:complexType>
+     <xsd:element name="item" type="oval-sc:ItemType" abstract="true">
+          <xsd:annotation>
+               <xsd:documentation>The abstract item element holds information about a specific item on a system. An item might be a file, a rpm, a process, etc. This element is extended by the different component schemas through substitution groups. Each item represents a unique instance of an object as specified by an OVAL Object. For example, a single file or a single user. Each item my be referenced by more than one object in the collected object section. Please refer to the description of ItemType for more details about the information stored in items.</xsd:documentation>
+          </xsd:annotation>
+     </xsd:element>
+     <xsd:complexType name="ItemType">
+          <xsd:annotation>
+               <xsd:documentation>The ItemType complex type specifies an optional message element that is used to pass things like error messages during data collection to a tool that will utilize the information. The required id attribute is an unique (to the file) identifier that allows the specific item to be referenced. The optional object_ref attribute allows the item to be linked to an object declaration used to identify the item being collected. The required status attribute holds information regarding the success of the data collection. For example, if an item exists on the system then the status would reflect this with a value of 'exists'. If there was an error collecting a any information about an item that is known to exist, then the status would be 'error'. An error specific to a particular entity should be addressed at the entity level and not the item level. Note that an item should not have a status of 'does not exist' as there simply would be no item element in the system characteristics file for this case. If part of the object declaration does not exist on the system (say a path exists but the filename does not), then no item should be written for this object and the object element in the collected_object section should have a flag value of 'does not exist'.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element name="message" type="oval:MessageType" minOccurs="0" maxOccurs="1"/>
+          </xsd:sequence>
+          <xsd:attribute name="id" type="oval:ItemIDPattern" use="required"/>
+          <xsd:attribute name="status" type="oval-sc:StatusEnumeration" use="optional" default="exists"/>
+     </xsd:complexType>
+     <!-- =============================================================================== -->
+     <!-- =================================  SIGNATURE  ================================= -->
+     <!-- =============================================================================== -->
+     <!--
+		The signature element is defined by the xmldsig schema.  Please refer to that
+		documentation for a description of the valid elements and types.  More
+		information about the official W3C Recommendation regarding XML digital
+		signatures can be found at http://www.w3.org/TR/xmldsig-core/.
+	-->
+     <!-- =============================================================================== -->
+     <!-- ===============================  ENUMERATIONS  ================================ -->
+     <!-- =============================================================================== -->
+     <xsd:simpleType name="FlagEnumeration">
+          <xsd:annotation>
+               <xsd:documentation>The FlagEnumeration simple type defines the valid flags associated with a collected object. These flags are meant to provide information about how the specified object was handled by the data collector. In order to evaluate an OVAL Definition, information about the defined objects need to be available. The flags help detail the success of trying to collect information related to these objects.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:restriction base="xsd:string">
+               <xsd:enumeration value="error">
+                    <xsd:annotation>
+                         <xsd:documentation>A flag of 'error' says that there was an error trying to identify objects on the system that match the specified object declaration. This flag is not meant to be used when there was an error retrieving a specific attribute, but rather when it could not be determined if an instance of the object exists or not. Any error in retrieving specific attributes should be represented by setting the status of that specific attribute to 'error'.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="complete">
+                    <xsd:annotation>
+                         <xsd:documentation>Every matching item on the system has been identified and is represented in the system characteristics file. It can be assumed that no additional matching items exist on the system.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="incomplete">
+                    <xsd:annotation>
+                         <xsd:documentation>An instance of the specified object exists on the system, but only some of the matching items have been identified and are represented in the system characteristics file. It is unknown if additional matching items also exist. Note that with a flag of incomplete, each item that has been identified matches the object declaration, but additional items might also exist on the system.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="does not exist">
+                    <xsd:annotation>
+                         <xsd:documentation>A flag of 'does not exist' means that the underlying structure is installed on the system but no matching item was found.  For example, the Windows metabase is installed but the specified metabase_object could not be found.  In this example, if the metabase itself was not installed, then the flag would have been 'not applicable'.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="not collected">
+                    <xsd:annotation>
+                         <xsd:documentation>An attempt to collect information on items matching the object was not made. An object with this flag will produce an 'unknown' result during analysis since it is unknown if a matching items exists on the system or not. This is different from an 'error' flag since with an 'error' flag an attempt to collect information was made. With the 'not collected' flag, no attempt was made.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="not applicable">
+                    <xsd:annotation>
+                         <xsd:documentation>The specified object is not applicable to the system being characterized.  This could be because the data repository is not installed or that the object structure is for a different flavor of systems. An example would be trying to collect objects related to a Red Hat system off a Windows system.  Another example would be trying to collect an rpminfo object on a Linux system if the rpm packaging system is not installed.  If the rpm packaging system is installed and the specified rpminfo object could not be found, then the flag would be 'does not exist'.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+          </xsd:restriction>
+     </xsd:simpleType>
+     <xsd:simpleType name="StatusEnumeration">
+          <xsd:annotation>
+               <xsd:documentation>The StatusEnumeration simple type defines the valid status messages associated with collection of specific information associated with an item.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:restriction base="xsd:string">
+               <xsd:enumeration value="error">
+                    <xsd:annotation>
+                         <xsd:documentation>A status of 'error' says that there was an error collecting information associated with an item as a whole or a specific entity.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="exists">
+                    <xsd:annotation>
+                         <xsd:documentation>A status of 'exists' says that the item or specific piece of information exists on the system and has been collected.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="does not exist">
+                    <xsd:annotation>
+                         <xsd:documentation>A status of 'does not exist' says that the item or specific piece of information does not exist and therefore has not been collected. This status assumes that an attempt was made to collect the information, but the information just doesn't exist. This can happen when a certain entity is only pertinent to particular instances, or when xsi:nil is used to refer to a higher level object.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+               <xsd:enumeration value="not collected">
+                    <xsd:annotation>
+                         <xsd:documentation>A status of 'not collected' says that no attempt was made to collect the item or specific piece of information so it is unknown what the value is and if it even exists.</xsd:documentation>
+                    </xsd:annotation>
+               </xsd:enumeration>
+          </xsd:restriction>
+     </xsd:simpleType>
+     <!-- =============================================================================== -->
+     <!-- ===============================  ENTITY TYPES  ================================ -->
+     <!-- =============================================================================== -->
+     <xsd:complexType name="EntityItemBaseType" abstract="true">
+          <xsd:annotation>
+               <xsd:documentation>The EntityItemBaseType complex type is an abstract type that defines the default attributes associated with every entity.  The optional datatype determines the type of data expected. (the default datatype is 'string')  Note that the datatype attribute simply defines the type of data as found on the system, it is not used during evaluation.  An OVAL Definition defines how the data should be interpreted during analysis.  If the definition states a datatype that is different than what the system characteristics presents, then a type cast must be made.  The optional mask attribute is used to identify values that have been hidden for sensitivity concerns.  This is used by the result file which uses the system characateristic schema to format the information found on a specific system.  If the original definition set the mask attribute of an entity to 'true', then value obtained from the system should not be presented in the results file.  A system characteristics file that is not held within a results file should not use the mask attribute.  The optional status attribute holds information regarding the success of the data collection.  For example, if there was an error collecting a particular piece of data, then the status would be 'error'.</xsd:documentation>
+               <xsd:appinfo>
+                    <sch:pattern id="entitystatus">
+                         <sch:rule context="oval-sc:system_data/*/*">
+                              <sch:assert test="not(@status) or @status='exists' or .=''">item <sch:value-of select="../@id"/> - a value for the <sch:value-of select="name()"/> entity should only be supplied if the status attribute is 'exists'</sch:assert>
+                              <sch:assert test="not(@mask) or @mask='false' or .=''">item <sch:value-of select="../@id"/> - a value for the <sch:value-of select="name()"/> entity should only be supplied if the mask attribute is 'false'</sch:assert>
+                         </sch:rule>
+                    </sch:pattern>
+               </xsd:appinfo>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:extension base="xsd:anySimpleType">
+                    <xsd:attribute name="datatype" type="oval:DatatypeEnumeration" use="optional" default="string"/>
+                    <xsd:attribute name="mask" type="xsd:boolean" use="optional" default="false"/>
+                    <xsd:attribute name="status" type="oval-sc:StatusEnumeration" use="optional" default="exists"/>
+               </xsd:extension>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityItemAnyType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityItemAnyType type is extended by the entities of an individual item. This type provides uniformity to each entity by including the attributes found in the EntityItemBaseType. This specific type describes any simple data.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:extension base="oval-sc:EntityItemBaseType"/>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityItemBinaryType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityItemBinaryType type is extended by the entities of an individual item. This type provides uniformity to each entity by including the attributes found in the EntityItemBaseType. This specific type describes simple binary data. The empty string is also allowed for cases where there was an error in the data collection of an entity and a status needs to be reported.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-sc:EntityItemBaseType">
+                    <xsd:simpleType>
+                         <xsd:union memberTypes="xsd:hexBinary oval:EmptyStringType"/>
+                    </xsd:simpleType>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityItemBoolType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityItemBoolType type is extended by the entities of an individual item. This type provides uniformity to each entity by including the attributes found in the EntityItemBaseType. This specific type describes simple boolean data. The empty string is also allowed for cases where there was an error in the data collection of an entity and a status needs to be reported.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-sc:EntityItemBaseType">
+                    <xsd:simpleType>
+                         <xsd:union memberTypes="xsd:boolean oval:EmptyStringType"/>
+                    </xsd:simpleType>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityItemFloatType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityItemFloatType type is extended by the entities of an individual item. This type provides uniformity to each entity by including the attributes found in the EntityItemBaseType. This specific type describes simple float data. The empty string is also allowed for cases where there was an error in the data collection of an entity and a status needs to be reported.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-sc:EntityItemBaseType">
+                    <xsd:simpleType>
+                         <xsd:union memberTypes="xsd:float oval:EmptyStringType"/>
+                    </xsd:simpleType>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityItemIntType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityItemIntType type is extended by the entities of an individual item. This type provides uniformity to each entity by including the attributes found in the EntityItemBaseType. This specific type describes simple integer data. The empty string is also allowed for cases where there was an error in the data collection of an entity and a status needs to be reported.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-sc:EntityItemBaseType">
+                    <xsd:simpleType>
+                         <xsd:union memberTypes="xsd:integer oval:EmptyStringType"/>
+                    </xsd:simpleType>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityItemStringType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityItemStringType type is extended by the entities of an individual item. This type provides uniformity to each entity by including the attributes found in the EntityItemBaseType. This specific type describes simple string data.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-sc:EntityItemBaseType">
+                    <xsd:simpleType>
+                         <xsd:restriction base="xsd:string"/>
+                    </xsd:simpleType>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/oval-system-characteristics-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/oval-variables-schema.xsd
===================================================================
--- trunk/ovaldi/xml/oval-variables-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/oval-variables-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:oval-var="http://oval.mitre.org/XMLSchema/oval-variables-5" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" targetNamespace="http://oval.mitre.org/XMLSchema/oval-variables-5" elementFormDefault="qualified" version="5.4">
+     <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-common-5" schemaLocation="oval-common-schema.xsd"/>
+     <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>
+     <xsd:annotation>
+          <xsd:documentation/>
+          <xsd:documentation>The following is a description of the elements, types, and attributes that compose the core schema for encoding Open Vulnerability and Assessment Language (OVAL) Variables. This schema provided to give structure to any external variables and their values that an OVAL definition is expecting.</xsd:documentation>
+          <xsd:documentation>The OVAL Schema is maintained by The MITRE Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+          <xsd:appinfo>
+               <schema>Core Variable</schema>
+               <version>5.4</version>
+               <date>4/1/2008 10:41:45 AM</date>
+                <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+          </xsd:appinfo>
+     </xsd:annotation>
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="oval_variables">
+          <xsd:annotation>
+               <xsd:documentation>The oval_variables element is the root of an OVAL Variable Document. Its purpose is to bind together the different variables contained in the document. The generator section must be present and provides information about when the variable file was compiled and under what version. The optional Signature element allows an XML Signature as defined by the W3C to be attached to the document. This allows authentication and data integrity to be provided to the user. Enveloped signatures are supported. More information about the official W3C Recommendation regarding XML digital signatures can be found at http://www.w3.org/TR/xmldsig-core/.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:sequence>
+                    <xsd:element name="generator" type="oval:GeneratorType" minOccurs="1" maxOccurs="1"/>
+                    <xsd:element name="variables" type="oval-var:VariablesType" minOccurs="0" maxOccurs="1"/>
+                    <xsd:element ref="ds:Signature" minOccurs="0" maxOccurs="1"/>
+               </xsd:sequence>
+          </xsd:complexType>
+          <xsd:key name="varKey">
+               <xsd:annotation>
+                    <xsd:documentation>Enforce uniqueness amongst the variable ids found in the variable document.</xsd:documentation>
+               </xsd:annotation>
+               <xsd:selector xpath=".//oval-var:variable"/>
+               <xsd:field xpath="@id"/>
+          </xsd:key>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =================================  GENERATOR  ================================= -->
+     <!-- =============================================================================== -->
+     <!--
+		The GeneratorType is defined by the oval common schema.  Please refer to
+		that documentation for a description of the complex type.
+	-->
+     <!-- =============================================================================== -->
+     <!-- ================================  DEFINITIONS  ================================ -->
+     <!-- =============================================================================== -->
+     <xsd:complexType name="VariablesType">
+          <xsd:annotation>
+               <xsd:documentation>The VariablesType complex type is a container for one or more variable elements. Each variable element holds the value of an external variable used in an OVAL Definition. Please refer to the description of the VariableType for more information about an individual variable.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element name="variable" type="oval-var:VariableType" minOccurs="1" maxOccurs="unbounded"/>
+          </xsd:sequence>
+     </xsd:complexType>
+     <xsd:complexType name="VariableType">
+          <xsd:annotation>
+               <xsd:documentation>Each variable element contains the associated datatype and value which will be substituted into the OVAL Definition that is referencing this specific variable.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:sequence>
+               <xsd:element name="value" type="xsd:anySimpleType" minOccurs="1" maxOccurs="unbounded"/>
+          </xsd:sequence>
+          <xsd:attribute name="id" type="oval:VariableIDPattern" use="required"/>
+          <xsd:attribute name="datatype" type="oval:DatatypeEnumeration" use="required"/>
+          <xsd:attribute name="comment" type="xsd:string" use="required"/>
+     </xsd:complexType>
+     <!-- =============================================================================== -->
+     <!-- =================================  SIGNATURE  ================================= -->
+     <!-- =============================================================================== -->
+     <!--
+		The signature element is defined by the xmldsig schema.  Please refer to that
+		documentation for a description of the valid elements and types.  More
+		information about the official W3C Recommendation regarding XML digital
+		signatures can be found at http://www.w3.org/TR/xmldsig-core/.
+	-->
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/oval-variables-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/results_to_html.xsl
===================================================================
--- trunk/ovaldi/xml/results_to_html.xsl	                        (rev 0)
+++ trunk/ovaldi/xml/results_to_html.xsl	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,677 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+****************************************************************************************
+ Copyright (c) 2002-2008, The MITRE Corporation
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are
+ permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this list
+       of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice, this 
+       list of conditions and the following disclaimer in the documentation and/or other
+       materials provided with the distribution.
+     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+       used to endorse or promote products derived from this software without specific 
+       prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
+ SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+ TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+****************************************************************************************
+	
+	AUTHOR:Matt Burton, The Mitre Corporation 
+	DATE: 02 May 2005 
+	
+	Modified by Loren Bandiera, MMG Security
+   	   * Updating for v5 results
+	DATE: 10 May 2006
+	
+	Reimplemented by Jon Baker, The Mitre Corporation 
+	DATE: 12 October 2006 
+
+	Modified by Vladimir Giszpenc, DSCI Contractor Supporting CERDEC S&TCD IAD
+   	   * Allowing for references other than CVE such as Red Hat patches
+	DATE: 18 May 2007
+
+	Modified by Vladimir Giszpenc, DSCI Contractor Supporting CERDEC S&TCD IAD
+   	   * Added some aggregate data in the Systems Analysed section
+	DATE: 20 Aug 2007
+
+	The results_to_html stylesheet converts an OVAL Results document into a more readable html format.
+	General information about the source of the OVAL Definitions being reported on, and the OVAL Results
+	producer is displayed. Next general information about each system analyzed is presented including a 
+	table or result information. The table displays true results then all other results sorted in
+	descending order by result. If the OVAL Results document has results for multiple systems a set
+	of links will be generated near the top of the resulting html to allow users to easily jump to the 
+	each system's results.
+	
+-->
+<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5"
+	xmlns:oval-res="http://oval.mitre.org/XMLSchema/oval-results-5" xmlns:oval-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5"
+	xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:apache-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#apache"
+	xmlns:ind-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:windows-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#windows"
+	xmlns:unix-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix" xmlns:linux-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
+	<xsl:output method="html" indent="yes" omit-xml-declaration="yes"/>
+
+	<xsl:key name="definition-index" use="@id" match="/oval-res:oval_results/oval-def:oval_definitions/oval-def:definitions/oval-def:definition"/>
+
+	<!-- Style declarations for pretty formatting -->
+	<xsl:template name="oval_res_style">
+		<style type="text/css">
+
+TD.title {BACKGROUND-COLOR: #000000; COLOR: #ffc; TEXT-ALIGN: left; font: bold 12pt/14pt "Arial"} 
+TD.label {BACKGROUND-COLOR: #99cc99; font: 10pt/12pt "Arial"}
+TD.label2 {font: bold 10pt/14pt "Arial"}
+TD.text {font: 10pt/12pt "Arial"}
+
+.trueA{background-color: #FFBC8F; font: 10pt/12pt "Arial"}
+.trueB{background-color: #FFE0CC; font: 10pt/12pt "Arial"}
+				
+.falseA{background-color: #ACD685; font: 10pt/12pt "Arial"}
+.falseB{background-color: #CBE6B3; font: 10pt/12pt "Arial"}
+				
+.unknownA{background-color: #AEC8E0; font: 10pt/12pt "Arial"}
+.unknownB{background-color: #DAE6F1; font: 10pt/12pt "Arial"}
+				
+.errorA{background-color: #FFDD75; font: 10pt/12pt "Arial"}
+.errorB{background-color: #FFECB3; font: 10pt/12pt "Arial"}
+				
+.naA{background-color: #EEEEEE; font: 10pt/12pt "Arial"}
+.naB{background-color: #FFFFFF; font: 10pt/12pt "Arial"}
+				
+.neA{background-color: #EEEEEE; font: 10pt/12pt "Arial"}
+.neB{background-color: #FFFFFF; font: 10pt/12pt "Arial"}
+
+		</style>
+	</xsl:template>
+	
+	<xsl:template name="ResultColorTable">
+		<table border="0" cellspacing="0" cellpadding="0">
+			<tr>
+				<td>&#160;&#160;&#160;</td>
+				<td>
+					<!--<td class="label2">Result Color Key:&#160;&#160;</td>-->
+					<table border="1" cellpadding="0" cellspacing="0">
+						<tr>
+							<td class="trueA" width="10">&#160;</td>
+							<td class="trueB" width="10">&#160;</td>
+							<td class="text">&#160;True&#160;&#160;</td>
+						</tr>
+					</table>
+				</td>
+				<td>&#160;&#160;&#160;</td>
+				<td>
+				<table border="1" cellpadding="0" cellspacing="0">
+					<tr>
+						<td class="falseA" width="10">&#160;</td>
+						<td class="falseB" width="10">&#160;</td>
+						<td class="text">&#160;False&#160;&#160;</td>
+					</tr>
+				</table>
+				</td>
+				<td>&#160;&#160;&#160;</td>
+				<td>
+					<table border="1" cellpadding="0" cellspacing="0">
+						<tr>
+							<td class="errorA" width="10">&#160;</td>
+							<td class="errorB" width="10">&#160;</td>
+							<td class="text">&#160;Error&#160;&#160;</td>
+						</tr>
+					</table>
+				</td>
+				<td>&#160;&#160;&#160;</td>
+				<td>
+					<table border="1" cellpadding="0" cellspacing="0">
+						<tr>
+							<td class="unknownA" width="10">&#160;</td>
+							<td class="unknownB" width="10">&#160;</td>
+							<td class="text">&#160;Unknown&#160;&#160;</td>
+						</tr>
+					</table>
+				</td>
+				<td>&#160;&#160;&#160;</td>
+				<td>
+					<table border="1" cellpadding="0" cellspacing="0">
+						<tr>
+							<td class="naA" width="10">&#160;</td>
+							<td class="naB" width="10">&#160;</td>
+							<td class="text">&#160;Not Applicable&#160;&#160;</td>
+						</tr>
+					</table>
+				</td>
+				<td>&#160;&#160;&#160;</td>
+				<td>
+					<table border="1" cellpadding="0" cellspacing="0">
+						<tr>
+							<td class="neA" width="10">&#160;</td>
+							<td class="neB" width="10">&#160;</td>
+							<td class="text">&#160;Not Evaluated&#160;&#160;</td>	
+						</tr>
+					</table>
+				</td>
+			</tr>
+		</table>
+	</xsl:template>
+
+	<!-- Gets the top level node -->
+	<xsl:template match="oval-res:oval_results">
+		<html>
+			<head>
+				<title>OVAL Results</title>
+				<!-- Get stylesheet -->
+				<xsl:call-template name="oval_res_style"/>
+			</head>
+			<body>
+								
+				<!-- display results and definition generator information -->
+				<table border="1" cellpadding="0" cellspacing="0" width="100%">
+					<tr>
+						<td width="50%">
+							<xsl:call-template name="ResultGenerator">
+								<xsl:with-param name="generatorElm" select="./oval-res:generator"/>
+							</xsl:call-template>
+						</td>
+						<td width="50%">
+							<xsl:call-template name="DefGenerator">
+								<xsl:with-param name="generatorElm" select="./oval-def:oval_definitions/oval-def:generator"/>
+							</xsl:call-template>
+						</td>
+					</tr>
+				</table>
+				<br/>
+
+				<!-- 
+					create anchors to each system in the results file
+					if only one systen leave out the anchors
+				-->
+				<!-- 2007-08-20 Added aggregate result detail-->
+				<xsl:if test="not(count(./oval-res:results/oval-res:system) = 1)">
+					<table border="1" cellpadding="0" cellspacing="0">
+						<tr>
+							<td class="title" colspan="7">Systems Analyzed</td>
+						</tr>
+						<!-- display the result color coding table -->
+						<tr><td colspan="7"><xsl:call-template name="ResultColorTable"/></td></tr>
+						
+						<tr>
+							<td class="label" align="center">System</td>
+							<td class="label" align="center">Trues</td>
+							<td class="label" align="center">Falses</td>
+							<td class="label" align="center">Errors</td>
+							<td class="label" align="center">Unknown</td>
+							<td class="label" align="center">Not Applicables</td>
+							<td class="label" align="center">Not Evaluateds</td>
+						</tr>
+						<xsl:for-each select="./oval-res:results/oval-res:system">
+							<tr>
+								<td class="label">
+									<a href="#{position()}">
+										<xsl:value-of select="./oval-sc:oval_system_characteristics/oval-sc:system_info/oval-sc:primary_host_name"/>
+									</a>
+								</td>
+								<td width="10">
+									<xsl:choose>
+										<xsl:when test="position() mod 2 = 1">
+											<xsl:attribute name="class">trueA</xsl:attribute>	
+										</xsl:when>
+										<xsl:when test="position() mod 2 = 0">
+											<xsl:attribute name="class">trueB</xsl:attribute>
+										</xsl:when>
+									</xsl:choose>
+									<xsl:value-of select="count(./oval-res:definitions/oval-res:definition[@result='true'])"/>
+								</td>
+								<td width="10">
+									<xsl:choose>
+										<xsl:when test="position() mod 2 = 1">
+											<xsl:attribute name="class">falseA</xsl:attribute>	
+										</xsl:when>
+										<xsl:when test="position() mod 2 = 0">
+											<xsl:attribute name="class">falseB</xsl:attribute>
+										</xsl:when>
+									</xsl:choose>
+									<xsl:value-of select="count(./oval-res:definitions/oval-res:definition[@result='false'])"/>
+								</td>
+								<td width="10">
+									<xsl:choose>
+										<xsl:when test="position() mod 2 = 1">
+											<xsl:attribute name="class">errorA</xsl:attribute>	
+										</xsl:when>
+										<xsl:when test="position() mod 2 = 0">
+											<xsl:attribute name="class">errorB</xsl:attribute>
+										</xsl:when>
+									</xsl:choose>
+									<xsl:value-of select="count(./oval-res:definitions/oval-res:definition[@result='error'])"/>
+								</td>
+								<td width="10">
+									<xsl:choose>
+										<xsl:when test="position() mod 2 = 1">
+											<xsl:attribute name="class">unknownA</xsl:attribute>	
+										</xsl:when>
+										<xsl:when test="position() mod 2 = 0">
+											<xsl:attribute name="class">unknownB</xsl:attribute>
+										</xsl:when>
+									</xsl:choose>
+									<xsl:value-of select="count(./oval-res:definitions/oval-res:definition[@result='unknown'])"/>
+								</td>
+								<td width="10">
+									<xsl:choose>
+										<xsl:when test="position() mod 2 = 1">
+											<xsl:attribute name="class">naA</xsl:attribute>	
+										</xsl:when>
+										<xsl:when test="position() mod 2 = 0">
+											<xsl:attribute name="class">naB</xsl:attribute>
+										</xsl:when>
+									</xsl:choose>
+									<xsl:value-of select="count(./oval-res:definitions/oval-res:definition[@result='not applicable'])"/>
+								</td>
+								<td width="10">
+									<xsl:choose>
+										<xsl:when test="position() mod 2 = 1">
+											<xsl:attribute name="class">neA</xsl:attribute>	
+										</xsl:when>
+										<xsl:when test="position() mod 2 = 0">
+											<xsl:attribute name="class">neB</xsl:attribute>
+										</xsl:when>
+									</xsl:choose>
+									<xsl:value-of select="count(./oval-res:definitions/oval-res:definition[@result='not evaluated'])"/>
+								</td>
+							</tr>
+							<!-- 2007-08-20 Added aggregate result detail-->
+						</xsl:for-each>
+					</table>
+					<br/>
+				</xsl:if>
+
+				<!-- 
+					for each system in the results file
+					 - display system info
+					 - display the sc generator
+					 - display results table
+				-->
+				<xsl:for-each select="./oval-res:results/oval-res:system">
+					<!-- display the system info data -->
+					<xsl:call-template name="SystemInfo">
+						<xsl:with-param name="sysInfoElm" select="./oval-sc:oval_system_characteristics/oval-sc:system_info"/>
+					</xsl:call-template>
+
+					<!-- display the generator info for the sc data -->
+					<xsl:call-template name="SCGenerator">
+						<xsl:with-param name="generatorElm" select="./oval-sc:oval_system_characteristics/oval-sc:generator"/>
+					</xsl:call-template>
+
+					<!-- display definition results -->
+					<xsl:call-template name="DefinitionsResults">
+						<xsl:with-param name="definitionsElm" select="./oval-res:definitions"/>
+					</xsl:call-template>
+				</xsl:for-each>
+			</body>
+		</html>
+	</xsl:template>
+
+	<!-- Get the system_info and put it into a table. -->
+	<xsl:template name="SystemInfo">
+		<xsl:param name="sysInfoElm"/>
+		<table border="1" cellspacing="0" cellpaddign="2" width="100%" bgcolor="#cccccc">
+			<tr>
+				<td class="title" colspan="2">
+					<a name="{position()}">System Information</a>
+				</td>
+			</tr>
+			<tr>
+				<td class="label2" width="20%">Host Name</td>
+				<td class="text" width="80%"><xsl:value-of select="$sysInfoElm/child::oval-sc:primary_host_name/text()"/>&#160;</td>
+				<!-- $#160; is used to keep empty cells in the table clean -->
+			</tr>
+			<tr>
+				<td class="label2" width="20%">Operating System</td>
+				<td class="text" width="80%"><xsl:value-of select="$sysInfoElm/child::oval-sc:os_name/text()"/>&#160;</td>
+			</tr>
+			<tr>
+				<td class="label2" width="20%">Operating System Version</td>
+				<td class="text" width="80%"><xsl:value-of select="$sysInfoElm/child::oval-sc:os_version/text()"/>&#160;</td>
+			</tr>
+			<tr>
+				<td class="label2" width="20%">Architecture</td>
+				<td class="text" width="80%"><xsl:value-of select="$sysInfoElm/child::oval-sc:architecture/text()"/>&#160;</td>
+			</tr>
+			<tr>
+				<td class="label2" width="20%">Interfaces</td>
+				<td width="80%">
+					<xsl:call-template name="Interfaces">
+						<xsl:with-param name="iterfacesElm" select="$sysInfoElm[1]/oval-sc:interfaces"/>
+					</xsl:call-template>
+				</td>
+			</tr>
+		</table>
+	</xsl:template>
+
+	<!-- Get this interface and put it into the table, using templates to loop through all possible interfaces -->
+	<xsl:template name="Interfaces">
+		<xsl:param name="iterfacesElm"/>
+
+		<xsl:for-each select="$iterfacesElm/oval-sc:interface">
+			<xsl:if test="position() mod 2 = 1">
+				<table border="1" cellpadding="1" cellspacing="0" width="100%" bgcolor="ffffff">
+					<tr>
+						<td class="label2" width="20%">Interface Name</td>
+						<td class="text" width="80%"><xsl:value-of select="./oval-sc:interface_name/text()"/>&#160;</td>
+					</tr>
+					<tr>
+						<td class="label2" width="20%">IP Address</td>
+						<td class="text" width="80%"><xsl:value-of select="./oval-sc:ip_address/text()"/>&#160;</td>
+					</tr>
+					<tr>
+						<td class="label2" width="20%">MAC Address</td>
+						<td class="text" width="80%"><xsl:value-of select="./oval-sc:mac_address/text()"/>&#160;</td>
+					</tr>
+				</table>
+			</xsl:if>
+			<xsl:if test="position() mod 2 = 0">
+				<table border="1" cellpadding="1" cellspacing="0" width="100%" bgcolor="eeeeee">
+					<tr>
+						<td class="label2" width="20%">Interface Name</td>
+						<td class="text" width="80%"><xsl:value-of select="./oval-sc:interface_name/text()"/>&#160;</td>
+					</tr>
+					<tr>
+						<td class="label2" width="20%">IP Address</td>
+						<td class="text" width="80%"><xsl:value-of select="./oval-sc:ip_address/text()"/>&#160;</td>
+					</tr>
+					<tr>
+						<td class="label2" width="20%">MAC Address</td>
+						<td class="text" width="80%"><xsl:value-of select="./oval-sc:mac_address/text()"/>&#160;</td>
+					</tr>
+				</table>
+			</xsl:if>
+		</xsl:for-each>
+	</xsl:template>
+
+	<!-- Create a table for the Result Generator and call its children. -->
+	<xsl:template name="ResultGenerator">
+		<xsl:param name="generatorElm"/>
+		<table border="1" cellspacing="0" cellpaddign="2" width="100%" bgcolor="#cccccc">
+			<tr>
+				<td class="title" colspan="5">OVAL Results Generator Information</td>
+			</tr>
+			<tr>
+				<td class="label" nowrap="nowrap">Schema Version</td>
+				<td class="label" nowrap="nowrap">Product Name</td>
+				<td class="label" nowrap="nowrap">Product Version</td>
+				<td class="label">Date</td>
+				<td class="label">Time</td>
+			</tr>
+			<xsl:call-template name="Generator">
+				<xsl:with-param name="generatorElm" select="$generatorElm"/>
+			</xsl:call-template>
+		</table>
+	</xsl:template>
+
+	<!-- Create a table for the System Characteristics Generator and call its children. -->
+	<xsl:template name="SCGenerator">
+		<xsl:param name="generatorElm"/>
+		<table border="1" cellspacing="0" cellpaddign="2" width="100%" bgcolor="#cccccc">
+			<tr>
+				<td class="title" colspan="5">OVAL System Characteristics Generator Information</td>
+			</tr>
+			<tr>
+				<td class="label">Schema Version</td>
+				<td class="label">Product Name</td>
+				<td class="label">Product Version</td>
+				<td class="label">Date</td>
+				<td class="label">Time</td>
+			</tr>
+			<xsl:call-template name="Generator">
+				<xsl:with-param name="generatorElm" select="$generatorElm"/>
+			</xsl:call-template>
+		</table>
+	</xsl:template>
+
+	<!-- Create a table for the Definitions Generator and call its children. -->
+	<xsl:template name="DefGenerator">
+		<xsl:param name="generatorElm"/>
+		<table border="1" cellspacing="0" cellpaddign="2" width="100%" bgcolor="#cccccc">
+			<tr>
+				<td class="title" colspan="5">OVAL Definition Generator Information</td>
+			</tr>
+			<tr>
+				<td class="label" nowrap="nowrap">Schema Version</td>
+				<td class="label" nowrap="nowrap">Product Name</td>
+				<td class="label" nowrap="nowrap">Product Version</td>
+				<td class="label">Date</td>
+				<td class="label">Time</td>
+			</tr>
+			<xsl:call-template name="Generator">
+				<xsl:with-param name="generatorElm" select="$generatorElm"/>
+			</xsl:call-template>
+		</table>
+	</xsl:template>
+
+	<!-- Each child of Generators (oval, system_characteristics, results) is the same, this template gets their children. -->
+	<xsl:template name="Generator">
+		<xsl:param name="generatorElm"/>
+		<xsl:variable name="MessyNumber" select="string($generatorElm/oval:timestamp)"/>
+		<td class="text"><xsl:value-of select="$generatorElm/oval:schema_version"/>&#160;</td>
+		<td class="text"><xsl:value-of select="$generatorElm/oval:product_name"/>&#160;</td>
+		<td class="text"><xsl:value-of select="$generatorElm/oval:product_version"/>&#160;</td>
+		<td class="text">
+			<!--Create variable "MessyNumber" to make time stamp a string and then print it out in a readable version -->
+			<xsl:value-of select="substring($MessyNumber, 1, 4)"/>
+			<!-- year -->
+			<xsl:text>-</xsl:text>
+			<xsl:value-of select="substring($MessyNumber, 6, 2)"/>
+			<!-- month -->
+			<xsl:text>-</xsl:text>
+			<xsl:value-of select="substring($MessyNumber, 9, 2)"/>
+			<!-- day -->
+		</td>
+		<td class="text">
+			<xsl:value-of select="substring($MessyNumber, 12, 2)"/>
+			<xsl:text>:</xsl:text>
+			<!-- hour -->
+			<xsl:value-of select="substring($MessyNumber, 15, 2)"/>
+			<xsl:text>:</xsl:text>
+			<!-- minute -->
+			<xsl:value-of select="substring($MessyNumber, 18, 2)"/>&#160; <!-- second -->
+		</td>
+	</xsl:template>
+
+	<xsl:template name="DefinitionsResults">
+		<xsl:param name="definitionsElm"/>
+		<table border="1" cellspacing="0" cellpaddign="2" width="100%">
+			<tr>
+				<td class="title" colspan="7">OVAL Definition Results</td>
+			</tr>
+			<!-- display the result color coding table -->
+			<tr><td colspan="7"><xsl:call-template name="ResultColorTable"/></td></tr>
+			
+			<tr>
+				<td class="label" align="center">ID</td>
+				<td class="label" align="center">Result</td>
+				<td class="label" align="center">Class</td>
+				<td class="label" align="center">Reference ID</td>
+				<td class="label" align="center">Title</td>
+			</tr>
+
+			<!-- 
+				Process true results then all others
+			<xsl:for-each select="$definitionsElm/oval-res:definition[@result = 'true']">
+				<xsl:sort select="@result" data-type="text" order="descending"/>
+				<xsl:call-template name="Definition">
+					<xsl:with-param name="definitionElm" select="."/>
+				</xsl:call-template>
+			</xsl:for-each>
+			<xsl:for-each select="$definitionsElm/oval-res:definition[@result != 'true']">
+				<xsl:sort select="@result" data-type="text" order="descending"/>
+				<xsl:call-template name="Definition">
+					<xsl:with-param name="definitionElm" select="."/>
+				</xsl:call-template>
+			</xsl:for-each>
+			-->
+			
+			<!-- 
+				Process all results in descending order by result attribute then definition id 
+			<xsl:for-each select="$definitionsElm/oval-res:definition">
+				<xsl:sort select="@result" data-type="text" order="descending"/>
+				<xsl:sort select="@id" data-type="text" order="descending"/>
+				<xsl:call-template name="Definition">
+					<xsl:with-param name="definitionElm" select="."/>
+				</xsl:call-template>
+			</xsl:for-each>
+			-->
+			
+			
+			<!-- 
+				select the definitions with the desired result
+				sort them by their class
+				display them 
+			-->
+			
+			<!-- process true results -->
+			<xsl:for-each select="$definitionsElm/oval-res:definition[@result='true']">
+				<xsl:sort select="@id" data-type="text" order="descending"/>
+				<xsl:call-template name="Definition">
+					<xsl:with-param name="definitionElm" select="."/>
+				</xsl:call-template>
+			</xsl:for-each>
+			
+			<!-- process unknown results -->
+			<xsl:for-each select="$definitionsElm/oval-res:definition[@result='unknown']">
+				<xsl:sort select="@id" data-type="text" order="descending"/>
+				<xsl:call-template name="Definition">
+					<xsl:with-param name="definitionElm" select="."/>
+				</xsl:call-template>
+			</xsl:for-each>
+			
+			<!-- process error results -->
+			<xsl:for-each select="$definitionsElm/oval-res:definition[@result='error']">
+				<xsl:sort select="@id" data-type="text" order="descending"/>
+				<xsl:call-template name="Definition">
+					<xsl:with-param name="definitionElm" select="."/>
+				</xsl:call-template>
+			</xsl:for-each>
+			
+			<!-- process not evaluated results -->
+			<xsl:for-each select="$definitionsElm/oval-res:definition[@result='not evaluated']">
+				<xsl:sort select="@id" data-type="text" order="descending"/>
+				<xsl:call-template name="Definition">
+					<xsl:with-param name="definitionElm" select="."/>
+				</xsl:call-template>
+			</xsl:for-each>
+			
+			<!-- process false results -->
+			<xsl:for-each select="$definitionsElm/oval-res:definition[@result='false']">
+				<xsl:sort select="@id" data-type="text" order="descending"/>
+				<xsl:call-template name="Definition">
+					<xsl:with-param name="definitionElm" select="."/>
+				</xsl:call-template>
+			</xsl:for-each>
+			
+			<!-- process not applicable results -->
+			<xsl:for-each select="$definitionsElm/oval-res:definition[@result='not applicable']">
+				<xsl:sort select="@id" data-type="text" order="descending"/>
+				<xsl:call-template name="Definition">
+					<xsl:with-param name="definitionElm" select="."/>
+				</xsl:call-template>
+			</xsl:for-each>
+
+		</table>
+	</xsl:template>
+
+	<xsl:template name="Definition">
+		<xsl:param name="definitionElm"/>
+		<tr>
+			<!-- set results to alternating colors -->
+			<xsl:choose>
+				<xsl:when test="$definitionElm/@result  = 'true' and position() mod 2 = 1">
+					<xsl:attribute name="class">trueA</xsl:attribute>	
+				</xsl:when>
+				<xsl:when test="$definitionElm/@result  = 'true' and position() mod 2 = 0">
+					<xsl:attribute name="class">trueB</xsl:attribute>
+				</xsl:when>
+				<xsl:when test="$definitionElm/@result  = 'false' and position() mod 2 = 1">
+					<xsl:attribute name="class">falseA</xsl:attribute>
+				</xsl:when>
+				<xsl:when test="$definitionElm/@result  = 'false' and position() mod 2 = 0">
+					<xsl:attribute name="class">falseB</xsl:attribute>
+				</xsl:when>
+				<xsl:when test="$definitionElm/@result  = 'unknown' and position() mod 2 = 1">
+					<xsl:attribute name="class">unknownA</xsl:attribute>
+				</xsl:when>
+				<xsl:when test="$definitionElm/@result  = 'unknown' and position() mod 2 = 0">
+					<xsl:attribute name="class">unknownB</xsl:attribute>
+				</xsl:when>
+				<xsl:when test="$definitionElm/@result  = 'error' and position() mod 2 = 1">
+					<xsl:attribute name="class">errorA</xsl:attribute>				
+				</xsl:when>
+				<xsl:when test="$definitionElm/@result  = 'error' and position() mod 2 = 0">
+					<xsl:attribute name="class">errorB</xsl:attribute>
+				</xsl:when>
+				<xsl:when test="$definitionElm/@result  = 'not applicable' and position() mod 2 = 1">
+					<xsl:attribute name="class">naA</xsl:attribute>				
+				</xsl:when>
+				<xsl:when test="$definitionElm/@result  = 'not applicable' and position() mod 2 = 0">
+					<xsl:attribute name="class">naB</xsl:attribute>
+				</xsl:when>
+				<xsl:when test="$definitionElm/@result  = 'not evaluated' and position() mod 2 = 1">
+					<xsl:attribute name="class">neA</xsl:attribute>				
+				</xsl:when>
+				<xsl:when test="$definitionElm/@result  = 'not evaluated' and position() mod 2 = 0">
+					<xsl:attribute name="class">neB</xsl:attribute>
+				</xsl:when>
+			</xsl:choose>
+
+			<!-- id -->
+			<xsl:variable name="idUrl" select="concat('http://oval.mitre.org/repository/data/getDef?id=', $definitionElm/@definition_id)"/>
+			<td class="text" align="center">				
+				<a>
+					<xsl:attribute name="target">_blank</xsl:attribute>
+					<xsl:attribute name="href">
+						<xsl:value-of select="$idUrl"/>
+					</xsl:attribute>
+					<xsl:value-of select="$definitionElm/@definition_id"/>
+				</a>
+			</td>
+
+			<!-- result -->
+			<td class="text" align="center">
+				<xsl:value-of select="$definitionElm/@result"/>
+			</td>
+
+			<!-- Class -->
+			<td class="text" align="center">
+				<xsl:for-each select="key('definition-index', @definition_id)">
+					<xsl:value-of select="@class"/>
+				</xsl:for-each>
+			</td>
+
+			<!-- reference id -->
+			<td class="text" align="center">
+				<xsl:for-each select="key('definition-index', @definition_id)">
+					<xsl:for-each select="oval-def:metadata/oval-def:reference">
+						<a>
+							<xsl:attribute name="target">_blank</xsl:attribute>
+							<xsl:attribute name="href"><xsl:value-of select="@ref_url"/></xsl:attribute>
+							<xsl:value-of select="@ref_id"/>
+						</a>
+					</xsl:for-each>&#160;
+				</xsl:for-each>&#160;
+			</td>
+
+			<!-- title -->
+			<td class="text">
+				<xsl:for-each select="key('definition-index', @definition_id)">
+					<xsl:value-of select="oval-def:metadata/oval-def:title"/>
+				</xsl:for-each>&#160;
+			</td>
+		</tr>
+	</xsl:template>
+</xsl:stylesheet>


Property changes on: trunk/ovaldi/xml/results_to_html.xsl
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/solaris-definitions-schema.xsd
===================================================================
--- trunk/ovaldi/xml/solaris-definitions-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/solaris-definitions-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,684 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:sol-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#solaris" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-definitions-5#solaris" elementFormDefault="qualified" version="5.4">
+      <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-definitions-5" schemaLocation="oval-definitions-schema.xsd"/>
+      <xsd:annotation>
+            <xsd:documentation>The following is a description of the elements, types, and attributes that compose the Solaris specific tests found in Open Vulnerability and Assessment Language (OVAL). Each test is an extension of the standard test element defined in the Core Definition Schema. Through extension, each test inherits a set of elements and attributes that are shared amongst all OVAL tests. Each test is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core Definition Schema is not outlined here.</xsd:documentation>
+            <xsd:documentation>The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+            <xsd:appinfo>
+                  <schema>Solaris Definition</schema>
+                  <version>5.4</version>
+                  <date>4/1/2008 10:41:45 AM</date>
+                  <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                  <sch:title>schematron validation of the Solaris portion of an OVAL Definitions file</sch:title>
+                  <sch:ns prefix="oval-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5"/>
+                  <sch:ns prefix="sol-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5#solaris"/>
+                  <sch:ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/>
+            </xsd:appinfo>
+      </xsd:annotation>
+      <!-- =============================================================================== -->
+      <!-- ===============================  ISAINFO TEST  ================================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="isainfo_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The isainfo test reveals information about the instruction set architectures. This information can be retrieved by the isainfo command. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an isainfo_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:documentation>The isainfo_test was originally developed by Robert L. Hollis at ThreatGuard, Inc. Many thanks for their support of the OVAL project.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="isainfotst">
+                              <sch:rule context="sol-def:isainfo_test/sol-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/sol-def:smf_object/@id">
+                                          <sch:value-of select="../@id"/> - the object child element of an isainfo_test must reference an isainfo_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="sol-def:isainfo_test/sol-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/sol-def:smf_state/@id">
+                                          <sch:value-of select="../@id"/> - the state child element of an isainfo_test must reference an isainfo_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="isainfo_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The isainfo_object element is used by an isainfo test to define those objects to evaluated based on a specified state. There is actually only one object relating to isainfo and this is the system as a whole. Therefore, there are no child entities defined. Any OVAL Test written to check isainfo will reference the same isainfo_object which is basically an empty object element.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType"/>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="isainfo_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The isainfo_state element defines the information about the instruction set architectures. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="bits" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the number of bits in the address space of the native instruction set (isainfo -b).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="isastebits">
+                                                            <sch:rule context="sol-def:isainfo_state/sol-def:bits">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the bits entity of an isainfo_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="kernel_isa" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the name of the instruction set used by kernel components (isainfo -k).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="isastekernel_isa">
+                                                            <sch:rule context="sol-def:isainfo_state/sol-def:kernel_isa">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the kernel_isa entity of an isainfo_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="application_isa" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the name of the instruction set used by portable applications (isainfo -n).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="isasteapplication_isa">
+                                                            <sch:rule context="sol-def:isainfo_state/sol-def:application_isa">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the application_isa entity of an isainfo_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ===============================  PACKAGE TEST  ================================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="package_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The package test is used to check information associated with different packages installed on the system. The information used by this test is modeled after the /usr/bin/pkginfo command. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an inetd_object and the optional state element specifies the information to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="packagetst">
+                              <sch:rule context="sol-def:package_test/sol-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/sol-def:package_object/@id">
+                                          <sch:value-of select="../@id"/> - the object child element of a package_test must reference a package_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="sol-def:package_test/sol-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/sol-def:package_state/@id">
+                                          <sch:value-of select="../@id"/> - the state child element of a package_test must reference a package_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="package_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The package_object element is used by a package test to define the packages to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>A package object consists of a single pkginst entity that identifies the package to be used.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="pkginst" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The pkginst entity is a string that represents a package designation by its instance. An instance can be the package abbreviation or a specific instance (for example, inst.1 or inst.2).</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="packageobjpkginst">
+                                                                        <sch:rule context="sol-def:package_object/sol-def:pkginst">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the pkginst entity of a package_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="package_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The package_state element defines the different information associated with packages installed on the system. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="pkginst" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The pkginst entity is a string that represents a package designation by its instance. An instance can be the package abbreviation or a specific instance (for example, inst.1 or inst.2).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="packagestepkginst">
+                                                            <sch:rule context="sol-def:package_state/sol-def:pkginst">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the pkginst entity of a package_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The name entity is a text string that specifies a full package name.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="packagestename">
+                                                            <sch:rule context="sol-def:package_state/sol-def:name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the name entity of a package_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="category" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The category entity is a string in the form of a comma-separated list of categories under which a package may be displayed. Note that a package must at least belong to the system or application category. Categories are case-insensitive and may contain only alphanumerics. Each category is limited in length to 16 characters.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="packagestecategory">
+                                                            <sch:rule context="sol-def:package_state/sol-def:category">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the category entity of a package_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="version" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The version entity is a text string that specifies the current version associated with the software package. The maximum length is 256 ASCII characters and the first character cannot be a left parenthesis. Current Solaris software practice is to assign this parameter monotonically increasing Dewey decimal values of the form: major_revision.minor_revision[.micro_revision] where all the revision fields are integers. The versioning fields can be extended to an arbitrary string of numbers in Dewey-decimal format, if necessary.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="packagesteversion">
+                                                            <sch:rule context="sol-def:package_state/sol-def:version">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the version entity of a package_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="vendor" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The vendor entity is a string used to identify the vendor that holds the software copyright (maximum length of 256 ASCII characters).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="packagestevendor">
+                                                            <sch:rule context="sol-def:package_state/sol-def:vendor">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the vendor entity of a package_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="description" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The description entity is a string that represents a more in-depth description of a package.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="packagestedescription">
+                                                            <sch:rule context="sol-def:package_state/sol-def:description">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the description entity of a package_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ================================  PATCH TEST  ================================= -->
+      <!-- =============================================================================== -->
+      <xsd:element name="patch54_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The patch test is used to check information associated with different patches installed on the system. The information being tested is based off the /usr/bin/showrev -p command. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an inetd_object and the optional state element specifies the information to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="patch54tst">
+                              <sch:rule context="sol-def:patch54_test/sol-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/sol-def:patch54_object/@id">
+                                          <sch:value-of select="../@id"/> - the object child element of a patch54_test must reference a patch54_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="sol-def:patch54_test/sol-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/sol-def:patch_state/@id">
+                                          <sch:value-of select="../@id"/> - the state child element of a patch54_test must reference a patch_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="patch_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>This test has been deprecated and will be removed in version 6.0 of the language. Recommend use of the newer patch54_test.</xsd:documentation>
+                  <xsd:documentation>The patch test is used to check information associated with different patches installed on the system. The information being tested is based off the /usr/bin/showrev -p command. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an inetd_object and the optional state element specifies the information to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="patchtst">
+                              <sch:rule context="sol-def:patch_test/sol-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/sol-def:patch_object/@id">
+                                          <sch:value-of select="../@id"/> - the object child element of a patch_test must reference a patch_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="sol-def:patch_test/sol-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/sol-def:patch_state/@id">
+                                          <sch:value-of select="../@id"/> - the state child element of a patch_test must reference a patch_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="patch54_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The patch54_object element is used by a patch test to define the specific patch to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>A patch object consists of a base entity that identifies the patch to be used, and a version entity that represent the patch revision number.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="behaviors" type="sol-def:PatchBehaviors" minOccurs="0" maxOccurs="1"/>
+                                                <xsd:element name="base" type="oval-def:EntityObjectIntType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>Patches are identified by unique alphanumeric strings, with the patch base code first, a hyphen, and a number that represents the patch revision number.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="patch54objbase">
+                                                                        <sch:rule context="sol-def:patch54_object/sol-def:base">
+                                                                              <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the base entity of a patch54_object should be 'int'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="version" type="oval-def:EntityObjectIntType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>Patches are identified by unique alphanumeric strings, with the patch base code first, a hyphen, and a number that represents the patch revision number.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="patch54objversion">
+                                                                        <sch:rule context="sol-def:patch54_object/sol-def:version">
+                                                                              <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the version entity of a patch54_object should be 'int'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="patch_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>This object has been deprecated and will be removed in version 6.0 of the language. Recommend use of the newer patch54_object.</xsd:documentation>
+                  <xsd:documentation>The patch_object element is used by a patch test to define the specific patch to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>A patch object consists of a single base entity that identifies the patch to be used.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="base" type="oval-def:EntityObjectIntType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>Patches are identified by unique alphanumeric strings, with the patch base code first, a hyphen, and a number that represents the patch revision number.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="patchobjbase">
+                                                                        <sch:rule context="sol-def:patch_object/sol-def:base">
+                                                                              <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the base entity of a patch_object should be 'int'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="patch_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The patch_state element defines the different information associated with a specific patch installed on the system. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="base" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The base entity reresents a patch base code found before the hyphen.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="patchstebase">
+                                                            <sch:rule context="sol-def:patch_state/sol-def:base">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the base entity of a patch_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="version" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The version entity represents a patch version number found after the hyphen</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="patchsteversion">
+                                                            <sch:rule context="sol-def:patch_state/sol-def:version">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the version entity of a patch_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:complexType name="PatchBehaviors">
+            <xsd:annotation>
+                  <xsd:documentation>These behaviors allow a more detailed definition of the patch_object being specified.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:attribute name="supersedence" use="optional" default="false">
+                  <xsd:annotation>
+                        <xsd:documentation>'supersedence' specifies that the object should also match any superseding patches to the one being specified. In other words, if set to True the resulting object set would be the original patch specified plus any superseding patches. The default value is 'false' meaning the object should only match the specified patch.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:boolean"/>
+                  </xsd:simpleType>
+            </xsd:attribute>
+      </xsd:complexType>
+      <!-- =============================================================================== -->
+      <!-- =================================  SMF TEST  ================================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="smf_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The smf_test is used to check service management facility controlled services including traditional unix rc level start/kill scrips and inetd daemon services. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a smf_object and the optional state element specifies the information to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="smftst">
+                              <sch:rule context="sol-def:smf_test/sol-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/sol-def:smf_object/@id">
+                                          <sch:value-of select="../@id"/> - the object child element of a smf_test must reference a smf_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="sol-def:smf_test/sol-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/sol-def:smf_state/@id">
+                                          <sch:value-of select="../@id"/> - the state child element of a smf_test must reference a smf_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="smf_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The smf_object element is used by a smf_test to define the specific service instance to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>A smf_object consists of a service_name entity that identifies the service and a fmri entity that represents the fault management resource identifier.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="fmri" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The FMRI (Fault Managed Resource Identifier) entity is used to identify system objects for which advanced fault and resource management capabilities are provided. Services managed by SMF are assigned FMRI URIs prefixed with the scheme name "svc". FMRIs used by SMF can be expressed in three ways: first as an absolute path including a location path such as "localhost" (eg svc://localhost/system/system-log:default), second as a path relative to the local machine (eg svc:/system/system-log:default), and third as simply the service identifier with the string prefixes implied (eg system/system-log:default). For OVAL, the absolute path version (first choice) should be used.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="fmriobjbase">
+                                                                        <sch:rule context="sol-def:smf_object/sol-def:fmri">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the fmri entity of a smf_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="smf_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The smf_state element defines the different information associated with a specific smf controlled service. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="fmri" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The FMRI (Fault Managed Resource Identifier) entity describes a possible identifier associated with a service. Services managed by SMF are assigned FMRI URIs prefixed with the scheme name "svc". FMRIs used by SMF can be expressed in three ways: first as an absolute path including a location path such as "localhost" (eg svc://localhost/system/system-log:default), second as a path relative to the local machine (eg svc:/system/system-log:default), and third as simply the service identifier with the string prefixes implied (eg system/system-log:default). For OVAL, the absolute path version (first choice) should be used.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fmristebase">
+                                                            <sch:rule context="sol-def:smf_state/sol-def:fmri">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the fmri entity of a smf_object should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="service_name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The service_name entity is usually an abbreviated form of the FMRI. In the example svc://localhost/system/system-log:default, the name would be system-log.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="srvnamestebase">
+                                                            <sch:rule context="sol-def:smf_state/sol-def:service_name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the service_name entity of a smf_object should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="service_state" type="sol-def:EntityStateSmfServiceStateType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The service_state entity describes a possible state that the service may be in. Each service instance is always in a well-defined state based on its dependencies, the results of the execution of its methods, and its potential receipt of events from the contracts filesystem. The service_state values are UNINITIALIZED, OFFLINE, ONLINE, DEGRADED, MAINTENANCE, DISABLED, and LEGACY-RUN.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="srvstatestebase">
+                                                            <sch:rule context="sol-def:smf_state/sol-def:service_state">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the service_state entity of a smf_object should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="protocol" type="sol-def:EntityStateSmfProtocolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The protocol entity describes a possible protocol supported by the service. Possible values are tcp, tcp6, tcp6only, udp, udp6, and udp6only</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="protocolstebase">
+                                                            <sch:rule context="sol-def:smf_state/sol-def:protocol">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the protocol entity of a smf_object should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="server_executable" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The entity server_executable is a string representing the listening daemon on the server side. An example being 'svcprop ftp' which might show 'inetd/start/exec astring /usr/sbin/in.ftpd\ -a'</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="srvexestebase">
+                                                            <sch:rule context="sol-def:smf_state/sol-def:server_executable">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the server_executable entity of a smf_object should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="server_arguements" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The server_arguments entity describes possible parameters that are passed to the service.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="srvargsstebase">
+                                                            <sch:rule context="sol-def:smf_state/sol-def:server_arguements">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the server_arguements entity of a smf_object should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="exec_as_user" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The exec_as_user entity is a string pulled from svcprop in the following format: inetd_start/user astring root</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="execasuserstebase">
+                                                            <sch:rule context="sol-def:smf_state/sol-def:exec_as_user">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the exec_as_user entity of a smf_object should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+      <xsd:complexType name="EntityStateSmfProtocolType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityStateSmfProtocolType complex type defines the different values that are valid for the protocol entity of a smf_state. The empty string is also allowed as a valid value to support an empty element that is found when a variable reference is used within the type entity.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityStateStringType">
+                        <xsd:enumeration value="tcp">
+                              <xsd:annotation>
+                                    <xsd:documentation/>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="tcp6">
+                              <xsd:annotation>
+                                    <xsd:documentation/>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="tcp6only">
+                              <xsd:annotation>
+                                    <xsd:documentation>Request that service listen only for and pass on true IPv6 requests (not IPv4 mapped ones).</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="udp">
+                              <xsd:annotation>
+                                    <xsd:documentation/>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="udp6">
+                              <xsd:annotation>
+                                    <xsd:documentation/>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="udp6only">
+                              <xsd:annotation>
+                                    <xsd:documentation>Request that service listen only for and pass on true IPv6 requests (not IPv4 mapped ones).</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+      <xsd:complexType name="EntityStateSmfServiceStateType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityStateSmfServiceStateType complex type defines the different values that are valid for the service_state entity of a smf_state. The empty string is also allowed as a valid value to support an empty element that is found when a variable reference is used within the type entity.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityStateStringType">
+                        <xsd:enumeration value="DEGRADED">
+                              <xsd:annotation>
+                                    <xsd:documentation>The instance is enabled and running or available to run. The instance, however, is functioning at a limited capacity in comparison to normal operation.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="DISABLED">
+                              <xsd:annotation>
+                                    <xsd:documentation>The instance is disabled.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="MAINTENANCE">
+                              <xsd:annotation>
+                                    <xsd:documentation>The instance is enabled, but not able to run. Administrative action is required to restore the instance to offline and subsequent states.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="LEGACY-RUN">
+                              <xsd:annotation>
+                                    <xsd:documentation>This state represents a legacy instance that is not managed by the service management facility. Instances in this state have been started at some point, but might or might not be running.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="OFFLINE">
+                              <xsd:annotation>
+                                    <xsd:documentation>The instance is enabled, but not yet running or available to run.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ONLINE">
+                              <xsd:annotation>
+                                    <xsd:documentation>The instance is enabled and running or is available to run.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="UNINITIALIZED">
+                              <xsd:annotation>
+                                    <xsd:documentation>This is the initial state for all service instances.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/solaris-definitions-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/solaris-system-characteristics-schema.xsd
===================================================================
--- trunk/ovaldi/xml/solaris-system-characteristics-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/solaris-system-characteristics-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,394 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" xmlns:sol-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#solaris" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#solaris" elementFormDefault="qualified" version="5.4">
+     <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" schemaLocation="oval-system-characteristics-schema.xsd"/>
+     <xsd:annotation>
+          <xsd:documentation>The following is a description of the elements, types, and attributes that compose the Solaris specific system characteristic items found in Open Vulnerability and Assessment Language (OVAL). Each item is an extension of the standard test element defined in the Core Definition Schema. Through extension, each test inherits a set of elements and attributes that are shared amongst all OVAL tests. Each test is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core Definition Schema is not outlined here.</xsd:documentation>
+          <xsd:documentation>The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+          <xsd:appinfo>
+               <schema>Solaris System Characteristics</schema>
+               <version>5.4</version>
+               <date>4/1/2008 10:41:45 AM</date>
+                <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                <sch:title>schematron validation of the Solaris portion of an OVAL System Characteristics file</sch:title>
+               <sch:ns prefix="oval-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5"/>
+               <sch:ns prefix="sol-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#solaris"/>
+          </xsd:appinfo>
+     </xsd:annotation>
+     <!-- =============================================================================== -->
+     <!-- ===============================  ISAINFO ITEM  ================================ -->
+     <!-- =============================================================================== -->
+     <xsd:element name="isainfo_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>Information about the instruction set architectures. This information can be retrieved by the isainfo command.</xsd:documentation>
+               <xsd:documentation>The isainfo_item was originally developed by Robert L. Hollis at ThreatGuard, Inc. Many thanks for their support of the OVAL project.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="bits" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the number of bits in the address space of the native instruction set (isainfo -b).</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="isaitembits">
+                                                  <sch:rule context="sol-sc:isainfo_item/sol-sc:bits">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the bits entity of an isainfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="kernel_isa" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the name of the instruction set used by kernel components (isainfo -k).</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="isaitemkernel_isa">
+                                                  <sch:rule context="sol-sc:isainfo_item/sol-sc:kernel_isa">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the kernel_isa entity of an isainfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="application_isa" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the name of the instruction set used by portable applications (isainfo -n).</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="isaitemapplication_isa">
+                                                  <sch:rule context="sol-sc:isainfo_item/sol-sc:application_isa">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the application_isa entity of an isainfo_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ===============================  PACKAGE ITEM  ================================ -->
+     <!-- =============================================================================== -->
+     <xsd:element name="package_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>Output of /usr/bin/pkginfo. See pkginfo(1).</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="pkginst" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="packageitempkginst">
+                                                  <sch:rule context="sol-sc:package_item/sol-sc:pkginst">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the pkginst entity of a package_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="packageitemname">
+                                                  <sch:rule context="sol-sc:package_item/sol-sc:name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the name entity of a package_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="category" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="packageitemcategory">
+                                                  <sch:rule context="sol-sc:package_item/sol-sc:category">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the category entity of a package_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="version" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="packageitemversion">
+                                                  <sch:rule context="sol-sc:package_item/sol-sc:version">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the version entity of a package_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="vendor" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="packageitemvendor">
+                                                  <sch:rule context="sol-sc:package_item/sol-sc:vendor">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the vendor entity of a package_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="description" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="packageitemdescription">
+                                                  <sch:rule context="sol-sc:package_item/sol-sc:description">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the description entity of a package_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =============================  PATCH ITEM  ==================================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="patch_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>From /usr/bin/showrev -p. See showrev(1M).</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="base" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="patchitembase">
+                                                  <sch:rule context="sol-sc:patch_item/sol-sc:base">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the base entity of a patch_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="version" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="patchitemversion">
+                                                  <sch:rule context="sol-sc:patch_item/sol-sc:version">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the version entity of a patch_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =================================  SMF ITEM  ================================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="smf_item" substitutionGroup="oval-sc:item">
+            <xsd:annotation>
+                  <xsd:documentation>The smf_item is used to hold information related to service management facility controlled services</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-sc:ItemType">
+                              <xsd:sequence>
+                                    <xsd:element name="fmri" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The FMRI (Fault Managed Resource Identifier) entity holds the identifier associated with a service.  Services managed by SMF are assigned FMRI URIs prefixed with the scheme name "svc".  FMRIs used by SMF can be expressed in three ways: first as an absolute path including a location path such as "localhost"  (eg svc://localhost/system/system-log:default), second as a path relative to the local machine (eg svc:/system/system-log:default), and third as simply the service identifier with the string prefixes implied (eg system/system-log:default).  For OVAL, the absolute path version (first choice) should be used.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fmriitembase">
+                                                            <sch:rule context="sol-sc:smf_item/sol-sc:fmri">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the fmri entity of a smf_item should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="service_name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The service_name entity is usually an abbreviated form of the FMRI.  In the example svc://localhost/system/system-log:default, the name would be system-log.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="srvnameitembase">
+                                                            <sch:rule context="sol-sc:smf_item/sol-sc:service_name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the service_name entity of a smf_item should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="service_state" type="sol-sc:EntityItemSmfServiceStateType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The service_state entity describes the state that the service is in.  Each service instance is always in a well-defined state based on its dependencies, the results of the execution of its methods, and its potential receipt of events from the contracts filesystem.  The service_state values are UNINITIALIZED, OFFLINE, ONLINE, DEGRADED, MAINTENANCE, DISABLED, and LEGACY-RUN.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="srvstateitembase">
+                                                            <sch:rule context="sol-sc:smf_item/sol-sc:service_state">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the service_state entity of a smf_item should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="protocol" type="sol-sc:EntityItemSmfProtocolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The protocol entity describes the protocol supported by the service.  Possible values are tcp, tcp6, tcp6only, udp, udp6, and udp6only</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="protocolitembase">
+                                                            <sch:rule context="sol-sc:smf_item/sol-sc:protocol">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the protocol entity of a smf_item should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="server_executable" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The entity server_executable is a string representing the listening daemon on the server side.  An example being 'svcprop ftp' which might show 'inetd/start/exec astring /usr/sbin/in.ftpd\ -a'</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="srvexeitembase">
+                                                            <sch:rule context="sol-sc:smf_item/sol-sc:server_executable">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the server_executable entity of a smf_item should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="server_arguements" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The server_arguments entity describes the parameters that are passed to the service.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="srvargsitembase">
+                                                            <sch:rule context="sol-sc:smf_item/sol-sc:server_arguements">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the server_arguements entity of a smf_item should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="exec_as_user" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The exec_as_user entity is a string pulled from svcprop in the following format:  inetd_start/user astring root</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="execasuseritembase">
+                                                            <sch:rule context="sol-sc:smf_item/sol-sc:exec_as_user">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the exec_as_user entity of a smf_item should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+      <xsd:complexType name="EntityItemSmfProtocolType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityItemSmfProtocolType defines the different values that are valid for the protocol entity of a smf_item.  The empty string is also allowed as a valid value to support empty emlements associated with error conditions.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-sc:EntityItemStringType">
+                        <xsd:enumeration value="tcp">
+                              <xsd:annotation>
+                                    <xsd:documentation></xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="tcp6">
+                              <xsd:annotation>
+                                    <xsd:documentation></xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="tcp6only">
+                              <xsd:annotation>
+                                    <xsd:documentation>Request that service listen only for and pass on true IPv6 requests (not IPv4 mapped ones).</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="udp">
+                              <xsd:annotation>
+                                    <xsd:documentation></xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="udp6">
+                              <xsd:annotation>
+                                    <xsd:documentation></xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="udp6only">
+                              <xsd:annotation>
+                                    <xsd:documentation>Request that service listen only for and pass on true IPv6 requests (not IPv4 mapped ones).</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="">
+                              <xsd:annotation>
+                                    <xsd:documentation>The empty string value is permitted here to allow for detailed error reporting.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+      <xsd:complexType name="EntityItemSmfServiceStateType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityItemSmfServiceStateType defines the different values that are valid for the service_state entity of a smf_item.  The empty string is also allowed as a valid value to support empty emlements associated with error conditions.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-sc:EntityItemStringType">
+                        <xsd:enumeration value="DEGRADED">
+                              <xsd:annotation>
+                                    <xsd:documentation>The instance is enabled and running or available to run. The instance, however, is functioning at a limited capacity in comparison to normal operation.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="DISABLED">
+                              <xsd:annotation>
+                                    <xsd:documentation>The instance is disabled.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="MAINTENANCE">
+                              <xsd:annotation>
+                                    <xsd:documentation>The instance is enabled, but not able to run.  Administrative action is required to restore the instance to offline and subsequent states.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="LEGACY-RUN">
+                              <xsd:annotation>
+                                    <xsd:documentation>This state represents a legacy instance that is not managed by the service management facility.  Instances in this state have been started at some point, but might or might not be running.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="OFFLINE">
+                              <xsd:annotation>
+                                    <xsd:documentation>The instance is enabled, but not yet running or available to run.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ONLINE">
+                              <xsd:annotation>
+                                    <xsd:documentation>The instance is enabled and running or is available to run.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="UNINITIALIZED">
+                              <xsd:annotation>
+                                    <xsd:documentation>This is the initial state for all service instances.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="">
+                              <xsd:annotation>
+                                    <xsd:documentation>The empty string value is permitted here to allow for detailed error reporting.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/solaris-system-characteristics-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/unix-definitions-schema.xsd
===================================================================
--- trunk/ovaldi/xml/unix-definitions-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/unix-definitions-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,1963 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:unix-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix" elementFormDefault="qualified" version="5.4">
+      <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-definitions-5" schemaLocation="oval-definitions-schema.xsd"/>
+      <xsd:annotation>
+            <xsd:documentation>The following is a description of the elements, types, and attributes that compose generic UNIX tests found in Open Vulnerability and Assessment Language (OVAL). Each test is an extension of the standard test element defined in the Core Definition Schema. Through extension, each test inherits a set of elements and attributes that are shared amongst all OVAL tests. Each test is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core Definition Schema is not outlined here.</xsd:documentation>
+            <xsd:documentation>The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+            <xsd:appinfo>
+                  <schema>UNIX Definition</schema>
+                  <version>5.4</version>
+                  <date>4/1/2008 10:41:46 AM</date>
+                  <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                  <sch:title>schematron validation of the UNIX portion of an OVAL Definitions file</sch:title>
+                  <sch:ns prefix="oval-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5"/>
+                  <sch:ns prefix="unix-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix"/>
+                  <sch:ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/>
+            </xsd:appinfo>
+      </xsd:annotation>
+      <!-- =============================================================================== -->
+      <!-- =================================  FILE TEST  ================================= -->
+      <!-- =============================================================================== -->
+      <xsd:element name="file_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The file test is used to check metadata associated with UNIX files, of the sort returned by either an ls command, stat command or stat() system call. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a file_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="file_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The file_object element is used by a file test to define the specific file(s) to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>A file object defines the path and filename of the file(s). In addition, a number of behaviors may be provided that help guide the collection of objects. Please refer to the FileBehaviors complex type for more information about specific behaviors.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="behaviors" type="unix-def:FileBehaviors" minOccurs="0" maxOccurs="1"/>
+                                                <xsd:element name="path" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The path element specifies the absolute path to a file on the machine.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="unixfileobjpath">
+                                                                        <sch:rule context="unix-def:file_object/unix-def:path">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a file_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="filename" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1" nillable="true">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The filename element specifies the name of a file to evaluate. If the nillable attribute is set to true, then the object being specified is the higher level directory object. (not all the files in the directory) In this case, the filename element should not be used during collection and would result in the set of collected objects being the directories themselves. For example, one would set nillable to true if the desire was to as test the attributes or permissions associated with a directory. Setting nil equal to true is different than using a .* pattern match, which says to collect every file under a given path.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="unixfileobjfilename">
+                                                                        <sch:rule context="unix-def:file_object/unix-def:filename">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filename entity of a file_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="file_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The file_state element defines the different metadata associate with a UNIX file. This includes the path, filename, type, group id, user id, size, etc. In addition, the permission associated with the file are also included. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="path" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Specifies the absolute path to a file on the machine.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixfilestepath">
+                                                            <sch:rule context="unix-def:file_state/unix-def:path">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a file_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="filename" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The name of the file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixfilestefilename">
+                                                            <sch:rule context="unix-def:file_state/unix-def:filename">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filename entity of a file_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="type" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the file's type: regular file (regular), directory, named pipe (fifo), symbolic link, socket or block special.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixfilestetype">
+                                                            <sch:rule context="unix-def:file_state/unix-def:type">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the type entity of a file_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="group_id" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The group_id entity represents the group owner of a file, by group number. To test for a file with no group assigned to it, this entity would be used with an empty value.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixfilestegroup_id">
+                                                            <sch:rule context="unix-def:file_state/unix-def:group_id">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the group_id entity of a file_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="user_id" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The numeric user id, or uid, is the third column of each user's entry in /etc/passwd. This element represents the owner of the file. To test for a file with no user assigned to it, this entity would be used with an empty value.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixfilesteuser_id">
+                                                            <sch:rule context="unix-def:file_state/unix-def:user_id">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the user_id entity of a file_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="a_time" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the time of the last access, in seconds since the last epoch.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixfilestea_time">
+                                                            <sch:rule context="unix-def:file_state/unix-def:a_time">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the a_time entity of a file_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="c_time" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the time of the last change to the file's inode, which stores all.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixfilestec_time">
+                                                            <sch:rule context="unix-def:file_state/unix-def:c_time">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the c_time entity of a file_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="m_time" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the time of the last change to the file's contents.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixfilestem_time">
+                                                            <sch:rule context="unix-def:file_state/unix-def:m_time">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the m_time entity of a file_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="size" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the size of the file in bytes.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixfilestesize">
+                                                            <sch:rule context="unix-def:file_state/unix-def:size">
+                                                                  <sch:assert test="not(@datatype) or @datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the size entity of a file_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="suid" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Does the program run with the uid (thus privileges) of the file's owner, rather than the calling user?</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixfilestesuid">
+                                                            <sch:rule context="unix-def:file_state/unix-def:suid">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the suid entity of a file_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="sgid" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Does the program run with the gid (thus privileges) of the file's group owner, rather than the calling user's group?</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixfilestesgid">
+                                                            <sch:rule context="unix-def:file_state/unix-def:sgid">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the sgid entity of a file_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="sticky" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Can users delete each other's files in this directory, when said directory is writable by those users?</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixfilestesticky">
+                                                            <sch:rule context="unix-def:file_state/unix-def:sticky">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the sticky entity of a file_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="uread" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Can the owner (user owner) of the file read this file or, if a directory, read the directory contents?</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixfilesteuread">
+                                                            <sch:rule context="unix-def:file_state/unix-def:uread">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the uread entity of a file_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="uwrite" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Can the owner (user owner) of the file read this file or, if a directory, read the directory contents?</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixfilesteuwrite">
+                                                            <sch:rule context="unix-def:file_state/unix-def:uwrite">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the uwrite entity of a file_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="uexec" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Can the owner (user owner) of the file execute it or, if a directory, change into the directory?</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixfilesteuexec">
+                                                            <sch:rule context="unix-def:file_state/unix-def:uexec">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the uexec entity of a file_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="gread" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Can the group owner of the file read this file or, if a directory, read the directory contents?</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixfilestegread">
+                                                            <sch:rule context="unix-def:file_state/unix-def:gread">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the gread entity of a file_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="gwrite" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Can the group owner of the file write to this file or directory?</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixfilestegwrite">
+                                                            <sch:rule context="unix-def:file_state/unix-def:gwrite">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the gwrite entity of a file_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="gexec" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Can the group owner of the file execute it or, if a directory, change into the directory?</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixfilestegexec">
+                                                            <sch:rule context="unix-def:file_state/unix-def:gexec">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the gexec entity of a file_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="oread" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Can all other users read this file or, if a directory, read the directory contents?</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixfilesteoread">
+                                                            <sch:rule context="unix-def:file_state/unix-def:oread">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the oread entity of a file_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="owrite" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Can the other users write to this file or directory?</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixfilesteowrite">
+                                                            <sch:rule context="unix-def:file_state/unix-def:owrite">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the owrite entity of a file_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="oexec" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Can the other users execute this file or, if a directory, change into the directory?</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixfilesteoexec">
+                                                            <sch:rule context="unix-def:file_state/unix-def:oexec">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the oexec entity of a file_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:complexType name="FileBehaviors">
+            <xsd:annotation>
+                  <xsd:documentation>These behaviors allow a more detailed definition of the file objects being specified.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:attribute name="max_depth" use="optional" default="-1">
+                  <xsd:annotation>
+                        <xsd:documentation>'max_depth' defines how many directories to recurse when a recurse direction is specified. The default value is '-1' meaning no limitation. A value of '0' is equivalent to no recursion, '1' means to step only one directory level up/down, and so on.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:integer">
+                              <xsd:fractionDigits value="0"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="recurse" use="optional" default="symlinks and directories">
+                  <xsd:annotation>
+                        <xsd:documentation>The recurse attribute defines how to recurse into the PATH entity, in other words what to follow during recursion. Options includ symlinks, directories, or both. Note that a max-depth has be specified for recursion to take place and for this attribute to mean anything. The values of 'none', 'files', and 'files and directories' have been deprecated and will be removed in a future version since it is not possible to recures files.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:string">
+                              <xsd:enumeration value="none"/>
+                              <xsd:enumeration value="files"/>
+                              <xsd:enumeration value="directories"/>
+                              <xsd:enumeration value="files and directories"/>
+                              <xsd:enumeration value="symlinks"/>
+                              <xsd:enumeration value="symlinks and directories"/>
+
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="recurse_direction" use="optional" default="none">
+                  <xsd:annotation>
+                        <xsd:documentation>'recurse_direction' defines the direction to recurse, either 'up' to parent directories, or 'down' into child directories. The default value is 'none' for no recursion.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:string">
+                              <xsd:enumeration value="none"/>
+                              <xsd:enumeration value="up"/>
+                              <xsd:enumeration value="down"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="recurse_file_system" use="optional" default="all">
+                  <xsd:annotation>
+                        <xsd:documentation>'recurse_file_system' defines the file system limitation of any recursion, either 'local' limiting data collection to local file systems (as opposed to file systems mounted from an external system), or 'defined' to keep any recursion within the file system that the file_object (path+filename) has specified. The default value is 'all' meaning to use all available file systems for data collection.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:string">
+                              <xsd:enumeration value="all"/>
+                              <xsd:enumeration value="local"/>
+                              <xsd:enumeration value="defined"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+      </xsd:complexType>
+      <!-- =============================================================================== -->
+      <!-- ================================  INETD TEST  ================================= -->
+      <!-- =============================================================================== -->
+      <xsd:element name="inetd_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The inetd test is used to check information associated with different Internet services. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an inetd_object and the optional state element specifies the information to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="inetd_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The inetd_object element is used by an inetd test to define the specific protocol-service to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>An inetd object consists of a protocol entity and a service_name entity that identifies the specific service to be tested.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="protocol" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>A recognized protocol listed in the file /etc/inet/protocols.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="inetdobjprotocol">
+                                                                        <sch:rule context="unix-def:inetd_object/unix-def:protocol">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the protocol entity of an inetd_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="service_name" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The name of a valid service listed in the services file. For RPC services, the value of the service-name field consists of the RPC service name or program number, followed by a '/' (slash) and either a version number or a range of version numbers (for example, rstatd/2-4).</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="inetdobjservice_name">
+                                                                        <sch:rule context="unix-def:inetd_object/unix-def:service_name">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the service_name entity of an inetd_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="inetd_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The inetd_state element defines the different information associated with a specific Internet service. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="protocol" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>A recognized protocol listed in the file /etc/inet/protocols.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="inetdsteprotocol">
+                                                            <sch:rule context="unix-def:inetd_state/unix-def:protocol">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the protocol entity of an inetd_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="service_name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The name of a valid service listed in the services file. For RPC services, the value of the service-name field consists of the RPC service name or program number, followed by a '/' (slash) and either a version number or a range of version numbers (for example, rstatd/2-4).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="inetdsteservice_name">
+                                                            <sch:rule context="unix-def:inetd_state/unix-def:service_name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the service_name entity of an inetd_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="server_program" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Either the pathname of a server program to be invoked by inetd to perform the requested service, or the value internal if inetd itself provides the service.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="inetdsteserver_program">
+                                                            <sch:rule context="unix-def:inetd_state/unix-def:server_program">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the server_program entity of an inetd_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="server_arguments" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="inetdsteserver_arguments">
+                                                            <sch:rule context="unix-def:inetd_state/unix-def:server_arguments">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the server_arguments entity of an inetd_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="endpoint_type" type="unix-def:EntityStateEndpointType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="inetdsteendpoint_type">
+                                                            <sch:rule context="unix-def:inetd_state/unix-def:endpoint_type">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the endpoint_type entity of an inetd_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="exec_as_user" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="inetdsteexec_as_user">
+                                                            <sch:rule context="unix-def:inetd_state/unix-def:exec_as_user">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the exec_as_user entity of an inetd_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="wait_status" type="unix-def:EntityStateWaitStatusType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This field has values wait or nowait. This entry specifies whether the server that is invoked by inetd will take over the listening socket associated with the service, and whether once launched, inetd will wait for that server to exit, if ever, before it resumes listening for new service requests.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="inetdstewait_status">
+                                                            <sch:rule context="unix-def:inetd_state/unix-def:wait_status">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the wait_status entity of an inetd_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ==============================  INTERFACE TEST  =============================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="interface_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The interface test enumerate various attributes about the interfaces on a system. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an interface_object and the optional state element specifies the interface information to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="interface_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The interface_object element is used by an interface test to define the specific interfaces(s) to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>An interface object consists of a single name entity that identifies which interface is being specified.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="name" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The name element is the interface (eth0, eth1, fw0, etc.) name to check.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="unixinterfaceobjname">
+                                                                        <sch:rule context="unix-def:interface_object/unix-def:name">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the name entity of an interface_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="interface_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The interface_state element enumerates the different properties associate with a Unix interface. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The name element is the interface (eth0, eth1, fw0, etc.) name to check.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixinterfacestename">
+                                                            <sch:rule context="unix-def:interface_state/unix-def:name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the name entity of an interface_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="hardware_addr" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The hardware_addr element is the hardware or MAC address of the physical network card.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixinterfacestehardware_addr">
+                                                            <sch:rule context="unix-def:interface_state/unix-def:hardware_addr">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the hardware_addr entity of an interface_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="inet_addr" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the IP address of the interface.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixinterfacesteinet_addr">
+                                                            <sch:rule context="unix-def:interface_state/unix-def:inet_addr">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the inet_addr entity of an interface_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="broadcast_addr" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the broadcast IP address for this interface's network, like 192.168.255.255.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixinterfacestebroadcast_addr">
+                                                            <sch:rule context="unix-def:interface_state/unix-def:broadcast_addr">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the broadcast_addr entity of an interface_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="netmask" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the bitmask used to calculate the inteface's IP network. The network number is calculated by bitwise-ANDing this with the IP address. The host number on that network is calculated by bitwise-XORing this with the IP address.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixinterfacestenetmask">
+                                                            <sch:rule context="unix-def:interface_state/unix-def:netmask">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the netmask entity of an interface_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="flag" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The flag entity represents the interface flag line, which generally contains flags like "UP" to denote an active interface, "PROMISC" to note that the interface is listening for Ethernet frames not specifically addressed to it, and others. This element can be included multiple times in a system characteristic item in order to record a multitude of flags. Note that the entity_check attribute associated with EntityStateStringType guides the evaluation of entities like this that refer to items that can occur an unbounded number of times.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixinterfacesteflag">
+                                                            <sch:rule context="unix-def:interface_state/unix-def:flag">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for a flag entity of an interface_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ==============================  PASSWORD TEST  ================================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="password_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>/etc/passwd. See passwd(4).</xsd:documentation>
+                  <xsd:documentation>The password test is used to check metadata associated with the UNIX password file, of the sort returned by the passwd command. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a password_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="password_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The password_object element is used by a password test to define the object to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>A password object consists of a single username entity that identifies the user whos passwords are to be evaluated.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="username" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation/>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="passwordobjusername">
+                                                                        <sch:rule context="unix-def:password_object/unix-def:username">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the username entity of a password_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="password_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The password_state element defines the different information associated with the system passwords. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="username" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="passwordsteusername">
+                                                            <sch:rule context="unix-def:package_state/unix-def:username">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the username entity of a password_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="password" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="passwordstepassword">
+                                                            <sch:rule context="unix-def:package_state/unix-def:password">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the password entity of a password_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="user_id" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The numeric user id, or uid, is the third column of each user's entry in /etc/passwd. This element represents the owner of the file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="passwordsteuser_id">
+                                                            <sch:rule context="unix-def:package_state/unix-def:user_id">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the user_id entity of a password_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="group_id" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="passwordstegroup_id">
+                                                            <sch:rule context="unix-def:package_state/unix-def:group_id">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the group_id entity of a password_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="gcos" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="passwordstegcos">
+                                                            <sch:rule context="unix-def:package_state/unix-def:gcos">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the gcos entity of a password_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="home_dir" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="passwordstehome_dir">
+                                                            <sch:rule context="unix-def:package_state/unix-def:home_dir">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the home_dir entity of a password_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="login_shell" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="passwordstelogin_shell">
+                                                            <sch:rule context="unix-def:package_state/unix-def:login_shell">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the login_shell entity of a password_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ===============================  PROCESS TEST  ================================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="process_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The process test is used to check information found in the UNIX processes. It is equivalent to parsing the output of the ps command. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a process_object and the optional state element specifies the process information to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="process_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The process_object element is used by a process test to define the specific process(es) to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>A process object defines the command line used to start the process(s).</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="command" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The command element specifies the command/program name to check.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="unixprocessobjcommand">
+                                                                        <sch:rule context="unix-def:process_object/unix-def:command">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the command entity of a process_object be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="process_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The process_state element defines the different metadata associate with a UNIX process. This includes the command line, pid, ppid, priority, and user id. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="command" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The command element specifies the command/program name to check.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixprocessstecommand">
+                                                            <sch:rule context="unix-def:process_state/unix-def:command">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the command entity of a process_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="exec_time" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the cumulative CPU time, formatted in [DD-]HH:MM:SS where DD is the number of days when execution time is 24 hours or more.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixprocesssteexec_time">
+                                                            <sch:rule context="unix-def:process_state/unix-def:exec_time">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the exec_time entity of a process_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="pid" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the process ID of the process.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixprocessstepid">
+                                                            <sch:rule context="unix-def:process_state/unix-def:pid">
+                                                                  <sch:assert test="not(@datatype) or @datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the pid entity of a process_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="ppid" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the process ID of the process's parent process.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixprocesssteppid">
+                                                            <sch:rule context="unix-def:process_state/unix-def:ppid">
+                                                                  <sch:assert test="not(@datatype) or @datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the ppid entity of a process_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="priority" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the scheduling priority with which the process runs. This can be adjusted with the nice command or nice() system call.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixprocessstepriority">
+                                                            <sch:rule context="unix-def:process_state/unix-def:priority">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the priority entity of a process_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="scheduling_class" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>A platform specific characteristic maintained by the scheduler: RT (real-time), TS (timeshare), FF (fifo), SYS (system), etc.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixprocessstescheduling_class">
+                                                            <sch:rule context="unix-def:process_state/unix-def:scheduling_class">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the scheduling_class entity of a process_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="start_time" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the time of day the process started formatted in HH:MM:SS if the same day the process started or formatted as MMM_DD (Ex.: Feb_5) if process started the previous day or further in the past.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixprocessstestart_time">
+                                                            <sch:rule context="unix-def:process_state/unix-def:start_time">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the start_time entity of a process_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="tty" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the TTY on which the process was started, if applicable.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixprocessstetty">
+                                                            <sch:rule context="unix-def:process_state/unix-def:tty">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the tty entity of a process_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="user_id" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The numeric user id, or uid, is the third column of each user's entry in /etc/passwd. It represents the owner, and thus privilege level, of the specified program.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixprocesssteuser_id">
+                                                            <sch:rule context="unix-def:process_state/unix-def:user_id">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the user_id entity of a process_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ===============================  RUNLEVEL TEST  =============================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="runlevel_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The runlevel test is used to check information about which runlevel specified service are scheduled to exist at. For more information see the output generated by a chkconfig --list. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a runlevel_object and the optional state element specifies the data to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="runlevel_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The runlevel_object element is used by a runlevel_test to define the specific service(s)/runlevel combination to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="service_name" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The service_name entity refers the name associated with a service. This name is usually the filename of the script file located in /etc/init.d directory.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="unixrlobjservice_name">
+                                                                        <sch:rule context="unix-def:runlevel_object/unix-def:service_name">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the service_name entity of a runlevel_object be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="runlevel" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The runlevel entity refers to which runlevel a system is at. A runlevel is defined as a software configuration of the system that allows only a selected group of processes to exist.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="unixrlobjrunlevel">
+                                                                        <sch:rule context="unix-def:runlevel_object/unix-def:runlevel">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the runlevel entity of a runlevel_object be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="runlevel_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The runlevel_state element holds information about whether a specific service is schedule to start or kill at a given runlevel. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="service_name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The service_name entity refers the name associated with a service. This name is usually the filename of the script file located in /etc/init.d directory.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixrlsteservice_name">
+                                                            <sch:rule context="unix-def:runlevel_state/unix-def:service_name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the service_name entity of a runlevel_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="runlevel" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The runlevel entity refers to which runlevel a system is at. A runlevel is defined as a software configuration of the system that allows only a selected group of processes to exist.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixrlsterunlevel">
+                                                            <sch:rule context="unix-def:runlevel_state/unix-def:runlevel">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the runlevel entity of a runlevel_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="start" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The start entity determines if the process is scheduled to be spawned at the specified runlevel.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixrlstestart">
+                                                            <sch:rule context="unix-def:runlevel_state/unix-def:start">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the start entity of a runlevel_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="kill" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The kill entity determines if the proces is supposed to be killed at the specified runlevel.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unixrlstekill">
+                                                            <sch:rule context="unix-def:runlevel_state/unix-def:kill">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the kill entity of a runlevel_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =================================  SCCS TEST  ================================= -->
+      <!-- =============================================================================== -->
+      <xsd:element name="sccs_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation/>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="sccs_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation/>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="behaviors" type="unix-def:SccsBehaviors" minOccurs="0" maxOccurs="1"/>
+                                                <xsd:element name="path" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The path to an SCCS file.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="sccsobjpath">
+                                                                        <sch:rule context="unix-def:file_object/unix-def:path">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a sccs_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="filename" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The name of an SCCS file.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="sccsobjfilename">
+                                                                        <sch:rule context="unix-def:file_object/unix-def:filename">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filename entity of a sccs_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="sccs_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation/>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="path" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="sccsstepath">
+                                                            <sch:rule context="unix-def:sccs_state/unix-def:path">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a sccs_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="filename" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the name of a SCCS file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="sccsstefilename">
+                                                            <sch:rule context="unix-def:sccs_state/unix-def:filename">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filename entity of a sccs_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="module_name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="sccsstemodule_name">
+                                                            <sch:rule context="unix-def:sccs_state/unix-def:module_name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the module_name entity of a sccs_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="module_type" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="sccsstemodule_type">
+                                                            <sch:rule context="unix-def:sccs_state/unix-def:module_type">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the module_type entity of a sccs_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="release" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="sccssterelease">
+                                                            <sch:rule context="unix-def:sccs_state/unix-def:release">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the release entity of a sccs_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="level" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="sccsstelevel">
+                                                            <sch:rule context="unix-def:sccs_state/unix-def:level">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the level entity of a sccs_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="branch" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="sccsstebranch">
+                                                            <sch:rule context="unix-def:sccs_state/unix-def:branch">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the branch entity of a sccs_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="sequence" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="sccsstesequence">
+                                                            <sch:rule context="unix-def:sccs_state/unix-def:sequence">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the sequence entity of a sccs_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="what_string" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="sccsstewhat_string">
+                                                            <sch:rule context="unix-def:sccs_state/unix-def:what_string">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the what_string entity of a sccs_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:complexType name="SccsBehaviors">
+            <xsd:annotation>
+                  <xsd:documentation>These behaviors allow a more detailed definition of the sccs objects being specified.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:attribute name="max_depth" use="optional" default="-1">
+                  <xsd:annotation>
+                        <xsd:documentation>'max_depth' defines how many directories to recurse when a recurse direction is specified. The default value is '-1' meaning no limitation. A value of '0' is equivalent to no recursion, '1' means to step only one directory level up/down, and so on.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:integer">
+                              <xsd:fractionDigits value="0"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="recurse" use="optional" default="symlinks and directories">
+                  <xsd:annotation>
+                        <xsd:documentation>The recurse attribute defines how to recurse into the PATH entity, in other words what to follow during recursion. Options includ symlinks, directories, or both. Note that a max-depth has be specified for recursion to take place and for this attribute to mean anything. The values of 'none', 'files', and 'files and directories' have been deprecated and will be removed in a future version since it is not possible to recures files.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:string">
+                              <xsd:enumeration value="none"/>
+                              <xsd:enumeration value="files"/>
+                              <xsd:enumeration value="directories"/>
+                              <xsd:enumeration value="files and directories"/>
+                              <xsd:enumeration value="symlinks"/>
+                              <xsd:enumeration value="symlinks and directories"/>
+                              
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="recurse_direction" use="optional" default="none">
+                  <xsd:annotation>
+                        <xsd:documentation>'recurse_direction' defines the direction to recurse, either 'up' to parent directories, or 'down' into child directories. The default value is 'none' for no recursion.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:string">
+                              <xsd:enumeration value="none"/>
+                              <xsd:enumeration value="up"/>
+                              <xsd:enumeration value="down"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="recurse_file_system" use="optional" default="all">
+                  <xsd:annotation>
+                        <xsd:documentation>'recurse_file_system' defines the file system limitation of any recursion, either 'local' limiting data collection to local file systems (as opposed to file systems mounted from an external system), or 'defined' to keep any recursion within the file system that the file_object (path+filename) has specified. The default value is 'all' meaning to use all available file systems for data collection.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:string">
+                              <xsd:enumeration value="all"/>
+                              <xsd:enumeration value="local"/>
+                              <xsd:enumeration value="defined"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+      </xsd:complexType>
+      <!-- =============================================================================== -->
+      <!-- ================================  SHADOW TEST  ================================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="shadow_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The shadow test is used to check information from the /etc/shadow file for a specific user. This file contains a user's password, but also their password aging and lockout information. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an inetd_object and the optional state element specifies the information to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="shadow_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The shadow_object element is used by a shadow test to define the shadow file to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>A shdow object consists of a single user entity that identifies the username associted with the shadow file.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="username" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation/>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="shadowobjusername">
+                                                                        <sch:rule context="unix-def:shadow_object/unix-def:username">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the username entity of a shadow_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="shadow_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The shadows_state element defines the different information associated with the system shadow file. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="username" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the name of the user being checked.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="shadowsteusername">
+                                                            <sch:rule context="unix-def:shadow_state/unix-def:username">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the username entity of a shadow_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="password" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the encrypted version of the user's password.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="shadowstepassword">
+                                                            <sch:rule context="unix-def:shadow_state/unix-def:password">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the password entity of a shadow_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="chg_lst" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is the date of the last password change in days since 1/1/1970.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="shadowstechg_lst">
+                                                            <sch:rule context="unix-def:shadow_state/unix-def:chg_lst">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the chg_lst entity of a shadow_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="chg_allow" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This specifies how often in days a user may change their password. It can also be thought of as the minimum age of a password.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="shadowstechg_allow">
+                                                            <sch:rule context="unix-def:shadow_state/unix-def:chg_allow">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the chg_allow entity of a shadow_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="chg_req" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This describes how long a user can keep a password before the system forces her to change it.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="shadowstechg_req">
+                                                            <sch:rule context="unix-def:shadow_state/unix-def:chg_req">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the chg_req entity of a shadow_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="exp_warn" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This describes how long before password expiration the system begins warning the user. The system will warn the user at each login.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="shadowsteexp_warn">
+                                                            <sch:rule context="unix-def:shadow_state/unix-def:exp_warn">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the exp_warn entity of a shadow_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="exp_inact" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The exp_inact entity describes how many days of account inactivity the system will wait after a password expires before locking the account. Unix systems are generally configured to only allow a given password to last for a fixed period of time. When this time, the chg_req parameter, is near running out, the system begins warning the user at each login. How soon before the expiration the user receives these warnings is specified in exp_warn. The only hiccup in this design is that a user may not login in time to ever receive a warning before account expiration. The exp_inact parameter gives the sysadmin flexibility so that a user who reaches the end of their expiration time gains exp_inact more days to login and change their password manually.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="shadowsteexp_inact">
+                                                            <sch:rule context="unix-def:shadow_state/unix-def:exp_inact">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the exp_inact entity of a shadow_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="exp_date" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This speicifies when will the account's password expire, in days since 1/1/1970.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="shadowsteexp_date">
+                                                            <sch:rule context="unix-def:shadow_state/unix-def:exp_date">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the exp_date entity of a shadow_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="flag" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This is a reserved field that the shadow file may use in the future.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="shadowsteflag">
+                                                            <sch:rule context="unix-def:shadow_state/unix-def:flag">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the flag entity of a shadow_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ================================  UNAME TEST  ================================= -->
+      <!-- =============================================================================== -->
+      <xsd:element name="uname_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The uname test reveals information about the hardware the machine is running on. This information is the parsed equivalent of uname -a. For example: "Linux quark 2.6.5-7.108-default #1 Wed Aug 25 13:34:40 UTC 2004 i686 i686 i386 GNU/Linux" or "Darwin TestHost 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc". It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a uname_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="uname_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The uname_object element is used by an uname test to define those objects to evaluated based on a specified state. There is actually only one object relating to uname and this is the system as a whole. Therefore, there are no child entities defined. Any OVAL Test written to check uname will reference the same uname_object which is basically an empty object element.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType"/>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="uname_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The uname_state element defines the information about the hardware the machine is running one. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="machine_class" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This entity specifies a machine hardware name. This corresponds to the command uname -m.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unamestemachine_class">
+                                                            <sch:rule context="unix-def:uname_state/unix-def:machine_class">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the machine_class entity of a uname_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="node_name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This entity specifies a host name. This corresponds to the command uname -n.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unamestenode_name">
+                                                            <sch:rule context="unix-def:uname_state/unix-def:node_name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the node_name entity of a uname_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="os_name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This entity specifies an operating system name. This corresponds to the command uname -s.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unamesteos_name">
+                                                            <sch:rule context="unix-def:uname_state/unix-def:os_name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the os_name entity of a uname_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="os_release" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This entity specifies a build version. This corresponds to the command uname -r.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unamesteos_release">
+                                                            <sch:rule context="unix-def:uname_state/unix-def:os_release">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the os_release entity of a uname_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="os_version" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This entity specifies an operating system version. This corresponds to the command uname -v.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unamesteos_version">
+                                                            <sch:rule context="unix-def:uname_state/unix-def:os_version">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the os_version entity of a uname_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="processor_type" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This entity specifies a processor type. This corresponds to the command uname -p.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="unamesteprocessor_type">
+                                                            <sch:rule context="unix-def:uname_state/unix-def:processor_type">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the processor_type entity of a uname_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ================================  XINETD TEST  ================================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="xinetd_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The xinetd test is used to check information associated with different Internet services. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an inetd_object and the optional state element specifies the information to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="xinetd_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The xinetd_object element is used by an xinetd test to define the specific protocol-service to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>An xinetd object consists of a protocol entity and a service_name entity that identifies the specific service to be tested.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice minOccurs="1" maxOccurs="1">
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="protocol" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>A recognized protocol.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="xinetdobjprotocol">
+                                                                        <sch:rule context="unix-def:xinetd_object/unix-def:protocol">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the protocol entity of an xinetd_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="service_name" type="oval-def:EntityObjectStringType" minOccurs="1" maxOccurs="1">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The name of a valid service.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="xinetdobjservice_name">
+                                                                        <sch:rule context="unix-def:xinetd_object/unix-def:service_name">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the service_name entity of an xinetd_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="xinetd_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The xinetd_state element defines the different information associated with a specific Internet service. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="protocol" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>A recognized protocol.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="xinetdsteprotocol">
+                                                            <sch:rule context="unix-def:xinetd_state/unix-def:protocol">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the protocol entity of an xinetd_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="service_name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The name of a valid service.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="xinetdsteservice_name">
+                                                            <sch:rule context="unix-def:xinetd_state/unix-def:service_name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the service_name entity of an xinetd_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="flags" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="xinetdsteflags">
+                                                            <sch:rule context="unix-def:xinetd_state/unix-def:flags">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the flags entity of an xinetd_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="no_access" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="xinetdstenoaccess">
+                                                            <sch:rule context="unix-def:xinetd_state/unix-def:no_access">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the no_access entity of an xinetd_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="only_from" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="xinetdsteonlyfrom">
+                                                            <sch:rule context="unix-def:xinetd_state/unix-def:only_from">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the only_from entity of an xinetd_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="port" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="xinetdsteport">
+                                                            <sch:rule context="unix-def:xinetd_state/unix-def:port">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the port entity of an xinetd_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="server" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="xinetdsteserver">
+                                                            <sch:rule context="unix-def:xinetd_state/unix-def:server">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the server entity of an xinetd_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="server_arguments" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="xinetdsteserverarguments">
+                                                            <sch:rule context="unix-def:xinetd_state/unix-def:server_arguments">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the server_arguments entity of an xinetd_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="socket_type" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="xinetdstesockettype">
+                                                            <sch:rule context="unix-def:xinetd_state/unix-def:socket_type">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the socket_type entity of an xinetd_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="type" type="unix-def:EntityXinetdTypeStatusType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="xinetdstetype">
+                                                            <sch:rule context="unix-def:xinetd_state/unix-def:type">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the type entity of an xinetd_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="user" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="xinetdsteuser">
+                                                            <sch:rule context="unix-def:xinetd_state/unix-def:user">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the user entity of an xinetd_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="wait" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="xinetdstewait">
+                                                            <sch:rule context="unix-def:xinetd_state/unix-def:wait">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the wait entity of an xinetd_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="disabled" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="xinetdstedisabled">
+                                                            <sch:rule context="unix-def:xinetd_state/unix-def:disabled">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the disabled entity of an xinetd_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+      <xsd:complexType name="EntityStateEndpointType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityStateEndpointType complex type restricts a string value to a specific set of values that describe endpoint types associated with an Internet service. The empty string is also allowed to support empty emlement associated with variable references.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityStateStringType">
+                        <xsd:enumeration value="stream">
+                              <xsd:annotation>
+                                    <xsd:documentation>for a stream socket</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="dgram">
+                              <xsd:annotation>
+                                    <xsd:documentation>for a datagram socket</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="raw">
+                              <xsd:annotation>
+                                    <xsd:documentation>for a raw socket</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="seqpacket">
+                              <xsd:annotation>
+                                    <xsd:documentation>for a sequenced packet socket </xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="tli">
+                              <xsd:annotation>
+                                    <xsd:documentation>for all TLI endpoints</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+      <xsd:complexType name="EntityXinetdTypeStatusType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityXinetdTypeStatusType complex type restricts a string value to three values, either RPC, INTERNAL, or UNLISTED that specify the type of service registered in xinetd. The empty string is also allowed to support empty emlement associated with error conditions.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityStateStringType">
+                        <xsd:enumeration value="INTERNAL">
+                              <xsd:annotation>
+                                    <xsd:documentation>The INTERNAL type is used to describe services like echo, chargen, and others whose functionality is supplied by xinetd itself.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="RPC">
+                              <xsd:annotation>
+                                    <xsd:documentation>The RPC type is used to describe services that use remote procedure call ala NFS.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="UNLISTED">
+                              <xsd:annotation>
+                                    <xsd:documentation>The UNLISTED type is used to describe services that aren't listed in /etc/protocols or /etc/rpc.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+      <xsd:complexType name="EntityStateWaitStatusType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityStateWaitStatusType complex type restricts a string value to two values, either wait or nowait, that specify whether the server that is invoked by inetd will take over the listening socket associated with the service, and whether once launched, inetd will wait for that server to exit, if ever, before it resumes listening for new service requests. The empty string is also allowed to support empty emlement associated with variable references.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityStateStringType">
+                        <xsd:enumeration value="wait">
+                              <xsd:annotation>
+                                    <xsd:documentation>The value of 'wait' specifies that the server that is invoked by inetd will take over the listening socket associated with the service, and once launched, inetd will wait for that server to exit, if ever, before it resumes listening for new service requests.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="nowait">
+                              <xsd:annotation>
+                                    <xsd:documentation>The value of 'nowait' specifies that the server that is invoked by inetd will not wait for any existing server to finish before taking over the listening socket associated with the service.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/unix-definitions-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/unix-system-characteristics-schema.xsd
===================================================================
--- trunk/ovaldi/xml/unix-system-characteristics-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/unix-system-characteristics-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,1324 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" xmlns:unix-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#unix" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#unix" elementFormDefault="qualified" version="5.4">
+     <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" schemaLocation="oval-system-characteristics-schema.xsd"/>
+     <xsd:annotation>
+          <xsd:documentation>The following is a description of the elements, types, and attributes that compose the UNIX specific system characteristic items found in Open Vulnerability and Assessment Language (OVAL). Each item is an extension of the standard item element defined in the Core System Characteristic Schema. Through extension, each item inherits a set of elements and attributes that are shared amongst all OVAL Items. Each item is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core System Characteristic Schema is not outlined here.</xsd:documentation>
+          <xsd:documentation>The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+          <xsd:appinfo>
+               <schema>Unix System Characteristics</schema>
+               <version>5.4</version>
+               <date>4/1/2008 10:41:46 AM</date>
+                <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                <sch:title>schematron validation of the UNIX portion of an OVAL System Characteristics file</sch:title>
+               <sch:ns prefix="oval-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5"/>
+               <sch:ns prefix="unix-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#unix"/>
+          </xsd:appinfo>
+     </xsd:annotation>
+     <!-- =============================================================================== -->
+     <!-- =================================  FILE ITEM   ================================ -->
+     <!-- =============================================================================== -->
+     <xsd:element name="file_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>The file item holds information about the individual files found on a system. Each file item contains path and filename information as well as its type, associated user and group ids, relevant dates, and the privialeges granted. It extends the standard ItemType as defined in the oval-system-characteristics schema and one should refer to the ItemType description for more information.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="path" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The path entity specifies the absolute path (excluding the filename) to a file on the machine.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixfileitempath">
+                                                  <sch:rule context="unix-sc:file_item/unix-sc:path">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the path entity of a file_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="filename" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1" nillable="true">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The name of the file. If the nillable attribute is set to true, then the item being represented is the higher directory represented by the path entity.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixfileitemfilename">
+                                                  <sch:rule context="unix-sc:file_item/unix-sc:filename">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the filename entity of a file_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="type" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the file's type: regular file (regular), directory, named pipe (fifo), symbolic link, socket or block special.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixfileitemtype">
+                                                  <sch:rule context="unix-sc:file_item/unix-sc:type">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the type entity of a file_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="group_id" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the group owner of the file, by group number.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixfileitemgroup_id">
+                                                  <sch:rule context="unix-sc:file_item/unix-sc:group_id">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the group_id entity of a file_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="user_id" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The numeric user id, or uid, is the third column of each user's entry in /etc/passwd. This element represents the owner of the file.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixfileitemuser_id">
+                                                  <sch:rule context="unix-sc:file_item/unix-sc:user_id">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the user_id entity of a file_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="a_time" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the time of the last access, in seconds since the last epoch.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixfileitema_time">
+                                                  <sch:rule context="unix-sc:file_item/unix-sc:a_time">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the a_time entity of a file_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="c_time" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the time of the last change to the file's inode, which stores all.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixfileitemc_time">
+                                                  <sch:rule context="unix-sc:file_item/unix-sc:c_time">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the c_time entity of a file_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="m_time" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the time of the last change to the file's contents.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixfileitemm_time">
+                                                  <sch:rule context="unix-sc:file_item/unix-sc:m_time">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the m_time entity of a file_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="size" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the size of the file in bytes.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixfileitemsize">
+                                                  <sch:rule context="unix-sc:file_item/unix-sc:size">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the size entity of a file_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="suid" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Does the program run with the uid (thus privileges) of the file's owner, rather than the calling user?</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixfileitemsuid">
+                                                  <sch:rule context="unix-sc:file_item/unix-sc:suid">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the suid entity of a file_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="sgid" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Does the program run with the gid (thus privileges) of the file's group owner, rather than the calling user's group?</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixfileitemsgid">
+                                                  <sch:rule context="unix-sc:file_item/unix-sc:sgid">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the sgid entity of a file_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="sticky" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Can users delete each other's files in this directory, when said directory is writable by those users?</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixfileitemsticky">
+                                                  <sch:rule context="unix-sc:file_item/unix-sc:sticky">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the sticky entity of a file_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="uread" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Can the owner (user owner) of the file read this file or, if a directory, read the directory contents?</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixfileitemuread">
+                                                  <sch:rule context="unix-sc:file_item/unix-sc:uread">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the uread entity of a file_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="uwrite" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Can the owner (user owner) of the file read this file or, if a directory, read the directory contents?</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixfileitemuwrite">
+                                                  <sch:rule context="unix-sc:file_item/unix-sc:uwrite">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the uwrite entity of a file_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="uexec" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Can the owner (user owner) of the file execute it or, if a directory, change into the directory?</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixfileitemuexec">
+                                                  <sch:rule context="unix-sc:file_item/unix-sc:uexec">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the uexec entity of a file_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="gread" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Can the group owner of the file read this file or, if a directory, read the directory contents?</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixfileitemgread">
+                                                  <sch:rule context="unix-sc:file_item/unix-sc:gread">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the gread entity of a file_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="gwrite" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Can the group owner of the file write to this file or directory?</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixfileitemgwrite">
+                                                  <sch:rule context="unix-sc:file_item/unix-sc:gwrite">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the gwrite entity of a file_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="gexec" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Can the group owner of the file execute it or, if a directory, change into the directory?</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixfileitemgexec">
+                                                  <sch:rule context="unix-sc:file_item/unix-sc:gexec">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the gexec entity of a file_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="oread" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Can all other users read this file or, if a directory, read the directory contents?</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixfileitemoread">
+                                                  <sch:rule context="unix-sc:file_item/unix-sc:oread">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the oread entity of a file_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="owrite" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Can the other users write to this file or directory?</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixfileitemowrite">
+                                                  <sch:rule context="unix-sc:file_item/unix-sc:owrite">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the owrite entity of a file_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="oexec" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Can the other users execute this file or, if a directory, change into the directory?</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixfileitemoexec">
+                                                  <sch:rule context="unix-sc:file_item/unix-sc:oexec">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the oexec entity of a file_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ================================  INETD ITEM  ================================= -->
+     <!-- =============================================================================== -->
+     <xsd:element name="inetd_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>The inetd item holds information associated with different Internet services. It extends the standard ItemType as defined in the oval-system-characteristics schema and one should refer to the ItemType description for more information.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="protocol" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>A recognized protocol listed in the file /etc/inet/protocols.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="inetditemprotocol">
+                                                  <sch:rule context="unix-sc:inetd_item/unix-sc:protocol">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the protocol entity of an inetd_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="service_name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The name of a valid service listed in the services file. For RPC services, the value of the service-name field consists of the RPC service name or program number, followed by a '/' (slash) and either a version number or a range of version numbers (for example, rstatd/2-4).</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="inetditemservice_name">
+                                                  <sch:rule context="unix-sc:inetd_item/unix-sc:service_name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the service_name entity of an inetd_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="server_program" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Either the pathname of a server program to be invoked by inetd to perform the requested service, or the value internal if inetd itself provides the service.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="inetditemserver_program">
+                                                  <sch:rule context="unix-sc:inetd_item/unix-sc:server_program">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the server_program entity of an inetd_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="server_arguments" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="inetditemserver_arguments">
+                                                  <sch:rule context="unix-sc:inetd_item/unix-sc:server_arguments">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the server_arguments entity of an inetd_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="endpoint_type" type="unix-sc:EntityEndpointType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="inetditemendpoint_type">
+                                                  <sch:rule context="unix-sc:inetd_item/unix-sc:endpoint_type">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the endpoint_type entity of an inetd_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="exec_as_user" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="inetditemexec_as_user">
+                                                  <sch:rule context="unix-sc:inetd_item/unix-sc:exec_as_user">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the exec_as_user entity of an inetd_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="wait_status" type="unix-sc:EntityWaitStatusType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This field has values wait or nowait. This entry specifies whether the server that is invoked by inetd will take over the listening socket associated with the service, and whether once launched, inetd will wait for that server to exit, if ever, before it resumes listening for new service requests.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="inetditemwait_status">
+                                                  <sch:rule context="unix-sc:inetd_item/unix-sc:wait_status">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the wait_status entity of an inetd_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ==============================  INTERFACE ITEM  =============================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="interface_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>The interface item holds information about the interfaces on a system. Each interface item contains name and address information as well as any associated flags. It extends the standard ItemType as defined in the oval-system-characteristics schema and one should refer to the ItemType description for more information.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The name entity is the actual name of the specific interface. Examples might be eth0, eth1, fwo, etc.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixinterfaceitemname">
+                                                  <sch:rule context="unix-sc:interface_item/unix-sc:name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the name entity of an interface_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="hardware_addr" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The hardware_addr entity is the hardware or MAC address of the physical network card.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixinterfaceitemhardware_addr">
+                                                  <sch:rule context="unix-sc:interface_item/unix-sc:hardware_addr">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the hardware_addr entity of an interface_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="inet_addr" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The inet_addr entity is the IP address of the specific interface.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixinterfaceiteminet_addr">
+                                                  <sch:rule context="unix-sc:interface_item/unix-sc:inet_addr">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the inet_addr entity of an interface_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="broadcast_addr" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The broadcast_addr entity is the broadcast IP address for this interface's network. For example 192.168.255.255.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixinterfaceitembroadcast_addr">
+                                                  <sch:rule context="unix-sc:interface_item/unix-sc:broadcast_addr">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the broadcast_addr entity of an interface_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="netmask" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the bitmask used to calculate the inteface's IP network. The network number is calculated by bitwise-ANDing this with the IP address. The host number on that network is calculated by bitwise-XORing this with the IP address.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixinterfaceitemnetmask">
+                                                  <sch:rule context="unix-sc:interface_item/unix-sc:netmask">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the netmask entity of an interface_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="flag" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="unbounded">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the interface flag line, which generally contains flags like "UP" to denote an active interface, "PROMISC" to note that the interface is listening for Ethernet frames not specifically addressed to it, and others.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixinterfaceitemflag">
+                                                  <sch:rule context="unix-sc:interface_item/unix-sc:flag">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the flag entity of an interface_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ===============================  PASSWORD ITEM  =============================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="password_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>/etc/passwd. See passwd(4).</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="username" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the name of the user for which data was gathered.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="passworditemusername">
+                                                  <sch:rule context="unix-sc:password_item/unix-sc:username">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the username entity of a password_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="password" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the encrypted version of the user's password.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="passworditempassword">
+                                                  <sch:rule context="unix-sc:password_item/unix-sc:password">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the password entity of a password_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="user_id" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The numeric user id, or uid, is the third column of each user's entry in /etc/passwd. This element represents the owner of the file.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="passworditemuser_id">
+                                                  <sch:rule context="unix-sc:password_item/unix-sc:user_id">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the user_id entity of a password_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="group_id" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the group owner of the file, by group number.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="passworditemgroup_id">
+                                                  <sch:rule context="unix-sc:password_item/unix-sc:group_id">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the group_id entity of a password_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="gcos" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="passworditemgcos">
+                                                  <sch:rule context="unix-sc:password_item/unix-sc:gcos">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the gcos entity of a password_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="home_dir" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="passworditemhome_dir">
+                                                  <sch:rule context="unix-sc:password_item/unix-sc:home_dir">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the home_dir entity of a password_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="login_shell" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="passworditemlogin_shell">
+                                                  <sch:rule context="unix-sc:password_item/unix-sc:login_shell">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the login_shell entity of a password_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ===============================  PROCESS ITEM  ================================ -->
+     <!-- =============================================================================== -->
+     <xsd:element name="process_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>Output of /usr/bin/ps. See ps(1).</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="command" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This specifies the command/program name about which data has has been collected.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixprocessitemcommand">
+                                                  <sch:rule context="unix-sc:process_item/unix-sc:command">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the command entity of a process_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="exec_time" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                         <xsd:documentation>This is the cumulative CPU time, formatted in [DD-]HH:MM:SS where DD is the number of days when execution time is 24 hours or more.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixprocessitemexec_time">
+                                                  <sch:rule context="unix-sc:process_item/unix-sc:exec_time">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the exec_time entity of a process_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="pid" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the process ID of the process.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixprocessitempid">
+                                                  <sch:rule context="unix-sc:process_item/unix-sc:pid">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the pid entity of a process_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="ppid" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the process ID of the process's parent process.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixprocessitemppid">
+                                                  <sch:rule context="unix-sc:process_item/unix-sc:ppid">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the ppid entity of a process_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="priority" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the scheduling priority with which the process runs. This can be adjusted with the nice command or nice() system call.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixprocessitempriority">
+                                                  <sch:rule context="unix-sc:process_item/unix-sc:priority">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the priority entity of a process_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="scheduling_class" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                         <xsd:documentation>A platform specific characteristic maintained by the scheduler: RT (real-time), TS (timeshare), FF (fifo), SYS (system), etc.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixprocessitemscheduling_class">
+                                                  <sch:rule context="unix-sc:process_item/unix-sc:scheduling_class">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the scheduling_class entity of a process_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="start_time" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                         <xsd:documentation>This is the time of day the process started formatted in HH:MM:SS if the same day the process started or formatted as MMM_DD (Ex.: Feb_5) if process started the previous day or further in the past.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixprocessitemstart_time">
+                                                  <sch:rule context="unix-sc:process_item/unix-sc:start_time">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the start_time entity of a process_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="tty" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the TTY on which the process was started, if applicable.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixprocessitemtty">
+                                                  <sch:rule context="unix-sc:process_item/unix-sc:tty">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the tty entity of a process_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="user_id" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The numeric user id, or uid, is the third column of each user's entry in /etc/passwd. It represents the owner, and thus privilege level, of the specified program.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixprocessitemuser_id">
+                                                  <sch:rule context="unix-sc:process_item/unix-sc:user_id">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the user_id entity of a process_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ===============================  RUNLEVEL ITEM  =============================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="runlevel_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>The runlevel item holds information about the start or kill state of a specified service at a given runlevel. Each runlevel item contains service_name and runlevel information as well as start and kill information. It extends the standard ItemType as defined in the oval-system-characteristics schema and one should refer to the ItemType description for more information.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="service_name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The service_name entity is the actual name of the specific service.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixrlitemservice_name">
+                                                  <sch:rule context="unix-sc:runlevel_item/unix-sc:service_name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the service_name entity of a runlevel_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="runlevel" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The runlevel entity specifies is the runlevel the system is currently at.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixrlitemrunlevel">
+                                                  <sch:rule context="unix-sc:runlevel_item/unix-sc:runlevel">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the runlevel entity of a runlevel_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="start" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The start entity specifies whether the service is scheduled to start at the current runlevel.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixrlitemstart">
+                                                  <sch:rule context="unix-sc:runlevel_item/unix-sc:start">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the start entity of a runlevel_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="kill" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The kill entity specifies whether the service is scheduled to be killed at the current runlevel.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unixrlitemkill">
+                                                  <sch:rule context="unix-sc:runlevel_item/unix-sc:kill">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the kill entity of a runlevel_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =================================  SCCS ITEM  ================================= -->
+     <!-- =============================================================================== -->
+     <xsd:element name="sccs_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation/>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="path" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sccsitempath">
+                                                  <sch:rule context="unix-sc:sccs_item/unix-sc:path">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the path entity of a process_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="filename" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sccsitemfilename">
+                                                  <sch:rule context="unix-sc:sccs_item/unix-sc:filename">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the filename entity of a process_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="module_name" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sccsitemmodule_name">
+                                                  <sch:rule context="unix-sc:sccs_item/unix-sc:module_name">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the module_name entity of a process_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="module_type" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sccsitemmodule_type">
+                                                  <sch:rule context="unix-sc:sccs_item/unix-sc:module_type">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the module_type entity of a process_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="release" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sccsitemrelease">
+                                                  <sch:rule context="unix-sc:sccs_item/unix-sc:release">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the release entity of a process_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="level" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sccsitemlevel">
+                                                  <sch:rule context="unix-sc:sccs_item/unix-sc:level">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the level entity of a process_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="branch" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sccsitembranch">
+                                                  <sch:rule context="unix-sc:sccs_item/unix-sc:branch">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the branch entity of a process_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="sequence" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sccsitemsequence">
+                                                  <sch:rule context="unix-sc:sccs_item/unix-sc:sequence">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the sequence entity of a process_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="what_string" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sccsitemwhat_string">
+                                                  <sch:rule context="unix-sc:sccs_item/unix-sc:what_string">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the what_string entity of a process_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =============================  SHADOW ITEM  =================================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="shadow_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>/etc/shadow. See shadow(4).</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="username" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the name of the user for which data was gathered.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="shadowitemusername">
+                                                  <sch:rule context="unix-sc:shadow_item/unix-sc:username">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the username entity of a shadow_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="password" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the encrypted version of the user's password.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="shadowitempassword">
+                                                  <sch:rule context="unix-sc:shadow_item/unix-sc:password">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the password entity of a shadow_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="chg_lst" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is the date of the last password change in days since 1/1/1970.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="shadowitemchg_lst">
+                                                  <sch:rule context="unix-sc:shadow_item/unix-sc:chg_lst">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the chg_lst entity of a shadow_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="chg_allow" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This specifies how often in days a user may change their password. It can also be thought of as the minimum age of a password.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="shadowitemchg_allow">
+                                                  <sch:rule context="unix-sc:shadow_item/unix-sc:chg_allow">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the chg_allow entity of a shadow_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="chg_req" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This describes how long a user can keep a password before the system forces her to change it.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="shadowitemchg_req">
+                                                  <sch:rule context="unix-sc:shadow_item/unix-sc:chg_req">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the chg_req entity of a shadow_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="exp_warn" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This describes how long before password expiration the system begins warning the user. The system will warn the user at each login.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="shadowitemexp_warn">
+                                                  <sch:rule context="unix-sc:shadow_item/unix-sc:exp_warn">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the exp_warn entity of a shadow_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="exp_inact" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This describes how many days of account inactivity the system will wait after a password expires before locking the account? This window, usually only set to a few days, gives users who are logging in very seldomly a bit of extra time to receive the password expiration warning and change their password.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="shadowitemexp_inact">
+                                                  <sch:rule context="unix-sc:shadow_item/unix-sc:exp_inact">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the exp_inact entity of a shadow_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="exp_date" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This speicifies when will the account's password expire, in days since 1/1/1970.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="shadowitemexp_date">
+                                                  <sch:rule context="unix-sc:shadow_item/unix-sc:exp_date">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the exp_date entity of a shadow_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="flag" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This is a reserved field that the shadow file may use in the future.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="shadowitemflag">
+                                                  <sch:rule context="unix-sc:shadow_item/unix-sc:flag">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the flag entity of a shadow_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =============================  UNAME ITEM  ==================================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="uname_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>Information about the hardware the machine is running on. This information is the parsed equivalent of uname -a.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="machine_class" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This entity specifies the machine hardware name.  This corresponds to the command uname -m.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unameitemmachine_class">
+                                                  <sch:rule context="unix-sc:uname_item/unix-sc:machine_class">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the machine_class entity of a uname_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="node_name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                         <xsd:documentation>This entity specifies the host name.  This corresponds to the command uname -n.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unameitemnode_name">
+                                                  <sch:rule context="unix-sc:uname_item/unix-sc:node_name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the node_name entity of a uname_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="os_name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                         <xsd:documentation>This entity specifies the operating system name.  This corresponds to the command uname -s.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unameitemos_name">
+                                                  <sch:rule context="unix-sc:uname_item/unix-sc:os_name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the os_name entity of a uname_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="os_release" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                         <xsd:documentation>This entity specifies the build version.  This corresponds to the command uname -r.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unameitemos_release">
+                                                  <sch:rule context="unix-sc:uname_item/unix-sc:os_release">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the os_release entity of a uname_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="os_version" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                         <xsd:documentation>This entity specifies the operating system version.  This corresponds to the command uname -v.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unameitemos_version">
+                                                  <sch:rule context="unix-sc:uname_item/unix-sc:os_version">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the os_version entity of a uname_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="processor_type" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                         <xsd:documentation>This entity specifies the processor type.  This corresponds to the command uname -p.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="unameitemprocessor_type">
+                                                  <sch:rule context="unix-sc:uname_item/unix-sc:processor_type">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the processor_type entity of a uname_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ================================  XINETD ITEM  ================================ -->
+     <!-- =============================================================================== -->
+     <xsd:element name="xinetd_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>The xinetd item holds information associated with different Internet services. It extends the standard ItemType as defined in the oval-system-characteristics schema and one should refer to the ItemType description for more information.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="protocol" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The protocol entity describes the protocol related to the service item.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="xinetditemprotocol">
+                                                  <sch:rule context="unix-sc:xinetd_item/unix-sc:protocol">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the protocol entity of an xinetd_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="service_name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The service_name entity describes the name of the service.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="xinetditemservice_name">
+                                                  <sch:rule context="unix-sc:xinetd_item/unix-sc:service_name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the service_name entity of an xinetd_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="flags" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The flags entity describes miscellaneous settings like TCP keepalives or libwrap deactivation.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="xinetditemflags">
+                                                  <sch:rule context="unix-sc:xinetd_item/unix-sc:flags">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the flags entity of an xinetd_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="no_access" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="xinetditemnoaccess">
+                                                  <sch:rule context="unix-sc:xinetd_item/unix-sc:no_access">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the no_access entity of an xinetd_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="only_from" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The only_from entity describes specifies an exclusive set of IP addresses that may connect to this service</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="xinetditemonlyfrom">
+                                                  <sch:rule context="unix-sc:xinetd_item/unix-sc:only_from">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the only_from entity of an xinetd_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="port" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="xinetditemport">
+                                                  <sch:rule context="unix-sc:xinetd_item/unix-sc:port">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the port entity of an xinetd_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="server" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>what program listens on this port</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="xinetditemserver">
+                                                  <sch:rule context="unix-sc:xinetd_item/unix-sc:server">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the server entity of an xinetd_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="server_arguments" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="xinetditemserver_arguments">
+                                                  <sch:rule context="unix-sc:xinetd_item/unix-sc:server_arguments">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the server_arguments entity of an xinetd_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="socket_type" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="xinetditemsockettype">
+                                                  <sch:rule context="unix-sc:xinetd_item/unix-sc:socket_type">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the socket_type entity of an xinetd_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="type" type="unix-sc:EntityXinetdTypeStatusType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="xinetditemtype">
+                                                  <sch:rule context="unix-sc:xinetd_item/unix-sc:type">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the type entity of an xinetd_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="user" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The user entity describes user that xinetd should run the service as.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="xinetditemuser">
+                                                  <sch:rule context="unix-sc:xinetd_item/unix-sc:user">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the user entity of an xinetd_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="wait" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The wait entity describes whether the service allows only one connection at a time.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="xinetditemwait">
+                                                  <sch:rule context="unix-sc:xinetd_item/unix-sc:wait">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the wait entity of an xinetd_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="disabled" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The disabled entity describes whether this service is on or not.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="xinetditemdisabled">
+                                                  <sch:rule context="unix-sc:xinetd_item/unix-sc:disabled">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the disabled entity of an xinetd_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <xsd:complexType name="EntityEndpointType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityEndpointType complex type restricts a string value to a specific set of values that describe endpoint types associated with an Internet service. The empty string is also allowed to support empty emlement associated with error conditions.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-sc:EntityItemStringType">
+                    <xsd:enumeration value="stream"/>
+                    <xsd:enumeration value="dgram"/>
+                    <xsd:enumeration value="raw"/>
+                    <xsd:enumeration value="seqpacket"/>
+                    <xsd:enumeration value="tli"/>
+                    <xsd:enumeration value=""/>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityXinetdTypeStatusType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityXinetdTypeStatusType complex type restricts a string value to three values, either RPC, INTERNAL, or UNLISTED that specify the type of service registered in xinetd. The empty string is also allowed to support empty emlement associated with error conditions.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-sc:EntityItemStringType">
+                    <xsd:enumeration value="INTERNAL">
+                         <xsd:annotation>
+                              <xsd:documentation>The INTERNAL type is used to describe services like echo, chargen, and others whose functionality is supplied by xinetd itself.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:enumeration>
+                    <xsd:enumeration value="RPC">
+                         <xsd:annotation>
+                              <xsd:documentation>The RPC type is used to describe services that use remote procedure call ala NFS.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:enumeration>
+                    <xsd:enumeration value="UNLISTED">
+                         <xsd:annotation>
+                              <xsd:documentation>The UNLISTED type is used to describe services that aren't listed in /etc/protocols or /etc/rpc.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:enumeration>
+                    <xsd:enumeration value=""/>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityWaitStatusType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityWaitStatusType complex type restricts a string value to two values, either wait or nowait, that specify whether the server that is invoked by inetd will take over the listening socket associated with the service, and whether once launched, inetd will wait for that server to exit, if ever, before it resumes listening for new service requests. The empty string is also allowed to support empty emlement associated with error conditions.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-sc:EntityItemStringType">
+                    <xsd:enumeration value="wait"/>
+                    <xsd:enumeration value="nowait"/>
+                    <xsd:enumeration value=""/>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/unix-system-characteristics-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/windows-definitions-schema.xsd
===================================================================
--- trunk/ovaldi/xml/windows-definitions-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/windows-definitions-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,8302 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:win-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#windows" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-definitions-5#windows" elementFormDefault="qualified" version="5.4">
+      <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-common-5" schemaLocation="oval-common-schema.xsd"/>
+      <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-definitions-5" schemaLocation="oval-definitions-schema.xsd"/>
+      <xsd:annotation>
+            <xsd:documentation>The following is a description of the elements, types, and attributes that compose the Windows specific tests found in Open Vulnerability and Assessment Language (OVAL). Each test is an extension of the standard test element defined in the Core Definition Schema. Through extension, each test inherits a set of elements and attributes that are shared amongst all OVAL tests. Each test is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core Definition Schema is not outlined here.</xsd:documentation>
+            <xsd:documentation>The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+            <xsd:appinfo>
+                  <schema>Windows Definition</schema>
+                  <version>5.4</version>
+                  <date>4/1/2008 10:41:46 AM</date>
+                  <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                  <sch:title>schematron validation of the Windows portion of an OVAL Definitions file</sch:title>
+                  <sch:ns prefix="oval-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5"/>
+                  <sch:ns prefix="win-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5#windows"/>
+                  <sch:ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/>
+                  <sch:pattern id="affected_platform">
+                        <sch:rule context="oval-def:affected[@family='windows']">
+                              <sch:assert test="not(oval-def:platform) or oval-def:platform='Microsoft Windows 95' or oval-def:platform='Microsoft Windows 98' or oval-def:platform='Microsoft Windows ME' or oval-def:platform='Microsoft Windows NT' or oval-def:platform='Microsoft Windows 2000' or oval-def:platform='Microsoft Windows XP' or oval-def:platform='Microsoft Windows Server 2003' or oval-def:platform='Microsoft Windows Vista' or oval-def:platform='Microsoft Windows Server 2008'">
+                                    <sch:value-of select="../../@id"/> - the value "<sch:value-of select="oval-def:platform"/>" found in platform element as part of the affected element is not a valid windows platform.</sch:assert>
+                        </sch:rule>
+                  </sch:pattern>
+            </xsd:appinfo>
+      </xsd:annotation>
+      <!-- =============================================================================== -->
+      <!-- ============================  ACCESS TOKEN TEST   ============================= -->
+      <!-- =============================================================================== -->
+      <xsd:element name="accesstoken_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The access token test is used to check the properties of a Windows' access token as well as individual privileges and rights associated with it. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an accesstoken_object and the optional state element specifies the data to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="attst">
+                              <sch:rule context="win-def:accesstoken_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:accesstoken_object/@id"><sch:value-of select="../@id"/> - the object child element of an accesstoken_test must reference an accesstoken_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:accesstoken_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:accesstoken_state/@id"><sch:value-of select="../@id"/> - the state child element of an accesstoken_test must reference an accesstoken_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="accesstoken_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The accesstoken_object element is used by an access token test to define the object to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>An access token object consists of a single security principle that identifies user, group, or compter account that is associated with the token.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="behaviors" type="win-def:AccesstokenBehaviors" minOccurs="0"/>
+                                                <xsd:element name="security_principle" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The security_principle element defines the access token being specified. Security principals include users or groups with either local or domain accounts, and computer accounts created when a computer running Windows NT, Windows 2000, Windows XP, or a member of the Windows Server 2003 family joins a domain. User rights and permissions to access objects such as Active Directory objects, files, and registry settings are assigned to security principals. In a domain environment, security principals should be identified in the form: "domain\trustee name" For local security principals use: "computer name\trustee name" For built-in accounts on the system, use the trustee name without a domain. For example: ADMINISTRATOR, SYSTEM, NETWORK_SERVICES, ADMINISTRATORS (group), etc. Note that the built-in security principals should be all caps as that is how the windows apis return them.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="atobjsecurity_principle">
+                                                                        <sch:rule context="win-def:accesstoken_object/win-def:security_principle">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the security_principle entity of an accesstoken_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="accesstoken_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The accesstoken_state element defines the different information that can be used to evaluate the specified access tokens. This includes the multitude of user rights and permissions that can be granted. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="security_principle" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The security_principle element identifies an access token to test for. Security principals include users or groups with either local or domain accounts, and computer accounts created when a computer running Windows NT, Windows 2000, Windows XP, or a member of the Windows Server 2003 family joins a domain. User rights and permissions to access objects such as Active Directory objects, files, and registry settings are assigned to security principals. In a domain environment, security principals should be identified in the form: "domain\trustee name" For local security principals use: "computer name\trustee name" For built-in accounts on the system, use the trustee name without a domain. For example: ADMINISTRATOR, SYSTEM, NETWORK_SERVICES, ADMINISTRATORS (group), etc. Note that the built-in security principals should be all caps as that is how the windows apis return them.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesecurity_principle">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:security_principle">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the security_principle entity of an accesstoken_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="seassignprimarytokenprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the seassignprimarytokenprivilege privilege is enabled, it allows a parent process to replace the access token that is associated with a child process.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atsteseassignprimarytokenprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:seassignprimarytokenprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the seassignprimarytokenprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="seauditprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the seauditprivilege privilege is enabled, it allows a process to generate audit records in the security log. The security log can be used to trace unauthorized system access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atsteseauditprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:seauditprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the seauditprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="sebackupprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the sebackupprivilege privilege is enabled, it allows the user to circumvent file and directory permissions to back up the system. The privilege is selected only when an application attempts access by using the NTFS backup application programming interface (API). Otherwise, normal file and directory permissions apply.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesebackupprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:sebackupprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the sebackupprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="sechangenotifyprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the sechangenotifyprivilege privilege is enabled, it allows the user to pass through folders to which the user otherwise has no access while navigating an object path in the NTFS file system or in the registry. This privilege does not allow the user to list the contents of a folder; it allows the user only to traverse its directories.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesechangenotifyprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:sechangenotifyprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the sechangenotifyprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="secreateglobalprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the secreateglobalprivilege privilege is enabled, it allows the user to create named file mapping objects in the global namespace during Terminal Services sessions.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesecreateglobalprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:secreateglobalprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the secreateglobalprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="secreatepagefileprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the secreatepagefileprivilege privilege is enabled, it allows the user to create and change the size of a pagefile.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesecreatepagefileprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:secreatepagefileprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the secreatepagefileprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="secreatepermanentprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the secreatepermanentprivilege privilege is enabled, it allows a process to create a directory object in the object manager. It is useful to kernel-mode components that extend the object namespace. Components that are running in kernel mode have this privilege inherently.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesecreatepermanentprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:secreatepermanentprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the secreatepermanentprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="secreatesymboliclinkprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the secreatesymboliclinkprivilege privilege is enabled, it allows users to create symbolic links. This is new for Vista.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesecreatesymboliclinkprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:secreatesymboliclinkprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the secreatesymboliclinkprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="secreatetokenprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the secreatetokenprivilege privilege is enabled, it allows a process to create an access token by calling NtCreateToken() or other token-creating APIs.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesecreatetokenprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:secreatetokenprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the secreatetokenprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="sedebugprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the sedebugprivilege privilege is enabled, it allows the user to attach a debugger to any process. It provides access to sensitive and critical operating system components.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesedebugprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:sedebugprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the sedebugprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="seenabledelegationprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the seenabledelegationprivilege privilege is enabled, it allows the user to change the Trusted for Delegation setting on a user or computer object in Active Directory. The user or computer that is granted this privilege must also have write access to the account control flags on the object.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atsteseenabledelegationprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:seenabledelegationprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the seenabledelegationprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="seimpersonateprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the seimpersonateprivilege privilege is enabled, it allows the user to impersonate a client after authentication. It is not supported on Windows XP, Windows 2000 SP3 and earlier, or Windows NT.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atsteseimpersonateprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:seimpersonateprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the seimpersonateprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="seincreasebasepriorityprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the seincreasebasepriorityprivilege privilege is enabled, it allows a user to increase the base priority class of a process.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atsteseincreasebasepriorityprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:seincreasebasepriorityprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the seincreasebasepriorityprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="seincreasequotaprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the seincreasequotaprivilege privilege is enabled, it allows a process that has access to a second process to increase the processor quota assigned to the second process.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atsteseincreasequotaprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:seincreasequotaprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the seincreasequotaprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="seincreaseworkingsetprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the seincreaseworkingsetprivilege privilege is enabled, it allows a user to increase a process working set. This is new for Vista.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atsteseincreaseworkingsetprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:seincreaseworkingsetprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the seincreaseworkingsetprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="seloaddriverprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the seloaddriverprivilege privilege is enabled, it allows a user to install and remove drivers for Plug and Play devices.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atsteseloaddriverprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:seloaddriverprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the seloaddriverprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="selockmemoryprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the selockmemoryprivilege privilege is enabled, it allows a process to keep data in physical memory, which prevents the system from paging the data to virtual memory on disk.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atsteselockmemoryprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:selockmemoryprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the selockmemoryprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="semachineaccountprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the semachineaccountprivilege privilege is enabled, it allows the user to add a computer to a specific domain.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesemachineaccountprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:semachineaccountprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the semachineaccountprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="semanagevolumeprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the semanagevolumeprivilege privilege is enabled, it allows a non-administrative or remote user to manage volumes or disks.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesemanagevolumeprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:semanagevolumeprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the semanagevolumeprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="seprofilesingleprocessprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the seprofilesingleprocessprivilege privilege is enabled, it allows a user to sample the performance of an application process.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atsteseprofilesingleprocessprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:seprofilesingleprocessprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the seprofilesingleprocessprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="serelabelprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the serelabelprivilege privilege is enabled, it allows a user to modify an object label. This user right is new for Vista.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atsteserelabelprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:serelabelprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the serelabelprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="seremoteshutdownprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the seremoteshutdownprivilege privilege is enabled, it allows a user to shut down a computer from a remote location on the network. </xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atsteseremoteshutdownprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:seremoteshutdownprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the seremoteshutdownprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="serestoreprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the serestoreprivilege privilege is enabled, it allows a user to circumvent file and directory permissions when restoring backed-up files and directories and to set any valid security principal as the owner of an object.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atsteserestoreprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:serestoreprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the serestoreprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="sesecurityprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the sesecurityprivilege privilege is enabled, it allows a user to specify object access auditing options for individual resources such as files, Active Directory objects, and registry keys. A user who has this privilege can also view and clear the security log from Event Viewer.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesesecurityprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:sesecurityprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the sesecurityprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="seshutdownprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the seshutdownprivilege privilege is enabled, it allows a user to shut down the local computer.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atsteseshutdownprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:seshutdownprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the seshutdownprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="sesyncagentprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the sesyncagentprivilege privilege is enabled, it allows a process to read all objects and properties in the directory, regardless of the protection on the objects and properties. It is required in order to use Lightweight Directory Access Protocol (LDAP) directory synchronization (Dirsync) services.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesesyncagentprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:sesyncagentprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the sesyncagentprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="sesystemenvironmentprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the sesystemenvironmentprivilege privilege is enabled, it allows modification of system environment variables either by a process through an API or by a user through System Properties.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesesystemenvironmentprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:sesystemenvironmentprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the sesystemenvironmentprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="sesystemprofileprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the sesystemprofileprivilege privilege is enabled, it allows a user to sample the performance of system processes.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesesystemprofileprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:sesystemprofileprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the sesystemprofileprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="sesystemtimeprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the sesystemtimeprivilege privilege is enabled, it allows the user to adjust the time on the computer's internal clock. It is not required to change the time zone or other display characteristics of the system time.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesesystemtimeprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:sesystemtimeprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the sesystemtimeprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="setakeownershipprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the setakeownershipprivilege privilege is enabled, it allows a user to take ownership of any securable object in the system, including Active Directory objects, NTFS files and folders, printers, registry keys, services, processes, and threads.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesetakeownershipprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:setakeownershipprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the setakeownershipprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="setcbprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the setcbprivilege privilege is enabled, it allows a process to assume the identity of any user and thus gain access to the resources that the user is authorized to access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesetcbprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:setcbprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the setcbprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="setimezoneprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the setimezoneprivilege privilege is enabled, it allows the user to change the time zone. This is new for Vista.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesetimezoneprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:setimezoneprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the setimezoneprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="seundockprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the seundockprivilege privilege is enabled, it allows the user of a portable computer to undock the computer by clicking Eject PC on the Start menu.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atsteseundockprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:seundockprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the seundockprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="seunsolicitedinputprivilege" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If the seunsolicitedinputprivilege privilege is enabled, it allows the user to read unsolicited data from a terminal device.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atsteseunsolicitedinputprivilege">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:seunsolicitedinputprivilege">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the seunsolicitedinputprivilege entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="sebatchlogonright" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If an account is assigned the sebatchlogonright right, it can log on using the batch logon type.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesebatchlogonright">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:sebatchlogonright">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the sebatchlogonright entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="seinteractivelogonright" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If an account is assigned the seinteractivelogonright right, it can log on using the interactive logon type.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atsteseinteractivelogonright">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:seinteractivelogonright">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the seinteractivelogonright entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="senetworklogonright" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If an account is assigned the senetworklogonright right, it can log on using the network logon type.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesenetworklogonright">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:senetworklogonright">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the senetworklogonright entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="seremoteinteractivelogonright" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If an account is assigned the seremoteinteractivelogonright right, it can log on to the computer by using a Remote Desktop connection.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atsteseremoteinteractivelogonright">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:seremoteinteractivelogonright">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the seremoteinteractivelogonright entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="seservicelogonright" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If an account is assigned the seservicelogonright right, it can log on using the service logon type.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atsteseservicelogonright">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:seservicelogonright">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the seservicelogonright entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="sedenybatchLogonright" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If an account is assigned the sedenybatchLogonright right, it is explicitly denied the ability to log on using the batch logon type.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesedenybatchLogonright">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:sedenybatchLogonright">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the sedenybatchLogonright entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="sedenyinteractivelogonright" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If an account is assigned the sedenyinteractivelogonright right, it is explicitly denied the ability to log on using the interactive logon type.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesedenyinteractivelogonright">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:sedenyinteractivelogonright">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the sedenyinteractivelogonright entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="sedenynetworklogonright" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If an account is assigned the sedenynetworklogonright right, it is explicitly denied the ability to log on using the network logon type.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesedenynetworklogonright">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:sedenynetworklogonright">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the sedenynetworklogonright entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="sedenyremoteInteractivelogonright" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If an account is assigned the sedenyremoteInteractivelogonright right, it is explicitly denied the ability to log on through Terminal Services.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesedenyremoteInteractivelogonright">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:sedenyremoteInteractivelogonright">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the sedenyremoteInteractivelogonright entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="sedenyservicelogonright" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>If an account is assigned the sedenyservicelogonright right, it is explicitly denied the ability to log on using the service logon type.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="atstesedenyservicelogonright">
+                                                            <sch:rule context="win-def:accesstoken_state/win-def:sedenyservicelogonright">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the sedenyservicelogonright entity of an accesstoken_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:complexType name="AccesstokenBehaviors">
+            <xsd:annotation>
+                  <xsd:documentation>These behaviors allow a more detailed definition of the accesstoken_object being specified.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:attribute name="include_group" type="xsd:boolean" use="optional" default="true">
+                  <xsd:annotation>
+                        <xsd:documentation>If a group security principle is specified, this behavior specifies whether to include the group or not. For example, maybe you want to check the access tokens associated with every user within a group, but not the group itself. In this case, you would set the include_group behavior to 'false'. If the security_principle is not a group, then this behavior should be ignored.</xsd:documentation>
+                  </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="resolve_group" type="xsd:boolean" use="optional" default="false">
+                  <xsd:annotation>
+                        <xsd:documentation>If a group security principle is specified, this behavior specifies whether to resolve the group into its list of users. For example, to check the access tokens of every user in a group, you could specify the group security_principle and then set the resolve_group behavior to 'true'. If the security_principle is not a group, then this behavior should be ignored.</xsd:documentation>
+                  </xsd:annotation>
+            </xsd:attribute>
+      </xsd:complexType>
+      <!-- =============================================================================== -->
+      <!-- ===========================  ACTIVE DIRECTORY TEST  =========================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="activedirectory_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The active directory test is used to check information about specific entries in active directory. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an activedirectory_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="adtst">
+                              <sch:rule context="win-def:activedirectory_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:activedirectory_object/@id"><sch:value-of select="../@id"/> - the object child element of an activedirectory_test must reference an activedirectory_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:activedirectory_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:activedirectory_state/@id"><sch:value-of select="../@id"/> - the state child element of an activedirectory_test must reference an activedirectory_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="activedirectory_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The activedirectory_object element is used by an active directory test to define those objects to evaluated based on a specified state. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>An active directory object consists of three pieces of information, a naming context, a relative distinguished name, and an attribute. Each piece helps identify a specific active directory entry.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="naming_context" type="win-def:EntityObjectNamingContextType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>Each object in active directory exists under a certain naming context (also known as a partition). A naming context is defined as a single object in the Directory Information Tree (DIT) along with every object in the tree subordinate to it. There are three default naming contexts in Active Directory: domain, configuration, and schema.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="adobjnaming_context">
+                                                                        <sch:rule context="win-def:activedirectory_object/win-def:naming_context">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the naming_context entity of an activedirectory_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="relative_dn" type="oval-def:EntityObjectStringType" nillable="true">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The relative_dn field is used to uniquely identify an object inside the specified naming context. It contains all the parts of the object's distinguished name except those outlined by the naming context. If the nillable attribute is set to true, then the object being specified is the higher level naming context. In this case, the relative_dn element should not be collected or used in analysis. Setting nil equal to true is different than using a .* pattern match, which says to collect every relative dn under a given naming context. Note that when nil is used for the relative dn element, the attribute element should also be nilled.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="adobjrelative_dn">
+                                                                        <sch:rule context="win-def:activedirectory_object/win-def:relative_dn">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the relative_dn entity of an activedirectory_object should be 'string'</sch:assert>
+                                                                              <sch:assert test="not(@xsi:nil='true') or ../win-def:attribute/@xsi:nil='true'"><sch:value-of select="../@id"/> - attribute entity must be nil when relative_dn is nil</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="attribute" type="oval-def:EntityObjectStringType" nillable="true">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>Specifies a named value contained by the object. If the nillable attribute is set to true, then the object being specified is the higher level relative_dn. In this case, the attribute element should not be collected or used in analysis. Setting nil equal to true is different than using a .* pattern match, which says to collect every attribute under a given relative dn.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="adobjattribute">
+                                                                        <sch:rule context="win-def:activedirectory_object/win-def:attribute">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the attribute entity of an activedirectory_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="activedirectory_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The activedirectory_state element defines the different information that can be used to evaluate the specified entries in active directory. An active directory test will reference a specific instance of this state that defines the exact settings that need to be evaluated. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="naming_context" type="win-def:EntityStateNamingContextType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Each object in active directory exists under a certain naming context (also known as a partition). A naming context is defined as a single object in the Directory Information Tree (DIT) along with every object in the tree subordinate to it. There are three default naming contexts in Active Directory: domain, configuration, and schema.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="adstenaming_context">
+                                                            <sch:rule context="win-def:activedirectory_state/win-def:naming_context">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the naming_context entity of an activedirectory_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="relative_dn" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The relative_dn field is used to uniquely identify an object inside the specified naming context. It contains all the parts of the objects distinguished name except those outlined by the naming context.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="adsterelative_dn">
+                                                            <sch:rule context="win-def:activedirectory_state/win-def:relative_dn">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the relative_dn entity of an activedirectory_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="attribute" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Specifies a named value contained by the object.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="adsteattribute">
+                                                            <sch:rule context="win-def:activedirectory_state/win-def:attribute">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the attribute entity of an activedirectory_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="object_class" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The name of the class of which the object is an instance.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="adsteobject_class">
+                                                            <sch:rule context="win-def:activedirectory_state/win-def:object_class">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the object_class entity of an activedirectory_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="adstype" type="win-def:EntityStateAdstypeType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Specifies the type of information that the specified attribute represents.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="adsteadstype">
+                                                            <sch:rule context="win-def:activedirectory_state/win-def:adstype">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the adstype entity of an activedirectory_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="value" type="oval-def:EntityStateAnyType" minOccurs="0" maxOccurs="unbounded">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The actual value of the specified active directory attribute.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="adstevalue">
+                                                            <sch:rule context="win-def:activedirectory_state/win-def:value">
+                                                                  <sch:assert test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"><sch:value-of select="../@id"/> - The datatype has been set to 'int' but the value is not an integer.</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ==========================  AUDIT EVENT POLICY TEST  ========================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="auditeventpolicy_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The audit event policy test is used to check different types of events the system should audit. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a auditeventpolicy_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="aeptst">
+                              <sch:rule context="win-def:auditeventpolicy_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:auditeventpolicy_object/@id"><sch:value-of select="../@id"/> - the object child element of an auditeventpolicy_test must reference an auditeventpolicy_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:auditeventpolicy_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:auditeventpolicy_state/@id"><sch:value-of select="../@id"/> - the state child element of an auditeventpolicy_test must reference an auditeventpolicy_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="auditeventpolicy_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The auditeventpolicy_object element is used by an audit event policy test to define those objects to evaluate based on a specified state. There is actually only one object relating to audit event policy and this is the system as a whole. Therefore, there are no child entities defined. Any OVAL Test written to check audit event policy will reference the same auditeventpolicy_object which is basically an empty object element.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType"/>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="auditeventpolicy_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The auditeventpolicy_state element specifies the different system activities that can be audited. An audit event policy test will reference a specific instance of this state that defines the exact settings that need to be evaluated. The defined values are found in window's POLICY_AUDIT_EVENT_TYPE enumeration and accessed through the LsaQueryInformationPolicy when the InformationClass parameters are set to PolicyAuditEventsInformation. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="account_logon" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Audit attempts to log on to or log off of the system. Also, audit attempts to make a network connection.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsteaccount_logon">
+                                                            <sch:rule context="win-def:auditeventpolicy_state/win-def:account_logon">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the account_logon entity of an auditeventpolicy_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="account_management" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Audit attempts to create, delete, or change user or group accounts. Also, audit password changes.</xsd:documentation>
+                                                <xsd:appinfo>> <sch:pattern id="aepsteaccount_management">
+                                                            <sch:rule context="win-def:auditeventpolicy_state/win-def:account_management">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the account_management entity of an auditeventpolicy_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="detailed_tracking" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Audit specific events, such as program activation, some forms of handle duplication, indirect access to an object, and process exit. </xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepstedetailed_tracking">
+                                                            <sch:rule context="win-def:auditeventpolicy_state/win-def:detailed_tracking">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the detailed_tracking entity of an auditeventpolicy_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="directory_service_access" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Audit attempts to access the directory service.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepstedirectory_service_access">
+                                                            <sch:rule context="win-def:auditeventpolicy_state/win-def:directory_service_access">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the directory_service_access entity of an auditeventpolicy_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="logon" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Audit attempts to log on to or log off of the system. Also, audit attempts to make a network connection.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepstelogon">
+                                                            <sch:rule context="win-def:auditeventpolicy_state/win-def:logon">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the logon entity of an auditeventpolicy_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="object_access" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Audit attempts to access securable objects, such as files.</xsd:documentation>
+                                                <xsd:appinfo>> <sch:pattern id="aepsteobject_access">
+                                                            <sch:rule context="win-def:auditeventpolicy_state/win-def:object_access">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the object_access entity of an auditeventpolicy_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="policy_change" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Audit attempts to change Policy object rules. </xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepstepolicy_change">
+                                                            <sch:rule context="win-def:auditeventpolicy_state/win-def:policy_change">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the policy_change entity of an auditeventpolicy_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="privilege_use" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Audit attempts to use privileges.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsteprivilege_use">
+                                                            <sch:rule context="win-def:auditeventpolicy_state/win-def:privilege_use">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the privilege_use entity of an auditeventpolicy_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="system" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Audit attempts to shut down or restart the computer. Also, audit events that affect system security or the security log.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepstesystem">
+                                                            <sch:rule context="win-def:auditeventpolicy_state/win-def:system">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the system entity of an auditeventpolicy_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ===================  AUDIT EVENT POLICY SUBCATEGORIES TEST  =================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="auditeventpolicysubcategories_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The audit event policy subcategories test is used to check different types of events the system should audit. These subcategories are new for Windows Vista. The test extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a auditeventpolicy_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="aepstst">
+                              <sch:rule context="win-def:auditeventpolicysubcategories_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:auditeventpolicysubcategories_object/@id"><sch:value-of select="../@id"/> - the object child element of an auditeventpolicysubcategories_test must reference an auditeventpolicysubcategories_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:auditeventpolicysubcategories_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:auditeventpolicysubcategories_state/@id"><sch:value-of select="../@id"/> - the state child element of an auditeventpolicysubcategories_test must reference an auditeventpolicysubcategories_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="auditeventpolicysubcategories_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The auditeventpolicysubcategories_object element is used by an audit event policy subcategories test to define those objects to evaluate based on a specified state. There is actually only one object relating to audit event policy subcategories and this is the system as a whole. Therefore, there are no child entities defined. Any OVAL Test written to check audit event policy subcategories will reference the same auditeventpolicysubcategories_object which is basically an empty object element.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType"/>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="auditeventpolicysubcategories_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The auditeventpolicysubcategories_state element specifies the different system activities that can be audited. An audit event policy subcategories test will reference a specific instance of this state that defines the exact subcategories that need to be evaluated. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <!-- Account Logon Audit Policy Subcategories -->
+                                    <xsd:element name="credential_validation" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstecredentialvalidation">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:credential_validation">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the credential_validation entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="kerberos_ticket_events" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstekerberosticketevents">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:kerberos_ticket_events">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the kerberos_ticket_events entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="other_account_logon_events" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepssteotheraccountlogonevents">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:other_account_logon_events">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the other_account_logon_events entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <!-- Account Management Audit Policy Subcategories -->
+                                    <xsd:element name="application_group_management" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepssteapplicationgroupmanagement">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:application_group_management">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the application_group_management entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="computer_account_management" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstecomputeraccountmanagement">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:computer_account_management">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the computer_account_management entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="distribution_group_management" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstedistributiongroupmanagement">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:distribution_group_management">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the distribution_group_management entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="other_account_management_events" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepssteotheraccountmanagementevents">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:other_account_management_events">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the other_account_management_events entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="security_group_management" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstesecuritygroupmanagement">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:security_group_management">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the security_group_management entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="user_account_management" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepssteuseraccountmanagement">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:user_account_management">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the user_account_management entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <!-- Detailed Tracking Audit Policy Subcategories -->
+                                    <xsd:element name="dpapi_activity" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstedpapiactivity">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:dpapi_activity">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the dpapi_activity entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="process_creation" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepssteprocesscreation">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:process_creation">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the process_creation entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="process_termination" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepssteprocesstermination">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:process_termination">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the process_termination entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="rpc_events" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepssterpcevents">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:rpc_events">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the rpc_events entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <!-- DS Access Audit Policy Subcategories -->
+                                    <xsd:element name="directory_service_access" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstedirectoryserviceaccess">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:directory_service_access">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the directory_service_access entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="directory_service_changes" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstedirectoryservicechanges">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:directory_service_changes">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the directory_service_changes entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="directory_service_replication" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstedirectoryservicereplication">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:directory_service_replication">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the directory_service_replication entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="detailed_directory_service_replication" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstedetaileddirectoryservicereplication">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:detailed_directory_service_replication">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the detailed_directory_service_replication entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <!-- Logon/Logoff Audit Policy Subcategories -->
+                                    <xsd:element name="account_lockout" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepssteaccountlockout">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:account_lockout">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the account_lockout entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="ipsec_extended_mode" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepssteipsecextendedmode">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:ipsec_extended_mode">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the ipsec_extended_mode entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="ipsec_main_mode" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepssteipsecmainmode">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:ipsec_main_mode">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the ipsec_main_mode entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="ipsec_quick_mode" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepssteipsec_quick_mode">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:ipsec_quick_mode">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the ipsec_quick_mode entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="logoff" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstelogoff">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:logoff">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the logoff entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="logon" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstelogon">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:logon">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the logon entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="other_logon_logoff_events" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepssteotherlogonlogoffevents">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:other_logon_logoff_events">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the other_logon_logoff_events entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="special_logon" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstespeciallogon">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:special_logon">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the special_logon entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <!-- Object Access Audit Policy Subcategories -->
+                                    <xsd:element name="application_generated" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepssteapplicationgenerated">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:application_generated">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the application_generated entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="certification_services" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstecertificationservices">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:certification_services">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the certification_services entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_share" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstefileshare">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:file_share">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the file_share entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_system" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstefilesystem">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:file_system">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the file_system entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="filtering_platform_connection" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstefilteringplatformconnection">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:filtering_platform_connection">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filtering_platform_connection entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="filtering_platform_packet_drop" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstefilteringplatformpacketdrop">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:filtering_platform_packet_drop">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filtering_platform_packet_drop entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="handle_manipulation" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstehandlemanipulation">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:handle_manipulation">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the handle_manipulation entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="kernel_object" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstekernelobject">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:kernel_object">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the kernel_object entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="other_object_access_events" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepssteotherobjectaccessevents">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:other_object_access_events">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the other_object_access_events entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="registry" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepssteregistry">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:registry">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the registry entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="sam" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstesam">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:sam">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the sam entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <!-- Policy Change Audit Policy Subcategories -->
+                                    <xsd:element name="audit_policy_change" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepssteauditpolicychange">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:audit_policy_change">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the audit_policy_change entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="authentication_policy_change" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepssteauthenticationpolicychange">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:authentication_policy_change">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the authentication_policy_change entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="authorization_policy_change" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepssteauthorizationpolicychange">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:authorization_policy_change">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the authorization_policy_change entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="filtering_platform_policy_change" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstefilteringplatformpolicychange">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:filtering_platform_policy_change">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filtering_platform_policy_change entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="mpssvc_rule_level_policy_change" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstempssvcrulelevelpolicychange">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:mpssvc_rule_level_policy_change">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the mpssvc_rule_level_policy_change entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="other_policy_change_events" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepssteotherpolicychangeevents">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:other_policy_change_events">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the other_policy_change_events entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <!-- Privilege Use Audit Policy Subcategories -->
+                                    <xsd:element name="non_sensitive_privilege_use" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstenonsensitiveprivilegeuse">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:non_sensitive_privilege_use">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the non_sensitive_privilege_use entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="other_privilege_use_events" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepssteotherprivilegeuseevents">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:other_privilege_use_events">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the other_privilege_use_events entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="sensitive_privilege_use" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstesensitive_privilege_use">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:sensitive_privilege_use">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the sensitive_privilege_use entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <!-- System Audit Policy Subcategories -->
+                                    <xsd:element name="ipsec_driver" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepssteipsecdriver">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:ipsec_driver">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the ipsec_driver entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="other_system_events" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepssteothersystemevents">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:other_system_events">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the other_system_events entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="security_state_change" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstesecuritystatechange">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:security_state_change">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the security_state_change entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="security_system_extension" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstesecuritysystemextension">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:security_system_extension">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the security_system_extension entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="system_integrity" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="aepsstesystemintegrity">
+                                                            <sch:rule context="win-def:auditeventpolicysubcategories_state/win-def:system_integrity">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the system_integrity entity of an auditeventpolicysubcategories_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =================================  FILE TEST  ================================= -->
+      <!-- =============================================================================== -->
+      <xsd:element name="file_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The file test is used to check metadata associated with Windows files. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a file_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="filetst">
+                              <sch:rule context="win-def:file_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:file_object/@id"><sch:value-of select="../@id"/> - the object child element of a file_test must reference a file_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:file_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:file_state/@id"><sch:value-of select="../@id"/> - the state child element of a file_test must reference a file_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="file_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The file_object element is used by a file test to define the specific file(s) to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>A file object defines the path and filename of the file(s). In addition, a number of behaviors may be provided that help guide the collection of objects. Please refer to the FileBehaviors complex type for more information about specific behaviors.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="behaviors" type="win-def:FileBehaviors" minOccurs="0"/>
+                                                <xsd:element name="path" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The path element specifies the absolute path to a file on the machine.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="fileobjpath">
+                                                                        <sch:rule context="win-def:file_object/win-def:path">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a file_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="filename" type="oval-def:EntityObjectStringType" nillable="true">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The filename element specifies the name of a file to evaluate. If the nillable attribute is set to true, then the object being specified is the higher level directory object. (not all the files in the directory) In this case, the filename element should not be used during collection and would result in the set of collected objects being the directories themselves. For example, one would set nillable to true if the desire was to as test the attributes or permissions associated with a directory. Setting nil equal to true is different than using a .* pattern match, which says to collect every file under a given path.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="fileobjfilename">
+                                                                        <sch:rule context="win-def:file_object/win-def:filename">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filename entity of a file_object should be 'string'</sch:assert>
+                                                                              <sch:assert test="if (not(@operation) or @operation='equals' or @operation='not equal') then (not(contains(.,'\') or contains(.,'/') or contains(.,':') or contains(.,'*') or contains(.,'?') or contains(.,'>') or contains(.,'|'))) else (1=1)"><sch:value-of select="../@id"/> - filename entity can not contain the characters / \ : * ? > | </sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="file_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The file_state element defines the different metadata associate with a Windows file. This includes the path, filename, owner, size, last modified time, version, etc. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="path" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The path element specifies the absolute path to a file on the machine.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="filestepath">
+                                                            <sch:rule context="win-def:file_state/win-def:path">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a file_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="filename" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The filename element specifies the name of the file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="filestefilename">
+                                                            <sch:rule context="win-def:file_state/win-def:filename">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filename entity of a file_state should be 'string'</sch:assert>
+                                                                  <sch:assert test="if (not(@operation) or @operation='equals' or @operation='not equal') then (not(contains(.,'\') or contains(.,'/') or contains(.,':') or contains(.,'*') or contains(.,'?') or contains(.,'>') or contains(.,'|'))) else (1=1)"><sch:value-of select="../@id"/> - filename entity can not contain the characters / \ : * ? > | </sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="owner" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The owner element is a string that contains the name of the owner.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="filesteowner">
+                                                            <sch:rule context="win-def:file_state/win-def:owner">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the owner entity of a file_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="size" type="oval-def:EntityStateIntType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The size element is the size of the file in bytes.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <valid_datatypes>integer</valid_datatypes>
+                                                      <valid_operators>equals, not equal, greater than, less than, greater than or equal, less than or equal</valid_operators>
+                                                      <sch:pattern id="filestesize">
+                                                            <sch:rule context="win-def:file_state/win-def:size">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the size entity of a file_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="a_time" type="oval-def:EntityStateIntType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Time of last access of file. Valid on NTFS but not on FAT formatted disk drives. The string should represent the FILETIME structure which is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="filestea_time">
+                                                            <sch:rule context="win-def:file_state/win-def:a_time">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the a_time entity of a file_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="c_time" type="oval-def:EntityStateIntType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Time of creation of file. Valid on NTFS but not on FAT formatted disk drives. The string should represent the FILETIME structure which is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="filestec_time">
+                                                            <sch:rule context="win-def:file_state/win-def:c_time">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the c_time entity of a file_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="m_time" type="oval-def:EntityStateIntType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Time of last modification of file. The string should represent the FILETIME structure which is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="filestem_time">
+                                                            <sch:rule context="win-def:file_state/win-def:m_time">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the m_time entity of a file_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="ms_checksum" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The ms_checksum element is the md5 checksum of the file as supplied by Microsoft.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="filestems_checksum">
+                                                            <sch:rule context="win-def:file_state/win-def:ms_checksum">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the ms_checksum entity of a file_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="version" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The version element is the delimited version string of the file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="filesteversion">
+                                                            <sch:rule context="win-def:file_state/win-def:version">
+                                                                  <sch:assert test="@datatype='version'"><sch:value-of select="../@id"/> - datatype attribute for the version entity of a file_state should be 'version'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="type" type="win-def:EntityStateFileTypeType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The type element marks whether the file is a directory, named pipe, standard file, etc. These types are the return values for GetFileType, with the exception of FILE_ATTRIBUTE_DIRECTORY which is obtained by looking at GetFileAttributesEx. NOTE: Should this entity be split into two in future versions of the language as there are other values associated with GetFileAttributesEx that are not represented here?</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="filestetype">
+                                                            <sch:rule context="win-def:file_state/win-def:type">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the type entity of a file_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="development_class" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The development_class element allows the distinction to be made between the GDR development environment and the QFE development environment. This field holds the text found in front of the mmmmmm-nnnn version, for example srv03_gdr.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="filestedevelopment_class">
+                                                            <sch:rule context="win-def:file_state/win-def:development_class">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the development_class entity of a file_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="company" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This entity defines a company name to be found within the version-information structure.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="filestecompany">
+                                                            <sch:rule context="win-def:file_state/win-def:company">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the company entity of a file_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="internal_name" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This entity defines an internal name to be found within the version-information structure.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="filesteinternalname">
+                                                            <sch:rule context="win-def:file_state/win-def:internal_name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the internal_name entity of a file_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="language" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This entity defines a language to be found within the version-information structure.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="filestelanguage">
+                                                            <sch:rule context="win-def:file_state/win-def:language">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the language entity of a file_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="original_filename" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This entity defines an original filename to be found within the version-information structure.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="filesteoriginalfilename">
+                                                            <sch:rule context="win-def:file_state/win-def:original_filename">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the original_filename entity of a file_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="product_name" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This entity defines a product name to be found within the version-information structure.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="filesteproductname">
+                                                            <sch:rule context="win-def:file_state/win-def:product_name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the product_name entity of a file_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="product_version" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This entity defines a product version to be found within the version-information structure.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="filesteproductversion">
+                                                            <sch:rule context="win-def:file_state/win-def:product_version">
+                                                                  <sch:assert test="@datatype='version'"><sch:value-of select="../@id"/> - datatype attribute for the product_version entity of a file_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:complexType name="FileBehaviors">
+            <xsd:annotation>
+                  <xsd:documentation>The FileBehaviors complex type defines a number of behaviors that allow a more detailed definition of the file objects being specified.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:attribute name="max_depth" use="optional" default="-1">
+                  <xsd:annotation>
+                        <xsd:documentation>'max_depth' defines the maximum depth of recursion to perform when a recurse_direction is specified. A value of '0' is equivalent to no recursion, '1' means to step only one directory level up/down, and so on. The default value is '-1' meaning no limitation. Note that the default recurse_direction behavior is 'none' so even though max_depth specifies no limitation by default, the recurse_direction behavior turns recusion off.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:integer">
+                              <xsd:fractionDigits value="0"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="recurse_direction" use="optional" default="none">
+                  <xsd:annotation>
+                        <xsd:documentation>'recurse_direction' defines the direction, either 'up' to parent directories, or 'down' into child directories to recursively search for files. When recursing up or down, one is limited by the max_depth behavior. Note that it is not an error if max_depth specifies a certain level of recursion and that level does not exist. Recursing should only go as deep as available. The default value is 'none' for no recursion.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:string">
+                              <xsd:enumeration value="none"/>
+                              <xsd:enumeration value="up"/>
+                              <xsd:enumeration value="down"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+      </xsd:complexType>
+      <!-- =============================================================================== -->
+      <!-- ====================  FILE AUDITED PERMISSIONS TEST (53)  ===================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="fileauditedpermissions53_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The file audit permissions test is used to check the audit permissions associated with Windows files. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a fileauditedpermissions_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="fap53tst">
+                              <sch:rule context="win-def:fileauditedpermissions53_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:fileauditedpermissions53_object/@id"><sch:value-of select="../@id"/> - the object child element of a fileauditedpermissions53_test must reference a fileauditedpermissions53_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:fileauditedpermissions53_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:fileauditedpermissions53_state/@id"><sch:value-of select="../@id"/> - the state child element of a fileauditedpermissions53_test must reference a fileauditedpermissions53_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="fileauditedpermissions53_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The fileauditedpermissions53_object element is used by a file audited permissions test to define the objects used to evalutate against the specified state. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic.</xsd:documentation>
+                  <xsd:documentation>A fileauditedpermissions53_object is defined as a combination of a Windows file and trustee sid. The file represents the file to be evaluated while the trustee sid represents the account (sid) to check audited permissions of. If multiple files or sids are matched by either reference, then each possible combination of file and sid is a matching file audited permissions object. In addition, a number of behaviors may be provided that help guide the collection of objects. Please refer to the FileAuditPermissions53Behaviors complex type for more information about specific behaviors.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set" minOccurs="0"/>
+                                          <xsd:sequence minOccurs="0">
+                                                <xsd:element name="behaviors" type="win-def:FileAuditPermissions53Behaviors" minOccurs="0"/>
+                                                <xsd:element name="path" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The path element specifies the absolute path to a file on the machine.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="fap53objpath">
+                                                                        <sch:rule context="win-def:fileauditedpermissions53_object/win-def:path">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a fileauditedpermissions53_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="filename" type="oval-def:EntityObjectStringType" nillable="true">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The filename element specifies the name of a file to evaluate. If the nillable attribute is set to true, then the object being specified is the higher level directory object. (not all the files in the directory) In this case, the filename element should not be used during collection and would result in the set of collected objects being the directories themselves. For example, one would set nillable to true if the desire was to as test the attributes or permissions associated with a directory. Setting nil equal to true is different than using a .* pattern match, which says to collect every file under a given path.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="fap53objfilename">
+                                                                        <sch:rule context="win-def:fileauditedpermissions53_object/win-def:filename">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filename entity of a fileauditedpermissions53_object should be 'string'</sch:assert>
+                                                                              <sch:assert test="if (not(@operation) or @operation='equals' or @operation='not equal') then (not(contains(.,'\') or contains(.,'/') or contains(.,':') or contains(.,'*') or contains(.,'?') or contains(.,'>') or contains(.,'|'))) else (1=1)"><sch:value-of select="../@id"/> - filename entity can not contain the characters / \ : * ? > | </sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="trustee_sid" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The trustee_sid element is the unique sid that associated a user, group, system, or program (such as a Windows service).</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="fap53objtrustee_sid">
+                                                                        <sch:rule context="win-def:fileauditedpermissions53_object/win-def:trustee_sid">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_sid entity of a fileauditedpermissions53_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="fileauditedpermissions53_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The fileauditedpermissions53_state element defines the different audit permissions that can be associated with a given fileauditedpermissions53_object. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="path" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The path element specifies the absolute path (for a file on the machine) to test for.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fap53stepath">
+                                                            <sch:rule context="win-def:fileauditedpermissions53_state/win-def:path">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a fileauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="filename" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The filename element specifies the name of a file to test for.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fap53stefilename">
+                                                            <sch:rule context="win-def:fileauditedpermissions53_state/win-def:filename">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filename entity of a fileauditedpermissions53_state should be 'string'</sch:assert>
+                                                                  <sch:assert test="if (not(@operation) or @operation='equals' or @operation='not equal') then (not(contains(.,'\') or contains(.,'/') or contains(.,':') or contains(.,'*') or contains(.,'?') or contains(.,'>') or contains(.,'|'))) else (1=1)"><sch:value-of select="../@id"/> - filename entity can not contain the characters / \ : * ? > | </sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="trustee_sid" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The trustee_sid element is the unique sid that associated a user, group, system, or program (such as a Windows service).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fap53stetrustee_sid">
+                                                            <sch:rule context="win-def:fileauditedpermissions53_state/win-def:trustee_sid">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_sid entity of a fileauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_delete" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to delete the object.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fap53stestandard_delete">
+                                                            <sch:rule context="win-def:fileauditedpermissions53_state/win-def:standard_delete">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the standard_delete entity of a fileauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_read_control" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to read the information in the object's security descriptor, not including the information in the SACL.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fap53stestandard_read_control">
+                                                            <sch:rule context="win-def:fileauditedpermissions53_state/win-def:standard_read_control">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the standard_read_control entity of a fileauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_write_dac" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to modify the DACL in the object's security descriptor.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fap53stestandard_write_dac">
+                                                            <sch:rule context="win-def:fileauditedpermissions53_state/win-def:standard_write_dac">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the standard_write_dac entity of a fileauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_write_owner" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to change the owner in the object's security descriptor.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fap53stestandard_write_owner">
+                                                            <sch:rule context="win-def:fileauditedpermissions53_state/win-def:standard_write_owner">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the standard_write_owner entity of a fileauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_synchronize" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Windows NT/2000: The right to use the object for synchronization. This enables a thread to wait until the object is in the signaled state. Some object types do not support this access right.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fap53stestandard_synchronize">
+                                                            <sch:rule context="win-def:fileauditedpermissions53_state/win-def:standard_synchronize">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the standard_synchronize entity of a fileauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="access_system_security" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Indicates access to a system access control list (SACL).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fap53steaccess_system_security">
+                                                            <sch:rule context="win-def:fileauditedpermissions53_state/win-def:access_system_security">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the access_system_security entity of a fileauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_read" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Read access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fap53stegeneric_read">
+                                                            <sch:rule context="win-def:fileauditedpermissions53_state/win-def:generic_read">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the generic_read entity of a fileauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_write" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Write access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fap53stegeneric_write">
+                                                            <sch:rule context="win-def:fileauditedpermissions53_state/win-def:generic_write">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the generic_write entity of a fileauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_execute" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Execute access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fap53stegeneric_execute">
+                                                            <sch:rule context="win-def:fileauditedpermissions53_state/win-def:generic_execute">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the generic_execute entity of a fileauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_all" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Read, write, and execute access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fap53stegeneric_all">
+                                                            <sch:rule context="win-def:fileauditedpermissions53_state/win-def:generic_all">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the generic_all entity of a fileauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_read_data" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to read data from the file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fap53stefile_read_data">
+                                                            <sch:rule context="win-def:fileauditedpermissions53_state/win-def:file_read_data">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the file_read_data entity of a fileauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_write_data" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to write data to the file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fap53stefile_write_data">
+                                                            <sch:rule context="win-def:fileauditedpermissions53_state/win-def:file_write_data">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the file_write_data entity of a fileauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_append_data" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to append data to the file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fap53stefile_append_data">
+                                                            <sch:rule context="win-def:fileauditedpermissions53_state/win-def:file_append_data">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the file_append_data entity of a fileauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_read_ea" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to read extended attributes.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fap53stefile_read_ea">
+                                                            <sch:rule context="win-def:fileauditedpermissions53_state/win-def:file_read_ea">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the file_read_ea entity of a fileauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_write_ea" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to write extended attributes.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fap53stefile_write_ea">
+                                                            <sch:rule context="win-def:fileauditedpermissions53_state/win-def:file_write_ea">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the file_write_ea entity of a fileauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_execute" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to execute a file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fap53stefile_execute">
+                                                            <sch:rule context="win-def:fileauditedpermissions53_state/win-def:file_execute">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the file_execute entity of a fileauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_delete_child" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Right to delete a directory and all the files it contains (its children), even if the files are read-only.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fap53stefile_delete_child">
+                                                            <sch:rule context="win-def:fileauditedpermissions53_state/win-def:file_delete_child">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the file_delete_child entity of a fileauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_read_attributes" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to read file attributes.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fap53stefile_read_attributes">
+                                                            <sch:rule context="win-def:fileauditedpermissions53_state/win-def:file_read_attributes">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the file_read_attributes entity of a fileauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_write_attributes" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to change file attributes.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fap53stefile_write_attributes">
+                                                            <sch:rule context="win-def:fileauditedpermissions53_state/win-def:file_write_attributes">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the file_write_attributes entity of a fileauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:complexType name="FileAuditPermissions53Behaviors">
+            <xsd:annotation>
+                  <xsd:documentation>These behaviors allow a more detailed definition of the fileauditpermissions53_objects being specified.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:attribute name="max_depth" use="optional" default="-1">
+                  <xsd:annotation>
+                        <xsd:documentation>'max_depth' defines the maximum depth of recursion to perform when a recurse_direction is specified. A value of '0' is equivalent to no recursion, '1' means to step only one directory level up/down, and so on. The default value is '-1' meaning no limitation. Note that the default recurse_direction behavior is 'none' so even though max_depth specifies no limitation by default, the recurse_direction behavior turns recusion off.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:integer">
+                              <xsd:fractionDigits value="0"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="recurse_direction" use="optional" default="none">
+                  <xsd:annotation>
+                        <xsd:documentation>'recurse_direction' defines the direction, either 'up' to parent directories, or 'down' into child directories to recursively search for files. When recursing up or down, one is limited by the max_depth behavior. Note that it is not an error if max_depth specifies a certain level of recursion and that level does not exist. Recursing should only go as deep as available. The default value is 'none' for no recursion.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:string">
+                              <xsd:enumeration value="none"/>
+                              <xsd:enumeration value="up"/>
+                              <xsd:enumeration value="down"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="include_group" type="xsd:boolean" use="optional" default="true"/>
+            <xsd:attribute name="resolve_group" type="xsd:boolean" use="optional" default="false"/>
+      </xsd:complexType>
+      <!-- =============================================================================== -->
+      <!-- ================  FILE AUDITED PERMISSIONS (deprecated) TEST  ================= -->
+      <!-- =============================================================================== -->
+      <xsd:element name="fileauditedpermissions_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>This test has been deprecated and will be removed in version 6.0 of the language. Recommend use of the newer fileauditedpermissions53_test.</xsd:documentation>
+                  <xsd:documentation>The file audit permissions test is used to check the audit permissions associated with Windows files. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a fileauditedpermissions_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="faptst">
+                              <sch:rule context="win-def:fileauditedpermissions_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:fileauditedpermissions_object/@id"><sch:value-of select="../@id"/> - the object child element of a fileauditedpermissions_test must reference a fileauditedpermissions_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:fileauditedpermissions_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:fileauditedpermissions_state/@id"><sch:value-of select="../@id"/> - the state child element of a fileauditedpermissions_test must reference a fileauditedpermissions_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="fileauditedpermissions_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>This object has been deprecated and will be removed in version 6.0 of the language. Recommend use of the newer fileauditedpermissions53_object.</xsd:documentation>
+                  <xsd:documentation>The fileauditedpermissions_object element is used by a file audited permissions test to define the objects used to evalutate against the specified state. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic.</xsd:documentation>
+                  <xsd:documentation>A fileauditedpermissions_object is defined as a combination of a Windows file and trustee name. The file represents the file to be evaluated while the trustee name represents the account (sid) to check audited permissions of. If multiple files or sids are matched by either reference, then each possible combination of file and sid is a matching file audited permissions object. In addition, a number of behaviors may be provided that help guide the collection of objects. Please refer to the FileAuditPermissionsBehaviors complex type for more information about specific behaviors.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set" minOccurs="0"/>
+                                          <xsd:sequence minOccurs="0">
+                                                <xsd:element name="behaviors" type="win-def:FileAuditPermissionsBehaviors" minOccurs="0"/>
+                                                <xsd:element name="path" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The path element specifies the absolute path to a file on the machine.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="fapobjpath">
+                                                                        <sch:rule context="win-def:fileauditedpermissions_object/win-def:path">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a fileauditedpermissions_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="filename" type="oval-def:EntityObjectStringType" nillable="true">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The filename element specifies the name of a file to evaluate. If the nillable attribute is set to true, then the object being specified is the higher level directory object. (not all the files in the directory) In this case, the filename element should not be used during collection and would result in the set of collected objects being the directories themselves. For example, one would set nillable to true if the desire was to as test the attributes or permissions associated with a directory. Setting nil equal to true is different than using a .* pattern match, which says to collect every file under a given path.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="fapobjfilename">
+                                                                        <sch:rule context="win-def:fileauditedpermissions_object/win-def:filename">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filename entity of a fileauditedpermissions_object should be 'string'</sch:assert>
+                                                                              <sch:assert test="if (not(@operation) or @operation='equals' or @operation='not equal') then (not(contains(.,'\') or contains(.,'/') or contains(.,':') or contains(.,'*') or contains(.,'?') or contains(.,'>') or contains(.,'|'))) else (1=1)"><sch:value-of select="../@id"/> - filename entity can not contain the characters / \ : * ? > | </sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="trustee_name" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The trustee_name element is the unique name that associated a particular SID. A SID can be associated with a user, group, or program (such as a Windows service). In a domain environment, trustee names should be identified in the form: "domain\trustee name" For local trustee names use: "computer name\trustee name" For built-in accounts on the system, use the trustee name without a domain. For example: ADMINISTRATOR, SYSTEM, NETWORK_SERVICES, ADMINISTRATORS (group), etc. Note that the built-in trustee names should be all caps as that is how the windows apis return them.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="fapobjtrustee_name">
+                                                                        <sch:rule context="win-def:fileauditedpermissions_object/win-def:trustee_name">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_name entity of a fileauditedpermissions_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="fileauditedpermissions_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>This state has been deprecated and will be removed in version 6.0 of the language. Recommend use of the newer fileauditedpermissions53_state.</xsd:documentation>
+                  <xsd:documentation>The fileauditedpermissions_state element defines the different audit permissions that can be associated with a given fileauditedpermissions_object. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="path" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The path element specifies the absolute path (for a file on the machine) to test for.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fapstepath">
+                                                            <sch:rule context="win-def:fileauditedpermissions_state/win-def:path">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a fileauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="filename" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The filename element specifies the name of a file to test for.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fapstefilename">
+                                                            <sch:rule context="win-def:fileauditedpermissions_state/win-def:filename">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filename entity of a fileauditedpermissions_state should be 'string'</sch:assert>
+                                                                  <sch:assert test="if (not(@operation) or @operation='equals' or @operation='not equal') then (not(contains(.,'\') or contains(.,'/') or contains(.,':') or contains(.,'*') or contains(.,'?') or contains(.,'>') or contains(.,'|'))) else (1=1)"><sch:value-of select="../@id"/> - filename entity can not contain the characters / \ : * ? > | </sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="trustee_name" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The trustee_name is the unique name associated with a particular security identifier (SID). In a domain environment, trustee names should be identified in the form: "domain\trustee name" For local trustee names use: "computer name\trustee name" For built-in accounts on the system, use the trustee name without a domain. For example: ADMINISTRATOR, SYSTEM, NETWORK_SERVICES, ADMINISTRATORS (group), etc. Note that the built-in trustee names should be all caps as that is how the windows apis return them.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fapstetrustee_name">
+                                                            <sch:rule context="win-def:fileauditedpermissions_state/win-def:trustee_name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_name entity of a fileauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_delete" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to delete the object.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fapstestandard_delete">
+                                                            <sch:rule context="win-def:fileauditedpermissions_state/win-def:standard_delete">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the standard_delete entity of a fileauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_read_control" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to read the information in the object's security descriptor, not including the information in the SACL.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fapstestandard_read_control">
+                                                            <sch:rule context="win-def:fileauditedpermissions_state/win-def:standard_read_control">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the standard_read_control entity of a fileauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_write_dac" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to modify the DACL in the object's security descriptor.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fapstestandard_write_dac">
+                                                            <sch:rule context="win-def:fileauditedpermissions_state/win-def:standard_write_dac">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the standard_write_dac entity of a fileauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_write_owner" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to change the owner in the object's security descriptor.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fapstestandard_write_owner">
+                                                            <sch:rule context="win-def:fileauditedpermissions_state/win-def:standard_write_owner">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the standard_write_owner entity of a fileauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_synchronize" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Windows NT/2000: The right to use the object for synchronization. This enables a thread to wait until the object is in the signaled state. Some object types do not support this access right.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fapstestandard_synchronize">
+                                                            <sch:rule context="win-def:fileauditedpermissions_state/win-def:standard_synchronize">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the standard_synchronize entity of a fileauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="access_system_security" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Indicates access to a system access control list (SACL).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fapsteaccess_system_security">
+                                                            <sch:rule context="win-def:fileauditedpermissions_state/win-def:access_system_security">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the access_system_security entity of a fileauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_read" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Read access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fapstegeneric_read">
+                                                            <sch:rule context="win-def:fileauditedpermissions_state/win-def:generic_read">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the generic_read entity of a fileauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_write" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Write access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fapstegeneric_write">
+                                                            <sch:rule context="win-def:fileauditedpermissions_state/win-def:generic_write">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the generic_write entity of a fileauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_execute" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Execute access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fapstegeneric_execute">
+                                                            <sch:rule context="win-def:fileauditedpermissions_state/win-def:generic_execute">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the generic_execute entity of a fileauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_all" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Read, write, and execute access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fapstegeneric_all">
+                                                            <sch:rule context="win-def:fileauditedpermissions_state/win-def:generic_all">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the generic_all entity of a fileauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_read_data" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to read data from the file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fapstefile_read_data">
+                                                            <sch:rule context="win-def:fileauditedpermissions_state/win-def:file_read_data">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the file_read_data entity of a fileauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_write_data" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to write data to the file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fapstefile_write_data">
+                                                            <sch:rule context="win-def:fileauditedpermissions_state/win-def:file_write_data">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the file_write_data entity of a fileauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_append_data" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to append data to the file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fapstefile_append_data">
+                                                            <sch:rule context="win-def:fileauditedpermissions_state/win-def:file_append_data">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the file_append_data entity of a fileauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_read_ea" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to read extended attributes.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fapstefile_read_ea">
+                                                            <sch:rule context="win-def:fileauditedpermissions_state/win-def:file_read_ea">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the file_read_ea entity of a fileauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_write_ea" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to write extended attributes.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fapstefile_write_ea">
+                                                            <sch:rule context="win-def:fileauditedpermissions_state/win-def:file_write_ea">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the file_write_ea entity of a fileauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_execute" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to execute a file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fapstefile_execute">
+                                                            <sch:rule context="win-def:fileauditedpermissions_state/win-def:file_execute">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the file_execute entity of a fileauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_delete_child" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Right to delete a directory and all the files it contains (its children), even if the files are read-only.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fapstefile_delete_child">
+                                                            <sch:rule context="win-def:fileauditedpermissions_state/win-def:file_delete_child">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the file_delete_child entity of a fileauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_read_attributes" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to read file attributes.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fapstefile_read_attributes">
+                                                            <sch:rule context="win-def:fileauditedpermissions_state/win-def:file_read_attributes">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the file_read_attributes entity of a fileauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_write_attributes" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to change file attributes.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fapstefile_write_attributes">
+                                                            <sch:rule context="win-def:fileauditedpermissions_state/win-def:file_write_attributes">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the file_write_attributes entity of a fileauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:complexType name="FileAuditPermissionsBehaviors">
+            <xsd:annotation>
+                  <xsd:documentation>These behaviors allow a more detailed definition of the fileauditpermissions_objects being specified.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:attribute name="max_depth" use="optional" default="-1">
+                  <xsd:annotation>
+                        <xsd:documentation>'max_depth' defines the maximum depth of recursion to perform when a recurse_direction is specified. A value of '0' is equivalent to no recursion, '1' means to step only one directory level up/down, and so on. The default value is '-1' meaning no limitation. Note that the default recurse_direction behavior is 'none' so even though max_depth specifies no limitation by default, the recurse_direction behavior turns recusion off.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:integer">
+                              <xsd:fractionDigits value="0"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="recurse_direction" use="optional" default="none">
+                  <xsd:annotation>
+                        <xsd:documentation>'recurse_direction' defines the direction, either 'up' to parent directories, or 'down' into child directories to recursively search for files. When recursing up or down, one is limited by the max_depth behavior. Note that it is not an error if max_depth specifies a certain level of recursion and that level does not exist. Recursing should only go as deep as available. The default value is 'none' for no recursion.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:string">
+                              <xsd:enumeration value="none"/>
+                              <xsd:enumeration value="up"/>
+                              <xsd:enumeration value="down"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="include_group" type="xsd:boolean" use="optional" default="true"/>
+            <xsd:attribute name="resolve_group" type="xsd:boolean" use="optional" default="false"/>
+      </xsd:complexType>
+      <!-- =============================================================================== -->
+      <!-- ========================  FILE EFFECTIVE RIGHTS TEST (53)  ========================= -->
+      <!-- =============================================================================== -->
+      <xsd:element name="fileeffectiverights53_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The file effective rights test is used to check the effective rights associated with Windows files. Note that the trustee's effective access rights are the access rights that the ACL grants to the trustee or to any groups of which the trustee is a member. The fileeffectiverights53_test element extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a fileeffectiverights53_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="fer53tst">
+                              <sch:rule context="win-def:fileeffectiverights53_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:fileeffectiverights53_object/@id"><sch:value-of select="../@id"/> - the object child element of a fileeffectiverights53_test must reference a fileeffectiverights53_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:fileeffectiverights53_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:fileeffectiverights53_state/@id"><sch:value-of select="../@id"/> - the state child element of a fileeffectiverights53_test must reference a fileeffectiverights53_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="fileeffectiverights53_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The fileeffectiverights53_object element is used by a file effective rights test to define the objects used to evalutate against the specified state. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic.</xsd:documentation>
+                  <xsd:documentation>A fileeffectiverights53_object is defined as a combination of a Windows file and trustee sid. The file represents the file to be evaluated while the trustee sid represents the account (sid) to check effective rights of. If multiple files or sids are matched by either reference, then each possible combination of file and sid is a matching file effective rights object. In addition, a number of behaviors may be provided that help guide the collection of objects. Please refer to the FileEffectiveRights53Behaviors complex type for more information about specific behaviors.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set" minOccurs="0"/>
+                                          <xsd:sequence minOccurs="0">
+                                                <xsd:element name="behaviors" type="win-def:FileEffectiveRights53Behaviors" minOccurs="0"/>
+                                                <xsd:element name="path" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>Specifies the absolute path to a file on the machine.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="fer53objpath">
+                                                                        <sch:rule context="win-def:fileeffectiverights53_object/win-def:path">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a fileeffectiverights53_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="filename" type="oval-def:EntityObjectStringType" nillable="true">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The filename element specifies the name of a file to evaluate. If the nillable attribute is set to true, then the object being specified is the higher level directory object. (not all the files in the directory) In this case, the filename element should not be used during collection and would result in the set of collected objects being the directories themselves. For example, one would set nillable to true if the desire was to as test the attributes or permissions associated with a directory. Setting nil equal to true is different than using a .* pattern match, which says to collect every file under a given path..</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="fer53objfilename">
+                                                                        <sch:rule context="win-def:fileeffectiverights53_object/win-def:filename">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filename entity of a fileeffectiverights53_object should be 'string'</sch:assert>
+                                                                              <sch:assert test="if (not(@operation) or @operation='equals' or @operation='not equal') then (not(contains(.,'\') or contains(.,'/') or contains(.,':') or contains(.,'*') or contains(.,'?') or contains(.,'>') or contains(.,'|'))) else (1=1)"><sch:value-of select="../@id"/> - filename entity can not contain the characters / \ : * ? > | </sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="trustee_sid" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The trustee_sid element is the unique sid that associated a user, group, system, or program (such as a Windows service).</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="fer53objtrustee_sid">
+                                                                        <sch:rule context="win-def:fileeffectiverights53_object/win-def:trustee_sid">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_sid entity of a fileeffectiverights53_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="fileeffectiverights53_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The fileeffectiverights53_state element defines the different rights that can be associated with a given fileeffectiverights53_object. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="path" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The path element specifies the absolute path to a file on the machine.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fer53stepath">
+                                                            <sch:rule context="win-def:fileeffectiverights53_state/win-def:path">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a fileeffectiverights53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="filename" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The filename element specifies the name of the file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fer53stefilename">
+                                                            <sch:rule context="win-def:fileeffectiverights53_state/win-def:filename">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filename entity of a fileeffectiverights53_state should be 'string'</sch:assert>
+                                                                  <sch:assert test="if (not(@operation) or @operation='equals' or @operation='not equal') then (not(contains(.,'\') or contains(.,'/') or contains(.,':') or contains(.,'*') or contains(.,'?') or contains(.,'>') or contains(.,'|'))) else (1=1)"><sch:value-of select="../@id"/> - filename entity can not contain the characters / \ : * ? > | </sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="trustee_sid" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The trustee_sid element is the unique sid that associated a user, group, system, or program (such as a Windows service).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fer53stetrustee_sid">
+                                                            <sch:rule context="win-def:fileeffectiverights53_state/win-def:trustee_sid">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_sid entity of a fileeffectiverights53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_delete" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to delete the object.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fer53stestandard_delete">
+                                                            <sch:rule context="win-def:fileeffectiverights53_state/win-def:standard_delete">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_delete entity of a fileeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_read_control" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to read the information in the object's security descriptor, not including the information in the SACL.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fer53stestandard_read_control">
+                                                            <sch:rule context="win-def:fileeffectiverights53_state/win-def:standard_read_control">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_read_control entity of a fileeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_write_dac" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to modify the DACL in the object's security descriptor.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fer53stestandard_write_dac">
+                                                            <sch:rule context="win-def:fileeffectiverights53_state/win-def:standard_write_dac">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_write_dac entity of a fileeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_write_owner" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to change the owner in the object's security descriptor.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fer53stestandard_write_owner">
+                                                            <sch:rule context="win-def:fileeffectiverights53_state/win-def:standard_write_owner">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_write_owner entity of a fileeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_synchronize" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Windows NT/2000: The right to use the object for synchronization. This enables a thread to wait until the object is in the signaled state. Some object types do not support this access right.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fer53stestandard_synchronize">
+                                                            <sch:rule context="win-def:fileeffectiverights53_state/win-def:standard_synchronize">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_synchronize entity of a fileeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="access_system_security" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Indicates access to a system access control list (SACL).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fer53steaccess_system_security">
+                                                            <sch:rule context="win-def:fileeffectiverights53_state/win-def:access_system_security">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the access_system_security entity of a fileeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_read" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Read access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fer53stegeneric_read">
+                                                            <sch:rule context="win-def:fileeffectiverights53_state/win-def:generic_read">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the generic_read entity of a fileeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_write" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Write access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fer53stegeneric_write">
+                                                            <sch:rule context="win-def:fileeffectiverights53_state/win-def:generic_write">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the generic_write entity of a fileeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_execute" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Execute access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fer53stegeneric_execute">
+                                                            <sch:rule context="win-def:fileeffectiverights53_state/win-def:generic_execute">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the generic_execute entity of a fileeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_all" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Read, write, and execute access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fer53stegeneric_all">
+                                                            <sch:rule context="win-def:fileeffectiverights53_state/win-def:generic_all">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the generic_all entity of a fileeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_read_data" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to read data from the file</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fer53stefile_read_data">
+                                                            <sch:rule context="win-def:fileeffectiverights53_state/win-def:file_read_data">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_read_data entity of a fileeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_write_data" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to write data to the file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fer53stefile_write_data">
+                                                            <sch:rule context="win-def:fileeffectiverights53_state/win-def:file_write_data">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_write_data entity of a fileeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_append_data" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to append data to the file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fer53stefile_append_data">
+                                                            <sch:rule context="win-def:fileeffectiverights53_state/win-def:file_append_data">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_append_data entity of a fileeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_read_ea" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to read extended attributes.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fer53stefile_read_ea">
+                                                            <sch:rule context="win-def:fileeffectiverights53_state/win-def:file_read_ea">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_read_ea entity of a fileeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_write_ea" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to write extended attributes.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fer53stefile_write_ea">
+                                                            <sch:rule context="win-def:fileeffectiverights53_state/win-def:file_write_ea">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_write_ea entity of a fileeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_execute" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to execute a file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fer53stefile_execute">
+                                                            <sch:rule context="win-def:fileeffectiverights53_state/win-def:file_execute">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_execute entity of a fileeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_delete_child" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Right to delete a directory and all the files it contains (its children), even if the files are read-only.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fer53stefile_delete_child">
+                                                            <sch:rule context="win-def:fileeffectiverights53_state/win-def:file_delete_child">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_delete_child entity of a fileeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_read_attributes" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to read file attributes.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fer53stefile_read_attributes">
+                                                            <sch:rule context="win-def:fileeffectiverights53_state/win-def:file_read_attributes">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_read_attributes entity of a fileeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_write_attributes" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to change file attributes.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fer53stefile_write_attributes">
+                                                            <sch:rule context="win-def:fileeffectiverights53_state/win-def:file_write_attributes">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_write_attributes entity of a fileeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:complexType name="FileEffectiveRights53Behaviors">
+            <xsd:annotation>
+                  <xsd:documentation>These behaviors allow a more detailed definition of the fileeffectiverights53_objects being specified.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:attribute name="max_depth" use="optional" default="-1">
+                  <xsd:annotation>
+                        <xsd:documentation>'max_depth' defines the maximum depth of recursion to perform when a recurse_direction is specified. A value of '0' is equivalent to no recursion, '1' means to step only one directory level up/down, and so on. The default value is '-1' meaning no limitation. Note that the default recurse_direction behavior is 'none' so even though max_depth specifies no limitation by default, the recurse_direction behavior turns recusion off.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:integer">
+                              <xsd:fractionDigits value="0"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="recurse_direction" use="optional" default="none">
+                  <xsd:annotation>
+                        <xsd:documentation>'recurse_direction' defines the direction, either 'up' to parent directories, or 'down' into child directories to recursively search for files. When recursing up or down, one is limited by the max_depth behavior. Note that it is not an error if max_depth specifies a certain level of recursion and that level does not exist. Recursing should only go as deep as available. The default value is 'none' for no recursion.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:string">
+                              <xsd:enumeration value="none"/>
+                              <xsd:enumeration value="up"/>
+                              <xsd:enumeration value="down"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="include_group" type="xsd:boolean" use="optional" default="true"/>
+            <xsd:attribute name="resolve_group" type="xsd:boolean" use="optional" default="false"/>
+      </xsd:complexType>
+      <!-- =============================================================================== -->
+      <!-- ==================  FILE EFFECTIVE RIGHTS TEST (deprecated)  ================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="fileeffectiverights_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>This test has been deprecated and will be removed in version 6.0 of the language. Recommend use of the newer fileeffectiverights53_test.</xsd:documentation>
+                  <xsd:documentation>The file effective rights test is used to check the effective rights associated with Windows files. Note that the trustee's effective access rights are the access rights that the ACL grants to the trustee or to any groups of which the trustee is a member. The fileeffectiverights_test element extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a fileeffectiverights_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="fertst">
+                              <sch:rule context="win-def:fileeffectiverights_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:fileeffectiverights_object/@id"><sch:value-of select="../@id"/> - the object child element of a fileeffectiverights_test must reference a fileeffectiverights_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:fileeffectiverights_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:fileeffectiverights_state/@id"><sch:value-of select="../@id"/> - the state child element of a fileeffectiverights_test must reference a fileeffectiverights_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="fileeffectiverights_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>This object has been deprecated and will be removed in version 6.0 of the language. Recommend use of the newer fileeffectiverights53_object.</xsd:documentation>
+                  <xsd:documentation>The fileeffectiverights_object element is used by a file effective rights test to define the objects used to evalutate against the specified state. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic.</xsd:documentation>
+                  <xsd:documentation>A fileeffectiverights_object is defined as a combination of a Windows file and trustee name. The file represents the file to be evaluated while the trustee name represents the account (sid) to check effective rights of. If multiple files or sids are matched by either reference, then each possible combination of file and sid is a matching file effective rights object. In addition, a number of behaviors may be provided that help guide the collection of objects. Please refer to the FileEffectiveRightsBehaviors complex type for more information about specific behaviors.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set" minOccurs="0"/>
+                                          <xsd:sequence minOccurs="0">
+                                                <xsd:element name="behaviors" type="win-def:FileEffectiveRightsBehaviors" minOccurs="0"/>
+                                                <xsd:element name="path" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>Specifies the absolute path to a file on the machine.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="fefobjpath">
+                                                                        <sch:rule context="win-def:fileeffectiverights_object/win-def:path">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a fileeffectiverights_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="filename" type="oval-def:EntityObjectStringType" nillable="true">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The filename element specifies the name of a file to evaluate. If the nillable attribute is set to true, then the object being specified is the higher level directory object. (not all the files in the directory) In this case, the filename element should not be used during collection and would result in the set of collected objects being the directories themselves. For example, one would set nillable to true if the desire was to as test the attributes or permissions associated with a directory. Setting nil equal to true is different than using a .* pattern match, which says to collect every file under a given path.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="fefobjfilename">
+                                                                        <sch:rule context="win-def:fileeffectiverights_object/win-def:filename">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filename entity of a fileeffectiverights_object should be 'string'</sch:assert>
+                                                                              <sch:assert test="if (not(@operation) or @operation='equals' or @operation='not equal') then (not(contains(.,'\') or contains(.,'/') or contains(.,':') or contains(.,'*') or contains(.,'?') or contains(.,'>') or contains(.,'|'))) else (1=1)"><sch:value-of select="../@id"/> - filename entity can not contain the characters / \ : * ? > | </sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="trustee_name" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The trustee_name element is the unique name that associated a particular SID. A SID can be associated with a user, group, or program (such as a Windows service). In a domain environment, trustee names should be identified in the form: "domain\trustee name" For local trustee names use: "computer name\trustee name" For built-in accounts on the system, use the trustee name without a domain. For example: ADMINISTRATOR, SYSTEM, NETWORK_SERVICES, ADMINISTRATORS (group), etc. Note that the built-in trustee names should be all caps as that is how the windows apis return them.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="fefobjtrustee_name">
+                                                                        <sch:rule context="win-def:fileeffectiverights_object/win-def:trustee_name">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_name entity of a fileeffectiverights_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="fileeffectiverights_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>This state has been deprecated and will be removed in version 6.0 of the language. Recommend use of the newer fileeffectiverights53_state.</xsd:documentation>
+                  <xsd:documentation>The fileeffectiverights_state element defines the different rights that can be associated with a given fileeffectiverights_object. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="path" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The path element specifies the absolute path to a file on the machine.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ferstepath">
+                                                            <sch:rule context="win-def:fileeffectiverights_state/win-def:path">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a fileeffectiverights_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="filename" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The filename element specifies the name of the file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ferstefilename">
+                                                            <sch:rule context="win-def:fileeffectiverights_state/win-def:filename">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the filename entity of a fileeffectiverights_state should be 'string'</sch:assert>
+                                                                  <sch:assert test="if (not(@operation) or @operation='equals' or @operation='not equal') then (not(contains(.,'\') or contains(.,'/') or contains(.,':') or contains(.,'*') or contains(.,'?') or contains(.,'>') or contains(.,'|'))) else (1=1)"><sch:value-of select="../@id"/> - filename entity can not contain the characters / \ : * ? > | </sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="trustee_name" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The unique name associated with a particular security identifier (SID). In a domain environment, trustee names should be identified in the form: "domain\trustee name" For local trustee names use: "computer name\trustee name" For built-in accounts on the system, use the trustee name without a domain. For example: ADMINISTRATOR, SYSTEM, NETWORK_SERVICES, ADMINISTRATORS (group), etc. Note that the built-in trustee names should be all caps as that is how the windows apis return them.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ferstetrustee_name">
+                                                            <sch:rule context="win-def:fileeffectiverights_state/win-def:trustee_name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_name entity of a fileeffectiverights_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_delete" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to delete the object.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ferstestandard_delete">
+                                                            <sch:rule context="win-def:fileeffectiverights_state/win-def:standard_delete">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_delete entity of a fileeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_read_control" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to read the information in the object's security descriptor, not including the information in the SACL.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ferstestandard_read_control">
+                                                            <sch:rule context="win-def:fileeffectiverights_state/win-def:standard_read_control">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_read_control entity of a fileeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_write_dac" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to modify the DACL in the object's security descriptor.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ferstestandard_write_dac">
+                                                            <sch:rule context="win-def:fileeffectiverights_state/win-def:standard_write_dac">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_write_dac entity of a fileeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_write_owner" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to change the owner in the object's security descriptor.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ferstestandard_write_owner">
+                                                            <sch:rule context="win-def:fileeffectiverights_state/win-def:standard_write_owner">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_write_owner entity of a fileeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_synchronize" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Windows NT/2000: The right to use the object for synchronization. This enables a thread to wait until the object is in the signaled state. Some object types do not support this access right.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ferstestandard_synchronize">
+                                                            <sch:rule context="win-def:fileeffectiverights_state/win-def:standard_synchronize">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_synchronize entity of a fileeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="access_system_security" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Indicates access to a system access control list (SACL).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="fersteaccess_system_security">
+                                                            <sch:rule context="win-def:fileeffectiverights_state/win-def:access_system_security">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the access_system_security entity of a fileeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_read" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Read access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ferstegeneric_read">
+                                                            <sch:rule context="win-def:fileeffectiverights_state/win-def:generic_read">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the generic_read entity of a fileeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_write" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Write access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ferstegeneric_write">
+                                                            <sch:rule context="win-def:fileeffectiverights_state/win-def:generic_write">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the generic_write entity of a fileeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_execute" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Execute access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ferstegeneric_execute">
+                                                            <sch:rule context="win-def:fileeffectiverights_state/win-def:generic_execute">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the generic_execute entity of a fileeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_all" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Read, write, and execute access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ferstegeneric_all">
+                                                            <sch:rule context="win-def:fileeffectiverights_state/win-def:generic_all">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the generic_all entity of a fileeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_read_data" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to read data from the file</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ferstefile_read_data">
+                                                            <sch:rule context="win-def:fileeffectiverights_state/win-def:file_read_data">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_read_data entity of a fileeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_write_data" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to write data to the file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ferstefile_write_data">
+                                                            <sch:rule context="win-def:fileeffectiverights_state/win-def:file_write_data">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_write_data entity of a fileeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_append_data" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to append data to the file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ferstefile_append_data">
+                                                            <sch:rule context="win-def:fileeffectiverights_state/win-def:file_append_data">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_append_data entity of a fileeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_read_ea" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to read extended attributes.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ferstefile_read_ea">
+                                                            <sch:rule context="win-def:fileeffectiverights_state/win-def:file_read_ea">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_read_ea entity of a fileeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_write_ea" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to write extended attributes.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ferstefile_write_ea">
+                                                            <sch:rule context="win-def:fileeffectiverights_state/win-def:file_write_ea">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_write_ea entity of a fileeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_execute" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to execute a file.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ferstefile_execute">
+                                                            <sch:rule context="win-def:fileeffectiverights_state/win-def:file_execute">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_execute entity of a fileeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_delete_child" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Right to delete a directory and all the files it contains (its children), even if the files are read-only.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ferstefile_delete_child">
+                                                            <sch:rule context="win-def:fileeffectiverights_state/win-def:file_delete_child">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_delete_child entity of a fileeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_read_attributes" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to read file attributes.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ferstefile_read_attributes">
+                                                            <sch:rule context="win-def:fileeffectiverights_state/win-def:file_read_attributes">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_read_attributes entity of a fileeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_write_attributes" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Grants the right to change file attributes.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ferstefile_write_attributes">
+                                                            <sch:rule context="win-def:fileeffectiverights_state/win-def:file_write_attributes">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_write_attributes entity of a fileeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:complexType name="FileEffectiveRightsBehaviors">
+            <xsd:annotation>
+                  <xsd:documentation>These behaviors allow a more detailed definition of the fileeffectiverights_objects being specified.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:attribute name="max_depth" use="optional" default="-1">
+                  <xsd:annotation>
+                        <xsd:documentation>'max_depth' defines the maximum depth of recursion to perform when a recurse_direction is specified. A value of '0' is equivalent to no recursion, '1' means to step only one directory level up/down, and so on. The default value is '-1' meaning no limitation. Note that the default recurse_direction behavior is 'none' so even though max_depth specifies no limitation by default, the recurse_direction behavior turns recusion off.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:integer">
+                              <xsd:fractionDigits value="0"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="recurse_direction" use="optional" default="none">
+                  <xsd:annotation>
+                        <xsd:documentation>'recurse_direction' defines the direction, either 'up' to parent directories, or 'down' into child directories to recursively search for files. When recursing up or down, one is limited by the max_depth behavior. Note that it is not an error if max_depth specifies a certain level of recursion and that level does not exist. Recursing should only go as deep as available. The default value is 'none' for no recursion.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:string">
+                              <xsd:enumeration value="none"/>
+                              <xsd:enumeration value="up"/>
+                              <xsd:enumeration value="down"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="include_group" type="xsd:boolean" use="optional" default="true"/>
+            <xsd:attribute name="resolve_group" type="xsd:boolean" use="optional" default="false"/>
+      </xsd:complexType>
+      <!-- =============================================================================== -->
+      <!-- ================================  GROUP TEST  ================================= -->
+      <!-- =============================================================================== -->
+      <xsd:element name="group_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The group_test allows the different users that belong to specific groups (identified by name) to be tested. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a group_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="grouptst">
+                              <sch:rule context="win-def:group_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:group_object/@id"><sch:value-of select="../@id"/> - the object child element of a group_test must reference a group_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:group_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:group_state/@id"><sch:value-of select="../@id"/> - the state child element of a group_test must reference a group_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="group_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The group_object element is used by a group test to define the specific group(s) (identified by name) to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set" minOccurs="0"/>
+                                          <xsd:sequence minOccurs="0">
+                                                <xsd:element name="group" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The group element holds a string that represents the name of a particular group. In Windows, group names are case-insensitive and thus case does not matter for this entity. In a domain environment, groups should be identified in the form: "domain\group name" For local groups use: "computer name\group name" For built-in accounts on the system, use the group name without a domain. For example: ADMINISTRATORS, etc. Note that the built-in group names should be all caps to help improve readability as that is how the windows apis return them. Of course techincally it does not matter since the names are case-insensitive.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="groupobjgroup">
+                                                                        <sch:rule context="win-def:group_object/win-def:group">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the group entity of a group_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="group_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The group_state element enumerates the different users associate with a Windows group. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="group" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The group element holds a string that represents the name of a particular group. In Windows, group names are case-insensitive and thus case does not matter for this entity. In a domain environment, groups should be identified in the form: "domain\group name" For local groups use: "computer name\group name" For built-in accounts on the system, use the group name without a domain. For example: ADMINISTRATORS, etc. Note that the built-in group names should be all caps to help improve readability as that is how the windows apis return them. Of course techincally it does not matter since the names are case-insensitive.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="groupstegroup">
+                                                            <sch:rule context="win-def:group_state/win-def:group">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the group entity of a group_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="user" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The user element holds a string that represents the name of a particular user. In Windows, user names are case-insensitive and thus case does not matter for this entity. In a domain environment, users should be identified in the form: "domain\user name" For local users use: "computer name\user name" For built-in accounts on the system, use the user name without a domain. For example: ADMINISTRATOR, SYSTEM, etc. Note that the built-in user names should be all caps to help improve readability as that is how the windows apis return them. Of course techincally it does not matter since the names are case-insensitive.</xsd:documentation>
+                                                <xsd:documentation>The user element can be included multiple times in a system characteristic item in order to record that a group contains a number of different users. Note that the entity_check attribute associated with EntityStateStringType guides the evaluation of entities like user that refer to items that can occur an unbounded number of times.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="groupsteuser">
+                                                            <sch:rule context="win-def:group_state/win-def:user">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the user entity of a group_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ==============================  GROUP SID TEST  =============================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="group_sid_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The group_sid_test allows the different users that belong to specific groups (identified by SID) to be tested. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a group_sid_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="groupsidtst">
+                              <sch:rule context="win-def:group_sid_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:group_sid_object/@id"><sch:value-of select="../@id"/> - the object child element of a group_sid_test must reference a group_sid_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:group_sid_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:group_sid_state/@id"><sch:value-of select="../@id"/> - the state child element of a group_sid_test must reference a group_sid_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="group_sid_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The group_sid_object element is used by a group_test to define the specific group(s) (identified by SID) to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set" minOccurs="0"/>
+                                          <xsd:sequence minOccurs="0">
+                                                <xsd:element name="group_sid" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The group_sid entity holds a string that represents the SID of a particular group.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="groupsidobjgroup">
+                                                                        <sch:rule context="win-def:group_sid_object/win-def:group_sid">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the group_sid entity of a group_sid_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="group_sid_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The group_state element enumerates the different users associated with a Windows group. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="group_sid" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The group_sid entity holds a string that represents the SID of a particular group.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="groupsidstegroup">
+                                                            <sch:rule context="win-def:group_sid_state/win-def:group_sid">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the group_sid entity of a group_sid_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="user_sid" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The user entity holds a string that represents the SID of a particular user.  This entity can be included multiple times in a system characteristic item in order to record that a group contains a number of different users. Note that the entity_check attribute associated with EntityStateStringType guides the evaluation of entities like user that refer to items that can occur an unbounded number of times.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="groupsidsteuser">
+                                                            <sch:rule context="win-def:group_sid_state/win-def:user_sid">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the user_sid entity of a group_sid_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ==============================  INTERFACE TEST  =============================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="interface_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The interface test enumerate various attributes about the interfaces on a system. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an interface_object and the optional state element specifies the interface information to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="wininterfacetst">
+                              <sch:rule context="win-def:interface_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:interface_object/@id"><sch:value-of select="../@id"/> - the object child element of an interface_test must reference an interface_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:interface_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:interface_state/@id"><sch:value-of select="../@id"/> - the state child element of an interface_test must reference an interface_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="interface_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The interface_object element is used by an interface test to define the specific interfaces(s) to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>An interface object consists of a single name entity that identifies which interface is being specified. For help understanding this object, see the MIB_IFROW and MIB_IPADDRROW structures.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set" minOccurs="0"/>
+                                          <xsd:sequence minOccurs="0">
+                                                <xsd:element name="name" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The name element specifies the name of an interface.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="wininterfaceobjname">
+                                                                        <sch:rule context="win-def:interface_object/win-def:name">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the name entity of a interface_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="interface_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The interface_state element enumerates the different properties associate with a Windows interface. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="name" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The name element specifies the name of an interface.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="wininterfacestename">
+                                                            <sch:rule context="win-def:interface_state/win-def:name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the name entity of an interface_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="index" type="oval-def:EntityStateIntType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The index element specifies index that identifies the interface.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="wininterfacesteindex">
+                                                            <sch:rule context="win-def:interface_state/win-def:index">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the index entity of an interface_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="type" type="win-def:EntityStateInterfaceTypeType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The type element specifies the type of interface which is limited to certain set of values.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="wininterfacestetype">
+                                                            <sch:rule context="win-def:interface_state/win-def:type">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the type entity of an interface_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="hardware_addr" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The hardware_addr element specifies the the physical address of the adapter for this interface.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="wininterfacestehardware_addr">
+                                                            <sch:rule context="win-def:interface_state/win-def:hardware_addr">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the hardware_addr entity of an interface_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="inet_addr" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The inet_addr element specifies the IP address.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="wininterfacesteinet_addr">
+                                                            <sch:rule context="win-def:interface_state/win-def:inet_addr">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the inet_addr entity of an interface_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="broadcast_addr" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The broadcast_addr element specifies the broadcast address. A broadcast address is typically the IP address with the host portion set to either all zeros or all ones.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="wininterfacestebroadcast_addr">
+                                                            <sch:rule context="win-def:interface_state/win-def:broadcast_addr">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the broadcast_addr entity of an interface_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="netmask" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The netmask element specifies the subnet mask for the IP address.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="wininterfacestenetmask">
+                                                            <sch:rule context="win-def:interface_state/win-def:netmask">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the netmask entity of an interface_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="addr_type" type="win-def:EntityStateAddrTypeType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The addr_type element specifies the address type or state of a specific interface. Each interface can be associated with more than one value meaning the addr_type element can occur multiple times in a system characteristic item. Note that the entity_check attribute associated with EntityStateAddrTypeType guides the evaluation of unbounded entities like addr_type.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="wininterfacesteaddr_type">
+                                                            <sch:rule context="win-def:interface_state/win-def:addr_type">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the addr_type entity of an interface_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ============================  LOCKOUT POLICY TEST  ============================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="lockoutpolicy_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The lockout policy test enumerates various attributes associated with lockout information for users and global groups in the security database. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a lockoutpolicy_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="lptst">
+                              <sch:rule context="win-def:lockoutpolicy_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:lockoutpolicy_object/@id"><sch:value-of select="../@id"/> - the object child element of a lockoutpolicy_test must reference a lockoutpolicy_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:lockoutpolicy_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:lockoutpolicy_state/@id"><sch:value-of select="../@id"/> - the state child element of a lockoutpolicy_test must reference a lockoutpolicy_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="lockoutpolicy_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The lockoutpolicy_object element is used by a lockout policy test to define those objects to evaluated based on a specified state. There is actually only one object relating to lockout policy and this is the system as a whole. Therefore, there are no child entities defined. Any OVAL Test written to check lockout policy will reference the same lockoutpolicy_object which is basically an empty object element.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType"/>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="lockoutpolicy_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The lockoutpolicy_state element specifies the various attributes associated with lockout information for users and global groups in the security database. A lockout policy test will reference a specific instance of this state that defines the exact settings that need to be evaluated. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="force_logoff" type="oval-def:EntityStateIntType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Specifies, in seconds, the amount of time between the end of the valid logon time and the time when the user is forced to log off the network. A value of TIMEQ_FOREVER (-1) indicates that the user is never forced to log off. A value of zero indicates that the user will be forced to log off immediately when the valid logon time expires. See the USER_MODALS_INFO_0 structure returned by a call to NetUserModalsGet().</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="lpsteforce_logoff">
+                                                            <sch:rule context="win-def:lockoutpolicy_state/win-def:force_logoff">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the force_logoff entity of a lockoutpolicy_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="lockout_duration" type="oval-def:EntityStateIntType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Specifies, in seconds, how long a locked account remains locked before it is automatically unlocked. See the USER_MODALS_INFO_3 structure returned by a call to NetUserModalsGet().</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="lpstelockout_duration">
+                                                            <sch:rule context="win-def:lockoutpolicy_state/win-def:lockout_duration">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the lockout_duration entity of a lockoutpolicy_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="lockout_observation_window" type="oval-def:EntityStateIntType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Specifies the maximum time, in seconds, that can elapse between any two failed logon attempts before lockout occurs. See the USER_MODALS_INFO_3 structure returned by a call to NetUserModalsGet().</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="lpstelockout_observation_window">
+                                                            <sch:rule context="win-def:lockoutpolicy_state/win-def:lockout_observation_window">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the lockout_observation_window entity of a lockoutpolicy_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="lockout_threshold" type="oval-def:EntityStateIntType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Specifies the number of invalid password authentications that can occur before an account is marked "locked out." See the USER_MODALS_INFO_3 structure returned by a call to NetUserModalsGet().</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="lpstelockout_threshold">
+                                                            <sch:rule context="win-def:lockoutpolicy_state/win-def:lockout_threshold">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the lockout_threshold entity of a lockoutpolicy_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ===============================  METABASE TEST  =============================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="metabase_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The metabase test is used to check information found in the Windows metabase. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a metabase_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="metabasetst">
+                              <sch:rule context="win-def:metabase_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:metabase_object/@id"><sch:value-of select="../@id"/> - the object child element of a metabase_test must reference a metabase_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:metabase_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:metabase_state/@id"><sch:value-of select="../@id"/> - the state child element of a metabase_test must reference a metabase_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="metabase_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The metabase_object element is used by a metabase test to define the specific metabase item(s) to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>A metabase object defines the key and id of the item(s).</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set" minOccurs="0"/>
+                                          <xsd:sequence minOccurs="0">
+                                                <xsd:element name="key" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The key element specifies a metabase key.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="metabaseobjkey">
+                                                                        <sch:rule context="win-def:metabase_object/win-def:key">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key entity of a metabase_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="id" type="oval-def:EntityObjectIntType" nillable="true">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The id element specifies a particular object under the metabase key. If the nillable attribute is set to true, then the object being specified is the higher level key. In this case, the id element should not be collected or used in analysis. Setting nil equal to true is different than using a .* pattern match, says to collect every id under a given key. The most likely use for xsi:nil within a metabase object is when checking for the existance of a particular key, without regards to the different ids associated with it.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <valid_datatypes>integer</valid_datatypes>
+                                                                  <valid_operators>equals, not equal, greater than, less than, greater than or equal, less than or equal</valid_operators>
+                                                                  <sch:pattern id="metabaseobjid">
+                                                                        <sch:rule context="win-def:metabase_object/win-def:id">
+                                                                              <sch:assert test="@datatype='int'">
+                                                                                    <sch:value-of select="../@id"/> - datatype attribute for the id entity of a metabase_object should be 'int'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="metabase_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The metabase_state element defines the different metadata associate with a metabase item. This includes the name, user type, data type, and the actual data. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="key" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The key element specifies a metabase key.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="metabasestekey">
+                                                            <sch:rule context="win-def:metabase_state/win-def:key">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key entity of a metabase_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="id" type="oval-def:EntityStateIntType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The id element specifies a particular object under the metabase key.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="metabasesteid">
+                                                            <sch:rule context="win-def:metabase_state/win-def:id">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the id entity of a metabase_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="name" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The name element describes the name of the specified metabase object.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="metabasestename">
+                                                            <sch:rule context="win-def:metabase_state/win-def:name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the name entity of a metabase_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="user_type" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The user_type element is a DWORD that specifies the user type of the data. See the METADATA_RECORD structure.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="metabasesteuser_type">
+                                                            <sch:rule context="win-def:metabase_state/win-def:user_type">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the user_type entity of a metabase_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="data_type" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The data_type element identifies the type of data in the metabase entry. See the METADATA_RECORD structure.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="metabasestedata_type">
+                                                            <sch:rule context="win-def:metabase_state/win-def:data_type">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the data_type entity of a metabase_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="data" type="oval-def:EntityStateAnyType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The actual data of the named item under the specified metabase key</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="metabasestedata">
+                                                            <sch:rule context="win-def:metabase_state/win-def:data">
+                                                                  <sch:assert test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"><sch:value-of select="../@id"/> - The datatype has been set to 'int' but the value is not an integer.</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ===========================  PASSWORD POLICY TEST  ============================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="passwordpolicy_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The password policy test is used to check specific policy associated with passwords. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a passwordpolicy_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:documentation>NOTE: This information is stored in the SAM or Active Directory but is encrypted or hidden so the registry_test and activedirectory_test are of no use. If this can be figured out, then the password_policy test is not needed.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="pptst">
+                              <sch:rule context="win-def:passwordpolicy_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:passwordpolicy_object/@id"><sch:value-of select="../@id"/> - the object child element of a passwordpolicy_test must reference a passwordpolicy_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:passwordpolicy_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:passwordpolicy_state/@id"><sch:value-of select="../@id"/> - the state child element of a passwordpolicy_test must reference a passwordpolicy_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="passwordpolicy_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The passwordpolicy_object element is used by a password policy test to define those objects to evaluated based on a specified state. There is actually only one object relating to password policy and this is the system as a whole. Therefore, there are no child entities defined. Any OVAL Test written to check password policy will reference the same passwordpolicy_object which is basically an empty object element.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType"/>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="passwordpolicy_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The passwordpolicy_state element specifies the various policies associated with passwords. A password policy test will reference a specific instance of this state that defines the exact settings that need to be evaluated.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="max_passwd_age" type="oval-def:EntityStateIntType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Specifies, in seconds, the maximum allowable password age. A value of TIMEQ_FOREVER (-1) indicates that the password never expires. The minimum valid value for this element is ONE_DAY (86400).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ppstemax_passwd_age">
+                                                            <sch:rule context="win-def:passwordpolicy_state/win-def:max_passwd_age">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the max_passwd_age entity of a passwordpolicy_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="min_passwd_age" type="oval-def:EntityStateIntType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Specifies the minimum number of seconds that can elapse between the time a password changes and when it can be changed again. A value of zero indicates that no delay is required between password updates.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ppstemin_passwd_age">
+                                                            <sch:rule context="win-def:passwordpolicy_state/win-def:min_passwd_age">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the min_passwd_age entity of a passwordpolicy_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="min_passwd_len" type="oval-def:EntityStateIntType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Specifies the minimum allowable password length. Valid values for this element are zero through PWLEN.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ppstemin_passwd_len">
+                                                            <sch:rule context="win-def:passwordpolicy_state/win-def:min_passwd_len">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the min_passwd_len entity of a passwordpolicy_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="password_hist_len" type="oval-def:EntityStateIntType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Specifies the length of password history maintained. A new password cannot match any of the previous usrmod0_password_hist_len passwords. Valid values for this element are zero through DEF_MAX_PWHIST.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ppstepassword_hist_len">
+                                                            <sch:rule context="win-def:passwordpolicy_state/win-def:password_hist_len">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the password_hist_len entity of a passwordpolicy_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="password_complexity" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>A boolean value that signifies whether passwords must meet the complexity requirements put forth by the operating system.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ppstepassword_complexity">
+                                                            <sch:rule context="win-def:passwordpolicy_state/win-def:password_complexity">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the password_complexity entity of an passwordpolicy_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="reversible_encryption" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Determines whether Windows 2000 Server, Windows 2000 Professional, and Windows XP Professional store passwords using reversible encryption.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="ppstereversible_encryption">
+                                                            <sch:rule context="win-def:passwordpolicy_state/win-def:reversible_encryption">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the reversible_encryption entity of an passwordpolicy_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =================================  PORT TEST  ================================= -->
+      <!-- =============================================================================== -->
+      <xsd:element name="port_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The port test is used to check information about the available ports on a Windows system. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a port_object and the optional state element specifies the port information to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="winporttst">
+                              <sch:rule context="win-def:port_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:port_object/@id"><sch:value-of select="../@id"/> - the object child element of a port_test must reference a port_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:port_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:port_state/@id"><sch:value-of select="../@id"/> - the state child element of a port_test must reference a port_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="port_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The port_object element is used by a port test to define the specific port(s) to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>A port object defines the local address, port number, and protocol of the port(s).</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set" minOccurs="0"/>
+                                          <xsd:sequence minOccurs="0">
+                                                <xsd:element name="local_address" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>This element specifies the local IP address the listening port is bound to.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="winportobjlocal_address">
+                                                                        <sch:rule context="win-def:port_object/win-def:local_address">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the local_address entity of a port_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="local_port" type="oval-def:EntityObjectIntType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>This element specifies the number assigned to the local listening port.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="winportobjlocal_port">
+                                                                        <sch:rule context="win-def:port_object/win-def:local_port">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the local_port entity of a port_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="protocol" type="win-def:EntityObjectProtocolType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>This element specifies the type of listening port. It is restricted to either TCP or UDP.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="winportobjprotocol">
+                                                                        <sch:rule context="win-def:port_object/win-def:protocol">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the protocol entity of a port_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="port_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The port_state element defines the different metadata associate with a Windows port. This includes the local address, port number, protocol, and pid. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="local_address" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This element specifies the local IP address the listening port is bound to.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="winportstelocal_address">
+                                                            <sch:rule context="win-def:port_state/win-def:local_address">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the local_address entity of a port_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="local_port" type="oval-def:EntityStateIntType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This element specifies the number assigned to the local listening port.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="winportstelocal_port">
+                                                            <sch:rule context="win-def:port_state/win-def:local_port">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the local_port entity of a port_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="protocol" type="win-def:EntityStateProtocolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This element specifies the type of listening port. It is restricted to either TCP or UDP.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="winportsteprotocol">
+                                                            <sch:rule context="win-def:port_state/win-def:protocol">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the protocol entity of a port_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="pid" type="oval-def:EntityStateIntType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The id given to the process that is associated with the specified listening port.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="winportstepid">
+                                                            <sch:rule context="win-def:port_state/win-def:pid">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the pid entity of a port_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =======================  PRINTER EFFECTIVE RIGHTS TEST  ======================= -->
+      <!-- =============================================================================== -->
+      <xsd:element name="printereffectiverights_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The printer effective rights test is used to check the effective rights associated with Windows printers. The printereffectiverights_test element extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a printereffectiverights_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="pertst">
+                              <sch:rule context="win-def:printereffectiverights_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:printereffectiverights_object/@id"><sch:value-of select="../@id"/> - the object child element of a printereffectiverights_test must reference a printereffectiverights_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:printereffectiverights_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:printereffectiverights_state/@id"><sch:value-of select="../@id"/> - the state child element of a printereffectiverights_test must reference a printereffectiverights_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="printereffectiverights_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation/>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set" minOccurs="0"/>
+                                          <xsd:sequence minOccurs="0">
+                                                <xsd:element name="behaviors" type="win-def:PrinterEffectiveRightsBehaviors" minOccurs="0"/>
+                                                <xsd:element name="printer_name" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The printer_name element describes a printer that a user may have rights on.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="perobjprinter_name">
+                                                                        <sch:rule context="win-def:printereffectiverights_object/win-def:printer_name">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the kprinter_nameey entity of a printereffectiverights_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="trustee_sid" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The trustee_sid element is the unique sid that associated a user, group, system, or program (such as a Windows service).</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="perobjtrustee_sid">
+                                                                        <sch:rule context="win-def:printereffectiverights_object/win-def:trustee_sid">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_sid entity of a printereffectiverights_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="printereffectiverights_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The regkeyeffectiverights_state element defines the different rights that can be associated with a given regkeyeffectiverights_object. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="printer_name" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This element specifies the name of the printer.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rersteprinter_name">
+                                                            <sch:rule context="win-def:regkeyeffectiverights_state/win-def:printer_name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the printer_name entity of a printereffectiverights_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="trustee_sid" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The trustee_sid element is the unique sid that associated a user, group, system, or program (such as a Windows service).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="perstetrustee_sid">
+                                                            <sch:rule context="win-def:printereffectiverights_state/win-def:trustee_sid">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_sid entity of a printereffectiverights_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_delete" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to delete the object.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="perstestandard_delete">
+                                                            <sch:rule context="win-def:printereffectiverights_state/win-def:standard_delete">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_delete entity of a printereffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_read_control" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to read the information in the object's security descriptor, not including the information in the SACL.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="perstestandard_read_control">
+                                                            <sch:rule context="win-def:printereffectiverights_state/win-def:standard_read_control">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_read_control entity of a printereffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_write_dac" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to modify the DACL in the object's security descriptor.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="perstestandard_write_dac">
+                                                            <sch:rule context="win-def:printereffectiverights_state/win-def:standard_write_dac">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_write_dac entity of a printereffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_write_owner" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to change the owner in the object's security descriptor.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="perstestandard_write_owner">
+                                                            <sch:rule context="win-def:printereffectiverights_state/win-def:standard_write_owner">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_write_owner entity of a printereffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_synchronize" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Windows NT/2000: The right to use the object for synchronization. This enables a thread to wait until the object is in the signaled state. Some object types do not support this access right.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="perstestandard_synchronize">
+                                                            <sch:rule context="win-def:printereffectiverights_state/win-def:standard_synchronize">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_synchronize entity of a printereffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="access_system_security" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Indicates access to a system access control list (SACL).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="persteaccess_system_security">
+                                                            <sch:rule context="win-def:printereffectiverights_state/win-def:access_system_security">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the access_system_security entity of a printereffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_read" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Read access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="perstegeneric_read">
+                                                            <sch:rule context="win-def:printereffectiverights_state/win-def:generic_read">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the generic_read entity of a printereffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_write" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Write access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="perstegeneric_write">
+                                                            <sch:rule context="win-def:printereffectiverights_state/win-def:generic_write">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the generic_write entity of a printereffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_execute" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Execute access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="perstegeneric_execute">
+                                                            <sch:rule context="win-def:printereffectiverights_state/win-def:generic_execute">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the generic_execute entity of a printereffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_all" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Read, write, and execute access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="perstegeneric_all">
+                                                            <sch:rule context="win-def:printereffectiverights_state/win-def:generic_all">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the generic_all entity of a printereffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="printer_access_administer" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="persteprinter_access_administer">
+                                                            <sch:rule context="win-def:printereffectiverights_state/win-def:printer_access_administer">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the printer_access_administer entity of a printereffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="printer_access_use" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="persteprinter_access_use">
+                                                            <sch:rule context="win-def:printereffectiverights_state/win-def:printer_access_use">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the printer_access_use entity of a printereffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="job_access_administer" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="perstejob_access_administer">
+                                                            <sch:rule context="win-def:printereffectiverights_state/win-def:job_access_administer">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the job_access_administer entity of a printereffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="job_access_read" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="perstejob_access_read">
+                                                            <sch:rule context="win-def:printereffectiverights_state/win-def:job_access_read">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the job_access_read entity of a printereffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:complexType name="PrinterEffectiveRightsBehaviors">
+            <xsd:annotation>
+                  <xsd:documentation>The PrinterEffectiveRightsBehaviors complex type defines a number of behaviors that allow a more detailed definition of the pritnereffectiverights objects being specified.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:attribute name="include_group" type="xsd:boolean" use="optional" default="true"/>
+            <xsd:attribute name="resolve_group" type="xsd:boolean" use="optional" default="false"/>
+      </xsd:complexType>
+      <!-- =============================================================================== -->
+      <!-- ===============================  PROCESS TEST  ================================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="process_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The process test is used to check information found in the Windows processes. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a process_object and the optional state element specifies the process information to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="processtst">
+                              <sch:rule context="win-def:process_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:process_object/@id"><sch:value-of select="../@id"/> - the object child element of a process_test must reference a process_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:process_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:process_state/@id"><sch:value-of select="../@id"/> - the state child element of a process_test must reference a process_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="process_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The process_object element is used by a process test to define the specific process(es) to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>A process object defines the command line used to start the process(s).</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set" minOccurs="0"/>
+                                          <xsd:sequence minOccurs="0">
+                                                <xsd:element name="command_line" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The command_line entity is the string used to start the process. This includes any parameters that are part of the command line.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="processobjcommand_line">
+                                                                        <sch:rule context="win-def:process_object/win-def:command_line">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the command_line entity of a process_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="process_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The process_state element defines the different metadata associate with a Windows process. This includes the command line, pid, ppid, image path, and current directory. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="command_line" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The command_line entity is the string used to start the process. This includes any parameters that are part of the command line.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="processstecommand_line">
+                                                            <sch:rule context="win-def:process_state/win-def:command_line">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the command_line entity of a process_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="pid" type="oval-def:EntityStateIntType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The id given to the process that is created for a specified command line.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="processstepid">
+                                                            <sch:rule context="win-def:port_state/win-def:pid">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the pid entity of a port_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="ppid" type="oval-def:EntityStateIntType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The id given to the parent of the process that is created for the specified command line</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="processsteppid">
+                                                            <sch:rule context="win-def:port_state/win-def:ppid">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the ppid entity of a port_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="priority" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The base priority of the process.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="processstepriority">
+                                                            <sch:rule context="win-def:process_state/win-def:priority">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the priority entity of a process_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="image_path" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The image_path entity contains the name of the executable file in question.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="processsteimage_path">
+                                                            <sch:rule context="win-def:process_state/win-def:image_path">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the image_path entity of a process_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="current_dir" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The current_directory entity represents the current path to the executable.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="processstecurrent_dir">
+                                                            <sch:rule context="win-def:process_state/win-def:current_dir">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the current_dir entity of a process_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ===============================  REGISTRY TEST  =============================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="registry_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The registry test is used to check metadata associated with Windows registry key. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a registry_object and the optional state element specifies the registry data to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="regtst">
+                              <sch:rule context="win-def:registry_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:registry_object/@id"><sch:value-of select="../@id"/> - the object child element of a registry_test must reference a registry_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:registry_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:registry_state/@id"><sch:value-of select="../@id"/> - the state child element of a registry_test must reference a registry_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="registry_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation/>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set" minOccurs="0"/>
+                                          <xsd:sequence minOccurs="0">
+                                                <xsd:element name="behaviors" type="win-def:RegistryBehaviors" minOccurs="0"/>
+                                                <xsd:element name="hive" type="win-def:EntityObjectRegistryHiveType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The hive that the registry key belongs to. This is restricted to a specific set of values: HKEY_CLASSES_ROOT, HKEY_CURRENT_CONFIG, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, and HKEY_USERS.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="regobjhive">
+                                                                        <sch:rule context="win-def:registry_object/win-def:hive">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the hive entity of a registry_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="key" type="oval-def:EntityObjectStringType" nillable="true">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The key element describes a registry key to be collected. Note that the hive portion of the string should not be included, as this data should be found under the hive element. If the nillable attribute is set to true, then the object being specified is the higher level hive. In this case, the key element should not be collected or used in analysis. Setting nil equal to true is different than using a .* pattern match. A .* pattern match says to collect every key under a given hive. Note that when nil is used for the key element, the name element should also be nilled.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="regobjkey">
+                                                                        <sch:rule context="win-def:registry_object/win-def:key">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key entity of a registry_object should be 'string'</sch:assert>
+                                                                              <sch:assert test="not(@xsi:nil='true') or ../win-def:name/@xsi:nil='true'"><sch:value-of select="../@id"/> - name entity must be nil when key is nil</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="name" type="oval-def:EntityObjectStringType" nillable="true">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The name element describes the name assigned to a value associated with a specific registry key. If the nillable attribute is set to true, then the object being specified is the higher level hive/key. In this case, the name element should not be collected or used in analysis. Setting nil equal to true on an element is different than using a .* pattern match. A .* pattern match says to collect every name under a given hive/key. The most likely use for xsi:nil within a registry object is when checking for the existance of a particular key, without regards to the different names associated with it.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="regobjname">
+                                                                        <sch:rule context="win-def:registry_object/win-def:name">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the name entity of a registry_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="registry_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The registry_state element defines the different metadata associate with a Windows registry key. This includes the hive, key, name, type, and value. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="hive" type="win-def:EntityStateRegistryHiveType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The hive that the registry key belongs to. This is restricted to a specific set of values: HKEY_CLASSES_ROOT, HKEY_CURRENT_CONFIG, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, and HKEY_USERS.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="regstehive">
+                                                            <sch:rule context="win-def:registry_state/win-def:hive">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the hive entity of a registry_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This element describes a registry key to be tested. Note that the hive portion of the string should not be inclueded, as this data should be found under the hive element.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="regstekey">
+                                                            <sch:rule context="win-def:registry_state/win-def:key">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key entity of a registry_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="name" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This element describes the name of a value of a registry key. If the nillable attribute is set to true, then the name element should not be used in analysis.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="regstename">
+                                                            <sch:rule context="win-def:registry_state/win-def:name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the name entity of a registry_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="type" type="win-def:EntityStateRegistryTypeType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The type entity allows a test to be written against the registy type associated with the specified registry key(s). Please refer to the documentation on the EntityStateRegistryTypeType for more information about the different valid individual types.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <valid_datatypes>string</valid_datatypes>
+                                                      <valid_operators>equals, not equal</valid_operators>
+                                                      <sch:pattern id="regstetype">
+                                                            <sch:rule context="win-def:registry_state/win-def:type">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the type entity of a registry_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="value" type="oval-def:EntityStateAnyType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The value entity allows a test to be written against the value held within the specified registry key(s). If the value being tested is of type REG_BINARY, then the datatype attribute should be set to 'binary' and the data represented by the value entity should follow the xsd:hexBinary form. (each binary octet is encoded as two hex digits) If the value being tested is of type REG_DWORD or REG_QWORD, then the datatype attribute should be set to 'int' and the value entity should represent the data as an integer. If the value being tested is of type REG_EXPAND_SZ, then the datatype attribute should be set to 'string' and the pre-expanded string should be represented by the value entity. If the value being tested is of type REG_MULTI_SZ, then only a single string (one of the multiple strings) should be tested using the value entity with the datatype attribute set to 'string'. In order to test multiple values, multiple OVAL registry tests should be used. If the specified registry key is of type REG_SZ, then the datatype should be 'string' and the value entity should be a copy of the string.</xsd:documentation>
+                                                <xsd:documentation>Note that if the intention is to test a version number held in the registry (as a reg_sz) then instead of setting the datatype to 'string', the datatype can be set to 'version'. This allows tools performing the evaluation to know how to perform less than and greater than operations correctly.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="regstevalue">
+                                                            <sch:rule context="win-def:registry_state/win-def:value">
+                                                                  <sch:assert test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"><sch:value-of select="../@id"/> - The datatype has been set to 'int' but the value is not an integer.</sch:assert>
+                                                                  <!-- we can use the xpath 2.0 function matches() to define assertions for other datatypes -->
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:complexType name="RegistryBehaviors">
+            <xsd:annotation>
+                  <xsd:documentation>The RegistryBehaviors complex type defines a number of behaviors that allow a more detailed definition of the registry objects being specified.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:attribute name="max_depth" use="optional" default="-1">
+                  <xsd:annotation>
+                        <xsd:documentation>'max_depth' defines the maximum depth of recursion to perform when a recurse_direction is specified. A value of '0' is equivalent to no recursion, '1' means to step only one directory level up/down, and so on. The default value is '-1' meaning no limitation. Note that the default recurse_direction behavior is 'none' so even though max_depth specifies no limitation by default, the recurse_direction behavior turns recusion off.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:integer">
+                              <xsd:fractionDigits value="0"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="recurse_direction" use="optional" default="none">
+                  <xsd:annotation>
+                        <xsd:documentation>'recurse_direction' defines the direction, either 'up' to parent keys, or 'down' into child keys to recursively search for registry keys. When recursing up or down, one is limited by the max_depth behavior. Note that it is not an error if max_depth specifies a certain level of recursion and that level does not exist. Recursing should only go as deep as available. The default value is 'none' for no recursion.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:string">
+                              <xsd:enumeration value="none"/>
+                              <xsd:enumeration value="up"/>
+                              <xsd:enumeration value="down"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+      </xsd:complexType>
+      <!-- =============================================================================== -->
+      <!-- ===================  REGKEY AUDITED PERMISSIONS TEST (53)  ==================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="regkeyauditedpermissions53_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The registry key audited permissions test is used to check the audit permissions associated with Windows registry keys. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a regkeyauditedpermissions53_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="rap53tst">
+                              <sch:rule context="win-def:regkeyauditedpermissions53_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:regkeyauditedpermissions53_object/@id"><sch:value-of select="../@id"/> - the object child element of a regkeyauditedpermissions53_test must reference a regkeyauditedpermissions53_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:regkeyauditedpermissions53_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:regkeyauditedpermissions53_state/@id"><sch:value-of select="../@id"/> - the state child element of a regkeyauditedpermissions53_test must reference a regkeyauditedpermissions53_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="regkeyauditedpermissions53_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The regkeyauditedpermissions53_object element is used by a registry key audited permissions test to define the objects used to evalutate against the specified state. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic.</xsd:documentation>
+                  <xsd:documentation>A regkeyauditedpermissions53_object is defined as a combination of a Windows registry key and trustee name. The hive and key elements represents the registry key to be evaluated while the trustee name represents the account (sid) to check audited permissions of. If multiple keys or sids are matched by either reference, then each possible combination of file and sid is a matching file audited permissions object. In addition, a number of behaviors may be provided that help guide the collection of objects. Please refer to the RegkeyAuditPermissions53Behaviors complex type for more information about specific behaviors.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set" minOccurs="0"/>
+                                          <xsd:sequence minOccurs="0">
+                                                <xsd:element name="behaviors" type="win-def:RegkeyAuditPermissions53Behaviors" minOccurs="0"/>
+                                                <xsd:element name="hive" type="win-def:EntityObjectRegistryHiveType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The hive that the registry key belongs to. This is restricted to a specific set of values: HKEY_CLASSES_ROOT, HKEY_CURRENT_CONFIG, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, and HKEY_USERS.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="rap53objhive">
+                                                                        <sch:rule context="win-def:regkeyauditedpermissions53_object/win-def:hive">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the hive entity of a regkeyauditedpermissions53_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="key" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The key element describes a registry key to be collected. Note that the hive portion of the string should not be included, as this data should be found under the hive element.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="rap53objkey">
+                                                                        <sch:rule context="win-def:regkeyauditedpermissions53_object/win-def:key">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key entity of a regkeyauditedpermissions53_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="trustee_sid" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The trustee_sid element is the unique sid that associated a user, group, system, or program (such as a Windows service).</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="rap53objtrustee_sid">
+                                                                        <sch:rule context="win-def:regkeyauditedpermissions53_object/win-def:trustee_sid">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_sid entity of a regkeyauditedpermissions53_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="regkeyauditedpermissions53_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The regkeyauditedpermissions53_state element defines the different audit permissions that can be associated with a given regkeyauditedpermissions53_object. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="hive" type="win-def:EntityStateRegistryHiveType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This element specifies the hive of a registry key on the machine from which to retrieve the SACL.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rap53stehive">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions53_state/win-def:hive">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the hive entity of a regkeyauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This element specifies a registry key on the machine from which to retrieve the SACL. Note that the hive portion of the string should not be inclueded, as this data should be found under the hive element.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rap53stekey">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions53_state/win-def:key">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key entity of a regkeyauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="trustee_sid" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The trustee_sid element is the unique sid that associated a user, group, system, or program (such as a Windows service).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rap53stetrustee_sid">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions53_state/win-def:trustee_sid">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_sid entity of a regkeyauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_delete" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to delete the object.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rap53stestandard_delete">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions53_state/win-def:standard_delete">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the standard_delete entity of a regkeyauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_read_control" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to read the information in the object's security descriptor, not including the information in the SACL.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rap53stestandard_read_control">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions53_state/win-def:standard_read_control">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the standard_read_control entity of a regkeyauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_write_dac" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to modify the DACL in the object's security descriptor.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rap53stestandard_write_dac">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions53_state/win-def:standard_write_dac">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the standard_write_dac entity of a regkeyauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_write_owner" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to change the owner in the object's security descriptor.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rap53stestandard_write_owner">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions53_state/win-def:standard_write_owner">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the standard_write_owner entity of a regkeyauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_synchronize" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Windows NT/2000: The right to use the object for synchronization. This enables a thread to wait until the object is in the signaled state. Some object types do not support this access right.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rap53stestandard_synchronize">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions53_state/win-def:standard_synchronize">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the standard_synchronize entity of a regkeyauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="access_system_security" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Indicates access to a system access control list (SACL).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rap53steaccess_system_security">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions53_state/win-def:access_system_security">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the access_system_security entity of a regkeyauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_read" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Read access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rap53stegeneric_read">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions53_state/win-def:generic_read">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the generic_read entity of a regkeyauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_write" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Write access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rap53stegeneric_write">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions53_state/win-def:generic_write">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the generic_write entity of a regkeyauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_execute" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Execute access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rap53stegeneric_execute">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions53_state/win-def:generic_execute">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the generic_execute entity of a regkeyauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_all" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Read, write, and execute access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rap53stegeneric_all">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions53_state/win-def:generic_all">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the generic_all entity of a regkeyauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_query_value" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rap53stekey_query_value">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions53_state/win-def:key_query_value">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key_query_value entity of a regkeyauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_set_value" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rap53stekey_set_value">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions53_state/win-def:key_set_value">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key_set_value entity of a regkeyauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_create_sub_key" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rap53stekey_create_sub_key">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions53_state/win-def:key_create_sub_key">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key_create_sub_key entity of a regkeyauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_enumerate_sub_keys" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rap53stekey_enumerate_sub_keys">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions53_state/win-def:key_enumerate_sub_keys">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key_enumerate_sub_keys entity of a regkeyauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_notify" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rap53stekey_notify">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions53_state/win-def:key_notify">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key_notify entity of a regkeyauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_create_link" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rap53stekey_create_link">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions53_state/win-def:key_create_link">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key_create_link entity of a regkeyauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_wow64_64key" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rap53stekey_wow64_64key">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions53_state/win-def:key_wow64_64key">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key_wow64_64key entity of a regkeyauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_wow64_32key" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rap53stekey_wow64_32key">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions53_state/win-def:key_wow64_32key">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key_wow64_32key entity of a regkeyauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_wow64_res" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rap53stekey_wow64_res">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions53_state/win-def:key_wow64_res">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key_wow64_res entity of a regkeyauditedpermissions53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:complexType name="RegkeyAuditPermissions53Behaviors">
+            <xsd:annotation>
+                  <xsd:documentation>The RegkeyAuditPermissions53Behaviors complex type defines a number of behaviors that allow a more detailed definition of the registrykeyauditedpermissions53_object being specified.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:attribute name="max_depth" use="optional" default="-1">
+                  <xsd:annotation>
+                        <xsd:documentation>'max_depth' defines the maximum depth of recursion to perform when a recurse_direction is specified. A value of '0' is equivalent to no recursion, '1' means to step only one directory level up/down, and so on. The default value is '-1' meaning no limitation. Note that the default recurse_direction behavior is 'none' so even though max_depth specifies no limitation by default, the recurse_direction behavior turns recusion off.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:integer">
+                              <xsd:fractionDigits value="0"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="recurse_direction" use="optional" default="none">
+                  <xsd:annotation>
+                        <xsd:documentation>'recurse_direction' defines the direction, either 'up' to parent keys, or 'down' into child keys to recursively search for registry keys. When recursing up or down, one is limited by the max_depth behavior. Note that it is not an error if max_depth specifies a certain level of recursion and that level does not exist. Recursing should only go as deep as available. The default value is 'none' for no recursion.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:string">
+                              <xsd:enumeration value="none"/>
+                              <xsd:enumeration value="up"/>
+                              <xsd:enumeration value="down"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="include_group" type="xsd:boolean" use="optional" default="true"/>
+            <xsd:attribute name="resolve_group" type="xsd:boolean" use="optional" default="false"/>
+      </xsd:complexType>
+      <!-- =============================================================================== -->
+      <!-- ===============  REGKEY AUDITED PERMISSIONS TEST (deprecated)  ================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="regkeyauditedpermissions_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>This test has been deprecated and will be removed in version 6.0 of the language. Recommend use of the newer regkeyauditedpermissions53_test.</xsd:documentation>
+                  <xsd:documentation>The registry key audited permissions test is used to check the audit permissions associated with Windows registry keys. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a regkeyauditedpermissions_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="raptst">
+                              <sch:rule context="win-def:regkeyauditedpermissions_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:regkeyauditedpermissions_object/@id"><sch:value-of select="../@id"/> - the object child element of a regkeyauditedpermissions_test must reference a regkeyauditedpermissions_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:regkeyauditedpermissions_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:regkeyauditedpermissions_state/@id"><sch:value-of select="../@id"/> - the state child element of a regkeyauditedpermissions_test must reference a regkeyauditedpermissions_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="regkeyauditedpermissions_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>This object has been deprecated and will be removed in version 6.0 of the language. Recommend use of the newer regkeyauditedpermissions53_object.</xsd:documentation>
+                  <xsd:documentation>The regkeyauditedpermissions_object element is used by a registry key audited permissions test to define the objects used to evalutate against the specified state. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic.</xsd:documentation>
+                  <xsd:documentation>A regkeyauditedpermissions_object is defined as a combination of a Windows registry key and trustee name. The hive and key elements represents the registry key to be evaluated while the trustee name represents the account (sid) to check audited permissions of. If multiple keys or sids are matched by either reference, then each possible combination of file and sid is a matching file audited permissions object. In addition, a number of behaviors may be provided that help guide the collection of objects. Please refer to the RegkeyAuditPermissionsBehaviors complex type for more information about specific behaviors.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set" minOccurs="0"/>
+                                          <xsd:sequence minOccurs="0">
+                                                <xsd:element name="behaviors" type="win-def:RegkeyAuditPermissionsBehaviors" minOccurs="0"/>
+                                                <xsd:element name="hive" type="win-def:EntityObjectRegistryHiveType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The hive that the registry key belongs to. This is restricted to a specific set of values: HKEY_CLASSES_ROOT, HKEY_CURRENT_CONFIG, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, and HKEY_USERS.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="rapobjhive">
+                                                                        <sch:rule context="win-def:regkeyauditedpermissions_object/win-def:hive">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the hive entity of a regkeyauditedpermissions_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="key" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The key element describes a registry key to be collected. Note that the hive portion of the string should not be included, as this data should be found under the hive element.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="rapobjkey">
+                                                                        <sch:rule context="win-def:regkeyauditedpermissions_object/win-def:key">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key entity of a regkeyauditedpermissions_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="trustee_name" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The trustee_name element is the unique name that associated a particular SID. A SID can be associated with a user, group, or program (such as a Windows service). In a domain environment, trustee names should be identified in the form: "domain\trustee name" For local trustee names use: "computer name\trustee name" For built-in accounts on the system, use the trustee name without a domain. For example: ADMINISTRATOR, SYSTEM, NETWORK_SERVICES, ADMINISTRATORS (group), etc. Note that the built-in trustee names should be all caps as that is how the windows apis return them.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="rapobjtrustee_name">
+                                                                        <sch:rule context="win-def:regkeyauditedpermissions_object/win-def:trustee_name">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_name entity of a regkeyauditedpermissions_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="regkeyauditedpermissions_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>This state has been deprecated and will be removed in version 6.0 of the language. Recommend use of the newer regkeyauditedpermissions53_state.</xsd:documentation>
+                  <xsd:documentation>The regkeyauditedpermissions_state element defines the different audit permissions that can be associated with a given regkeyauditedpermissions_object. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="hive" type="win-def:EntityStateRegistryHiveType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This element specifies the hive of a registry key on the machine from which to retrieve the SACL.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rapstehive">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions_state/win-def:hive">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the hive entity of a regkeyauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This element specifies a registry key on the machine from which to retrieve the SACL. Note that the hive portion of the string should not be inclueded, as this data should be found under the hive element.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rapstekey">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions_state/win-def:key">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key entity of a regkeyauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="trustee_name" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The unique name associated with a particular security identifier (SID). In a domain environment, trustee names should be identified in the form: "domain\trustee name" For local trustee names use: "computer name\trustee name" For built-in accounts on the system, use the trustee name without a domain. For example: ADMINISTRATOR, SYSTEM, NETWORK_SERVICES, ADMINISTRATORS (group), etc. Note that the built-in trustee names should be all caps as that is how the windows apis return them.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rapstetrustee_name">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions_state/win-def:trustee_name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_name entity of a regkeyauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_delete" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to delete the object.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rapstestandard_delete">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions_state/win-def:standard_delete">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the standard_delete entity of a regkeyauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_read_control" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to read the information in the object's security descriptor, not including the information in the SACL.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rapstestandard_read_control">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions_state/win-def:standard_read_control">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the standard_read_control entity of a regkeyauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_write_dac" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to modify the DACL in the object's security descriptor.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rapstestandard_write_dac">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions_state/win-def:standard_write_dac">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the standard_write_dac entity of a regkeyauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_write_owner" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to change the owner in the object's security descriptor.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rapstestandard_write_owner">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions_state/win-def:standard_write_owner">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the standard_write_owner entity of a regkeyauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_synchronize" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Windows NT/2000: The right to use the object for synchronization. This enables a thread to wait until the object is in the signaled state. Some object types do not support this access right.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rapstestandard_synchronize">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions_state/win-def:standard_synchronize">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the standard_synchronize entity of a regkeyauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="access_system_security" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Indicates access to a system access control list (SACL).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rapsteaccess_system_security">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions_state/win-def:access_system_security">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the access_system_security entity of a regkeyauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_read" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Read access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rapstegeneric_read">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions_state/win-def:generic_read">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the generic_read entity of a regkeyauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_write" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Write access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rapstegeneric_write">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions_state/win-def:generic_write">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the generic_write entity of a regkeyauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_execute" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Execute access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rapstegeneric_execute">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions_state/win-def:generic_execute">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the generic_execute entity of a regkeyauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_all" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Read, write, and execute access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rapstegeneric_all">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions_state/win-def:generic_all">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the generic_all entity of a regkeyauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_query_value" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rapstekey_query_value">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions_state/win-def:key_query_value">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key_query_value entity of a regkeyauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_set_value" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rapstekey_set_value">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions_state/win-def:key_set_value">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key_set_value entity of a regkeyauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_create_sub_key" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rapstekey_create_sub_key">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions_state/win-def:key_create_sub_key">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key_create_sub_key entity of a regkeyauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_enumerate_sub_keys" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rapstekey_enumerate_sub_keys">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions_state/win-def:key_enumerate_sub_keys">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key_enumerate_sub_keys entity of a regkeyauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_notify" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rapstekey_notify">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions_state/win-def:key_notify">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key_notify entity of a regkeyauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_create_link" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rapstekey_create_link">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions_state/win-def:key_create_link">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key_create_link entity of a regkeyauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_wow64_64key" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rapstekey_wow64_64key">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions_state/win-def:key_wow64_64key">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key_wow64_64key entity of a regkeyauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_wow64_32key" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rapstekey_wow64_32key">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions_state/win-def:key_wow64_32key">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key_wow64_32key entity of a regkeyauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_wow64_res" type="win-def:EntityStateAuditType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rapstekey_wow64_res">
+                                                            <sch:rule context="win-def:regkeyauditedpermissions_state/win-def:key_wow64_res">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key_wow64_res entity of a regkeyauditedpermissions_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:complexType name="RegkeyAuditPermissionsBehaviors">
+            <xsd:annotation>
+                  <xsd:documentation>The RegkeyAuditPermissionsBehaviors complex type defines a number of behaviors that allow a more detailed definition of the registrykeyauditedpermissions objects being specified.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:attribute name="max_depth" use="optional" default="-1">
+                  <xsd:annotation>
+                        <xsd:documentation>'max_depth' defines the maximum depth of recursion to perform when a recurse_direction is specified. A value of '0' is equivalent to no recursion, '1' means to step only one directory level up/down, and so on. The default value is '-1' meaning no limitation. Note that the default recurse_direction behavior is 'none' so even though max_depth specifies no limitation by default, the recurse_direction behavior turns recusion off.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:integer">
+                              <xsd:fractionDigits value="0"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="recurse_direction" use="optional" default="none">
+                  <xsd:annotation>
+                        <xsd:documentation>'recurse_direction' defines the direction, either 'up' to parent keys, or 'down' into child keys to recursively search for registry keys. When recursing up or down, one is limited by the max_depth behavior. Note that it is not an error if max_depth specifies a certain level of recursion and that level does not exist. Recursing should only go as deep as available. The default value is 'none' for no recursion.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:string">
+                              <xsd:enumeration value="none"/>
+                              <xsd:enumeration value="up"/>
+                              <xsd:enumeration value="down"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="include_group" type="xsd:boolean" use="optional" default="true"/>
+            <xsd:attribute name="resolve_group" type="xsd:boolean" use="optional" default="false"/>
+      </xsd:complexType>
+      <!-- =============================================================================== -->
+      <!-- ====================  REGKEY EFFECTIVE RIGHTS TEST (53)  ====================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="regkeyeffectiverights53_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The registry key effective rights test is used to check the effective rights associated with Windows files. Note that the trustee's effective access rights are the access rights that the ACL grants to the trustee or to any groups of which the trustee is a member. The regkeyeffectiverights53_test element extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a regkeyeffectiverights53_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="rer53tst">
+                              <sch:rule context="win-def:regkeyeffectiverights53_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:regkeyeffectiverights53_object/@id"><sch:value-of select="../@id"/> - the object child element of a regkeyeffectiverights53_test must reference a regkeyeffectiverights53_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:regkeyeffectiverights_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:regkeyeffectiverights53_state/@id"><sch:value-of select="../@id"/> - the state child element of a regkeyeffectiverights53_test must reference a regkeyeffectiverights53_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="regkeyeffectiverights53_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The regkeyeffectiverights53_object element is used by a registry key effective rights test to define the objects used to evalutate against the specified state. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic.</xsd:documentation>
+                  <xsd:documentation>A regkeyeffectiverights53_object is defined as a combination of a Windows registry and trustee sid. The key entity represents the registry key to be evaluated while the trustee sid represents the account (sid) to check effective rights of. If multiple files or sids are matched by either reference, then each possible combination of file and sid is a matching file effective rights object. In addition, a number of behaviors may be provided that help guide the collection of objects. Please refer to the FileEffectiveRights53Behaviors complex type for more information about specific behaviors.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set" minOccurs="0"/>
+                                          <xsd:sequence minOccurs="0">
+                                                <xsd:element name="behaviors" type="win-def:RegkeyEffectiveRights53Behaviors" minOccurs="0"/>
+                                                <xsd:element name="hive" type="win-def:EntityObjectRegistryHiveType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The hive that the registry key belongs to. This is restricted to a specific set of values: HKEY_CLASSES_ROOT, HKEY_CURRENT_CONFIG, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, and HKEY_USERS.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="rer53objhive">
+                                                                        <sch:rule context="win-def:regkeyeffectiverights53_object/win-def:hive">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the hive entity of a regkeyeffectiverights53_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="key" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The key element describes a registry key to be collected. Note that the hive portion of the string should not be included, as this data should be found under the hive element.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="rer53objkey">
+                                                                        <sch:rule context="win-def:regkeyeffectiverights53_object/win-def:key">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key entity of a regkeyeffectiverights53_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="trustee_sid" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The trustee_sid element is the unique sid that associated a user, group, system, or program (such as a Windows service).</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="rer53objtrustee_sid">
+                                                                        <sch:rule context="win-def:regkeyeffectiverights53_object/win-def:trustee_sid">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_sid entity of a regkeyeffectiverights53_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="regkeyeffectiverights53_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The regkeyeffectiverights53_state element defines the different rights that can be associated with a given regkeyeffectiverights53_object. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="hive" type="win-def:EntityStateRegistryHiveType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This element specifies the hive of a registry key on the machine from which to retrieve the SACL.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rer53stehive">
+                                                            <sch:rule context="win-def:regkeyeffectiverights53_state/win-def:hive">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the hive entity of a regkeyeffectiverights53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This element specifies a registry key on the machine from which to retrieve the SACL. Note that the hive portion of the string should not be inclueded, as this data should be found under the hive element.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rer53stekey">
+                                                            <sch:rule context="win-def:regkeyeffectiverights53_state/win-def:key">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key entity of a regkeyeffectiverights53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="trustee_sid" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The trustee_sid element is the unique sid that associated a user, group, system, or program (such as a Windows service).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rer53stetrustee_sid">
+                                                            <sch:rule context="win-def:regkeyeffectiverights53_state/win-def:trustee_sid">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_sid entity of a regkeyeffectiverights53_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_delete" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to delete the object.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rer53stestandard_delete">
+                                                            <sch:rule context="win-def:regkeyeffectiverights53_state/win-def:standard_delete">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_delete entity of a regkeyeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_read_control" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to read the information in the object's security descriptor, not including the information in the SACL.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rer53stestandard_read_control">
+                                                            <sch:rule context="win-def:regkeyeffectiverights53_state/win-def:standard_read_control">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_read_control entity of a regkeyeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_write_dac" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to modify the DACL in the object's security descriptor.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rer53stestandard_write_dac">
+                                                            <sch:rule context="win-def:regkeyeffectiverights53_state/win-def:standard_write_dac">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_write_dac entity of a regkeyeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_write_owner" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to change the owner in the object's security descriptor.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rer53stestandard_write_owner">
+                                                            <sch:rule context="win-def:regkeyeffectiverights53_state/win-def:standard_write_owner">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_write_owner entity of a regkeyeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_synchronize" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Windows NT/2000: The right to use the object for synchronization. This enables a thread to wait until the object is in the signaled state. Some object types do not support this access right.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rer53stestandard_synchronize">
+                                                            <sch:rule context="win-def:regkeyeffectiverights53_state/win-def:standard_synchronize">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_synchronize entity of a regkeyeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="access_system_security" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Indicates access to a system access control list (SACL).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rer53steaccess_system_security">
+                                                            <sch:rule context="win-def:regkeyeffectiverights53_state/win-def:access_system_security">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the access_system_security entity of a regkeyeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_read" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Read access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rer53stegeneric_read">
+                                                            <sch:rule context="win-def:regkeyeffectiverights53_state/win-def:generic_read">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the generic_read entity of a regkeyeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_write" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Write access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rer53stegeneric_write">
+                                                            <sch:rule context="win-def:regkeyeffectiverights53_state/win-def:generic_write">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the generic_write entity of a regkeyeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_execute" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Execute access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rer53stegeneric_execute">
+                                                            <sch:rule context="win-def:regkeyeffectiverights53_state/win-def:generic_execute">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the generic_execute entity of a regkeyeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_all" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Read, write, and execute access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rer53stegeneric_all">
+                                                            <sch:rule context="win-def:regkeyeffectiverights53_state/win-def:generic_all">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the generic_all entity of a regkeyeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_query_value" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rer53stekey_query_value">
+                                                            <sch:rule context="win-def:regkeyeffectiverights53_state/win-def:key_query_value">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the key_query_value entity of a regkeyeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_set_value" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rer53stekey_set_value">
+                                                            <sch:rule context="win-def:regkeyeffectiverights53_state/win-def:key_set_value">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the key_set_value entity of a regkeyeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_create_sub_key" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rer53stekey_create_sub_key">
+                                                            <sch:rule context="win-def:regkeyeffectiverights53_state/win-def:key_create_sub_key">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the key_create_sub_key entity of a regkeyeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_enumerate_sub_keys" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rer53stekey_enumerate_sub_keys">
+                                                            <sch:rule context="win-def:regkeyeffectiverights53_state/win-def:key_enumerate_sub_keys">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the key_enumerate_sub_keys entity of a regkeyeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_notify" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rer53stekey_notify">
+                                                            <sch:rule context="win-def:regkeyeffectiverights53_state/win-def:key_notify">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the key_notify entity of a regkeyeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_create_link" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rer53stekey_create_link">
+                                                            <sch:rule context="win-def:regkeyeffectiverights53_state/win-def:key_create_link">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the key_create_link entity of a regkeyeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_wow64_64key" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rer53stekey_wow64_64key">
+                                                            <sch:rule context="win-def:regkeyeffectiverights53_state/win-def:key_wow64_64key">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the key_wow64_64key entity of a regkeyeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_wow64_32key" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rer53stekey_wow64_32key">
+                                                            <sch:rule context="win-def:regkeyeffectiverights53_state/win-def:key_wow64_32key">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the key_wow64_32key entity of a regkeyeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_wow64_res" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rer53stekey_wow64_res">
+                                                            <sch:rule context="win-def:regkeyeffectiverights53_state/win-def:key_wow64_res">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the key_wow64_res entity of a regkeyeffectiverights53_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:complexType name="RegkeyEffectiveRights53Behaviors">
+            <xsd:annotation>
+                  <xsd:documentation>The RegkeyEffectiveRights53Behaviors complex type defines a number of behaviors that allow a more detailed definition of the registrykeyeffectiverights53_object being specified.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:attribute name="max_depth" use="optional" default="-1">
+                  <xsd:annotation>
+                        <xsd:documentation>'max_depth' defines the maximum depth of recursion to perform when a recurse_direction is specified. A value of '0' is equivalent to no recursion, '1' means to step only one directory level up/down, and so on. The default value is '-1' meaning no limitation. Note that the default recurse_direction behavior is 'none' so even though max_depth specifies no limitation by default, the recurse_direction behavior turns recusion off.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:integer">
+                              <xsd:fractionDigits value="0"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="recurse_direction" use="optional" default="none">
+                  <xsd:annotation>
+                        <xsd:documentation>'recurse_direction' defines the direction, either 'up' to parent keys, or 'down' into child keys to recursively search for registry keys. When recursing up or down, one is limited by the max_depth behavior. Note that it is not an error if max_depth specifies a certain level of recursion and that level does not exist. Recursing should only go as deep as available. The default value is 'none' for no recursion.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:string">
+                              <xsd:enumeration value="none"/>
+                              <xsd:enumeration value="up"/>
+                              <xsd:enumeration value="down"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="include_group" type="xsd:boolean" use="optional" default="true"/>
+            <xsd:attribute name="resolve_group" type="xsd:boolean" use="optional" default="false"/>
+      </xsd:complexType>
+      <!-- =============================================================================== -->
+      <!-- ================  REGKEY EFFECTIVE RIGHTS TEST (deprecated)  ================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="regkeyeffectiverights_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>This test has been deprecated and will be removed in version 6.0 of the language. Recommend use of the newer regkeyeffectiverights53_test.</xsd:documentation>
+                  <xsd:documentation>The registry key effective rights test is used to check the effective rights associated with Windows files. Note that the trustee's effective access rights are the access rights that the ACL grants to the trustee or to any groups of which the trustee is a member. The regkeyeffectiverights_test element extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a regkeyeffectiverights_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="rertst">
+                              <sch:rule context="win-def:regkeyeffectiverights_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:regkeyeffectiverights_object/@id"><sch:value-of select="../@id"/> - the object child element of a regkeyeffectiverights_test must reference a regkeyeffectiverights_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:regkeyeffectiverights_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:regkeyeffectiverights_state/@id"><sch:value-of select="../@id"/> - the state child element of a regkeyeffectiverights_test must reference a regkeyeffectiverights_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="regkeyeffectiverights_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>This object has been deprecated and will be removed in version 6.0 of the language. Recommend use of the newer regkeyeffectiverights53_object.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set" minOccurs="0"/>
+                                          <xsd:sequence minOccurs="0">
+                                                <xsd:element name="behaviors" type="win-def:RegkeyEffectiveRightsBehaviors" minOccurs="0"/>
+                                                <xsd:element name="hive" type="win-def:EntityObjectRegistryHiveType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The hive that the registry key belongs to. This is restricted to a specific set of values: HKEY_CLASSES_ROOT, HKEY_CURRENT_CONFIG, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, and HKEY_USERS.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="rerobjhive">
+                                                                        <sch:rule context="win-def:regkeyeffectiverights_object/win-def:hive">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the hive entity of a regkeyeffectiverights_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="key" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The key element describes a registry key to be collected. Note that the hive portion of the string should not be included, as this data should be found under the hive element.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="rerobjkey">
+                                                                        <sch:rule context="win-def:regkeyeffectiverights_object/win-def:key">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key entity of a regkeyeffectiverights_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="trustee_name" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The trustee_name element is the unique name that associated a particular SID. A SID can be associated with a user, group, or program (such as a Windows service). In a domain environment, trustee names should be identified in the form: "domain\trustee name" For local trustee names use: "computer name\trustee name" For built-in accounts on the system, use the trustee name without a domain. For example: ADMINISTRATOR, SYSTEM, NETWORK_SERVICES, ADMINISTRATORS (group), etc. Note that the built-in trustee names should be all caps as that is how the windows apis return them.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="rerobjtrustee_name">
+                                                                        <sch:rule context="win-def:regkeyeffectiverights_object/win-def:trustee_name">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_name entity of a regkeyeffectiverights_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="regkeyeffectiverights_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>This state has been deprecated and will be removed in version 6.0 of the language. Recommend use of the newer regkeyeffectiverights53_state.</xsd:documentation>
+                  <xsd:documentation>The regkeyeffectiverights_state element defines the different rights that can be associated with a given regkeyeffectiverights_object. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="hive" type="win-def:EntityStateRegistryHiveType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This element specifies the hive of a registry key on the machine from which to retrieve the SACL.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rerstehive">
+                                                            <sch:rule context="win-def:regkeyeffectiverights_state/win-def:hive">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the hive entity of a regkeyeffectiverights_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This element specifies a registry key on the machine from which to retrieve the SACL. Note that the hive portion of the string should not be inclueded, as this data should be found under the hive element.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rerstekey">
+                                                            <sch:rule context="win-def:regkeyeffectiverights_state/win-def:key">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the key entity of a regkeyeffectiverights_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="trustee_name" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The unique name associated with a particular security identifier (SID). In a domain environment, trustee names should be identified in the form: "domain\trustee name" For local trustee names use: "computer name\trustee name" For built-in accounts on the system, use the trustee name without a domain. For example: ADMINISTRATOR, SYSTEM, NETWORK_SERVICES, ADMINISTRATORS (group), etc. Note that the built-in trustee names should be all caps as that is how the windows apis return them.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rerstetrustee_name">
+                                                            <sch:rule context="win-def:regkeyeffectiverights_state/win-def:trustee_name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_name entity of a regkeyeffectiverights_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_delete" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to delete the object.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rerstestandard_delete">
+                                                            <sch:rule context="win-def:regkeyeffectiverights_state/win-def:standard_delete">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_delete entity of a regkeyeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_read_control" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to read the information in the object's security descriptor, not including the information in the SACL.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rerstestandard_read_control">
+                                                            <sch:rule context="win-def:regkeyeffectiverights_state/win-def:standard_read_control">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_read_control entity of a regkeyeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_write_dac" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to modify the DACL in the object's security descriptor.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rerstestandard_write_dac">
+                                                            <sch:rule context="win-def:regkeyeffectiverights_state/win-def:standard_write_dac">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_write_dac entity of a regkeyeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_write_owner" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The right to change the owner in the object's security descriptor.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rerstestandard_write_owner">
+                                                            <sch:rule context="win-def:regkeyeffectiverights_state/win-def:standard_write_owner">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_write_owner entity of a regkeyeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="standard_synchronize" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Windows NT/2000: The right to use the object for synchronization. This enables a thread to wait until the object is in the signaled state. Some object types do not support this access right.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rerstestandard_synchronize">
+                                                            <sch:rule context="win-def:regkeyeffectiverights_state/win-def:standard_synchronize">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the standard_synchronize entity of a regkeyeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="access_system_security" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Indicates access to a system access control list (SACL).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rersteaccess_system_security">
+                                                            <sch:rule context="win-def:regkeyeffectiverights_state/win-def:access_system_security">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the access_system_security entity of a regkeyeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_read" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Read access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rerstegeneric_read">
+                                                            <sch:rule context="win-def:regkeyeffectiverights_state/win-def:generic_read">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the generic_read entity of a regkeyeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_write" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Write access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rerstegeneric_write">
+                                                            <sch:rule context="win-def:regkeyeffectiverights_state/win-def:generic_write">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the generic_write entity of a regkeyeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_execute" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Execute access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rerstegeneric_execute">
+                                                            <sch:rule context="win-def:regkeyeffectiverights_state/win-def:generic_execute">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the generic_execute entity of a regkeyeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="generic_all" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Read, write, and execute access.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rerstegeneric_all">
+                                                            <sch:rule context="win-def:regkeyeffectiverights_state/win-def:generic_all">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the generic_all entity of a regkeyeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_query_value" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rerstekey_query_value">
+                                                            <sch:rule context="win-def:regkeyeffectiverights_state/win-def:key_query_value">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the key_query_value entity of a regkeyeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_set_value" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rerstekey_set_value">
+                                                            <sch:rule context="win-def:regkeyeffectiverights_state/win-def:key_set_value">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the key_set_value entity of a regkeyeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_create_sub_key" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rerstekey_create_sub_key">
+                                                            <sch:rule context="win-def:regkeyeffectiverights_state/win-def:key_create_sub_key">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the key_create_sub_key entity of a regkeyeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_enumerate_sub_keys" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rerstekey_enumerate_sub_keys">
+                                                            <sch:rule context="win-def:regkeyeffectiverights_state/win-def:key_enumerate_sub_keys">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the key_enumerate_sub_keys entity of a regkeyeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_notify" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rerstekey_notify">
+                                                            <sch:rule context="win-def:regkeyeffectiverights_state/win-def:key_notify">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the key_notify entity of a regkeyeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_create_link" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rerstekey_create_link">
+                                                            <sch:rule context="win-def:regkeyeffectiverights_state/win-def:key_create_link">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the key_create_link entity of a regkeyeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_wow64_64key" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rerstekey_wow64_64key">
+                                                            <sch:rule context="win-def:regkeyeffectiverights_state/win-def:key_wow64_64key">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the key_wow64_64key entity of a regkeyeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_wow64_32key" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rerstekey_wow64_32key">
+                                                            <sch:rule context="win-def:regkeyeffectiverights_state/win-def:key_wow64_32key">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the key_wow64_32key entity of a regkeyeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="key_wow64_res" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation/>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="rerstekey_wow64_res">
+                                                            <sch:rule context="win-def:regkeyeffectiverights_state/win-def:key_wow64_res">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the key_wow64_res entity of a regkeyeffectiverights_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:complexType name="RegkeyEffectiveRightsBehaviors">
+            <xsd:annotation>
+                  <xsd:documentation>The RegkeyEffectiveRightsBehaviors complex type defines a number of behaviors that allow a more detailed definition of the registrykeyeffectiverights objects being specified.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:attribute name="max_depth" use="optional" default="-1">
+                  <xsd:annotation>
+                        <xsd:documentation>'max_depth' defines the maximum depth of recursion to perform when a recurse_direction is specified. A value of '0' is equivalent to no recursion, '1' means to step only one directory level up/down, and so on. The default value is '-1' meaning no limitation. Note that the default recurse_direction behavior is 'none' so even though max_depth specifies no limitation by default, the recurse_direction behavior turns recusion off.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:integer">
+                              <xsd:fractionDigits value="0"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="recurse_direction" use="optional" default="none">
+                  <xsd:annotation>
+                        <xsd:documentation>'recurse_direction' defines the direction, either 'up' to parent keys, or 'down' into child keys to recursively search for registry keys. When recursing up or down, one is limited by the max_depth behavior. Note that it is not an error if max_depth specifies a certain level of recursion and that level does not exist. Recursing should only go as deep as available. The default value is 'none' for no recursion.</xsd:documentation>
+                  </xsd:annotation>
+                  <xsd:simpleType>
+                        <xsd:restriction base="xsd:string">
+                              <xsd:enumeration value="none"/>
+                              <xsd:enumeration value="up"/>
+                              <xsd:enumeration value="down"/>
+                        </xsd:restriction>
+                  </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="include_group" type="xsd:boolean" use="optional" default="true"/>
+            <xsd:attribute name="resolve_group" type="xsd:boolean" use="optional" default="false"/>
+      </xsd:complexType>
+      <!-- =============================================================================== -->
+      <!-- ===========================  SHARED RESOURCE TEST   =========================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="sharedresource_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The shared resource test is used to check properties associated with any shared resource on the system. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a sid_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="srtst">
+                              <sch:rule context="win-def:sharedresource_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:sharedresource_object/@id"><sch:value-of select="../@id"/> - the object child element of a sharedresource_test must reference a sharedresource_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:sharedresource_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:sharedresource_state/@id"><sch:value-of select="../@id"/> - the state child element of a sharedresource_test must reference a sharedresource_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="sharedresource_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The sharedresource_object element is used by a shared resource test to define the object, in this case a shared resource, to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>An shared resource object consists of a single netname entity that identifies a specific shared resource.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="netname" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The netname element is the unique name that is associated with a specific shared resource.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="srobjnetname">
+                                                                        <sch:rule context="win-def:sharedresource_object/win-def:netname">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the netname entity of a sharedresource_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="sharedresource_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The sharedresource_state element defines the different metadata associate with a Windows shared resource. This includes the share type, permissions, and max uses. This state mirror the SHARE_INFO_2 structure. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="netname" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This element specifies the name associated with a particular shared resource.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="srstenetname">
+                                                            <sch:rule context="win-def:sharedresource_state/win-def:netname">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the netname entity of a sharedresource_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="shared_type" type="win-def:EntityStateSharedResourceTypeType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The type of the shared resource.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="srsteshared_type">
+                                                            <sch:rule context="win-def:sharedresource_state/win-def:shared_type">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the shared_type entity of a sharedresource_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="max_uses" type="oval-def:EntityStateIntType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The maximum number of concurrent connections that the shared resource can accommodate.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="srstemax_uses">
+                                                            <sch:rule context="win-def:sharedresource_state/win-def:max_uses">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the max_uses entity of a sharedresource_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="current_uses" type="oval-def:EntityStateIntType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The number of current connections to the resource.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="srstecurrent_uses">
+                                                            <sch:rule context="win-def:sharedresource_state/win-def:current_uses">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the current_uses entity of a sharedresource_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="local_path" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The local path for the shared resource.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="srstelocal_path">
+                                                            <sch:rule context="win-def:sharedresource_state/win-def:local_path">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the local_path entity of a sharedresource_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="access_read_permission" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Permission to read data from a resource and, by default, to execute the resource.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="srsteaccess_read_permission">
+                                                            <sch:rule context="win-def:sharedresource_state/win-def:access_read_permission">
+                                                                  <sch:assert test="not(@datatype) or @datatype='bool'">
+                                                                        <sch:value-of select="../@id"/> - datatype attribute for the access_read_permission entity of a sharedresource_state should be 'bool'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="access_write_permission" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Permission to write data to the resource.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="srsteaccess_write_permission">
+                                                            <sch:rule context="win-def:sharedresource_state/win-def:access_write_permission">
+                                                                  <sch:assert test="not(@datatype) or @datatype='bool'">
+                                                                        <sch:value-of select="../@id"/> - datatype attribute for the access_write_permission entity of a sharedresource_state should be 'bool'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="access_create_permission" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Permission to create an instance of the resource (such as a file); data can be written to the resource as the resource is created.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="srsteaccess_create_permission">
+                                                            <sch:rule context="win-def:sharedresource_state/win-def:access_create_permission">
+                                                                  <sch:assert test="not(@datatype) or @datatype='bool'">
+                                                                        <sch:value-of select="../@id"/> - datatype attribute for the access_create_permission entity of a sharedresource_state should be 'bool'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="access_exec_permission" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Permission to execute the resource.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="srsteaccess_exec_permission">
+                                                            <sch:rule context="win-def:sharedresource_state/win-def:access_exec_permission">
+                                                                  <sch:assert test="not(@datatype) or @datatype='bool'">
+                                                                        <sch:value-of select="../@id"/> - datatype attribute for the access_exec_permission entity of a sharedresource_state should be 'bool'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="access_delete_permission" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Permission to delete the resource.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="srsteaccess_delete_permission">
+                                                            <sch:rule context="win-def:sharedresource_state/win-def:access_delete_permission">
+                                                                  <sch:assert test="not(@datatype) or @datatype='bool'">
+                                                                        <sch:value-of select="../@id"/> - datatype attribute for the access_delete_permission entity of a sharedresource_state should be 'bool'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="access_atrib_permission" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Permission to modify the resource's attributes (such as the date and time when a file was last modified).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="srsteaccess_atrib_permission">
+                                                            <sch:rule context="win-def:sharedresource_state/win-def:access_atrib_permission">
+                                                                  <sch:assert test="not(@datatype) or @datatype='bool'">
+                                                                        <sch:value-of select="../@id"/> - datatype attribute for the access_atrib_permission entity of a sharedresource_state should be 'bool'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="access_perm_permission" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Permission to modify the permissions (read, write, create, execute, and delete) assigned to a resource for a user or application.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="srsteaccess_perm_permission">
+                                                            <sch:rule context="win-def:sharedresource_state/win-def:access_perm_permission">
+                                                                  <sch:assert test="not(@datatype) or @datatype='bool'">
+                                                                        <sch:value-of select="../@id"/> - datatype attribute for the access_perm_permission entity of a sharedresource_state should be 'bool'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="access_all_permission" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Permission to read, write, create, execute, and delete resources, and to modify their attributes and permissions.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="srsteaccess_all_permission">
+                                                            <sch:rule context="win-def:sharedresource_state/win-def:access_all_permission">
+                                                                  <sch:assert test="not(@datatype) or @datatype='bool'">
+                                                                        <sch:value-of select="../@id"/> - datatype attribute for the access_all_permission entity of a sharedresource_state should be 'bool'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =================================  SID TEST   ================================= -->
+      <!-- =============================================================================== -->
+      <xsd:element name="sid_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The sid test is used to check properties associated with the specified sid. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a sid_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="sidtst">
+                              <sch:rule context="win-def:sid_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:sid_object/@id"><sch:value-of select="../@id"/> - the object child element of a sid_test must reference a sid_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:sid_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:sid_state/@id"><sch:value-of select="../@id"/> - the state child element of a sid_test must reference a sid_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="sid_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The sid_object element is used by a sid_test to define the object set, in this case a set of sids (identified by name), to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="behaviors" type="win-def:SidBehaviors" minOccurs="0"/>
+                                                <xsd:element name="trustee_name" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The trustee_name element is the unique name that associated a particular SID. A SID can be associated with a user, group, or program (such as a Windows service). In a domain environment, trustee names should be identified in the form: "domain\trustee name" For local trustee names use: "computer name\trustee name" For built-in accounts on the system, use the trustee name without a domain. For example: ADMINISTRATOR, SYSTEM, NETWORK_SERVICES, ADMINISTRATORS (group), etc. Note that the built-in trustee names should be all caps as that is how the windows apis return them.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="sidobjtrustee_name">
+                                                                        <sch:rule context="win-def:sid_object/win-def:trustee_name">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_name entity of a sid_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="sid_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The sid_state element defines the different metadata associate with a Windows trustee (identified by name).  Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="trustee_name" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This element specifies the trustee name associated with a particular SID. In a domain environment, trustee names should be identified in the form: "domain\trustee name" For local trustee names use: "computer name\trustee name" For built-in accounts on the system, use the trustee name without a domain. For example: ADMINISTRATOR, SYSTEM, NETWORK_SERVICES, ADMINISTRATORS (group), etc. Note that the built-in trustee names should be all caps as that is how the windows apis return them.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="sidstetrustee_name">
+                                                            <sch:rule context="win-def:sid_state/win-def:trustee_name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_name entity of a sid_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="trustee_sid" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The security identifier (SID) of the specified trustee name.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="sidstetrustee_sid">
+                                                            <sch:rule context="win-def:sid_state/win-def:trustee_sid">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_sid entity of a sid_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="trustee_domain" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The domain of the specified trustee name.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="sidstetrustee_domain">
+                                                            <sch:rule context="win-def:sid_state/win-def:trustee_domain">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_domain entity of a sid_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:complexType name="SidBehaviors">
+            <xsd:annotation>
+                  <xsd:documentation>The SidBehaviors complex type defines a number of behaviors that allow a more detailed definition of the sid objects being specified.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:attribute name="include_group" type="xsd:boolean" use="optional" default="true">
+                  <xsd:annotation>
+                        <xsd:documentation>'include_group' defines whether the group sid should be included in the object when the object is defined by a group sid. For example, the intension of an object defined by a group sid might be to retrieve all the user sids that are a member of the group, but not the group sid itself.</xsd:documentation>
+                  </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="resolve_group" type="xsd:boolean" use="optional" default="false">
+                  <xsd:annotation>
+                        <xsd:documentation>'resolve_group' defines whether an object defined by a group sid should be resolved to return all the user sids that are a member of that group.</xsd:documentation>
+                  </xsd:annotation>
+            </xsd:attribute>
+      </xsd:complexType>
+      <!-- =============================================================================== -->
+      <!-- ===============================  SID SID TEST   =============================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="sid_sid_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The sid_sid_test is used to check properties associated with the specified sid. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a sid_sid_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:documentation>Note that this sid_sid test was added in version 5.4 as a temporary fix.  There is a need within the community to identify things like users and groups by both the name and the sid.  For version 6 of OVAL, work is underway for a better solution to the problem, but for now, a second test was added to satisfy the need.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="sidsidtst">
+                              <sch:rule context="win-def:sid_sid_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:sid_sid_object/@id"><sch:value-of select="../@id"/> - the object child element of a sid_sid_test must reference a sid_sid_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:sid_sid_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:sid_sid_state/@id"><sch:value-of select="../@id"/> - the state child element of a sid_sid_test must reference a sid_sid_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="sid_sid_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The sid_sid_object element is used by a sid_sid_test to define the object set, in this case a set of sids, to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set"/>
+                                          <xsd:sequence>
+                                                <xsd:element name="behaviors" type="win-def:SidSidBehaviors" minOccurs="0"/>
+                                                <xsd:element name="trustee_sid" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The trustee_sid entity is a SID that can be associated with a user, group, or program (such as a Windows service).</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="sidsidobjtrustee_name">
+                                                                        <sch:rule context="win-def:sid_sid_object/win-def:trustee_sid">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_sid entity of a sid_sid_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="sid_sid_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The sid_state element defines the different metadata associate with a Windows trustee (identified by SID).  Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="trustee_sid" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The security identifier (SID) of the specified trustee name.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="sidsidstetrustee_sid">
+                                                            <sch:rule context="win-def:sid_sid_state/win-def:trustee_sid">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_sid entity of a sid_sid_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="trustee_name" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This element specifies the trustee name associated with a particular SID. In a domain environment, trustee names should be identified in the form: "domain\trustee name" For local trustee names use: "computer name\trustee name" For built-in accounts on the system, use the trustee name without a domain. For example: ADMINISTRATOR, SYSTEM, NETWORK_SERVICES, ADMINISTRATORS (group), etc. Note that the built-in trustee names should be all caps as that is how the windows apis return them.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="sidsidstetrustee_name">
+                                                            <sch:rule context="win-def:sid_sid_state/win-def:trustee_name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_name entity of a sid_sid_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="trustee_domain" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The domain of the specified trustee name.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="sidsidstetrustee_domain">
+                                                            <sch:rule context="win-def:sid_sid_state/win-def:trustee_domain">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the trustee_domain entity of a sid_sid_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:complexType name="SidSidBehaviors">
+            <xsd:annotation>
+                  <xsd:documentation>The SidSidBehaviors complex type defines a number of behaviors that allow a more detailed definition of the sid objects being specified.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:attribute name="include_group" type="xsd:boolean" use="optional" default="true">
+                  <xsd:annotation>
+                        <xsd:documentation>'include_group' defines whether the group sid should be included in the object when the object is defined by a group sid. For example, the intension of an object defined by a group sid might be to retrieve all the user sids that are a member of the group, but not the group sid itself.</xsd:documentation>
+                  </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="resolve_group" type="xsd:boolean" use="optional" default="false">
+                  <xsd:annotation>
+                        <xsd:documentation>'resolve_group' defines whether an object defined by a group sid should be resolved to return all the user sids that are a member of that group.</xsd:documentation>
+                  </xsd:annotation>
+            </xsd:attribute>
+      </xsd:complexType>
+      <!-- =============================================================================== -->
+      <!-- =========================  USER ACCESS CONTROL TEST  ========================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="uac_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The user access control test is used to check setting related to User Access Control within Windows. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a uaac_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="uactst">
+                              <sch:rule context="win-def:uac_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:uac_object/@id"><sch:value-of select="../@id"/> - the object child element of a uac_test must reference a uac_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:uac_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:uac_state/@id"><sch:value-of select="../@id"/> - the state child element of a uac_test must reference a uac_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="uac_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The uac_object element is used by a user access control test to define those objects to evaluate based on a specified state. There is actually only one object relating to user access control and this is the system as a whole. Therefore, there are no child entities defined. Any OVAL Test written to check user access control settings will reference the same uac_object which is basically an empty object element.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType"/>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="uac_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The uac_state element specifies the different settings that are available under User Access Control. A user access control test will reference a specific instance of this state that defines the exact settings that need to be evaluated. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="admin_approval_mode" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Admin Approval Mode for the Built-in Administrator account.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="uacsteadminapprovalmode">
+                                                            <sch:rule context="win-def:uac_state/win-def:admin_approval_mode">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the admin_approval_mode entity of a uac_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="elevation_prompt_admin" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Behavior of the elevation prompt for administrators in Admin Approval Mode.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="uacstebehaviorelevationadmin">
+                                                            <sch:rule context="win-def:uac_state/win-def:elevation_prompt_admin">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the elevation_prompt_admin entity of a uac_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="elevation_prompt_standard" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Behavior of the elevation prompt for standard users.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="uacsteelevationpromptstandard">
+                                                            <sch:rule context="win-def:uac_state/win-def:elevation_prompt_standard">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the elevation_prompt_standard entity of a uac_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="detect_installations" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Detect application installations and prompt for elevation.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="uacstedetectinstallations">
+                                                            <sch:rule context="win-def:uac_state/win-def:detect_installations">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the detect_installations entity of a uac_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="elevate_signed_executables" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Only elevate executables that are signed and validated.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="uacsteelevatesignedexecutables">
+                                                            <sch:rule context="win-def:uac_state/win-def:elevate_signed_executables">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the elevate_signed_executables entity of a uac_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="elevate_uiaccess" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Only elevate UIAccess applications that are installed in secure locations.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="uacsteelevateuiaccess">
+                                                            <sch:rule context="win-def:uac_state/win-def:elevate_uiaccess">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the elevate_uiaccess entity of a uac_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="run_admins_aam" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Run all administrators in Admin Approval Mode.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="uacsterunadminsaam">
+                                                            <sch:rule context="win-def:uac_state/win-def:run_admins_aam">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the run_admins_aam entity of a uac_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="secure_desktop" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Switch to the secure desktop when prompting for elevation.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="uacstesecuredesktop">
+                                                            <sch:rule context="win-def:uac_state/win-def:secure_desktop">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the secure_desktop entity of a uac_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="virtualize_write_failures" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Virtualize file and registry write failures to per-user locations.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="uacstevirtualizewritefailures">
+                                                            <sch:rule context="win-def:uac_state/win-def:virtualize_write_failures">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the virtualize_write_failures entity of a uac_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =================================  USER TEST  ================================= -->
+      <!-- =============================================================================== -->
+      <xsd:element name="user_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The user test is used to check information about Windows users. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a user_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="usertst">
+                              <sch:rule context="win-def:user_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:user_object/@id"><sch:value-of select="../@id"/> - the object child element of a user_test must reference a user_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:user_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:user_state/@id"><sch:value-of select="../@id"/> - the state child element of a user_test must reference a user_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="user_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation/>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set" minOccurs="0"/>
+                                          <xsd:sequence minOccurs="0">
+                                                <xsd:element name="user" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The user entity holds a string that represents the name of a particular user. In Windows, user names are case-insensitive and thus case does not matter for this entity. In a domain environment, users should be identified in the form: "domain\user name" For local users use: "computer name\user name" For built-in accounts on the system, use the user name without a domain. For example: ADMINISTRATOR, SYSTEM, etc. Note that the built-in user names should be all caps to help improve readability as that is how the windows apis return them. Of course techincally it does not matter since the names are case-insensitive.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="userobjuser">
+                                                                        <sch:rule context="win-def:user_object/win-def:user">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the user entity of a user_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="user_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The user_state element enumerates the different groups (identified by name) that a Windows user might belong to. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="user" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The user entity holds a string that represents the name of a particular user. In Windows, user names are case-insensitive and thus case does not matter for this entity. In a domain environment, users should be identified in the form: "domain\user name" For local users use: "computer name\user name" For built-in accounts on the system, use the user name without a domain. For example: ADMINISTRATOR, SYSTEM, etc. Note that the built-in user names should be all caps to help improve readability as that is how the windows apis return them. Of course techincally it does not matter since the names are case-insensitive.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="usersteuser">
+                                                            <sch:rule context="win-def:user_state/win-def:user">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the user entity of a user_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="enabled" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This element holds a boolean value that specifies whether the particular user account is enabled or not.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="usersteenabled">
+                                                            <sch:rule context="win-def:user_state/win-def:enabled">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the enabled entity of a user_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="group" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>A string the represents the name of a particular group. In Windows, group names are case-insensitive and thus case does not matter for this entity. In a domain environment, groups should be identified in the form: "domain\group name" For local groups use: "computer name\group name" For built-in accounts on the system, use the group name without a domain. For example: ADMINISTRATORS, etc. Note that the built-in group names should be all caps as that is how the windows apis return them. Of course techincally it does not matter since the names are case-insensitive.</xsd:documentation>
+                                                <xsd:documentation>The group element can be included multiple times in a system characteristic item in order to record that a user can be a member of a number of different groups. Note that the entity_check attribute associated with EntityStateStringType guides the evaluation of entities like group that refer to items that can occur an unbounded number of times.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="userstegroup">
+                                                            <sch:rule context="win-def:user_state/win-def:group">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the group entity of a user_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ===============================  USER SID TEST  =============================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="user_sid_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The user_sid_test is used to check information about Windows users. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a user_sid_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="usersidtst">
+                              <sch:rule context="win-def:user_sid_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:user_sid_object/@id"><sch:value-of select="../@id"/> - the object child element of a user_sid_test must reference a user_sid_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:user_sid_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:user_sid_state/@id"><sch:value-of select="../@id"/> - the state child element of a user_sid_test must reference a user_sid_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="user_sid_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The user_sid_object represents a set of users on a Windows system.  This set (which might contain only one user) is identified by a SID.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set" minOccurs="0"/>
+                                          <xsd:sequence minOccurs="0">
+                                                <xsd:element name="user" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>The user_sid entity holds a string that represents the SID of a particular user.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="usersidobjuser">
+                                                                        <sch:rule context="win-def:user_sid_object/win-def:user_sid">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the user_sid entity of a user_sid_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="user_sid_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The user_sid_state element enumerates the different groups (identified by SID) that a Windows user might belong to. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="user" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The user_sid entity holds a string that represents the SID of a particular user.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="usersidsteuser">
+                                                            <sch:rule context="win-def:user_sid_state/win-def:user_sid">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the user_sid entity of a user_sid_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="enabled" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>This element holds a boolean value that specifies whether the particular user account is enabled or not.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="usersidsteenabled">
+                                                            <sch:rule context="win-def:user_sid_state/win-def:enabled">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the enabled entity of a user_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="group" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>A string the represents the SID of a particular group.  The group_sid element can be included multiple times in a system characteristic item in order to record that a user can be a member of a number of different groups. Note that the entity_check attribute associated with EntityStateStringType guides the evaluation of entities like group that refer to items that can occur an unbounded number of times.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="usersidstegroup">
+                                                            <sch:rule context="win-def:user_sid_state/win-def:group_sid">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the group_sid entity of a user_sid_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ================================  VOLUME TEST  ================================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="volume_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The volume test is used to check information about different storage volumes found on a Windows system. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a volume_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="volumetst">
+                              <sch:rule context="win-def:volume_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:volume_object/@id"><sch:value-of select="../@id"/> - the object child element of a volume_test must reference a volume_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:volume_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:volume_state/@id"><sch:value-of select="../@id"/> - the state child element of a volume_test must reference a volume_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="volume_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation>The volume_object element is used by a volume test to define the specific volume(s) to be evaluated. Each object extends the standard ObjectType as definied in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
+                  <xsd:documentation>A volume object defines the rootpath of the volume(s).</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set" minOccurs="0"/>
+                                          <xsd:sequence minOccurs="0">
+                                                <xsd:element name="rootpath" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>A string that contains the root directory of the volume to be described. A trailing backslash is required. For example, you would specify \\MyServer\MyShare as "\\MyServer\MyShare\", or the C drive as "C:\".</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="volobjrootpath">
+                                                                        <sch:rule context="win-def:volume_object/win-def:rootpath">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the rootpath entity of a volume_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="volume_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation>The volume_state element defines the different metadata associate with a storage volume in Windows. This includes the rootpat, the file system type, name, and serial number, as well as any associated flags. Please refer to the individual elements in the schema for more details about what each represents. The GetVolumeInformation function as defined by Microsoft is also a good place to look for information.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="rootpath" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>A string that contains the root directory of the volume to be described. A trailing backslash is required. For example, you would specify \\MyServer\MyShare as "\\MyServer\MyShare\", or the C drive as "C:\".</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="volumesterootpath">
+                                                            <sch:rule context="win-def:volume_state/win-def:rootpath">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the rootpath entity of a volume_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_system" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The type of filesystem. For example FAT or NTFS.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="volumestefile_system">
+                                                            <sch:rule context="win-def:volume_state/win-def:file_system">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the file_system entity of a volume_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="name" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The name of the volume.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="volumestename">
+                                                            <sch:rule context="win-def:volume_state/win-def:name">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the name entity of a volume_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="volume_max_component_length" type="oval-def:EntityStateIntType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The volume_max_component_length element specifies the maximum length, in TCHARs, of a file name component that a specified file system supports. A file name component is the portion of a file name between backslashes. The value that is stored in the variable that *lpMaximumComponentLength points to is used to indicate that a specified file system supports long names. For example, for a FAT file system that supports long names, the function stores the value 255, rather than the previous 8.3 indicator. Long names can also be supported on systems that use the NTFS file system.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="volstevolume_max_component_length">
+                                                            <sch:rule context="win-def:volume_state/win-def:volume_max_component_length">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the volume_max_component_length entity of a volume_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="serial_number" type="oval-def:EntityStateIntType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The volume serial number.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="volsteserial_number">
+                                                            <sch:rule context="win-def:volume_state/win-def:serial_number">
+                                                                  <sch:assert test="@datatype='int'"><sch:value-of select="../@id"/> - datatype attribute for the serial_number entity of a volume_state should be 'int'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_case_sensitive_search" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The file system supports case-sensitive file names.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="volstefile_case_sensitive_search">
+                                                            <sch:rule context="win-def:volume_state/win-def:file_case_sensitive_search">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_case_sensitive_search entity of a volume_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_case_preserved_names" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The file system preserves the case of file names when it places a name on disk.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="volstefile_case_preserved_names">
+                                                            <sch:rule context="win-def:volume_state/win-def:file_case_preserved_names">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_case_preserved_names entity of a volume_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_unicode_on_disk" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The file system supports Unicode in file names as they appear on disk.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="volstefile_unicode_on_disk">
+                                                            <sch:rule context="win-def:volume_state/win-def:file_unicode_on_disk">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_unicode_on_disk entity of a volume_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_persistent_acls" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The file system preserves and enforces ACLs. For example, NTFS preserves and enforces ACLs, and FAT does not.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="volstefile_persistent_acls">
+                                                            <sch:rule context="win-def:volume_state/win-def:file_persistent_acls">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_persistent_acls entity of a volume_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_file_compression" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The file system supports file-based compression.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="volstefile_file_compression">
+                                                            <sch:rule context="win-def:volume_state/win-def:file_file_compression">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_file_compression entity of a volume_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_volume_quotas" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The file system supports disk quotas.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="volstefile_volume_quotas">
+                                                            <sch:rule context="win-def:volume_state/win-def:file_volume_quotas">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_volume_quotas entity of a volume_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_supports_sparse_files" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The file system supports sparse files.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="volstefile_supports_sparse_files">
+                                                            <sch:rule context="win-def:volume_state/win-def:file_supports_sparse_files">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_supports_sparse_files entity of a volume_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_supports_reparse_points" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The file system supports reparse points.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="volstefile_supports_reparse_points">
+                                                            <sch:rule context="win-def:volume_state/win-def:file_supports_reparse_points">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_supports_reparse_points entity of a volume_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_supports_remote_storage" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The specified volume is a compressed volume; for example, a DoubleSpace volume.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="volstefile_supports_remote_storage">
+                                                            <sch:rule context="win-def:volume_state/win-def:file_supports_remote_storage">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_supports_remote_storage entity of a volume_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_volume_is_compressed" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The specified volume is a compressed volume; for example, a DoubleSpace volume.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="volstefile_volume_is_compressed">
+                                                            <sch:rule context="win-def:volume_state/win-def:file_volume_is_compressed">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_volume_is_compressed entity of a volume_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_supports_object_ids" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The file system supports object identifiers.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="volstefile_supports_object_ids">
+                                                            <sch:rule context="win-def:volume_state/win-def:file_supports_object_ids">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_supports_object_ids entity of a volume_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_supports_encryption" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The file system supports the Encrypted File System (EFS).</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="volstefile_supports_encryption">
+                                                            <sch:rule context="win-def:volume_state/win-def:file_supports_encryption">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_supports_encryption entity of a volume_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_named_streams" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The file system supports named streams.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="volstefile_named_streams">
+                                                            <sch:rule context="win-def:volume_state/win-def:file_named_streams">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_named_streams entity of a volume_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="file_read_only_volume" type="oval-def:EntityStateBoolType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The specified volume is read-only. This flag was added in Windows XP.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="volstefile_read_only_volume">
+                                                            <sch:rule context="win-def:volume_state/win-def:file_read_only_volume">
+                                                                  <sch:assert test="@datatype='boolean'"><sch:value-of select="../@id"/> - datatype attribute for the file_read_only_volume entity of a volume_state should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =================================  WMI TEST  ================================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="wmi_test" substitutionGroup="oval-def:test">
+            <xsd:annotation>
+                  <xsd:documentation>The wmi test is used to check information accessed by WMI. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a wmi_object and the optional state element specifies the metadata to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
+                  <xsd:appinfo>
+                        <sch:pattern id="wmitst">
+                              <sch:rule context="win-def:wmi_test/win-def:object">
+                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/win-def:wmi_object/@id"><sch:value-of select="../@id"/> - the object child element of a wmi_test must reference a wmi_object</sch:assert>
+                              </sch:rule>
+                              <sch:rule context="win-def:wmi_test/win-def:state">
+                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/win-def:wmi_state/@id"><sch:value-of select="../@id"/> - the state child element of a wmi_test must reference a wmi_state</sch:assert>
+                              </sch:rule>
+                        </sch:pattern>
+                  </xsd:appinfo>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:TestType">
+                              <xsd:sequence>
+                                    <xsd:element name="object" type="oval-def:ObjectRefType"/>
+                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0"/>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="wmi_object" substitutionGroup="oval-def:object">
+            <xsd:annotation>
+                  <xsd:documentation/>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:ObjectType">
+                              <xsd:sequence>
+                                    <xsd:choice>
+                                          <xsd:element ref="oval-def:set" minOccurs="0"/>
+                                          <xsd:sequence minOccurs="0">
+                                                <xsd:element name="namespace" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>Specifies which WMI namespace to look under. Each WMI provider normally registers its own WMI namespace and then all its classes within that namespace. For example, all Win32 WMI classes can be found in the namespace "root\cimv2", all IIS WMI classes can be found at "root\microsoftiisv2", and all LDAP WMI classes can be found at "root\directory\ldap".</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="wmiobjnamespace">
+                                                                        <sch:rule context="win-def:wmi_object/win-def:namespace">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the namespace entity of a wmi_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                                <xsd:element name="wql" type="oval-def:EntityObjectStringType">
+                                                      <xsd:annotation>
+                                                            <xsd:documentation>A WQL query used to identify the object(s) to test against. Any valid WQL query is usable with one exception, at most one field is allowed in the SELECT portion of the query. For example SELECT name FROM ... is valid, as is SELECT 'true' FROM ..., but SELECT name, number FROM ... is not valid. This is because the result element in the data section is only designed to work against a single field.</xsd:documentation>
+                                                            <xsd:appinfo>
+                                                                  <sch:pattern id="wmiobjwql">
+                                                                        <sch:rule context="win-def:wmi_object/win-def:wql">
+                                                                              <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the wql entity of a wmi_object should be 'string'</sch:assert>
+                                                                        </sch:rule>
+                                                                  </sch:pattern>
+                                                            </xsd:appinfo>
+                                                      </xsd:annotation>
+                                                </xsd:element>
+                                          </xsd:sequence>
+                                    </xsd:choice>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="wmi_state" substitutionGroup="oval-def:state">
+            <xsd:annotation>
+                  <xsd:documentation/>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-def:StateType">
+                              <xsd:sequence>
+                                    <xsd:element name="namespace" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>Specifies which WMI namespace to look under. Each WMI provider normally registers its own WMI namespace and then all its classes within that namespace. For example, all Win32 WMI classes can be found in the namespace "root\cimv2", all IIS WMI classes can be found at "root\microsoftiisv2", and all LDAP WMI classes can be found at "root\directory\ldap".</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="wmistenamespace">
+                                                            <sch:rule context="win-def:wmi_state/win-def:namespace">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the namespace entity of a wmi_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="wql" type="oval-def:EntityStateStringType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>A WQL query used to identify the object(s) to test against. Any valid WQL query is usable with one exception, at most one field is allowed in the SELECT portion of the query. For example SELECT name FROM ... is valid, as is SELECT 'true' FROM ..., but SELECT name, number FROM ... is not valid. This is because the result element in the data section is only designed to work against a single field.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="wmistewql">
+                                                            <sch:rule context="win-def:wmi_state/win-def:wql">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the wql entity of a wmi_state should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="result" type="oval-def:EntityStateAnyType" minOccurs="0">
+                                          <xsd:annotation>
+                                                <xsd:documentation>The result element specifies how to test objects in the result set of the specified WQL statement. Only one comparable field is allowed. So if the WQL statement look like 'SELECT name FROM ...', then a result element with a value of 'Fred' would test that value against the names returned by the WQL statement.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="wmisteresult">
+                                                            <sch:rule context="win-def:wmi_state/win-def:result">
+                                                                  <sch:assert test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"><sch:value-of select="../@id"/> - The datatype has been set to 'int' but the value is not an integer.</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+      <!-- =============================================================================== -->
+      <xsd:complexType name="EntityStateAddrTypeType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityStateAddrTypeType complex type restricts a string value to a specific set of values that describe address types associated with an interface. The empty string is also allowed to support empty emlement associated with variable references.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityStateStringType">
+                        <xsd:enumeration value="MIB_IPADDR_DELETED">
+                              <xsd:annotation>
+                                    <xsd:documentation>The address is being deleted.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="MIB_IPADDR_DISCONNECTED">
+                              <xsd:annotation>
+                                    <xsd:documentation>The address is on disconnected interface.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="MIB_IPADDR_DYNAMIC">
+                              <xsd:annotation>
+                                    <xsd:documentation>The stated address is a dynamic IP address.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="MIB_IPADDR_PRIMARY">
+                              <xsd:annotation>
+                                    <xsd:documentation>The stated address is a primary IP address.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="MIB_IPADDR_TRANSIENT">
+                              <xsd:annotation>
+                                    <xsd:documentation>The stated address is a transient address.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+      <xsd:complexType name="EntityStateAdstypeType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityStateAdstypeType complex type restricts a string value to a specific set of values that specify the different types of information that an active directory attribute can represents. For more information look at the ADSTYPEENUM enumeration defined by Microsoft. The empty string is also allowed to support empty emlement associated with variable references.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityStateStringType">
+                        <xsd:enumeration value="ADSTYPE_INVALID">
+                              <xsd:annotation>
+                                    <xsd:documentation>The data type is invalid.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_DN_STRING">
+                              <xsd:annotation>
+                                    <xsd:documentation>The string is of Distinguished Name (path) of a directory service object.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_CASE_EXACT_STRING">
+                              <xsd:annotation>
+                                    <xsd:documentation>The string is of the case-sensitive type.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_CASE_IGNORE_STRING">
+                              <xsd:annotation>
+                                    <xsd:documentation>The string is of the case-insensitive type.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_PRINTABLE_STRING">
+                              <xsd:annotation>
+                                    <xsd:documentation>The string is displayable on screen or in print.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_NUMERIC_STRING">
+                              <xsd:annotation>
+                                    <xsd:documentation>The string is of a numeral to be interpreted as text.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_BOOLEAN">
+                              <xsd:annotation>
+                                    <xsd:documentation>The data is of a Boolean value.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_INTEGER">
+                              <xsd:annotation>
+                                    <xsd:documentation>The data is of an integer value.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_OCTET_STRING">
+                              <xsd:annotation>
+                                    <xsd:documentation>The string is of a byte array.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_UTC_TIME">
+                              <xsd:annotation>
+                                    <xsd:documentation>The data is of the universal time as expressed in Universal Time Coordinate (UTC).</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_LARGE_INTEGER">
+                              <xsd:annotation>
+                                    <xsd:documentation>The data is of a long integer value.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_PROV_SPECIFIC">
+                              <xsd:annotation>
+                                    <xsd:documentation>The string is of a provider-specific string.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_OBJECT_CLASS">
+                              <xsd:annotation>
+                                    <xsd:documentation>Not used.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_CASEIGNORE_LIST">
+                              <xsd:annotation>
+                                    <xsd:documentation>The data is of a list of case insensitive strings.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_OCTET_LIST">
+                              <xsd:annotation>
+                                    <xsd:documentation>The data is of a list of octet strings.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_PATH">
+                              <xsd:annotation>
+                                    <xsd:documentation>The string is of a directory path.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_POSTALADDRESS">
+                              <xsd:annotation>
+                                    <xsd:documentation>The string is of the postal address type.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_TIMESTAMP">
+                              <xsd:annotation>
+                                    <xsd:documentation>The data is of a time stamp in seconds.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_BACKLINK">
+                              <xsd:annotation>
+                                    <xsd:documentation>The string is of a back link.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_TYPEDNAME">
+                              <xsd:annotation>
+                                    <xsd:documentation>The string is of a typed name.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_HOLD">
+                              <xsd:annotation>
+                                    <xsd:documentation>The data is of the Hold data structure.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_NETADDRESS">
+                              <xsd:annotation>
+                                    <xsd:documentation>The string is of a net address.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_REPLICAPOINTER">
+                              <xsd:annotation>
+                                    <xsd:documentation>The data is of a replica pointer.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_FAXNUMBER">
+                              <xsd:annotation>
+                                    <xsd:documentation>The string is of a fax number.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_EMAIL">
+                              <xsd:annotation>
+                                    <xsd:documentation>The data is of an e-mail message.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_NT_SECURITY_DESCRIPTOR">
+                              <xsd:annotation>
+                                    <xsd:documentation>The data is of Windows NT/Windows 2000 security descriptor as represented by a byte array.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_UNKNOWN">
+                              <xsd:annotation>
+                                    <xsd:documentation>The data is of an undefined type.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_DN_WITH_BINARY">
+                              <xsd:annotation>
+                                    <xsd:documentation>The data is of ADS_DN_WITH_BINARY used for mapping a distinguished name to a non varying GUID. </xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="ADSTYPE_DN_WITH_STRING">
+                              <xsd:annotation>
+                                    <xsd:documentation>The data is of ADS_DN_WITH_STRING used for mapping a distinguished name to a non-varying string value.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+      <xsd:complexType name="EntityStateAuditType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityStateAuditType complex type restricts a string value to a specific set of values: AUDIT_NONE, AUDIT_SUCCESS, AUDIT_FAILURE, and AUDIT_SUCCESS_FAILURE. These values describe which audit records should be generated. The empty string is also allowed to support empty emlement associated with variable references.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityStateStringType">
+                        <xsd:enumeration value="AUDIT_FAILURE"/>
+                        <xsd:enumeration value="AUDIT_NONE"/>
+                        <xsd:enumeration value="AUDIT_SUCCESS"/>
+                        <xsd:enumeration value="AUDIT_SUCCESS_FAILURE"/>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+      <xsd:complexType name="EntityStateInterfaceTypeType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityStateInterfaceTypeType complex type restricts a string value to a specific set of values. These values describe the different interface types. The empty string is also allowed to support empty emlement associated with variable references.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityStateStringType">
+                        <xsd:enumeration value="MIB_IF_TYPE_ETHERNET"/>
+                        <xsd:enumeration value="MIB_IF_TYPE_FDDI"/>
+                        <xsd:enumeration value="MIB_IF_TYPE_LOOPBACK"/>
+                        <xsd:enumeration value="MIB_IF_TYPE_OTHER"/>
+                        <xsd:enumeration value="MIB_IF_TYPE_PPP"/>
+                        <xsd:enumeration value="MIB_IF_TYPE_SLIP"/>
+                        <xsd:enumeration value="MIB_IF_TYPE_TOKENRING"/>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+      <xsd:complexType name="EntityStateFileTypeType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityStateFileTypeType complex type restricts a string value to a specific set of values. These values describe the type of file being represented. For more information see the GetFileType and GetFileAttributesEx functions as defined by Microsoft. The empty string is also allowed to support empty emlement associated with variable references.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityStateStringType">
+                        <xsd:enumeration value="FILE_ATTRIBUTE_DIRECTORY">
+                              <xsd:annotation>
+                                    <xsd:documentation>The handle identifies a directory.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="FILE_TYPE_CHAR">
+                              <xsd:annotation>
+                                    <xsd:documentation>The specified file is a character file, typically an LPT device or a console.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="FILE_TYPE_DISK">
+                              <xsd:annotation>
+                                    <xsd:documentation>The specified file is a disk file.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="FILE_TYPE_PIPE">
+                              <xsd:annotation>
+                                    <xsd:documentation>The specified file is a socket, a named pipe, or an anonymous pipe.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="FILE_TYPE_REMOTE">
+                              <xsd:annotation>
+                                    <xsd:documentation>Unused.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="FILE_TYPE_UNKNOWN">
+                              <xsd:annotation>
+                                    <xsd:documentation>Either the type of the specified file is unknown, or the function failed.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+      <xsd:complexType name="EntityObjectNamingContextType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityObjectNamingContextType restricts a string value to a specific set of values: domain, configuration, and schema. These values describe the different default naming context found in active directory. A naming context is defined as a single object in the Directory Information Tree (DIT) along with every object in the tree subordinate to it. The empty string is also allowed to support empty emlement associated with variable references.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityObjectStringType">
+                        <xsd:enumeration value="domain"/>
+                        <xsd:enumeration value="configuration"/>
+                        <xsd:enumeration value="schema"/>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+      <xsd:complexType name="EntityStateNamingContextType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityObjectNamingContextType restricts a string value to a specific set of values: domain, configuration, and schema. These values describe the different default naming context found in active directory. A naming context is defined as a single object in the Directory Information Tree (DIT) along with every object in the tree subordinate to it. The empty string is also allowed to support empty emlement associated with variable references.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityStateStringType">
+                        <xsd:enumeration value="domain"/>
+                        <xsd:enumeration value="configuration"/>
+                        <xsd:enumeration value="schema"/>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+      <xsd:complexType name="EntityObjectProtocolType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityObjectProtocolType restricts a string value to a specific set of values: TCP and UDP. These values describe the different protocols available to a port. The empty string is also allowed to support empty emlement associated with variable references.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityObjectStringType">
+                        <xsd:enumeration value="TCP"/>
+                        <xsd:enumeration value="UDP"/>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+      <xsd:complexType name="EntityStateProtocolType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityStateProtocolType restricts a string value to a specific set of values: TCP and UDP. These values describe the different protocols available to a port. The empty string is also allowed to support empty emlement associated with variable references.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityStateStringType">
+                        <xsd:enumeration value="TCP"/>
+                        <xsd:enumeration value="UDP"/>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+      <xsd:complexType name="EntityObjectRegistryHiveType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityObjectRegistryHiveType restricts a string value to a specific set of values: HKEY_CLASSES_ROOT, HKEY_CURRENT_CONFIG, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, and HKEY_USERS. These values describe the possible hives in the registry. The empty string is also allowed to support empty emlement associated with variable references.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityObjectStringType">
+                        <xsd:enumeration value="HKEY_CLASSES_ROOT"/>
+                        <xsd:enumeration value="HKEY_CURRENT_CONFIG"/>
+                        <xsd:enumeration value="HKEY_CURRENT_USER"/>
+                        <xsd:enumeration value="HKEY_LOCAL_MACHINE"/>
+                        <xsd:enumeration value="HKEY_USERS"/>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+      <xsd:complexType name="EntityStateRegistryHiveType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityStateRegistryHiveType restricts a string value to a specific set of values: HKEY_CLASSES_ROOT, HKEY_CURRENT_CONFIG, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, and HKEY_USERS. These values describe the possible hives in the registry. The empty string is also allowed to support empty emlement associated with variable references.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityStateStringType">
+                        <xsd:enumeration value="HKEY_CLASSES_ROOT"/>
+                        <xsd:enumeration value="HKEY_CURRENT_CONFIG"/>
+                        <xsd:enumeration value="HKEY_CURRENT_USER"/>
+                        <xsd:enumeration value="HKEY_LOCAL_MACHINE"/>
+                        <xsd:enumeration value="HKEY_USERS"/>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+      <xsd:complexType name="EntityStateRegistryTypeType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityStateRegistryTypeType complex type defines the different values that are valid for the type entity of a registry state. These values describe the possible types of data stored in a registry key. The empty string is also allowed as a valid value to support an empty element that is found when a variable reference is used within the type entity. Please note that the values identified are for the type entity and are not valid values for the datatype attribute. For information about how to encode registry data in OVAL for each of the different types, please visit the registry_state documentation.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityStateStringType">
+                        <xsd:enumeration value="reg_binary">
+                              <xsd:annotation>
+                                    <xsd:documentation>The reg_binary type is used by registry keys that specify binary data in any form.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="reg_dword">
+                              <xsd:annotation>
+                                    <xsd:documentation>The reg_dword type is used by registry keys that specify a 32-bit number.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="reg_expand_sz">
+                              <xsd:annotation>
+                                    <xsd:documentation>The reg_expand_sz type is used by registry keys to specify a null-terminated string that contains unexpanded references to environment variables (for example, "%PATH%").</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="reg_multi_sz">
+                              <xsd:annotation>
+                                    <xsd:documentation>The reg_multi_sz type is used by registry keys that specify an array of null-terminated strings, terminated by two null characters.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="reg_none">
+                              <xsd:annotation>
+                                    <xsd:documentation>The reg_none type is used by registry keys that have no defined value type.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="reg_qword">
+                              <xsd:annotation>
+                                    <xsd:documentation>The reg_qword type is used by registry keys that specify a 64-bit number.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="reg_sz">
+                              <xsd:annotation>
+                                    <xsd:documentation>The reg_sz type is used by registry keys that specify a single null-terminated string.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+      <xsd:complexType name="EntityStateSharedResourceTypeType">
+            <xsd:annotation>
+                  <xsd:documentation>The EntityStateSharedResourceTypeType complex type defines the different values that are valid for the type entity of a shared resource state. Note that the Windows API returns a DWOD and OVAL uses the constant name that is normally defined for these return values. This is done to increase readability and maintainability of OVAL Definitions. The empty string is also allowed as a valid value to support an empty element that is found when a variable reference is used within the type entity.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:simpleContent>
+                  <xsd:restriction base="oval-def:EntityStateStringType">
+                        <xsd:enumeration value="STYPE_DISKTREE">
+                              <xsd:annotation>
+                                    <xsd:documentation>The STYPE_DISKTREE type means that the shared resource is a disk drive. The DWROD value this corresponds to is 0.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="STYPE_PRINTQ">
+                              <xsd:annotation>
+                                    <xsd:documentation>The STYPE_PRINTQ type means that the shared resource is a print queue. The DWROD value this corresponds to is 1.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="STYPE_DEVICE">
+                              <xsd:annotation>
+                                    <xsd:documentation>The STYPE_DEVICE type means that the shared resource is a communication device. The DWROD value this corresponds to is 2.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="STYPE_IPC">
+                              <xsd:annotation>
+                                    <xsd:documentation>The STYPE_IPC type means that the shared resource is an interprocess communication. The DWROD value this corresponds to is 3.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="STYPE_SPECIAL">
+                              <xsd:annotation>
+                                    <xsd:documentation>The STYPE_SPECIAL type means that this is a special share reserved for interprocess communication (IPC$) or remote administration of the server (ADMIN$). Can also refer to administrative shares such as C$, D$, E$, and so forth. The DWROD value this corresponds to is 0x40000000.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value="STYPE_TEMPORARY">
+                              <xsd:annotation>
+                                    <xsd:documentation>The STYPE_TEMPORARY type means that the shared resource is a temporary share. The DWROD value this corresponds to is 0x80000000.</xsd:documentation>
+                              </xsd:annotation>
+                        </xsd:enumeration>
+                        <xsd:enumeration value=""/>
+                  </xsd:restriction>
+            </xsd:simpleContent>
+      </xsd:complexType>
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/windows-definitions-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/windows-system-characteristics-schema.xsd
===================================================================
--- trunk/ovaldi/xml/windows-system-characteristics-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/windows-system-characteristics-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,4643 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" xmlns:win-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows" elementFormDefault="qualified" version="5.4">
+     <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" schemaLocation="oval-system-characteristics-schema.xsd"/>
+     <xsd:annotation>
+          <xsd:documentation>The following is a description of the elements, types, and attributes that compose the Windows specific system characteristic items found in Open Vulnerability and Assessment Language (OVAL). Each item is an extension of the standard item element defined in the Core System Characteristic Schema. Through extension, each item inherits a set of elements and attributes that are shared amongst all OVAL Items. Each item is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core System Characteristic Schema is not outlined here.</xsd:documentation>
+          <xsd:documentation>The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
+          <xsd:appinfo>
+               <schema>Windows System Characteristics</schema>
+               <version>5.4</version>
+               <date>4/1/2008 10:41:47 AM</date>
+                <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
+                <sch:title>schematron validation of the Windows portion of an OVAL System Characteristics file</sch:title>
+               <sch:ns prefix="oval-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5"/>
+               <sch:ns prefix="win-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows"/>
+          </xsd:appinfo>
+     </xsd:annotation>
+     <!-- =============================================================================== -->
+     <!-- =============================  ACCESS TOKEN ITEM  ============================= -->
+     <!-- =============================================================================== -->
+     <xsd:element name="accesstoken_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>The access token item holds information about the individual privileges and rights associated with a specific access token. Each privilege and right in the data section accepts a boolean value signifying whether the privilege is granted or not. It extends the standard ItemType as defined in the oval-system-characteristics schema and one should refer to the ItemType description for more information.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="security_principle" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Security principals include users or groups with either local or domain accounts, and computer accounts created when a computer running Windows NT, Windows 2000, Windows XP, or a member of the Windows Server 2003 family joins a domain. User rights and permissions to access objects such as Active Directory objects, files, and registry settings are assigned to security principals. In a domain environment, security principals should be identified in the form: "domain\trustee name" For local security principals use: "computer name\trustee name" For built-in accounts on the system, use the trustee name without a domain. For example: ADMINISTRATOR, SYSTEM, NETWORK_SERVICES, ADMINISTRATORS (group), etc. Note that the built-in security principals should be all caps as that is how the windows apis return them.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsecurity_principle">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:security_principle">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the security_principle entity of an accesstoken_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="seassignprimarytokenprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows a parent process to replace the access token that is associated with a child process.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemseassignprimarytokenprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:seassignprimarytokenprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the seassignprimarytokenprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="seauditprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows a process to generate audit records in the security log. The security log can be used to trace unauthorized system access.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemseauditprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:seauditprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the seauditprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="sebackupprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows the user to circumvent file and directory permissions to back up the system. The privilege is selected only when an application attempts access by using the NTFS backup application programming interface (API). Otherwise, normal file and directory permissions apply.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsebackupprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:sebackupprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the sebackupprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="sechangenotifyprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows the user to pass through folders to which the user otherwise has no access while navigating an object path in the NTFS file system or in the registry. This privilege does not allow the user to list the contents of a folder; it allows the user only to traverse its directories.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsechangenotifyprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:sechangenotifyprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the sechangenotifyprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="secreateglobalprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows the user to create named file mapping objects in the global namespace during Terminal Services sessions.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsecreateglobalprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:secreateglobalprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the secreateglobalprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="secreatepagefileprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows the user to create and change the size of a pagefile.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsecreatepagefileprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:secreatepagefileprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the secreatepagefileprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="secreatepermanentprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows a process to create a directory object in the object manager. It is useful to kernel-mode components that extend the object namespace. Components that are running in kernel mode have this privilege inherently.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsecreatepermanentprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:secreatepermanentprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the secreatepermanentprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="secreatesymboliclinkprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows a user create a symbolic link.  This is new for Vista.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsecreatesymboliclinkprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:secreatesymboliclinkprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the secreatesymboliclinkprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="secreatetokenprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows a process to create an access token by calling NtCreateToken() or other token-creating APIs.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsecreatetokenprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:secreatetokenprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the secreatetokenprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="sedebugprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows the user to attach a debugger to any process. It provides access to sensitive and critical operating system components.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsedebugprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:sedebugprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the sedebugprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="seenabledelegationprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows the user to change the Trusted for Delegation setting on a user or computer object in Active Directory. The user or computer that is granted this privilege must also have write access to the account control flags on the object.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemseenabledelegationprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:seenabledelegationprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the seenabledelegationprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="seimpersonateprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows the user to impersonate a client after authentication. It is not supported on Windows XP, Windows 2000 SP3 and earlier, or Windows NT.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemseimpersonateprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:seimpersonateprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the seimpersonateprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="seincreasebasepriorityprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows a user to increase the base priority class of a process.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemseincreasebasepriorityprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:seincreasebasepriorityprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the seincreasebasepriorityprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="seincreasequotaprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows a process that has access to a second process to increase the processor quota assigned to the second process.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemseincreasequotaprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:seincreasequotaprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the seincreasequotaprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="seincreaseworkingsetprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows a user to increase a process working set.  This is new for Vista</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemseincreaseworkingsetprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:seincreaseworkingsetprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the seincreaseworkingsetprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="seloaddriverprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows a user to install and remove drivers for Plug and Play devices.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemseloaddriverprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:seloaddriverprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the seloaddriverprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="selockmemoryprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows a process to keep data in physical memory, which prevents the system from paging the data to virtual memory on disk.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemselockmemoryprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:selockmemoryprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the selockmemoryprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="semachineaccountprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows the user to add a computer to a specific domain.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsemachineaccountprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:semachineaccountprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the semachineaccountprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="semanagevolumeprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows a non-administrative or remote user to manage volumes or disks.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsemanagevolumeprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:semanagevolumeprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the semanagevolumeprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="seprofilesingleprocessprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows a user to sample the performance of an application process.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemseprofilesingleprocessprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:seprofilesingleprocessprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the seprofilesingleprocessprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="serelabelprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows a user to modify an object label.  This user right is new for Vista.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemserelabelprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:serelabelprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the serelabelprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="seremoteshutdownprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows a user to shut down a computer from a remote location on the network.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemseremoteshutdownprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:seremoteshutdownprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the seremoteshutdownprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="serestoreprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows a user to circumvent file and directory permissions when restoring backed-up files and directories and to set any valid security principal as the owner of an object.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemserestoreprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:serestoreprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the serestoreprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="sesecurityprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows a user to specify object access auditing options for individual resources such as files, Active Directory objects, and registry keys. A user who has this privilege can also view and clear the security log from Event Viewer.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsesecurityprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:sesecurityprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the sesecurityprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="seshutdownprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows a user to shut down the local computer.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemseshutdownprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:seshutdownprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the seshutdownprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="sesyncagentprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows a process to read all objects and properties in the directory, regardless of the protection on the objects and properties. It is required in order to use Lightweight Directory Access Protocol (LDAP) directory synchronization (Dirsync) services.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsesyncagentprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:sesyncagentprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the sesyncagentprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="sesystemenvironmentprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows modification of system environment variables either by a process through an API or by a user through System Properties.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsesystemenvironmentprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:sesystemenvironmentprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the sesystemenvironmentprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="sesystemprofileprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows a user to sample the performance of system processes.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsesystemprofileprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:sesystemprofileprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the sesystemprofileprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="sesystemtimeprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows the user to adjust the time on the computer's internal clock. It is not required to change the time zone or other display characteristics of the system time.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsesystemtimeprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:sesystemtimeprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the sesystemtimeprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="setakeownershipprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows a user to take ownership of any securable object in the system, including Active Directory objects, NTFS files and folders, printers, registry keys, services, processes, and threads.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsetakeownershipprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:setakeownershipprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the setakeownershipprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="setcbprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows a process to assume the identity of any user and thus gain access to the resources that the user is authorized to access.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsetcbprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:setcbprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the setcbprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="setimezoneprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows a user to change the time zone.  This is new for Vista.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsetimezoneprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:setimezoneprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the setimezoneprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="seundockprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows the user of a portable computer to undock the computer by clicking Eject PC on the Start menu.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemseundockprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:seundockprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the seundockprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="seunsolicitedinputprivilege" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If this privilege is enabled, it allows the user to read unsolicited data from a terminal device.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemseunsolicitedinputprivilege">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:seunsolicitedinputprivilege">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the seunsolicitedinputprivilege entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="sebatchlogonright" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If an account is assigned this right, it can log on using the batch logon type.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsebatchlogonright">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:sebatchlogonright">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the sebatchlogonright entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="seinteractivelogonright" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If an account is assigned this right, it can log on using the interactive logon type.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemseinteractivelogonright">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:seinteractivelogonright">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the seinteractivelogonright entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="senetworklogonright" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If an account is assigned this right, it can log on using the network logon type.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsenetworklogonright">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:senetworklogonright">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the senetworklogonright entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="seremoteinteractivelogonright" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If an account is assigned this right, it can log on to the computer by using a Remote Desktop connection.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemseremoteinteractivelogonright">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:seremoteinteractivelogonright">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the seremoteinteractivelogonright entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="seservicelogonright" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If an account is assigned this right, it can log on using the service logon type.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemseservicelogonright">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:seservicelogonright">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the seservicelogonright entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="sedenybatchLogonright" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If an account is assigned this right, it is explicitly denied the ability to log on using the batch logon type.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsedenybatchLogonright">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:sedenybatchLogonright">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the sedenybatchLogonright entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="sedenyinteractivelogonright" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If an account is assigned this right, it is explicitly denied the ability to log on using the interactive logon type.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsedenyinteractivelogonright">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:sedenyinteractivelogonright">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the sedenyinteractivelogonright entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="sedenynetworklogonright" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If an account is assigned this right, it is explicitly denied the ability to log on using the network logon type.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsedenynetworklogonright">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:sedenynetworklogonright">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the sedenynetworklogonright entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="sedenyremoteInteractivelogonright" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If an account is assigned this right, it is explicitly denied the ability to log on through Terminal Services.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsedenyremoteInteractivelogonright">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:sedenyremoteInteractivelogonright">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the sedenyremoteInteractivelogonright entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="sedenyservicelogonright" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>If an account is assigned this right, it is explicitly denied the ability to log on using the service logon type.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="atitemsedenyservicelogonright">
+                                                  <sch:rule context="win-sc:accesstoken_item/win-sc:sedenyservicelogonright">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the sedenyservicelogonright entity of an accesstoken_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ========================  ACTIVE DIRECTORY ITEM  ============================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="activedirectory_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>The active directory item holds information about specific entries in the Windows Active Directory. It extends the standard ItemType as defined in the oval-system-characteristics schema and one should refer to the ItemType description for more information.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="naming_context" type="win-sc:EntityItemNamingContextType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Each object in active directory exists under a certain naming context (also known as a partition). A naming context is defined as a single object in the Directory Information Tree (DIT) along with every object in the tree subordinate to it. There are three default naming contexts in Active Directory: domain, configuration, and schema.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aditemnaming_context">
+                                                  <sch:rule context="win-sc:activedirectory_item/win-sc:naming_context">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the naming_context entity of an activedirectory_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="relative_dn" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1" nillable="true">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The relative_dn field is used to uniquely identify an object inside the specified naming context. It contains all the parts of the objects distinguished name except those outlined by the naming context. If the nillable attribute is set to true, then the item being represented is the higher level naming context. Using xsi:nil here will result in a status of 'does not exist' for object_class, adstype, and value since these entities are not associated with a naming context by itself. Note that when nil is used for the relative dn element, the attribute element should also be nilled.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aditemrelative_dn">
+                                                  <sch:rule context="win-sc:activedirectory_item/win-sc:relative_dn">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the relative_dn entity of an activedirectory_item should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@xsi:nil='true') or ../win-sc:attribute/@xsi:nil='true'"><sch:value-of select="../@id"/> - attribute entity must be nil when relative_dn is nil</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="attribute" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1" nillable="true">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Specifies a named value contained by the object. If the nillable attribute is set to true, then the item being represented is the higher level relative dn. Using xsi:nil here will result in a status of 'does not exist' for object_class, adstype, and value since these entities are not associated with a relative dn by itself.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aditemattribute">
+                                                  <sch:rule context="win-sc:activedirectory_item/win-sc:attribute">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the attribute entity of an activedirectory_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="object_class" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The name of the class of which the object is an instance.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aditemobject_class">
+                                                  <sch:rule context="win-sc:activedirectory_item/win-sc:object_class">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the object_class entity of an activedirectory_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="adstype" type="win-sc:EntityItemAdstypeType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Specifies the type of information that the specified attribute represents.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aditemadstype">
+                                                  <sch:rule context="win-sc:activedirectory_item/win-sc:adstype">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the adstype entity of an activedirectory_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="value" type="oval-sc:EntityItemAnyType" minOccurs="0" maxOccurs="unbounded">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The actual value of the specified active directory attribute.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <!-- no schematron restrictions -->
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =======================  AUDIT EVENT POLICY ITEM  ============================= -->
+     <!-- =============================================================================== -->
+     <xsd:element name="auditeventpolicy_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>The auditeventpolicy item enumerates the different types of events the system should audit. The defined values are found in window's POLICY_AUDIT_EVENT_TYPE enumeration and accessed through the LsaQueryInformationPolicy when the InformationClass parameters are set to PolicyAuditEventsInformation. It extends the standard ItemType as defined in the oval-system-characteristics schema and one should refer to the ItemType description for more information.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="account_logon" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Audit attempts to log on to or log off of the system. Also, audit attempts to make a network connection.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepitemaccount_logon">
+                                                  <sch:rule context="win-sc:auditeventpolicy_item/win-sc:account_logon">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the account_logon entity of an auditeventpolicy_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="account_management" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Audit attempts to create, delete, or change user or group accounts. Also, audit password changes.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepitemaccount_management">
+                                                  <sch:rule context="win-sc:auditeventpolicy_item/win-sc:account_management">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the account_management entity of an auditeventpolicy_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="detailed_tracking" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Audit specific events, such as program activation, some forms of handle duplication, indirect access to an object, and process exit. </xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepitemdetailed_tracking">
+                                                  <sch:rule context="win-sc:auditeventpolicy_item/win-sc:detailed_tracking">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the detailed_tracking entity of an auditeventpolicy_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="directory_service_access" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Audit attempts to access the directory service.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepitemdirectory_service_access">
+                                                  <sch:rule context="win-sc:auditeventpolicy_item/win-sc:directory_service_access">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the directory_service_access entity of an auditeventpolicy_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="logon" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Audit attempts to log on to or log off of the system. Also, audit attempts to make a network connection.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepitemlogon">
+                                                  <sch:rule context="win-sc:auditeventpolicy_item/win-sc:logon">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the logon entity of an auditeventpolicy_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="object_access" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Audit attempts to access securable objects, such as files.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepitemobject_access">
+                                                  <sch:rule context="win-sc:auditeventpolicy_item/win-sc:object_access">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the object_access entity of an auditeventpolicy_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="policy_change" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Audit attempts to change Policy object rules. </xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepitempolicy_change">
+                                                  <sch:rule context="win-sc:auditeventpolicy_item/win-sc:policy_change">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the policy_change entity of an auditeventpolicy_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="privilege_use" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Audit attempts to use privileges.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepitemprivilege_use">
+                                                  <sch:rule context="win-sc:auditeventpolicy_item/win-sc:privilege_use">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the privilege_use entity of an auditeventpolicy_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="system" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Audit attempts to shut down or restart the computer. Also, audit events that affect system security or the security log.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepitemsystem">
+                                                  <sch:rule context="win-sc:auditeventpolicy_item/win-sc:system">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the system entity of an auditeventpolicy_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ===================  AUDIT EVENT POLICY SUBCATEGORIES ITEM  =================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="auditeventpolicysubcategories_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>The auditeventpolicysubcategories item enumerates the different types of subcategories the system should audit.  These subcategories are new in Windows Vista.  It extends the standard ItemType as defined in the oval-system-characteristics schema and one should refer to the ItemType description for more information.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <!-- Account Logon Audit Policy Subcategories -->
+                              <xsd:element name="credential_validation" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemcredentialvalidation">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:credential_validation">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the credential_validation entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="kerberos_ticket_events" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemkerberosticketevents">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:kerberos_ticket_events">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the kerberos_ticket_events entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="other_account_logon_events" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemotheraccountlogonevents">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:other_account_logon_events">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the other_account_logon_events entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <!-- Account Management Audit Policy Subcategories -->
+                              <xsd:element name="application_group_management" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemapplicationgroupmanagement">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:application_group_management">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the application_group_management entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="computer_account_management" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemcomputeraccountmanagement">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:computer_account_management">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the computer_account_management entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="distribution_group_management" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemdistributiongroupmanagement">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:distribution_group_management">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the distribution_group_management entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="other_account_management_events" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemotheraccountmanagementevents">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:other_account_management_events">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the other_account_management_events entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="security_group_management" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemsecuritygroupmanagement">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:security_group_management">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the security_group_management entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="user_account_management" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemuseraccountmanagement">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:user_account_management">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the user_account_management entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <!-- Detailed Tracking Audit Policy Subcategories -->
+                              <xsd:element name="dpapi_activity" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemdpapiactivity">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:dpapi_activity">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the dpapi_activity entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="process_creation" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemprocesscreation">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:process_creation">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the process_creation entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="process_termination" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemprocesstermination">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:process_termination">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the process_termination entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="rpc_events" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemrpcevents">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:rpc_events">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the rpc_events entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <!-- DS Access Audit Policy Subcategories -->
+                              <xsd:element name="directory_service_access" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemdirectoryserviceaccess">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:directory_service_access">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the directory_service_access entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="directory_service_changes" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemdirectoryservicechanges">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:xxx">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the directory_service_changes entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="directory_service_replication" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemdirectoryservicereplication">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:directory_service_replication">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the directory_service_replication entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="detailed_directory_service_replication" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemdetaileddirectoryservicereplication">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:detailed_directory_service_replication">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the detailed_directory_service_replication entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <!-- Logon/Logoff Audit Policy Subcategories -->
+                              <xsd:element name="account_lockout" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemaccountlockout">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:account_lockout">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the account_lockout entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="ipsec_extended_mode" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemipsecextendedmode">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:ipsec_extended_mode">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the ipsec_extended_mode entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="ipsec_main_mode" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemipsecmainmode">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:ipsec_main_mode">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the ipsec_main_mode entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="ipsec_quick_mode" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemipsecquickmode">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:ipsec_quick_mode">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the ipsec_quick_mode entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="logoff" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemlogoff">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:logoff">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the logoff entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="logon" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemlogon">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:logon">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the logon entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="other_logon_logoff_events" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemotherlogonlogoffevents">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:other_logon_logoff_events">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the other_logon_logoff_events entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="special_logon" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemspeciallogon">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:special_logon">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the special_logon entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <!-- Object Access Audit Policy Subcategories -->
+                              <xsd:element name="application_generated" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemapplicationgenerated">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:application_generated">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the application_generated entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="certification_services" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemcertificationservices">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:certification_services">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the certification_services entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_share" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemfileshare">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:file_share">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the file_share entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_system" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemfilesystem">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:file_system">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the file_system entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="filtering_platform_connection" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemfilteringplatformconnection">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:filtering_platform_connection">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the filtering_platform_connection entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="filtering_platform_packet_drop" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemfilteringplatformpacketdrop">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:filtering_platform_packet_drop">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the filtering_platform_packet_drop entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="handle_manipulation" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemhandlemanipulation">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:handle_manipulation">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the handle_manipulation entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="kernel_object" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemkernelobject">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:kernel_object">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the kernel_object entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="other_object_access_events" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemotherobjectaccessevents">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:other_object_access_events">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the other_object_access_events entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="registry" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemregistry">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:registry">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the registry entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="sam" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemsam">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:sam">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the sam entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <!-- Policy Change Audit Policy Subcategories -->
+                              <xsd:element name="audit_policy_change" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemauditpolicychange">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:audit_policy_change">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the audit_policy_change entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="authentication_policy_change" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemauthenticationpolicychange">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:authentication_policy_change">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the authentication_policy_change entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="authorization_policy_change" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemauthorizationpolicychange">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:authorization_policy_change">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the authorization_policy_change entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="filtering_platform_policy_change" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemfilteringplatformpolicychange">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:filtering_platform_policy_change">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the filtering_platform_policy_change entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="mpssvc_rule_level_policy_change" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemmpssvcrulelevelpolicychange">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:mpssvc_rule_level_policy_change">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the mpssvc_rule_level_policy_change entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="other_policy_change_events" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemotherpolicychangeevents">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:other_policy_change_events">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the other_policy_change_events entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <!-- Privilege Use Audit Policy Subcategories -->
+                              <xsd:element name="non_sensitive_privilege_use" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemnonsensitiveprivilegeuse">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:non_sensitive_privilege_use">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the non_sensitive_privilege_use entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="other_privilege_use_events" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemotherprivilegeuseevents">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:other_privilege_use_events">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the other_privilege_use_events entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="sensitive_privilege_use" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemsensitiveprivilegeuse">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:sensitive_privilege_use">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the sensitive_privilege_use entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <!-- System Audit Policy Subcategories --> 
+                              <xsd:element name="ipsec_driver" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemipsecdriver">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:ipsec_driver">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the ipsec_driver entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="other_system_events" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemothersystemevents">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:other_system_events">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the other_system_events entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="security_state_change" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemsecuritystatechange">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:security_state_change">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the security_state_change entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="security_system_extension" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemsecuritysystemextension">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:security_system_extension">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the security_system_extension entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="system_integrity" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation></xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="aepsitemsystemintegrity">
+                                                  <sch:rule context="win-sc:auditeventpolicysubcategories_item/win-sc:system_integrity">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the system_integrity entity of an auditeventpolicysubcategories_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ==============================  FILE ITEM  ==================================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="file_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>This element describes file metadata. The time information can be retrieved by the _stst function. Development_class and other version information (company, internal name, language, original_filename, product_name, product_version) can be retrieved using the VerQueryValue function.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="path" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Specifies the absolute path to a file on the machine.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileitempath">
+                                                  <sch:rule context="win-sc:file_item/win-sc:path">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the path entity of a file_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="filename" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1" nillable="true">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The name of the file. If the nillable attribute is set to true, then the item being represented is the higher directory represented by the path entity. The other items associated with this item would then reflect the values associated with the directory.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileitemfilename">
+                                                  <sch:rule context="win-sc:file_item/win-sc:filename">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the filename entity of a file_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="owner" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>A string that contains the name of the owner.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileitemowner">
+                                                  <sch:rule context="win-sc:file_item/win-sc:owner">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the owner entity of a file_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="size" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Size of the file in bytes.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileitemsize">
+                                                  <sch:rule context="win-sc:file_item/win-sc:size">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the size entity of a file_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="a_time" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Time of last access of file. Valid on NTFS but not on FAT formatted disk drives. The string should represent the FILETIME structure which is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC).</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileitema_time">
+                                                  <sch:rule context="win-sc:file_item/win-sc:a_time">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the a_time entity of a file_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="c_time" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Time of creation of file. Valid on NTFS but not on FAT formatted disk drives. The string should represent the FILETIME structure which is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC).</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileitemc_time">
+                                                  <sch:rule context="win-sc:file_item/win-sc:c_time">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the c_time entity of a file_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="m_time" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Time of last modification of file. The string should represent the FILETIME structure which is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC).</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileitemm_time">
+                                                  <sch:rule context="win-sc:file_item/win-sc:m_time">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the m_time entity of a file_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="ms_checksum" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>the md5 checksum of the file.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileitemms_checksum">
+                                                  <sch:rule context="win-sc:file_item/win-sc:ms_checksum">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the ms_checksum entity of a file_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="version" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The version of the file.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileitemversion">
+                                                  <sch:rule context="win-sc:file_item/win-sc:version">
+                                                       <sch:assert test="@datatype='version'">item <sch:value-of select="../@id"/> - datatype attribute for the version entity of a file_item should be 'version'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="type" type="win-sc:EntityItemFileTypeType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The type child element marks wether the file item describes a directory, named pipe, standard file, etc. These types are the return values for GetFileType, with the exception of FILE_ATTRIBUTE_DIRECTORY which is obtained by looking at GetFileAttributesEx.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileitemtype">
+                                                  <sch:rule context="win-sc:file_item/win-sc:type">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the type entity of a file_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="development_class" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The development_class element allows the distinction to be made between the GDR development environment and the QFE development environment. This field holds the text found in front of the mmmmmm-nnnn version, for example srv03_gdr.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileitemdevelopment_class">
+                                                  <sch:rule context="win-sc:file_item/win-sc:development_class">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the development_class entity of a file_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="company" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This entity defines the company name held within the version-information structure.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileitemcompany">
+                                                  <sch:rule context="win-sc:file_item/win-sc:company">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the company entity of a file_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="internal_name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This entity defines the internal name held within the version-information structure.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileiteminternalname">
+                                                  <sch:rule context="win-sc:file_item/win-sc:internal_name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the internal_name entity of a file_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="language" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This entity defines the language held within the version-information structure.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileitemlanguage">
+                                                  <sch:rule context="win-sc:file_item/win-sc:language">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the language entity of a file_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="original_filename" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This entity defines the original filename held within the version-information structure.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileitemoriginalfilename">
+                                                  <sch:rule context="win-sc:file_item/win-sc:original_filename">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the original_filename entity of a file_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="product_name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This entity defines the product name held within the version-information structure.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileitemproductname">
+                                                  <sch:rule context="win-sc:file_item/win-sc:product_name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the product_name entity of a file_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="product_version" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This entity defines the product version held within the version-information structure.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileitemproductversion">
+                                                  <sch:rule context="win-sc:file_item/win-sc:product_version">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the product_version entity of a file_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =======================  FILE AUDITED PERMISSIONS ITEM  ======================= -->
+     <!-- =============================================================================== -->
+     <xsd:element name="fileauditedpermissions_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>This item stores the audited access rights of a file that a system access control list (SACL) structure grants to a specified trustee. The trustee's audited access rights are determined checking all access control entries (ACEs) in the SACL. For help with this test see the GetAuditedPermissionsFromAcl() api.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="path" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This element specifies the absolute path to a file on the machine from which the DACL was retrieved.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileaudititempath">
+                                                  <sch:rule context="win-sc:fileauditedpermissions_item/win-sc:path">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the path entity of a fileauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="filename" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1" nillable="true">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The name of the file. If the nillable attribute is set to true, then the item being represented is the higher directory represented by the path entity. The other items associated with this item would then reflect the values associated with the directory.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileaudititemfilename">
+                                                  <sch:rule context="win-sc:fileauditedpermissions_item/win-sc:filename">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the filename entity of a fileauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="trustee_sid" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The trustee_sid entity specifies the SID that associated a user, group, system, or program (such as a Windows service).</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileaudititemtrustee_sid">
+                                                  <sch:rule context="win-sc:fileauditedpermissions_item/win-sc:trustee_sid">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the trustee_sid entity of a fileauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="trustee_name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This entity has been deprecated and will be removed in version 6.0 of the language.</xsd:documentation>
+                                        <xsd:documentation>This element specifies the trustee name associated with this particular SACL.  A trustee can be a user, group, or program (such as a Windows service).  In a domain environment, trustee names should be identified in the form:  "domain\trustee name"   For local trustee names use:  "computer name\trustee name"  For built-in accounts on the system, use the trustee name without a domain.  For example: ADMINISTRATOR, SYSTEM, NETWORK_SERVICES, ADMINISTRATORS (group), etc.  Note that the built-in trustee names should be all caps as that is how the windows apis return them.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileaudititemtrustee_name">
+                                                  <sch:rule context="win-sc:fileauditedpermissions_item/win-sc:trustee_name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <value-of select="../@id"/> - datatype attribute for the trustee_name entity of a fileauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_delete" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The right to delete the object.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileaudititemstandard_delete">
+                                                  <sch:rule context="win-sc:fileauditedpermissions_item/win-sc:standard_delete">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the standard_delete entity of a fileauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_read_control" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The right to read the information in the object's security descriptor, not including the information in the SACL.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileaudititemstandard_read_control">
+                                                  <sch:rule context="win-sc:fileauditedpermissions_item/win-sc:standard_read_control">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the standard_read_control entity of a fileauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_write_dac" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The right to modify the DACL in the object's security descriptor.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileaudititemstandard_write_dac">
+                                                  <sch:rule context="win-sc:fileauditedpermissions_item/win-sc:standard_write_dac">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the standard_write_dac entity of a fileauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_write_owner" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The right to change the owner in the object's security descriptor.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileaudititemstandard_write_owner">
+                                                  <sch:rule context="win-sc:fileauditedpermissions_item/win-sc:standard_write_owner">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the standard_write_owner entity of a fileauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_synchronize" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Windows NT/2000: The right to use the object for synchronization. This enables a thread to wait until the object is in the signaled state. Some object types do not support this access right.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileaudititemstandard_synchronize">
+                                                  <sch:rule context="win-sc:fileauditedpermissions_item/win-sc:standard_synchronize">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for thestandard_synchronize entity of a fileauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="access_system_security" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Indicates access to a system access control list (SACL).</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileaudititemaccess_system_security">
+                                                  <sch:rule context="win-sc:fileauditedpermissions_item/win-sc:access_system_security">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the access_system_security entity of a fileauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="generic_read" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Read access.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileaudititemgeneric_read">
+                                                  <sch:rule context="win-sc:fileauditedpermissions_item/win-sc:generic_read">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the generic_read entity of a fileauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="generic_write" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Write access.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileaudititemgeneric_write">
+                                                  <sch:rule context="win-sc:fileauditedpermissions_item/win-sc:generic_write">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the generic_write entity of a fileauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="generic_execute" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Execute access.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileaudititemgeneric_execute">
+                                                  <sch:rule context="win-sc:fileauditedpermissions_item/win-sc:generic_execute">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the generic_execute entity of a fileauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="generic_all" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Read, write, and execute access.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileaudititemgeneric_all">
+                                                  <sch:rule context="win-sc:fileauditedpermissions_item/win-sc:generic_all">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the generic_all entity of a fileauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_read_data" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Grants the right to read data from the file.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileaudititemfile_read_data">
+                                                  <sch:rule context="win-sc:fileauditedpermissions_item/win-sc:file_read_data">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the file_read_data entity of a fileauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_write_data" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Grants the right to write data to the file.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileaudititemfile_write_data">
+                                                  <sch:rule context="win-sc:fileauditedpermissions_item/win-sc:file_write_data">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the file_write_data entity of a fileauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_append_data" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Grants the right to append data to the file.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileaudititemfile_append_data">
+                                                  <sch:rule context="win-sc:fileauditedpermissions_item/win-sc:file_append_data">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the file_append_data entity of a fileauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_read_ea" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Grants the right to read extended attributes.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileaudititemfile_read_ea">
+                                                  <sch:rule context="win-sc:fileauditedpermissions_item/win-sc:file_read_ea">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the file_read_ea entity of a fileauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_write_ea" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Grants the right to write extended attributes.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileaudititemfile_write_ea">
+                                                  <sch:rule context="win-sc:fileauditedpermissions_item/win-sc:file_write_ea">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the file_write_ea entity of a fileauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_execute" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Grants the right to execute a file.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileaudititemfile_execute">
+                                                  <sch:rule context="win-sc:fileauditedpermissions_item/win-sc:file_execute">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the file_execute entity of a fileauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_delete_child" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Right to delete a directory and all the files it contains (its children), even if the files are read-only.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileaudititemfile_delete_child">
+                                                  <sch:rule context="win-sc:fileauditedpermissions_item/win-sc:file_delete_child">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the file_delete_child entity of a fileauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_read_attributes" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Grants the right to read file attributes.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileaudititemfile_read_attributes">
+                                                  <sch:rule context="win-sc:fileauditedpermissions_item/win-sc:file_read_attributes">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the file_read_attributes entity of a fileauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_write_attributes" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Grants the right to change file attributes.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="fileaudititemfile_write_attributes">
+                                                  <sch:rule context="win-sc:fileauditedpermissions_item/win-sc:file_write_attributes">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the file_write_attributes entity of a fileauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ========================  FILE EFFECTIVE RIGHTS ITEM  ========================= -->
+     <!-- =============================================================================== -->
+     <xsd:element name="fileeffectiverights_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>This item stores the effective rights of a file that a discretionary access control list (DACL) structure grants to a specified trustee. The trustee's effective rights are determined checking all access-allowed and access-denied access control entries (ACEs) in the DACL. For help with this test see the GetEffectiveRightsFromAcl() api.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="path" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This element specifies the absolute path to a file on the machine from which the DACL was retrieved.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="feritempath">
+                                                  <sch:rule context="win-sc:fileeffectiverights_item/win-sc:path">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the path entity of a fileeffectiverights_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="filename" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1" nillable="true">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The name of the file. If the nillable attribute is set to true, then the item being represented is the higher directory represented by the path entity. The other items associated with this item would then reflect the values associated with the directory.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="feritemfilename">
+                                                  <sch:rule context="win-sc:fileeffectiverights_item/win-sc:filename">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the filename entity of a fileeffectiverights_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="trustee_sid" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The trustee_sid entity specifies the SID that associated a user, group, system, or program (such as a Windows service).</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="feritemtrustee_sid">
+                                                  <sch:rule context="win-sc:fileeffectiverights_item/win-sc:trustee_sid">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the trustee_sid entity of a fileeffectiverights_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="trustee_name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This entity has been deprecated and will be removed in version 6.0 of the language.</xsd:documentation>
+                                        <xsd:documentation>This element specifies the trustee name associated with this particular DACL.  A trustee can be a user, group, or program (such as a Windows service).  In a domain environment, trustee names should be identified in the form:  "domain\trustee name"   For local trustee names use:  "computer name\trustee name"  For built-in accounts on the system, use the trustee name without a domain.  For example: ADMINISTRATOR, SYSTEM, NETWORK_SERVICES, ADMINISTRATORS (group), etc.  Note that the built-in trustee names should be all caps as that is how the windows apis return them.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="feritemtrustee_name">
+                                                  <sch:rule context="win-sc:fileeffectiverights_item/win-sc:trustee_name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <value-of select="../@id"/> - datatype attribute for the trustee_name entity of a fileeffectiverights_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_delete" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The right to delete the object.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="feritemstandard_delete">
+                                                  <sch:rule context="win-sc:fileeffectiverights_item/win-sc:standard_delete">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the standard_delete entity of a fileeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_read_control" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The right to read the information in the object's security descriptor, not including the information in the SACL.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="feritemstandard_read_control">
+                                                  <sch:rule context="win-sc:fileeffectiverights_item/win-sc:standard_read_control">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the standard_read_control entity of a fileeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_write_dac" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The right to modify the DACL in the object's security descriptor.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="feritemstandard_write_dac">
+                                                  <sch:rule context="win-sc:fileeffectiverights_item/win-sc:standard_write_dac">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the standard_write_dac entity of a fileeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_write_owner" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The right to change the owner in the object's security descriptor.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="feritemstandard_write_owner">
+                                                  <sch:rule context="win-sc:fileeffectiverights_item/win-sc:standard_write_owner">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the standard_write_owner entity of a fileeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_synchronize" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Windows NT/2000: The right to use the object for synchronization. This enables a thread to wait until the object is in the signaled state. Some object types do not support this access right.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="feritemstandard_synchronize">
+                                                  <sch:rule context="win-sc:fileeffectiverights_item/win-sc:standard_synchronize">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the standard_synchronize entity of a fileeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="access_system_security" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Indicates access to a system access control list (SACL).</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="feritemaccess_system_security">
+                                                  <sch:rule context="win-sc:fileeffectiverights_item/win-sc:access_system_security">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the access_system_security entity of a fileeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="generic_read" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Read access.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="feritemgeneric_read">
+                                                  <sch:rule context="win-sc:fileeffectiverights_item/win-sc:generic_read">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the generic_read entity of a fileeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="generic_write" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Write access.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="feritemgeneric_write">
+                                                  <sch:rule context="win-sc:fileeffectiverights_item/win-sc:generic_write">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the generic_write entity of a fileeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="generic_execute" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Execute access.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="feritemgeneric_execute">
+                                                  <sch:rule context="win-sc:fileeffectiverights_item/win-sc:generic_execute">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the generic_execute entity of a fileeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="generic_all" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Read, write, and execute access.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="feritemgeneric_all">
+                                                  <sch:rule context="win-sc:fileeffectiverights_item/win-sc:generic_all">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the generic_all entity of a fileeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_read_data" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Grants the right to read data from the file</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="feritemfile_read_data">
+                                                  <sch:rule context="win-sc:fileeffectiverights_item/win-sc:file_read_data">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the file_read_data entity of a fileeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_write_data" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Grants the right to write data to the file.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="feritemfile_write_data">
+                                                  <sch:rule context="win-sc:fileeffectiverights_item/win-sc:file_write_data">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the file_write_data entity of a fileeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_append_data" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Grants the right to append data to the file.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="feritemfile_append_data">
+                                                  <sch:rule context="win-sc:fileeffectiverights_item/win-sc:file_append_data">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the file_append_data entity of a fileeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_read_ea" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Grants the right to read extended attributes.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="feritemfile_read_ea">
+                                                  <sch:rule context="win-sc:fileeffectiverights_item/win-sc:file_read_ea">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the file_read_ea entity of a fileeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_write_ea" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Grants the right to write extended attributes.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="feritemfile_write_ea">
+                                                  <sch:rule context="win-sc:fileeffectiverights_item/win-sc:file_write_ea">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the file_write_ea entity of a fileeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_execute" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Grants the right to execute a file.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="feritemfile_execute">
+                                                  <sch:rule context="win-sc:fileeffectiverights_item/win-sc:file_execute">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the file_execute entity of a fileeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_delete_child" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Right to delete a directory and all the files it contains (its children), even if the files are read-only.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="feritemfile_delete_child">
+                                                  <sch:rule context="win-sc:fileeffectiverights_item/win-sc:file_delete_child">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the file_delete_child entity of a fileeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_read_attributes" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Grants the right to read file attributes.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="feritemfile_read_attributes">
+                                                  <sch:rule context="win-sc:fileeffectiverights_item/win-sc:file_read_attributes">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the file_read_attributes entity of a fileeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_write_attributes" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Grants the right to change file attributes.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="feritemfile_write_attributes">
+                                                  <sch:rule context="win-sc:fileeffectiverights_item/win-sc:file_write_attributes">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the file_write_attributes entity of a fileeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ==============================  GROUP ITEM   ================================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="group_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>The windows group item allows the different users that belong to specific groups (identified by name) be collected. Note that the user element can appear an unlimited number of times. If no user is found in the specified group, then a single user element should exist with a status of 'does not exist'. If there is an error determining the users of a group, then a single user element should exist with a status of 'error'.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="group" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>A string the represents the name of a particular group. In a domain environment, groups should be identified in the form: "domain\group name" For local groups use: "computer name\group name" For built-in accounts on the system, use the group name without a domain. For example: ADMINISTRATORS, etc. Note that the built-in group names should be all caps as that is how the windows apis return them.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="groupitemgroup">
+                                                  <sch:rule context="win-sc:group_item/win-sc:group">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the group entity of a group_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="user" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="unbounded">
+                                   <xsd:annotation>
+                                        <xsd:documentation>A string that represents the name of a particular user. In a domain environment, users should be identified in the form: "domain\user name" For local users use: "computer name\user name" For built-in accounts on the system, use the user name without a domain. For example: ADMINISTRATOR, SYSTEM, etc. Note that the built-in user names should be all caps as that is how the windows apis return them.</xsd:documentation>
+                                        <xsd:documentation>If the specified group has more than one user as a member, then multiple user elements should exist. If the specified group does not contain a single user, then a single user element should exist with a status of 'does not exist'. If there is an error determining the userss that are members of the group, then a single user element should be included with a status of 'error'.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="groupitemuser">
+                                                  <sch:rule context="win-sc:group_item/win-sc:user">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the user entity of a group_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ============================  GROUP SID ITEM   ================================ -->
+      <!-- =============================================================================== -->
+      <xsd:element name="group_sid_item" substitutionGroup="oval-sc:item">
+            <xsd:annotation>
+                  <xsd:documentation>The windows group_sid_item allows the different users that belong to specific groups (identified by SID) be collected. Note that the user element can appear an unlimited number of times. If no user is found in the specified group, then a single user element should exist with a status of 'does not exist'. If there is an error determining the users of a group, then a single user element should exist with a status of 'error'.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-sc:ItemType">
+                              <xsd:sequence>
+                                    <xsd:element name="group_sid" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>A string the represents the SID of a particular group.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="groupsiditemgroup">
+                                                            <sch:rule context="win-sc:group_sid_item/win-sc:group_sid">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the group_sid entity of a group_sid_item should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="user_sid" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="unbounded">
+                                          <xsd:annotation>
+                                                <xsd:documentation>A string that represents the SID of a particular user.  If the specified group has more than one user as a member, then multiple user_sid entities should exist. If the specified group does not contain a single user, then a single user_sid entity should exist with a status of 'does not exist'. If there is an error determining the userss that are members of the group, then a single user_sid entity should be included with a status of 'error'.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="groupsiditemuser">
+                                                            <sch:rule context="win-sc:group_sid_item/win-sc:user_sid">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the user_sid entity of a group_sid_item should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+     <!-- ============================  INTERFACE ITEM  ================================= -->
+     <!-- =============================================================================== -->
+     <xsd:element name="interface_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>Enumerate various attributes about the interfaces on a system.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This element specifies the name of an interface.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="wininterfaceitemname">
+                                                  <sch:rule context="win-sc:interface_item/win-sc:name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the name entity of an interface_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="index" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This element specifies index that identifies the interface.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="wininterfaceitemindex">
+                                                  <sch:rule context="win-sc:interface_item/win-sc:index">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the index entity of an interface_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="type" type="win-sc:EntityItemInterfaceTypeType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This element specifies the type of interface which is limited to certain set of values.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="wininterfaceitemtype">
+                                                  <sch:rule context="win-sc:interface_item/win-sc:type">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the type entity of an interface_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="hardware_addr" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This element specifies the the physical address of the adapter for this interface.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="wininterfaceitemhardware_addr">
+                                                  <sch:rule context="win-sc:interface_item/win-sc:hardware_addr">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the hardware_addr entity of an interface_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="inet_addr" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This element specifies the IP address.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="wininterfaceiteminet_addr">
+                                                  <sch:rule context="win-sc:interface_item/win-sc:inet_addr">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the inet_addr entity of an interface_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="broadcast_addr" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This element specifies the broadcast address. A broadcast address is typically the IP address with the host portion set to either all zeros or all ones.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="wininterfaceitembroadcast_addr">
+                                                  <sch:rule context="win-sc:interface_item/win-sc:broadcast_addr">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the broadcast_addr entity of an interface_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="netmask" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This element specifies the subnet mask for the IP address.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="wininterfaceitemnetmask">
+                                                  <sch:rule context="win-sc:interface_item/win-sc:netmask">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the netmask entity of an interface_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="addr_type" type="win-sc:EntityItemAddrTypeType" minOccurs="0" maxOccurs="unbounded">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This element specifies the address type or state of a specific interface. Each interface can be associated with more than one value meaning the addr_type element can occur multiple times.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="wininterfaceitemaddr_type">
+                                                  <sch:rule context="win-sc:interface_item/win-sc:addr_type">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the addr_type entity of an interface_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =========================  LOCKOUT POLICY ITEM  =============================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="lockoutpolicy_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>The lockoutpolicy item enumerates various attributes associated with lockout information for users and global groups in the security database.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="force_logoff" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Specifies, in seconds, the amount of time between the end of the valid logon time and the time when the user is forced to log off the network. A value of TIMEQ_FOREVER indicates that the user is never forced to log off. A value of zero indicates that the user will be forced to log off immediately when the valid logon time expires. See the USER_MODALS_INFO_0 structure returned by a call to NetUserModalsGet().</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="lpitemforce_logoff">
+                                                  <sch:rule context="win-sc:lockoutpolicy_item/win-sc:force_logoff">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the force_logoff entity of a lockoutpolicy_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="lockout_duration" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Specifies, in seconds, how long a locked account remains locked before it is automatically unlocked. See the USER_MODALS_INFO_3 structure returned by a call to NetUserModalsGet().</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="lpitemlockout_duration">
+                                                  <sch:rule context="win-sc:lockoutpolicy_item/win-sc:lockout_duration">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the lockout_duration entity of a lockoutpolicy_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="lockout_observation_window" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Specifies the maximum time, in seconds, that can elapse between any two failed logon attempts before lockout occurs. See the USER_MODALS_INFO_3 structure returned by a call to NetUserModalsGet().</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="lpitemlockout_observation_window">
+                                                  <sch:rule context="win-sc:lockoutpolicy_item/win-sc:lockout_observation_window">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the lockout_observation_window entity of a lockoutpolicy_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="lockout_threshold" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Specifies the number of invalid password authentications that can occur before an account is marked "locked out." See the USER_MODALS_INFO_3 structure returned by a call to NetUserModalsGet().</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="lpitemlockout_threshold">
+                                                  <sch:rule context="win-sc:lockoutpolicy_item/win-sc:lockout_threshold">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the lockout_threshold entity of a lockoutpolicy_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ============================  METABASE ITEM  ================================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="metabase_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>This item gathers information from the specified metabase keys.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="key" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This element describes a metabase key to be gathered.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="metabaseitemkey">
+                                                  <sch:rule context="win-sc:metabase_item/win-sc:key">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the key entity of a metabase_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="id" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1" nillable="true">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The id element specifies a particular object under the metabase key. If the nillable attribute is set to true, then the item being represented is the higher level metabase key. Using xsi:nil here will result in a status of 'does not exist' for the other entities associated with this item since these entities are not associated with a key by itself.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="metabaseitemid">
+                                                  <sch:rule context="win-sc:metabase_item/win-sc:id">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the id entity of a metabase_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This element describes the name of the specified metabase object.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="metabaseitemname">
+                                                  <sch:rule context="win-sc:metabase_item/win-sc:name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the name entity of a metabase_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="user_type" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The user_type element is a DWORD that specifies the user type of the data. See the METADATA_RECORD structure.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="metabaseitemuser_type">
+                                                  <sch:rule context="win-sc:metabase_item/win-sc:user_type">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the user_type entity of a metabase_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="data_type" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The data_type element identifies the type of data in the metabase entry. See the METADATA_RECORD structure.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="metabaseitemdata_type">
+                                                  <sch:rule context="win-sc:metabase_item/win-sc:data_type">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the data_type entity of a metabase_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="data" type="oval-sc:EntityItemAnyType" minOccurs="0" maxOccurs="unbounded">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The actual data of the named item under the specified metabase key. If the specified metabase key is of type multi string, then multiple value elements should exist to describe the array of strings.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="metabaseitemdata">
+                                                  <sch:rule context="win-sc:metabase_item/win-sc:data">
+                                                       <sch:assert test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"><sch:value-of select="../@id"/> - The datatype has been set to 'int' but the value is not an integer.</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ========================  PASSWORD POLICY ITEM  =============================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="passwordpolicy_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>Specific policy items associated with passwords. Information is stored in the SAM or Active Directory but is encrypted or hidden so the registry_item and activedirectory_item are of no use. If this can be figured out, then the password_policy item is not needed.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="max_passwd_age" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Specifies, in seconds, the maximum allowable password age. A value of TIMEQ_FOREVER (-1) indicates that the password never expires. The minimum valid value for this element is ONE_DAY (86400).</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ppitemmax_passwd_age">
+                                                  <sch:rule context="win-sc:passwordpolicy_item/win-sc:max_passwd_age">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the max_passwd_age entity of a passwordpolicy_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="min_passwd_age" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Specifies the minimum number of seconds that can elapse between the time a password changes and when it can be changed again. A value of zero indicates that no delay is required between password updates.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ppitemmin_passwd_age">
+                                                  <sch:rule context="win-sc:passwordpolicy_item/win-sc:min_passwd_age">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the min_passwd_age entity of a passwordpolicy_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="min_passwd_len" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Specifies the minimum allowable password length. Valid values for this element are zero through PWLEN.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ppitemmin_passwd_len">
+                                                  <sch:rule context="win-sc:passwordpolicy_item/win-sc:min_passwd_len">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the min_passwd_len entity of a passwordpolicy_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="password_hist_len" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Specifies the length of password history maintained. A new password cannot match any of the previous usrmod0_password_hist_len passwords. Valid values for this element are zero through DEF_MAX_PWHIST.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ppitempassword_hist_len">
+                                                  <sch:rule context="win-sc:passwordpolicy_item/win-sc:password_hist_len">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the password_hist_len entity of a passwordpolicy_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="password_complexity" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>A boolean value that signifies whether passwords must meet the complexity requirements put forth by the operating system.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ppitempassword_complexity">
+                                                  <sch:rule context="win-sc:passwordpolicy_item/win-sc:password_complexity">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the password_complexity entity of a passwordpolicy_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="reversible_encryption" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Determines whether Windows 2000 Server, Windows 2000 Professional, and Windows XP Professional store passwords using reversible encryption.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="ppitemreversible_encryption">
+                                                  <sch:rule context="win-sc:passwordpolicy_item/win-sc:reversible_encryption">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the reversible_encryption entity of a passwordpolicy_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ==============================  PORT ITEM  ==================================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="port_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>Information about open listening ports.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="local_address" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This element specifies the local IP address the listening port is bound to.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="winportitemlocal_address">
+                                                  <sch:rule context="win-sc:port_item/win-sc:local_address">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the local_address entity of a port_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="local_port" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This element specifies the number assigned to the local listening port.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="winportitemlocal_port">
+                                                  <sch:rule context="win-sc:port_item/win-sc:local_port">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the local_port entity of a port_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="protocol" type="win-sc:EntityItemProtocolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This element specifies the type of listening port. It is restricted to either TCP or UDP.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="winportitemprotocol">
+                                                  <sch:rule context="win-sc:port_item/win-sc:protocol">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the protocol entity of a port_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="pid" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The id given to the process that is associated with the specified listening port.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="winportitempid">
+                                                  <sch:rule context="win-sc:port_item/win-sc:pid">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the pid entity of a port_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =======================  PRINTER EFFECTIVE RIGHTS ITEM  ======================= -->
+     <!-- =============================================================================== -->
+     <xsd:element name="printereffectiverights_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>This item stores the effective rights of a printer that a discretionary access control list (DACL) structure grants to a specified trustee. The trustee's effective rights are determined checking all access-allowed and access-denied access control entries (ACEs) in the DACL. For help with this test see the GetEffectiveRightsFromAcl() api.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="printer_name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The printer_name enitity specifies the name of the printer.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="peritemprinter_name">
+                                                  <sch:rule context="win-sc:printereffectiverights_item/win-sc:printer_name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the printer_name entity of a printereffectiverights_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="trustee_sid" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The trustee_sid entity specifies the SID that associated a user, group, system, or program (such as a Windows service).</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="peritemtrustee_sid">
+                                                  <sch:rule context="win-sc:printereffectiverights_item/win-sc:trustee_sid">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the trustee_sid entity of a printereffectiverights_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_delete" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The right to delete the object.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="peritemstandard_delete">
+                                                  <sch:rule context="win-sc:printereffectiverights_item/win-sc:standard_delete">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the standard_delete entity of a printereffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_read_control" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The right to read the information in the object's security descriptor, not including the information in the SACL.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="peritemstandard_read_control">
+                                                  <sch:rule context="win-sc:printereffectiverights_item/win-sc:standard_read_control">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the standard_read_control entity of a printereffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_write_dac" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The right to modify the DACL in the object's security descriptor.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="peritemstandard_write_dac">
+                                                  <sch:rule context="win-sc:printereffectiverights_item/win-sc:standard_write_dac">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the standard_write_dac entity of a printereffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_write_owner" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The right to change the owner in the object's security descriptor.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="peritemstandard_write_owner">
+                                                  <sch:rule context="win-sc:printereffectiverights_item/win-sc:standard_write_owner">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the standard_write_owner entity of a printereffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_synchronize" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Windows NT/2000: The right to use the object for synchronization. This enables a thread to wait until the object is in the signaled state. Some object types do not support this access right.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="peritemstandard_synchronize">
+                                                  <sch:rule context="win-sc:printereffectiverights_item/win-sc:standard_synchronize">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the standard_synchronize entity of a printereffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="access_system_security" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Indicates access to a system access control list (SACL).</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="peritemaccess_system_security">
+                                                  <sch:rule context="win-sc:printereffectiverights_item/win-sc:access_system_security">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the access_system_security entity of a printereffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="generic_read" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Read access.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="peritemgeneric_read">
+                                                  <sch:rule context="win-sc:printereffectiverights_item/win-sc:generic_read">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the generic_read entity of a printereffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="generic_write" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Write access.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="peritemgeneric_write">
+                                                  <sch:rule context="win-sc:printereffectiverights_item/win-sc:generic_write">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the generic_write entity of a printereffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="generic_execute" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Execute access.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="peritemgeneric_execute">
+                                                  <sch:rule context="win-sc:printereffectiverights_item/win-sc:generic_execute">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the generic_execute entity of a printereffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="generic_all" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Read, write, and execute access.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="peritemgeneric_all">
+                                                  <sch:rule context="win-sc:printereffectiverights_item/win-sc:generic_all">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the generic_all entity of a printereffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="printer_access_administer" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="peritemprinter_access_administer">
+                                                  <sch:rule context="win-sc:printereffectiverights_item/win-sc:printer_access_administer">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the printer_access_administer entity of a printereffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="printer_access_use" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="peritemprinter_access_use">
+                                                  <sch:rule context="win-sc:printereffectiverights_item/win-sc:printer_access_use">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the printer_access_use entity of a printereffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="job_access_administer" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="peritemjob_access_administer">
+                                                  <sch:rule context="win-sc:printereffectiverights_item/win-sc:job_access_administer">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the job_access_administer entity of a printereffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="job_access_read" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="peritemjob_access_read">
+                                                  <sch:rule context="win-sc:printereffectiverights_item/win-sc:job_access_read">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the job_access_read entity of a printereffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ============================  PROCESS ITEM  =================================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="process_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>Information about running processes.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="command_line" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                         <xsd:documentation>The command_line entity is the string used to start the process.  This includes any parameters that are part of the command line.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="processitemcommand_line">
+                                                  <sch:rule context="win-sc:process_item/win-sc:command_line">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the command_line entity of a process_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="pid" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The id given to the process that is created for a specified command line.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="processitempid">
+                                                  <sch:rule context="win-sc:process_item/win-sc:pid">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the pid entity of a process_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="ppid" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The id given to the parent of the process that is created for the specified command line</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="processitemppid">
+                                                  <sch:rule context="win-sc:process_item/win-sc:ppid">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the ppid entity of a process_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="priority" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The base priority of the process.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="processitempriority">
+                                                  <sch:rule context="win-sc:process_item/win-sc:priority">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the priority entity of a process_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="image_path" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                         <xsd:documentation>The image_path entity contains the name of the executable file in question.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="processitemimage_path">
+                                                  <sch:rule context="win-sc:process_item/win-sc:image_path">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the image_path entity of a process_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="current_dir" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                         <xsd:documentation>The current_directory entity represents the current path to the executable.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="processitemcurrent_dir">
+                                                  <sch:rule context="win-sc:process_item/win-sc:current_dir">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the current_dir entity of a process_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ============================  REGISTRY ITEM  ================================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="registry_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>The windows registry item specifies information that can be collected about a particular registry key.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="hive" type="win-sc:EntityItemRegistryHiveType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The hive that the registry key belongs to.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="regitemhive">
+                                                  <sch:rule context="win-sc:registry_item/win-sc:hive">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the hive entity of a registry_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="key" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1" nillable="true">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This element describes a registry key to be gathered. Note that the hive portion of the string should not be inclueded, as this data can be found under the hive element. If the nillable attribute is set to true, then the item being represented is the higher level hive. Using xsi:nil here will result in a status of 'does not exist' for the type, and value entities since these entities are not associated with a hive by itself. Note that when nil is used for the key element, the name element should also be nilled.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="regitemkey">
+                                                  <sch:rule context="win-sc:registry_item/win-sc:key">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the key entity of a registry_item should be 'string'</sch:assert>
+                                                       <sch:assert test="not(@xsi:nil='true') or ../win-sc:name/@xsi:nil='true'"><sch:value-of select="../@id"/> - name entity must be nil when key is nil</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1" nillable="true">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This element describes the name of a registry key. If the nillable attribute is set to true, then the item being represented is the higher level key. Using xsi:nil here will result in a status of 'does not exist' for the type, and value entities since these entities are not associated with a key by itself.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="regitemname">
+                                                  <sch:rule context="win-sc:registry_item/win-sc:name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the name entity of a registry_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="type" type="win-sc:EntityItemRegistryTypeType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Specifies the type of data stored by the registry key. Please refer to the EntityItemRegistryTypeType for more information about the different possible types.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="regitemtype">
+                                                  <sch:rule context="win-sc:registry_item/win-sc:type">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the type entity of a registry_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="value" type="oval-sc:EntityItemAnyType" minOccurs="0" maxOccurs="unbounded">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The value entity holds the actual value of the specified registry key. The representation of the value as well as the associated datatype attribute depends on type of data stored in the registry key. If the specified registry key is of type REG_BINARY, then the datatype attribute should be set to 'binary' and the data represented by the value entity should follow the xsd:hexBinary form. (each binary octet is encoded as two hex digits) If the registry key is of type REG_DWORD or REG_QWORD, then the datatype attribute should be set to 'int' and the value entity should represent the data as an integer. If the specified registry key is of type REG_EXPAND_SZ, then the datatype attribute should be set to 'string' and the pre-expanded string should be represented by the value entity. If the specified registry key is of type REG_MULTI_SZ, then multiple value entities should exist to describe the array of strings, with each value element holds a single string. In the end, there should be the same number of value entities as there are strings in the reg_multi_sz array. If the specified registry key is of type REG_SZ, then the datatype should be 'string' and the value entity should be a copy of the string.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="regitemvalue">
+                                                  <sch:rule context="win-sc:registry_item/win-sc:value">
+                                                       <sch:assert test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"><sch:value-of select="../@id"/> - The datatype has been set to 'int' but the value is not an integer.</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ===================  REGISTRY KEY AUDITED PERMISSIONS ITEM  =================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="regkeyauditedpermissions_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>This item stores the audited access rights of a registry key that a system access control list (SACL) structure grants to a specified trustee. The trustee's audited access rights are determined checking all access control entries (ACEs) in the SACL. For help with this test see the GetAuditedPermissionsFromAcl() api.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="hive" type="win-sc:EntityItemRegistryHiveType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This element specifies the hive of a registry key on the machine from which the SACL was retrieved.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rapitemhive">
+                                                  <sch:rule context="win-sc:regkeyauditedpermissions_item/win-sc:hive">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the hive entity of a regkeyauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="key" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This element specifies a registry key on the machine from which the SACL was retrieved. Note that the hive portion of the string should not be inclueded, as this data should be found under the hive element.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rapitemkey">
+                                                  <sch:rule context="win-sc:regkeyauditedpermissions_item/win-sc:key">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the key entity of a regkeyauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="trustee_sid" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The security identifier (SID) of the specified trustee name.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rapitemtrustee_sid">
+                                                  <sch:rule context="win-sc:regkeyauditedpermissions_item/win-sc:trustee_sid">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the trustee_sid entity of a regkeyauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="trustee_name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This entity has been deprecated and will be removed in version 6.0 of the language.</xsd:documentation>
+                                        <xsd:documentation>This element specifies the trustee name associated with this particular DACL.  A trustee can be a user, group, or program (such as a Windows service).  In a domain environment, trustee names should be identified in the form:  "domain\trustee name"   For local trustee names use:  "computer name\trustee name"  For built-in accounts on the system, use the trustee name without a domain.  For example: ADMINISTRATOR, SYSTEM, NETWORK_SERVICES, ADMINISTRATORS (group), etc.  Note that the built-in trustee names should be all caps as that is how the windows apis return them.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rapitemtrustee_name">
+                                                  <sch:rule context="win-sc:regkeyauditedpermissions_item/win-sc:trustee_name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <value-of select="../@id"/> - datatype attribute for the trustee_name entity of a regkeyauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_delete" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The right to delete the object.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rapitemstandard_delete">
+                                                  <sch:rule context="win-sc:regkeyauditedpermissions_item/win-sc:standard_delete">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the standard_delete entity of a regkeyauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_read_control" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The right to read the information in the object's security descriptor, not including the information in the SACL.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rapitemstandard_read_control">
+                                                  <sch:rule context="win-sc:regkeyauditedpermissions_item/win-sc:standard_read_control">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the standard_read_control entity of a regkeyauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_write_dac" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The right to modify the DACL in the object's security descriptor.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rapitemstandard_write_dac">
+                                                  <sch:rule context="win-sc:regkeyauditedpermissions_item/win-sc:standard_write_dac">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the standard_write_dac entity of a regkeyauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_write_owner" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The right to change the owner in the object's security descriptor.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rapitemstandard_write_owner">
+                                                  <sch:rule context="win-sc:regkeyauditedpermissions_item/win-sc:standard_write_owner">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the standard_write_owner entity of a regkeyauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_synchronize" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Windows NT/2000: The right to use the object for synchronization. This enables a thread to wait until the object is in the signaled state. Some object types do not support this access right.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rapitemstandard_synchronize">
+                                                  <sch:rule context="win-sc:regkeyauditedpermissions_item/win-sc:standard_synchronize">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the standard_synchronize entity of a regkeyauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="access_system_security" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Indicates access to a system access control list (SACL).</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rapitemaccess_system_security">
+                                                  <sch:rule context="win-sc:regkeyauditedpermissions_item/win-sc:access_system_security">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the access_system_security entity of a regkeyauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="generic_read" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Read access.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rapitemgeneric_read">
+                                                  <sch:rule context="win-sc:regkeyauditedpermissions_item/win-sc:generic_read">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the generic_read entity of a regkeyauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="generic_write" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Write access.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rapitemgeneric_write">
+                                                  <sch:rule context="win-sc:regkeyauditedpermissions_item/win-sc:generic_write">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the generic_write entity of a regkeyauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="generic_execute" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Execute access.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rapitemgeneric_execute">
+                                                  <sch:rule context="win-sc:regkeyauditedpermissions_item/win-sc:generic_execute">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the generic_execute entity of a regkeyauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="generic_all" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Read, write, and execute access.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rapitemgeneric_all">
+                                                  <sch:rule context="win-sc:regkeyauditedpermissions_item/win-sc:generic_all">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the generic_all entity of a regkeyauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="key_query_value" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rapitemkey_query_value">
+                                                  <sch:rule context="win-sc:regkeyauditedpermissions_item/win-sc:key_query_value">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the key_query_value entity of a regkeyauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="key_set_value" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rapitemkey_set_value">
+                                                  <sch:rule context="win-sc:regkeyauditedpermissions_item/win-sc:key_set_value">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the key_set_value entity of a regkeyauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="key_create_sub_key" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rapitemkey_create_sub_key">
+                                                  <sch:rule context="win-sc:regkeyauditedpermissions_item/win-sc:key_create_sub_key">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the key_create_sub_key entity of a regkeyauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="key_enumerate_sub_keys" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rapitemkey_enumerate_sub_keys">
+                                                  <sch:rule context="win-sc:regkeyauditedpermissions_item/win-sc:key_enumerate_sub_keys">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the key_enumerate_sub_keys entity of a regkeyauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="key_notify" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rapitemkey_notify">
+                                                  <sch:rule context="win-sc:regkeyauditedpermissions_item/win-sc:key_notify">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the key_notify entity of a regkeyauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="key_create_link" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rapitemkey_create_link">
+                                                  <sch:rule context="win-sc:regkeyauditedpermissions_item/win-sc:key_create_link">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the key_create_link entity of a regkeyauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="key_wow64_64key" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rapitemkey_wow64_64key">
+                                                  <sch:rule context="win-sc:regkeyauditedpermissions_item/win-sc:key_wow64_64key">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the key_wow64_64key entity of a regkeyauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="key_wow64_32key" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rapitemkey_wow64_32key">
+                                                  <sch:rule context="win-sc:regkeyauditedpermissions_item/win-sc:key_wow64_32key">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the key_wow64_32key entity of a regkeyauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="key_wow64_res" type="win-sc:EntityItemAuditType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="rapitemkey_wow64_res">
+                                                  <sch:rule context="win-sc:regkeyauditedpermissions_item/win-sc:key_wow64_res">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the key_wow64_res entity of a regkeyauditedpermissions_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ====================  REGISTRY KEY EFFECTIVE RIGHTS ITEM  ===================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="regkeyeffectiverights_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>This item stores the effective rights of a registry key that a discretionary access control list (DACL) structure grants to a specified trustee. The trustee's effective rights are determined checking all access-allowed and access-denied access control entries (ACEs) in the DACL. For help with this test see the GetEffectiveRightsFromAcl() api.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="hive" type="win-sc:EntityItemRegistryHiveType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The hive that the registry key belongs to.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="reritemhive">
+                                                  <sch:rule context="win-sc:regkeyeffectiverights_item/win-sc:hive">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the hive entity of a regkeyeffectiverights_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="key" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This element describes a registry key to be gathered. Note that the hive portion of the string should not be inclueded, as this data can be found under the hive element.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="reritemkey">
+                                                  <sch:rule context="win-sc:regkeyeffectiverights_item/win-sc:key">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the key entity of a regkeyeffectiverights_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="trustee_sid" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The trustee_sid entity specifies the SID that associated a user, group, system, or program (such as a Windows service).</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="reritemtrustee_sid">
+                                                  <sch:rule context="win-sc:regkeyeffectiverights_item/win-sc:trustee_sid">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the trustee_sid entity of a regkeyeffectiverights_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="trustee_name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This entity has been deprecated and will be removed in version 6.0 of the language.</xsd:documentation>
+                                        <xsd:documentation>This element specifies the trustee name associated with this particular DACL.  A trustee can be a user, group, or program (such as a Windows service).  In a domain environment, trustee names should be identified in the form:  "domain\trustee name"   For local trustee names use:  "computer name\trustee name"  For built-in accounts on the system, use the trustee name without a domain.  For example: ADMINISTRATOR, SYSTEM, NETWORK_SERVICES, ADMINISTRATORS (group), etc.  Note that the built-in trustee names should be all caps as that is how the windows apis return them.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="reritemtrustee_name">
+                                                  <sch:rule context="win-sc:regkeyeffectiverights_item/win-sc:trustee_name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <value-of select="../@id"/> - datatype attribute for the trustee_name entity of a regkeyeffectiverights_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_delete" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The right to delete the object.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="reritemstandard_delete">
+                                                  <sch:rule context="win-sc:regkeyeffectiverights_item/win-sc:standard_delete">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the standard_delete entity of a regkeyeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_read_control" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The right to read the information in the object's security descriptor, not including the information in the SACL.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="reritemstandard_read_control">
+                                                  <sch:rule context="win-sc:regkeyeffectiverights_item/win-sc:standard_read_control">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the standard_read_control entity of a regkeyeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_write_dac" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The right to modify the DACL in the object's security descriptor.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="reritemstandard_write_dac">
+                                                  <sch:rule context="win-sc:regkeyeffectiverights_item/win-sc:standard_write_dac">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the standard_write_dac entity of a regkeyeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_write_owner" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The right to change the owner in the object's security descriptor.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="reritemstandard_write_owner">
+                                                  <sch:rule context="win-sc:regkeyeffectiverights_item/win-sc:standard_write_owner">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the standard_write_owner entity of a regkeyeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="standard_synchronize" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Windows NT/2000: The right to use the object for synchronization. This enables a thread to wait until the object is in the signaled state. Some object types do not support this access right.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="reritemstandard_synchronize">
+                                                  <sch:rule context="win-sc:regkeyeffectiverights_item/win-sc:standard_synchronize">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the standard_synchronize entity of a regkeyeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="access_system_security" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Indicates access to a system access control list (SACL).</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="reritemaccess_system_security">
+                                                  <sch:rule context="win-sc:regkeyeffectiverights_item/win-sc:access_system_security">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the access_system_security entity of a regkeyeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="generic_read" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Read access.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="reritemgeneric_read">
+                                                  <sch:rule context="win-sc:regkeyeffectiverights_item/win-sc:generic_read">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the generic_read entity of a regkeyeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="generic_write" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Write access.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="reritemgeneric_write">
+                                                  <sch:rule context="win-sc:regkeyeffectiverights_item/win-sc:generic_write">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the generic_write entity of a regkeyeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="generic_execute" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Execute access.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="reritemgeneric_execute">
+                                                  <sch:rule context="win-sc:regkeyeffectiverights_item/win-sc:generic_execute">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the generic_execute entity of a regkeyeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="generic_all" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Read, write, and execute access.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="reritemgeneric_all">
+                                                  <sch:rule context="win-sc:regkeyeffectiverights_item/win-sc:generic_all">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the generic_all entity of a regkeyeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="key_query_value" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="reritemkey_query_value">
+                                                  <sch:rule context="win-sc:regkeyeffectiverights_item/win-sc:key_query_value">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the key_query_value entity of a regkeyeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="key_set_value" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="reritemkey_set_value">
+                                                  <sch:rule context="win-sc:regkeyeffectiverights_item/win-sc:key_set_value">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the key_set_value entity of a regkeyeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="key_create_sub_key" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="reritemkey_create_sub_key">
+                                                  <sch:rule context="win-sc:regkeyeffectiverights_item/win-sc:key_create_sub_key">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the key_create_sub_key entity of a regkeyeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="key_enumerate_sub_keys" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="reritemkey_enumerate_sub_keys">
+                                                  <sch:rule context="win-sc:regkeyeffectiverights_item/win-sc:key_enumerate_sub_keys">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the key_enumerate_sub_keys entity of a regkeyeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="key_notify" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="reritemkey_notify">
+                                                  <sch:rule context="win-sc:regkeyeffectiverights_item/win-sc:key_notify">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the key_notify entity of a regkeyeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="key_create_link" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="reritemkey_create_link">
+                                                  <sch:rule context="win-sc:regkeyeffectiverights_item/win-sc:key_create_link">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the key_create_link entity of a regkeyeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="key_wow64_64key" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="reritemkey_wow64_64key">
+                                                  <sch:rule context="win-sc:regkeyeffectiverights_item/win-sc:key_wow64_64key">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the key_wow64_64key entity of a regkeyeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="key_wow64_32key" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="reritemkey_wow64_32key">
+                                                  <sch:rule context="win-sc:regkeyeffectiverights_item/win-sc:key_wow64_32key">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the key_wow64_32key entity of a regkeyeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="key_wow64_res" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation/>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="reritemkey_wow64_res">
+                                                  <sch:rule context="win-sc:regkeyeffectiverights_item/win-sc:key_wow64_res">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the key_wow64_res entity of a regkeyeffectiverights_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ===========================  SHARED RESOURCE ITEM   =========================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="sharedresource_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation/>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="netname" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The share name of the resource.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sritemnetname">
+                                                  <sch:rule context="win-sc:sharedresource_item/win-sc:netname">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the netname entity of a sharedresource_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="shared_type" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The type of the shared resource.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sritemshared_type">
+                                                  <sch:rule context="win-sc:sharedresource_item/win-sc:shared_type">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the shared_type entity of a sharedresource_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="max_uses" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="unbounded">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The maximum number of concurrent connections that the shared resource can accommodate.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sritemmax_uses">
+                                                  <sch:rule context="win-sc:sharedresource_item/win-sc:max_uses">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the max_uses entity of a sharedresource_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="current_uses" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="unbounded">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The number of current connections to the shared resource.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sritemcurrent_uses">
+                                                  <sch:rule context="win-sc:sharedresource_item/win-sc:current_uses">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the current_uses entity of a sharedresource_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="local_path" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The local path for the shared resource.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sritemlocal_path">
+                                                  <sch:rule context="win-sc:sharedresource_item/win-sc:local_path">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the local_path entity of a sharedresource_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="access_read_permission" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Permission to read data from a resource and, by default, to execute the resource.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sritemaccess_read_permission">
+                                                  <sch:rule context="win-sc:sharedresource_item/win-sc:access_read_permission">
+                                                       <sch:assert test="not(@datatype) or @datatype='bool'">item <sch:value-of select="../@id"/> - datatype attribute for the access_read_permission entity of a sharedresource_item should be 'bool'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="access_write_permission" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Permission to write data to the resource.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sritemaccess_write_permission">
+                                                  <sch:rule context="win-sc:sharedresource_item/win-sc:access_write_permission">
+                                                       <sch:assert test="not(@datatype) or @datatype='bool'">item <sch:value-of select="../@id"/> - datatype attribute for the access_write_permission entity of a sharedresource_item should be 'bool'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="access_create_permission" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Permission to create an instance of the resource (such as a file); data can be written to the resource as the resource is created.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sritemaccess_create_permission">
+                                                  <sch:rule context="win-sc:sharedresource_item/win-sc:access_create_permission">
+                                                       <sch:assert test="not(@datatype) or @datatype='bool'">item <sch:value-of select="../@id"/> - datatype attribute for the access_create_permission entity of a sharedresource_item should be 'bool'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="access_exec_permission" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Permission to execute the resource.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sritemaccess_exec_permission">
+                                                  <sch:rule context="win-sc:sharedresource_item/win-sc:access_exec_permission">
+                                                       <sch:assert test="not(@datatype) or @datatype='bool'">item <sch:value-of select="../@id"/> - datatype attribute for the access_exec_permission entity of a sharedresource_item should be 'bool'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="access_delete_permission" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Permission to delete the resource.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sritemaccess_delete_permission">
+                                                  <sch:rule context="win-sc:sharedresource_item/win-sc:access_delete_permission">
+                                                       <sch:assert test="not(@datatype) or @datatype='bool'">item <sch:value-of select="../@id"/> - datatype attribute for the access_delete_permission entity of a sharedresource_item should be 'bool'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="access_atrib_permission" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Permission to modify the resource's attributes (such as the date and time when a file was last modified).</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sritemaccess_atrib_permission">
+                                                  <sch:rule context="win-sc:sharedresource_item/win-sc:access_atrib_permission">
+                                                       <sch:assert test="not(@datatype) or @datatype='bool'">item <sch:value-of select="../@id"/> - datatype attribute for the access_atrib_permission entity of a sharedresource_item should be 'bool'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="access_perm_permission" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Permission to modify the permissions (read, write, create, execute, and delete) assigned to a resource for a user or application.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sritemaccess_perm_permission">
+                                                  <sch:rule context="win-sc:sharedresource_item/win-sc:access_perm_permission">
+                                                       <sch:assert test="not(@datatype) or @datatype='bool'">item <sch:value-of select="../@id"/> - datatype attribute for the access_perm_permission entity of a sharedresource_item should be 'bool'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="access_all_permission" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Permission to read, write, create, execute, and delete resources, and to modify their attributes and permissions.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="sritemaccess_all_permission">
+                                                  <sch:rule context="win-sc:sharedresource_item/win-sc:access_all_permission">
+                                                       <sch:assert test="not(@datatype) or @datatype='bool'">item <sch:value-of select="../@id"/> - datatype attribute for the access_all_permission entity of a sharedresource_item should be 'bool'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =================================  SID ITEM   ================================= -->
+     <!-- =============================================================================== -->
+     <xsd:element name="sid_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation/>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="trustee_name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>This element specifies the trustee name associated with a particular SID. In a domain environment, trustee names should be identified in the form: "domain\trustee name" For local trustee names use: "computer name\trustee name" For built-in accounts on the system, use the trustee name without a domain. For example: ADMINISTRATOR, SYSTEM, NETWORK_SERVICES, ADMINISTRATORS (group), etc. Note that the built-in trustee names should be all caps as that is how the windows apis return them.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="siditemtrustee_name">
+                                                  <sch:rule context="win-sc:sid_item/win-sc:trustee_name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the trustee_name entity of a sid_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="trustee_sid" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The security identifier (SID) of the specified trustee name.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="siditemtrustee_sid">
+                                                  <sch:rule context="win-sc:sid_item/win-sc:trustee_sid">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the trustee_sid entity of a sid_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="trustee_domain" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The domain of the specified trustee name.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="siditemtrustee_domain">
+                                                  <sch:rule context="win-sc:sid_item/win-sc:trustee_domain">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the trustee_domain entity of a sid_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =========================  USER ACCESS CONTROL ITEM  ========================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="uac_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>The volume item enumerates various attributes about a particular volume mounted to a machine. This includes the various system flags returned by GetVolumeInformation().</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="admin_approval_mode" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Admin Approval Mode for the Built-in Administrator account.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="uacitemadminapprovalmode">
+                                                  <sch:rule context="win-sc:uac_item/win-sc:admin_approval_mode">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the admin_approval_mode entity of a uac_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="elevation_prompt_admin" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Behavior of the elevation prompt for administrators in Admin Approval Mode.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="uacitemelevationpromptadmin">
+                                                  <sch:rule context="win-sc:uac_item/win-sc:elevation_prompt_admin">
+                                                       <sch:assert test="@not(@datatype) or datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the elevation_prompt_admin entity of a uac_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="elevation_prompt_standard" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Behavior of the elevation prompt for standard users.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="uacitemelevationpromptstandard">
+                                                  <sch:rule context="win-sc:uac_item/win-sc:elevation_prompt_standard">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the elevation_prompt_standard entity of a uac_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="detect_installations" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Detect application installations and prompt for elevation.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="uacitemdetectinstallations">
+                                                  <sch:rule context="win-sc:uac_item/win-sc:detect_installations">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the detect_installations entity of a uac_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="elevate_signed_executables" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Only elevate executables that are signed and validated.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="uacitemelevatesignedexecutables">
+                                                  <sch:rule context="win-sc:uac_item/win-sc:elevate_signed_executables">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the elevate_signed_executables entity of a uac_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="elevate_uiaccess" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Only elevate UIAccess applications that are installed in secure locations.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="uacitemelevateuiaccess">
+                                                  <sch:rule context="win-sc:uac_item/win-sc:elevate_uiaccess">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the elevate_uiaccess entity of a uac_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="run_admins_aam" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Run all administrators in Admin Approval Mode.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="uacitemrunadminsaam">
+                                                  <sch:rule context="win-sc:uac_item/win-sc:run_admins_aam">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the run_admins_aam entity of a uac_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="secure_desktop" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Switch to the secure desktop when prompting for elevation.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="uacitemsecuredesktop">
+                                                  <sch:rule context="win-sc:uac_item/win-sc:secure_desktop">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the secure_desktop entity of a uac_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="virtualize_write_failures" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>Virtualize file and registry write failures to per-user locations.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="uacitemvirtualizewritefailures">
+                                                  <sch:rule context="win-sc:uac_item/win-sc:virtualize_write_failures">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the virtualize_write_failures entity of a uac_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- ==============================  USER ITEM  ==================================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="user_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>The windows user_item allows the different groups (identified by name) that a user belongs to be collected.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="user" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>A string the represents the name of a particular user. In a domain environment, users should be identified in the form: "domain\user name" For local users use: "computer_name\user_name" For built-in accounts on the system, use the user name without a domain. For example: ADMINISTRATOR, SYSTEM, etc. Note that the built-in user names should be all caps as that is how the windows apis return them.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="useritemuser">
+                                                  <sch:rule context="win-sc:user_item/win-sc:user">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the user entity of a user_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="enabled" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>A boolean that represents whether the particular user is enabled or not.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="useritemenabled">
+                                                  <sch:rule context="win-sc:user_item/win-sc:enabled">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the enabled entity of a user_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="group" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="unbounded">
+                                   <xsd:annotation>
+                                        <xsd:documentation>A string that represents the name of a particular group. In a domain environment, groups should be identified in the form: "domain\group name" For local groups use: "computer name\group name" For built-in accounts on the system, use the group name without a domain. For example: ADMINISTRATORS, etc. Note that the built-in group names should be all caps as that is how the windows apis return them.</xsd:documentation>
+                                        <xsd:documentation>If the specified user belongs to more than one group, then multiple group elements should exist. If the specified user is not a member of a single group, then a single group element should exist with a status of 'does not exist'. If there is an error determining the groups that the user belongs to, then a single group element should be included with a status of 'error'.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="useritemgroup">
+                                                  <sch:rule context="win-sc:user_item/win-sc:group">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for a group entity of a user_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+      <!-- =============================================================================== -->
+      <!-- ============================  USER SID ITEM  ================================== -->
+      <!-- =============================================================================== -->
+      <xsd:element name="user_sid_item" substitutionGroup="oval-sc:item">
+            <xsd:annotation>
+                  <xsd:documentation>The windows user_sid_item allows the different groups (identified by SID) that a user belongs to be collected.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:complexType>
+                  <xsd:complexContent>
+                        <xsd:extension base="oval-sc:ItemType">
+                              <xsd:sequence>
+                                    <xsd:element name="user_sid" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>A string the represents the SID of a particular user.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="usersiditemuser">
+                                                            <sch:rule context="win-sc:user_sid_item/win-sc:user_sid">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the user_sid entity of a user_sid_item should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="enabled" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                          <xsd:annotation>
+                                                <xsd:documentation>A boolean that represents whether the particular user is enabled or not.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="usersiditemenabled">
+                                                            <sch:rule context="win-sc:user_sid_item/win-sc:enabled">
+                                                                  <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the enabled entity of a user_sid_item should be 'boolean'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                                    <xsd:element name="group_sid" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="unbounded">
+                                          <xsd:annotation>
+                                                <xsd:documentation>A string that represents the SID of a particular group.  If the specified user belongs to more than one group, then multiple group_sid elements should exist. If the specified user is not a member of a single group, then a single group_sid element should exist with a status of 'does not exist'. If there is an error determining the groups that the user belongs to, then a single group_sid element should be included with a status of 'error'.</xsd:documentation>
+                                                <xsd:appinfo>
+                                                      <sch:pattern id="usersiditemgroup">
+                                                            <sch:rule context="win-sc:user_sid_item/win-sc:group_sid">
+                                                                  <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for a group_sid entity of a user_sid_item should be 'string'</sch:assert>
+                                                            </sch:rule>
+                                                      </sch:pattern>
+                                                </xsd:appinfo>
+                                          </xsd:annotation>
+                                    </xsd:element>
+                              </xsd:sequence>
+                        </xsd:extension>
+                  </xsd:complexContent>
+            </xsd:complexType>
+      </xsd:element>
+      <!-- =============================================================================== -->
+     <!-- =============================  VOLUME ITEM  =================================== -->
+     <!-- =============================================================================== -->
+     <xsd:element name="volume_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>The volume item enumerates various attributes about a particular volume mounted to a machine. This includes the various system flags returned by GetVolumeInformation().</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="rootpath" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>A string that contains the root directory of the volume to be described. A trailing backslash is required. For example, you would specify \\MyServer\MyShare as "\\MyServer\MyShare\", or the C drive as "C:\".</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="volitemrootpath">
+                                                  <sch:rule context="win-sc:volume_item/win-sc:rootpath">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the rootpath entity of a volume_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_system" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The type of filesystem. For example FAT or NTFS.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="volitemfile_system">
+                                                  <sch:rule context="win-sc:volume_item/win-sc:file_system">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the file_system entity of a volume_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The name of the volume.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="volitemname">
+                                                  <sch:rule context="win-sc:volume_item/win-sc:name">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the name entity of a volume_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="volume_max_component_length" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The volume_max_component_length element specifies the maximum length, in TCHARs, of a file name component that a specified file system supports. A file name component is the portion of a file name between backslashes. The value that is stored in the variable that *lpMaximumComponentLength points to is used to indicate that a specified file system supports long names. For example, for a FAT file system that supports long names, the function stores the value 255, rather than the previous 8.3 indicator. Long names can also be supported on systems that use the NTFS file system.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="volitemvolume_max_component_length">
+                                                  <sch:rule context="win-sc:volume_item/win-sc:volume_max_component_length">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the volume_max_component_length entity of a volume_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="serial_number" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The volume serial number.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="volitemserial_number">
+                                                  <sch:rule context="win-sc:volume_item/win-sc:serial_number">
+                                                       <sch:assert test="@datatype='int'">item <sch:value-of select="../@id"/> - datatype attribute for the serial_number entity of a volume_item should be 'int'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_case_sensitive_search" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The file system supports case-sensitive file names.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="volitemfile_case_sensitive_search">
+                                                  <sch:rule context="win-sc:volume_item/win-sc:file_case_sensitive_search">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the file_case_sensitive_search entity of a volume_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_case_preserved_names" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The file system preserves the case of file names when it places a name on disk.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="volitemfile_case_preserved_names">
+                                                  <sch:rule context="win-sc:volume_item/win-sc:file_case_preserved_names">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the file_case_preserved_names entity of a volume_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_unicode_on_disk" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The file system supports Unicode in file names as they appear on disk.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="volitemfile_unicode_on_disk">
+                                                  <sch:rule context="win-sc:volume_item/win-sc:file_unicode_on_disk">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the file_unicode_on_disk entity of a volume_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_persistent_acls" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The file system preserves and enforces ACLs. For example, NTFS preserves and enforces ACLs, and FAT does not.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="volitemfile_persistent_acls">
+                                                  <sch:rule context="win-sc:volume_item/win-sc:file_persistent_acls">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the file_persistent_acls entity of a volume_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_file_compression" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The file system supports file-based compression.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="volitemfile_file_compression">
+                                                  <sch:rule context="win-sc:volume_item/win-sc:file_file_compression">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the file_file_compression entity of a volume_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_volume_quotas" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The file system supports disk quotas.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="volitemfile_volume_quotas">
+                                                  <sch:rule context="win-sc:volume_item/win-sc:file_volume_quotas">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the file_volume_quotas entity of a volume_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_supports_sparse_files" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The file system supports sparse files.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="volitemfile_supports_sparse_files">
+                                                  <sch:rule context="win-sc:volume_item/win-sc:file_supports_sparse_files">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the file_supports_sparse_files entity of a volume_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_supports_reparse_points" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The file system supports reparse points.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="volitemfile_supports_reparse_points">
+                                                  <sch:rule context="win-sc:volume_item/win-sc:file_supports_reparse_points">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the file_supports_reparse_points entity of a volume_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_supports_remote_storage" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The specified volume is a compressed volume; for example, a DoubleSpace volume.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="volitemfile_supports_remote_storage">
+                                                  <sch:rule context="win-sc:volume_item/win-sc:file_supports_remote_storage">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the file_supports_remote_storage entity of a volume_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_volume_is_compressed" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The specified volume is a compressed volume; for example, a DoubleSpace volume.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="volitemfile_volume_is_compressed">
+                                                  <sch:rule context="win-sc:volume_item/win-sc:file_volume_is_compressed">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the file_volume_is_compressed entity of a volume_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_supports_object_ids" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The file system supports object identifiers.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="volitemfile_supports_object_ids">
+                                                  <sch:rule context="win-sc:volume_item/win-sc:file_supports_object_ids">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the file_supports_object_ids entity of a volume_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_supports_encryption" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The file system supports the Encrypted File System (EFS).</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="volitemfile_supports_encryption">
+                                                  <sch:rule context="win-sc:volume_item/win-sc:file_supports_encryption">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the file_supports_encryption entity of a volume_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_named_streams" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The file system supports named streams.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="volitemfile_named_streams">
+                                                  <sch:rule context="win-sc:volume_item/win-sc:file_named_streams">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the file_named_streams entity of a volume_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="file_read_only_volume" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The specified volume is read-only. This flag was added in Windows XP.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="volitemfile_read_only_volume">
+                                                  <sch:rule context="win-sc:volume_item/win-sc:file_read_only_volume">
+                                                       <sch:assert test="@datatype='boolean'">item <sch:value-of select="../@id"/> - datatype attribute for the file_read_only_volume entity of a volume_item should be 'boolean'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =============================  WMI CONTENT ITEM   ============================= -->
+     <!-- =============================================================================== -->
+     <xsd:element name="wmi_item" substitutionGroup="oval-sc:item">
+          <xsd:annotation>
+               <xsd:documentation>The wmi_item outlines information to be checked through Microsoft's WMI interface.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:complexType>
+               <xsd:complexContent>
+                    <xsd:extension base="oval-sc:ItemType">
+                         <xsd:sequence>
+                              <xsd:element name="namespace" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The WMI namespaces of the specific object.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="wmiitemnamespace">
+                                                  <sch:rule context="win-sc:wmi_item/win-sc:namespace">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the namespace entity of a wmi_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="wql" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
+                                   <xsd:annotation>
+                                        <xsd:documentation>A WQL query used to identify the object(s) specified. Any valid WQL query is allowed with one exception, at most one field is allowed in the SELECT portion of the query. For example SELECT name FROM ... is valid, as is SELECT 'true' FROM ..., but SELECT name, number FROM ... is not valid. This is because the result element in the data section is only designed to work against a single field.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="wmiitemwql">
+                                                  <sch:rule context="win-sc:wmi_item/win-sc:wql">
+                                                       <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id"/> - datatype attribute for the wql entity of a wmi_item should be 'string'</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                              <xsd:element name="result" type="oval-sc:EntityItemAnyType" minOccurs="0" maxOccurs="unbounded">
+                                   <xsd:annotation>
+                                        <xsd:documentation>The result element specifies how to test objects in the result set of the specified WQL statement. Only one comparable field is allowed. So if the WQL statement look like 'SELECT name FROM ...', then a result element with a value of 'Fred' would test that value against the names returned by the WQL statement. If the WQL statement returns more than one instance of the specified field, then multiple result elements should exist to describe each instance.</xsd:documentation>
+                                        <xsd:appinfo>
+                                             <sch:pattern id="wmiitemresult">
+                                                  <sch:rule context="win-sc:wmi_item/win-sc:result">
+                                                       <sch:assert test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())"><sch:value-of select="../@id"/> - The datatype has been set to 'int' but the value is not an integer.</sch:assert>
+                                                  </sch:rule>
+                                             </sch:pattern>
+                                        </xsd:appinfo>
+                                   </xsd:annotation>
+                              </xsd:element>
+                         </xsd:sequence>
+                    </xsd:extension>
+               </xsd:complexContent>
+          </xsd:complexType>
+     </xsd:element>
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <!-- =============================================================================== -->
+     <xsd:complexType name="EntityItemAddrTypeType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityItemAddrTypeType restricts a string value to a specific set of values that describe the different address types of interfaces. The empty string is also allowed to support empty emlement associated with error conditions.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-sc:EntityItemStringType">
+                    <xsd:enumeration value="MIB_IPADDR_DELETED"/>
+                    <xsd:enumeration value="MIB_IPADDR_DISCONNECTED"/>
+                    <xsd:enumeration value="MIB_IPADDR_DYNAMIC"/>
+                    <xsd:enumeration value="MIB_IPADDR_PRIMARY"/>
+                    <xsd:enumeration value="MIB_IPADDR_TRANSIENT"/>
+                    <xsd:enumeration value="">
+                         <xsd:annotation>
+                              <xsd:documentation>The empty string value is permitted here to allow for detailed error reporting.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:enumeration>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityItemAdstypeType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityItemAdstypeType restricts a string value to a specific set of values that describe the possible types associated with an Active Directory attribute. The empty string is also allowed to support empty emlement associated with error conditions.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-sc:EntityItemStringType">
+                    <xsd:enumeration value="ADSTYPE_INVALID"/>
+                    <xsd:enumeration value="ADSTYPE_DN_STRING"/>
+                    <xsd:enumeration value="ADSTYPE_CASE_EXACT_STRING"/>
+                    <xsd:enumeration value="ADSTYPE_CASE_IGNORE_STRING"/>
+                    <xsd:enumeration value="ADSTYPE_PRINTABLE_STRING"/>
+                    <xsd:enumeration value="ADSTYPE_NUMERIC_STRING"/>
+                    <xsd:enumeration value="ADSTYPE_BOOLEAN"/>
+                    <xsd:enumeration value="ADSTYPE_INTEGER"/>
+                    <xsd:enumeration value="ADSTYPE_OCTET_STRING"/>
+                    <xsd:enumeration value="ADSTYPE_UTC_TIME"/>
+                    <xsd:enumeration value="ADSTYPE_LARGE_INTEGER"/>
+                    <xsd:enumeration value="ADSTYPE_PROV_SPECIFIC"/>
+                    <xsd:enumeration value="ADSTYPE_OBJECT_CLASS"/>
+                    <xsd:enumeration value="ADSTYPE_CASEIGNORE_LIST"/>
+                    <xsd:enumeration value="ADSTYPE_OCTET_LIST"/>
+                    <xsd:enumeration value="ADSTYPE_PATH"/>
+                    <xsd:enumeration value="ADSTYPE_POSTALADDRESS"/>
+                    <xsd:enumeration value="ADSTYPE_TIMESTAMP"/>
+                    <xsd:enumeration value="ADSTYPE_BACKLINK"/>
+                    <xsd:enumeration value="ADSTYPE_TYPEDNAME"/>
+                    <xsd:enumeration value="ADSTYPE_HOLD"/>
+                    <xsd:enumeration value="ADSTYPE_NETADDRESS"/>
+                    <xsd:enumeration value="ADSTYPE_REPLICAPOINTER"/>
+                    <xsd:enumeration value="ADSTYPE_FAXNUMBER"/>
+                    <xsd:enumeration value="ADSTYPE_EMAIL"/>
+                    <xsd:enumeration value="ADSTYPE_NT_SECURITY_DESCRIPTOR"/>
+                    <xsd:enumeration value="ADSTYPE_UNKNOWN"/>
+                    <xsd:enumeration value="ADSTYPE_DN_WITH_BINARY"/>
+                    <xsd:enumeration value="ADSTYPE_DN_WITH_STRING"/>
+                    <xsd:enumeration value="">
+                         <xsd:annotation>
+                              <xsd:documentation>The empty string value is permitted here to allow for detailed error reporting.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:enumeration>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityItemAuditType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityItemAuditType restricts a string value to a specific set of values: AUDIT_NONE, AUDIT_SUCCESS, AUDIT_FAILURE, and AUDIT_SUCCESS_FAILURE. These values describe which audit records should be generated. The empty string is also allowed to support empty emlement associated with error conditions.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-sc:EntityItemStringType">
+                    <xsd:enumeration value="AUDIT_FAILURE"/>
+                    <xsd:enumeration value="AUDIT_NONE"/>
+                    <xsd:enumeration value="AUDIT_SUCCESS"/>
+                    <xsd:enumeration value="AUDIT_SUCCESS_FAILURE"/>
+                    <xsd:enumeration value="">
+                         <xsd:annotation>
+                              <xsd:documentation>The empty string value is permitted here to allow for detailed error reporting.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:enumeration>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityItemFileTypeType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityItemFileTypeType restricts a string value to a specific set of values that describe the different types of files. The empty string is also allowed to support empty emlement associated with error conditions.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-sc:EntityItemStringType">
+                    <xsd:enumeration value="FILE_ATTRIBUTE_DIRECTORY"/>
+                    <xsd:enumeration value="FILE_TYPE_CHAR"/>
+                    <xsd:enumeration value="FILE_TYPE_DISK"/>
+                    <xsd:enumeration value="FILE_TYPE_PIPE"/>
+                    <xsd:enumeration value="FILE_TYPE_REMOTE"/>
+                    <xsd:enumeration value="FILE_TYPE_UNKNOWN"/>
+                    <xsd:enumeration value="">
+                         <xsd:annotation>
+                              <xsd:documentation>The empty string value is permitted here to allow for detailed error reporting.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:enumeration>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityItemInterfaceTypeType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityItemInterfaceTypeType restricts a string value to a specific set of values that describe the different types of interfaces. The empty string is also allowed to support empty emlement associated with error conditions.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-sc:EntityItemStringType">
+                    <xsd:enumeration value="MIB_IF_TYPE_ETHERNET"/>
+                    <xsd:enumeration value="MIB_IF_TYPE_FDDI"/>
+                    <xsd:enumeration value="MIB_IF_TYPE_LOOPBACK"/>
+                    <xsd:enumeration value="MIB_IF_TYPE_OTHER"/>
+                    <xsd:enumeration value="MIB_IF_TYPE_PPP"/>
+                    <xsd:enumeration value="MIB_IF_TYPE_SLIP"/>
+                    <xsd:enumeration value="MIB_IF_TYPE_TOKENRING"/>
+                    <xsd:enumeration value="">
+                         <xsd:annotation>
+                              <xsd:documentation>The empty string value is permitted here to allow for detailed error reporting.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:enumeration>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityItemNamingContextType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityItemNamingContextType restricts a string value to a specific set of values: domain, configuration, and schema. These values describe the different naming context found withing Active Directory. The empty string is also allowed to support empty emlement associated with error conditions.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-sc:EntityItemStringType">
+                    <xsd:enumeration value="domain"/>
+                    <xsd:enumeration value="configuration"/>
+                    <xsd:enumeration value="schema"/>
+                    <xsd:enumeration value="">
+                         <xsd:annotation>
+                              <xsd:documentation>The empty string value is permitted here to allow for detailed error reporting.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:enumeration>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityItemProtocolType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityItemProtocolType restricts a string value to a specific set of values that describe the different available protocols. The empty string is also allowed to support empty emlement associated with error conditions.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-sc:EntityItemStringType">
+                    <xsd:enumeration value="TCP"/>
+                    <xsd:enumeration value="UDP"/>
+                    <xsd:enumeration value="">
+                         <xsd:annotation>
+                              <xsd:documentation>The empty string value is permitted here to allow for detailed error reporting.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:enumeration>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityItemRegistryHiveType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityItemRegistryHiveType restricts a string value to a specific set of values that describe the different registry hives. The empty string is also allowed to support empty emlement associated with error conditions.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-sc:EntityItemStringType">
+                    <xsd:enumeration value="HKEY_CLASSES_ROOT"/>
+                    <xsd:enumeration value="HKEY_CURRENT_CONFIG"/>
+                    <xsd:enumeration value="HKEY_CURRENT_USER"/>
+                    <xsd:enumeration value="HKEY_LOCAL_MACHINE"/>
+                    <xsd:enumeration value="HKEY_USERS"/>
+                    <xsd:enumeration value="">
+                         <xsd:annotation>
+                              <xsd:documentation>The empty string value is permitted here to allow for detailed error reporting.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:enumeration>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+     <xsd:complexType name="EntityItemRegistryTypeType">
+          <xsd:annotation>
+               <xsd:documentation>The EntityItemRegistryTypeType defines the different values that are valid for the type entity of a registry item. These values describe the possible types of data stored in a registry key. restricts a string value to a specific set of values that describe the different registry types. The empty string is also allowed as a valid value to support empty emlements associated with error conditions. Please note that the values identified are for the type entity and are not valid values for the datatype attribute. For information about how to encode registry data in OVAL for each of the different types, please visit the registry_item documentation.</xsd:documentation>
+          </xsd:annotation>
+          <xsd:simpleContent>
+               <xsd:restriction base="oval-sc:EntityItemStringType">
+                    <xsd:enumeration value="reg_binary">
+                         <xsd:annotation>
+                              <xsd:documentation>The reg_binary type is used by registry keys that specify binary data in any form.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:enumeration>
+                    <xsd:enumeration value="reg_dword">
+                         <xsd:annotation>
+                              <xsd:documentation>The reg_dword type is used by registry keys that specify a 32-bit number.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:enumeration>
+                    <xsd:enumeration value="reg_expand_sz">
+                         <xsd:annotation>
+                              <xsd:documentation>The reg_expand_sz type is used by registry keys to specify a null-terminated string that contains unexpanded references to environment variables (for example, "%PATH%").</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:enumeration>
+                    <xsd:enumeration value="reg_multi_sz">
+                         <xsd:annotation>
+                              <xsd:documentation>The reg_multi_sz type is used by registry keys that specify an array of null-terminated strings, terminated by two null characters.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:enumeration>
+                    <xsd:enumeration value="reg_none">
+                         <xsd:annotation>
+                              <xsd:documentation>The reg_none type is used by registry keys that have no defined value type.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:enumeration>
+                    <xsd:enumeration value="reg_qword">
+                         <xsd:annotation>
+                              <xsd:documentation>The reg_qword type is used by registry keys that specify a 64-bit number.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:enumeration>
+                    <xsd:enumeration value="reg_sz">
+                         <xsd:annotation>
+                              <xsd:documentation>The reg_sz type is used by registry keys that specify a single null-terminated string.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:enumeration>
+                    <xsd:enumeration value="">
+                         <xsd:annotation>
+                              <xsd:documentation>The empty string value is permitted here to allow for detailed error reporting.</xsd:documentation>
+                         </xsd:annotation>
+                    </xsd:enumeration>
+               </xsd:restriction>
+          </xsd:simpleContent>
+     </xsd:complexType>
+</xsd:schema>


Property changes on: trunk/ovaldi/xml/windows-system-characteristics-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/ovaldi/xml/xmldsig-core-schema.xsd
===================================================================
--- trunk/ovaldi/xml/xmldsig-core-schema.xsd	                        (rev 0)
+++ trunk/ovaldi/xml/xmldsig-core-schema.xsd	2008-04-20 11:55:02 UTC (rev 343)
@@ -0,0 +1,309 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!-- Schema for XML Signatures
+    http://www.w3.org/2000/09/xmldsig#
+    $Revision: 1777 $ on $Date: 2005-11-03 12:33:41 -0400 (Thu, 03 Nov 2005) $ by $Author: abuttner $
+
+    Copyright 2001 The Internet Society and W3C (Massachusetts Institute
+    of Technology, Institut National de Recherche en Informatique et en
+    Automatique, Keio University). All Rights Reserved.
+    http://www.w3.org/Consortium/Legal/
+
+    This document is governed by the W3C Software License [1] as described
+    in the FAQ [2].
+
+    [1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
+    [2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
+-->
+
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+        xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
+        targetNamespace="http://www.w3.org/2000/09/xmldsig#"
+        version="0.1" elementFormDefault="qualified"> 
+
+<!-- Basic Types Defined for Signatures -->
+
+<simpleType name="CryptoBinary">
+  <restriction base="base64Binary">
+  </restriction>
+</simpleType>
+
+<!-- Start Signature -->
+
+<element name="Signature" type="ds:SignatureType"/>
+<complexType name="SignatureType">
+  <sequence> 
+    <element ref="ds:SignedInfo"/> 
+    <element ref="ds:SignatureValue"/> 
+    <element ref="ds:KeyInfo" minOccurs="0"/> 
+    <element ref="ds:Object" minOccurs="0" maxOccurs="unbounded"/> 
+  </sequence>  
+  <attribute name="Id" type="ID" use="optional"/>
+</complexType>
+
+  <element name="SignatureValue" type="ds:SignatureValueType"/> 
+  <complexType name="SignatureValueType">
+    <simpleContent>
+      <extension base="base64Binary">
+        <attribute name="Id" type="ID" use="optional"/>
+      </extension>
+    </simpleContent>
+  </complexType>
+
+<!-- Start SignedInfo -->
+
+<element name="SignedInfo" type="ds:SignedInfoType"/>
+<complexType name="SignedInfoType">
+  <sequence> 
+    <element ref="ds:CanonicalizationMethod"/> 
+    <element ref="ds:SignatureMethod"/> 
+    <element ref="ds:Reference" maxOccurs="unbounded"/> 
+  </sequence>  
+  <attribute name="Id" type="ID" use="optional"/> 
+</complexType>
+
+  <element name="CanonicalizationMethod" type="ds:CanonicalizationMethodType"/> 
+  <complexType name="CanonicalizationMethodType" mixed="true">
+    <sequence>
+      <any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
+      <!-- (0,unbounded) elements from (1,1) namespace -->
+    </sequence>
+    <attribute name="Algorithm" type="anyURI" use="required"/> 
+  </complexType>
+
+  <element name="SignatureMethod" type="ds:SignatureMethodType"/>
+  <complexType name="SignatureMethodType" mixed="true">
+    <sequence>
+      <element name="HMACOutputLength" minOccurs="0" type="ds:HMACOutputLengthType"/>
+      <any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
+      <!-- (0,unbounded) elements from (1,1) external namespace -->
+    </sequence>
+    <attribute name="Algorithm" type="anyURI" use="required"/> 
+  </complexType>
+
+<!-- Start Reference -->
+
+<element name="Reference" type="ds:ReferenceType"/>
+<complexType name="ReferenceType">
+  <sequence> 
+    <element ref="ds:Transforms" minOccurs="0"/> 
+    <element ref="ds:DigestMethod"/> 
+    <element ref="ds:DigestValue"/> 
+  </sequence>
+  <attribute name="Id" type="ID" use="optional"/> 
+  <attribute name="URI" type="anyURI" use="optional"/> 
+  <attribute name="Type" type="anyURI" use="optional"/> 
+</complexType>
+
+  <element name="Transforms" type="ds:TransformsType"/>
+  <complexType name="TransformsType">
+    <sequence>
+      <element ref="ds:Transform" maxOccurs="unbounded"/>  
+    </sequence>
+  </complexType>
+
+  <element name="Transform" type="ds:TransformType"/>
+  <complexType name="TransformType" mixed="true">
+    <choice minOccurs="0" maxOccurs="unbounded"> 
+      <any namespace="##other" processContents="lax"/>
+      <!-- (1,1) elements from (0,unbounded) namespaces -->
+      <element name="XPath" type="string"/> 
+    </choice>
+    <attribute name="Algorithm" type="anyURI" use="required"/> 
+  </complexType>
+
+<!-- End Reference -->
+
+<element name="DigestMethod" type="ds:DigestMethodType"/>
+<complexType name="DigestMethodType" mixed="true"> 
+  <sequence>
+    <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+  </sequence>    
+  <attribute name="Algorithm" type="anyURI" use="required"/> 
+</complexType>
+
+<element name="DigestValue" type="ds:DigestValueType"/>
+<simpleType name="DigestValueType">
+  <restriction base="base64Binary"/>
+</simpleType>
+
+<!-- End SignedInfo -->
+
+<!-- Start KeyInfo -->
+
+<element name="KeyInfo" type="ds:KeyInfoType"/> 
+<complexType name="KeyInfoType" mixed="true">
+  <choice maxOccurs="unbounded">     
+    <element ref="ds:KeyName"/> 
+    <element ref="ds:KeyValue"/> 
+    <element ref="ds:RetrievalMethod"/> 
+    <element ref="ds:X509Data"/> 
+    <element ref="ds:PGPData"/> 
+    <element ref="ds:SPKIData"/>
+    <element ref="ds:MgmtData"/>
+    <any processContents="lax" namespace="##other"/>
+    <!-- (1,1) elements from (0,unbounded) namespaces -->
+  </choice>
+  <attribute name="Id" type="ID" use="optional"/> 
+</complexType>
+
+  <element name="KeyName" type="string"/>
+  <element name="MgmtData" type="string"/>
+
+  <element name="KeyValue" type="ds:KeyValueType"/> 
+  <complexType name="KeyValueType" mixed="true">
+   <choice>
+     <element ref="ds:DSAKeyValue"/>
+     <element ref="ds:RSAKeyValue"/>
+     <any namespace="##other" processContents="lax"/>
+   </choice>
+  </complexType>
+
+  <element name="RetrievalMethod" type="ds:RetrievalMethodType"/> 
+  <complexType name="RetrievalMethodType">
+    <sequence>
+      <element ref="ds:Transforms" minOccurs="0"/> 
+    </sequence>  
+    <attribute name="URI" type="anyURI"/>
+    <attribute name="Type" type="anyURI" use="optional"/>
+  </complexType>
+
+<!-- Start X509Data -->
+
+<element name="X509Data" type="ds:X509DataType"/> 
+<complexType name="X509DataType">
+  <sequence maxOccurs="unbounded">
+    <choice>
+      <element name="X509IssuerSerial" type="ds:X509IssuerSerialType"/>
+      <element name="X509SKI" type="base64Binary"/>
+      <element name="X509SubjectName" type="string"/>
+      <element name="X509Certificate" type="base64Binary"/>
+      <element name="X509CRL" type="base64Binary"/>
+      <any namespace="##other" processContents="lax"/>
+    </choice>
+  </sequence>
+</complexType>
+
+<complexType name="X509IssuerSerialType"> 
+  <sequence> 
+    <element name="X509IssuerName" type="string"/> 
+    <element name="X509SerialNumber" type="integer"/> 
+  </sequence>
+</complexType>
+
+<!-- End X509Data -->
+
+<!-- Begin PGPData -->
+
+<element name="PGPData" type="ds:PGPDataType"/> 
+<complexType name="PGPDataType"> 
+  <choice>
+    <sequence>
+      <element name="PGPKeyID" type="base64Binary"/> 
+      <element name="PGPKeyPacket" type="base64Binary" minOccurs="0"/> 
+      <any namespace="##other" processContents="lax" minOccurs="0"
+       maxOccurs="unbounded"/>
+    </sequence>
+    <sequence>
+      <element name="PGPKeyPacket" type="base64Binary"/> 
+      <any namespace="##other" processContents="lax" minOccurs="0"
+       maxOccurs="unbounded"/>
+    </sequence>
+  </choice>
+</complexType>
+
+<!-- End PGPData -->
+
+<!-- Begin SPKIData -->
+
+<element name="SPKIData" type="ds:SPKIDataType"/> 
+<complexType name="SPKIDataType">
+  <sequence maxOccurs="unbounded">
+    <element name="SPKISexp" type="base64Binary"/>
+    <any namespace="##other" processContents="lax" minOccurs="0"/>
+  </sequence>
+</complexType> 
+
+<!-- End SPKIData -->
+
+<!-- End KeyInfo -->
+
+<!-- Start Object (Manifest, SignatureProperty) -->
+
+<element name="Object" type="ds:ObjectType"/> 
+<complexType name="ObjectType" mixed="true">
+  <sequence minOccurs="0" maxOccurs="unbounded">
+    <any namespace="##any" processContents="lax"/>
+  </sequence>
+  <attribute name="Id" type="ID" use="optional"/> 
+  <attribute name="MimeType" type="string" use="optional"/> <!-- add a grep facet -->
+  <attribute name="Encoding" type="anyURI" use="optional"/> 
+</complexType>
+
+<element name="Manifest" type="ds:ManifestType"/> 
+<complexType name="ManifestType">
+  <sequence>
+    <element ref="ds:Reference" maxOccurs="unbounded"/> 
+  </sequence>
+  <attribute name="Id" type="ID" use="optional"/> 
+</complexType>
+
+<element name="SignatureProperties" type="ds:SignaturePropertiesType"/> 
+<complexType name="SignaturePropertiesType">
+  <sequence>
+    <element ref="ds:SignatureProperty" maxOccurs="unbounded"/> 
+  </sequence>
+  <attribute name="Id" type="ID" use="optional"/> 
+</complexType>
+
+   <element name="SignatureProperty" type="ds:SignaturePropertyType"/> 
+   <complexType name="SignaturePropertyType" mixed="true">
+     <choice maxOccurs="unbounded">
+       <any namespace="##other" processContents="lax"/>
+       <!-- (1,1) elements from (1,unbounded) namespaces -->
+     </choice>
+     <attribute name="Target" type="anyURI" use="required"/> 
+     <attribute name="Id" type="ID" use="optional"/> 
+   </complexType>
+
+<!-- End Object (Manifest, SignatureProperty) -->
+
+<!-- Start Algorithm Parameters -->
+
+<simpleType name="HMACOutputLengthType">
+  <restriction base="integer"/>
+</simpleType>
+
+<!-- Start KeyValue Element-types -->
+
+<element name="DSAKeyValue" type="ds:DSAKeyValueType"/>
+<complexType name="DSAKeyValueType">
+  <sequence>
+    <sequence minOccurs="0">
+      <element name="P" type="ds:CryptoBinary"/>
+      <element name="Q" type="ds:CryptoBinary"/>
+    </sequence>
+    <element name="G" type="ds:CryptoBinary" minOccurs="0"/>
+    <element name="Y" type="ds:CryptoBinary"/>
+    <element name="J" type="ds:CryptoBinary" minOccurs="0"/>
+    <sequence minOccurs="0">
+      <element name="Seed" type="ds:CryptoBinary"/>
+      <element name="PgenCounter" type="ds:CryptoBinary"/>
+    </sequence>
+  </sequence>
+</complexType>
+
+<element name="RSAKeyValue" type="ds:RSAKeyValueType"/>
+<complexType name="RSAKeyValueType">
+  <sequence>
+    <element name="Modulus" type="ds:CryptoBinary"/> 
+    <element name="Exponent" type="ds:CryptoBinary"/> 
+  </sequence>
+</complexType> 
+
+<!-- End KeyValue Element-types -->
+
+<!-- End Signature -->
+
+</schema>


Property changes on: trunk/ovaldi/xml/xmldsig-core-schema.xsd
___________________________________________________________________
Name: svn:executable
   + *




More information about the Oval-commits mailing list