XML schema reference

The XML schema file for the result XML comprises different elements that manage the structure and validation of the result XML file.

Syntax

<!-- define overall xml schema -->
<xs:element name="Results">
  <xs:complexType>
    <xs:sequence>
      <xs:element ref="PRSInfo" minOccurs="1"/>
      <xs:element ref="MachineInfo" minOccurs="0"/>
      <xs:element ref="UserInfo" minOccurs="0"/>
      <xs:element ref="ScenarioInfo" minOccurs="1"/>
      <xs:element ref="ProductInfo" minOccurs="1"/>
      <xs:element ref="DetailedResults" minOccurs="1"/>
      <xs:element ref="AggregatedResults" minOccurs="0"/>
      <xs:element ref="ResultSummary" minOccurs="1"/>
      <xs:element ref="Warnings" minOccurs="0"/>
    </xs:sequence>    
    <xs:attribute name="schemaVersion" type="xs:decimal" use="required" fixed="1.3"/>
  </xs:complexType>
</xs:element>
<!-- end of overall xml schema definition -->

Primary elements

PRSInfo
This element manages Prerequisite Scanner version details.
MachineInfo
This element manages information about the target environment on which the scan is run.
UserInfo
This element manages information about the logged in user running the scan.
ScenarioInfo
This element manages information about the type of scan and scenario.
ProductInfo
This element manages information about the product or component and its configuration file.
DetailedResults
This element manages the scan results for each set of prerequisite properties for a product or component that are grouped by the DetailedProductResultsElement element.
AggregatedResults
This element manages the aggregated scan results for disk space and memory.
ResultSummary
This element manages the overall PASS, WARNING, or FAIL result of the scan. It also manages the overall PASS, WARNING, or FAIL result for every scanned product and component.
Warnings
This element manages any warning messages that are logged during the scan, as specified by one or many Message elements.

PRSInfo

This required element defines the structure for the Prerequisite Scanner version details, including the tool name, version, build number, output directory, and the name of the result XML file.

<!-- Prerequisite Scanner informaton simple element definitions -->
<xs:element name="PRSName" type="xs:string" />
<xs:element name="PRSVersion" type="xs:string" />
<xs:element name="PRSBuild" type="xs:string" />
<xs:element name="PRSOutputDir" type="xs:string" />
<xs:element name="PRSResultXmlFile" type="xs:string" />

<!-- Prerequisite Scanner informaton complex element definition -->
<xs:element name="PRSInfo">
  <xs:complexType>
    <xs:sequence>
      <xs:element ref="PRSName" />
      <xs:element ref="PRSVersion" />
      <xs:element ref="PRSBuild" />      
      <xs:element ref="PRSOutputDir" />
      <xs:element ref="PRSResultXmlFile" />
    </xs:sequence>
  </xs:complexType>
</xs:element> 

An example of the output in the result XML file is as follows:

    <PRSInfo>
        <PRSName>IBM Prerequisite Scanner</PRSName>
        <PRSVersion>version_number</PRSVersion>
        <PRSBuild>build_number</PRSBuild>
        <PRSOutputDir>output_directory</PRSOutputDir>
        <PRSResultXmlFile>result.xml</PRSResultXmlFile>
     </PRSInfo>

MachineInfo

This optional element defines the structure for the machine information details, including the target system, its serial number, the OS serial number and version.

<!-- Machine information simple element definitions -->
<xs:element name="MachineName" type="xs:string" />
<xs:element name="MachineSerialNumber" type="xs:string" />
<xs:element name="MachineOSSerial" type="xs:string" />
<xs:element name="MachineOSName" type="xs:string" />

<!-- Machine informaton complex element definition -->
<xs:element name="MachineInfo">
  <xs:complexType>
    <xs:sequence>
      <xs:element ref="MachineName" minOccurs="0"/>
      <xs:element ref="MachineSerialNumber" minOccurs="0"/>
      <xs:element ref="MachineOSSerial" minOccurs="0"/>
      <xs:element ref="MachineOSName" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>  

An example of the output in the result XML file is as follows:

      <MachineInfo>
          <MachineName>computer_name</MachineName>
          <MachineSerialNumber>serial_number</MachineSerialNumber>
          <MachineOSSerial>OS_serial_number</MachineOSSerial>
          <MachineOSName>OS_version</MachineOSName>
      </MachineInfo>

UserInfo

This optional element defines the structure for the user information details, that is, the user name of the logged in user.

<!-- User information simple element definition -->
<xs:element name="UserName" type="xs:string"/>

<!-- User informaton complex element definition -->
<xs:element name="UserInfo">
  <xs:complexType>
    <xs:sequence>
      <xs:element ref="UserName" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>   

An example of the output in the result XML file is as follows:

      <UserInfo>
            <UserName>logged_in_user_name</UserName>
      </UserInfo>

ScenarioInfo

This required element defines the type of scan, which is defined as an enumeration.

<!-- Supported scenario types for Prerequisite scans -->
<xs:simpleType name="scenarioType"> 
    <xs:restriction base="xs:string">
        <xs:enumeration value="Prerequisite Scan"/>
    
		</xs:restriction>
</xs:simpleType> 
 
!-- Scenario info simple element definition -->
<xs:element name="ScenarioInfo" type="scenarioType" />

An example of the output in the result XML file is as follows:

      <ScenarioInfo>Prerequisite Scan</ScenarioInfo>

ProductInfo

This required element defines the structure for the scanned products information. One or many product codes can be passed to the Prerequisite Scanner script. The ProductInfo element contains at least one Product child element, with each child element representing a product or a component. The information for each product includes the product code, the product name, and the product version. The product name is the value for the product code in the codename.cfg file, and the version is the 8-digit value that is specified in the associated configuration file name.

<!-- Product simple element definition -->
<xs:element name="ProductCode" type="xs:string" />
<xs:element name="ProductName" type="xs:string" />
<xs:element name="ProductVersion" type="xs:string" /> 

<!-- Product complex element definition, required for each scanned product -->
<xs:element name="ProductElement">
  <xs:complexType>
    <xs:sequence>
      <xs:element ref="ProductCode" />
      <xs:element ref="ProductName" />
      <xs:element ref="ProductVersion" />
    </xs:sequence>
  </xs:complexType>
</xs:element> 

<!-- Product information complex element definition>
<xs:element name="ProductInfo">
  <xs:complexType>
    <xs:sequence>
      <xs:element ref="ProductElement" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>  

An example of the output in the result XML file, for a multiple product scan, is as follows:

       <ProductInfo>
            <ProductElement>
                <ProductCode>DMO</ProductCode>
                <ProductName>Prerequisite Scanner Demo</ProductName>
                <ProductVersion>01000000</ProductVersion>
            </ProductElement>
            <ProductElement>
                <ProductCode>TCR</ProductCode>
                <ProductName>Tivoli Common Reporting</ProductName>
                <ProductVersion>02010100</ProductVersion>
            </ProductElement>
        </ProductInfo>

DetailedResults

This required element defines the structure for the detailed results information for all scanned products. The DetailedResults element contains at least one DetailedProductResultsElement child element, with each child element that represents the detailed results for a scanned product. Each child element contains the product code to represent the scanned product, and at least one ResultElement child element. The ResultElement contains the property name, the result of the check, the actual value, and the expected value.

<!-- Supported result types -->
<xs:simpleType name="resultType"> 
    <xs:restriction base="xs:string">
        <xs:enumeration value="PASS"/>
        <xs:enumeration value="FAIL"/>
        <xs:enumeration value="WARN"/>
        <xs:enumeration value="WARNING"/>
    </xs:restriction>
</xs:simpleType>

<!-- Results simple element definitions -->
<xs:element name="PropertyName" type="xs:string" />
<xs:element name="Result" type="resultType" />
<xs:element name="Found" type="xs:string" />
<xs:element name="Expected" type="xs:string" />
<xs:element name="OverallResult" type="resultType" />

<! -- Individual property results complex element definition -->
<xs:element name="ResultElement">
  <xs:complexType>
    <xs:sequence>
      <xs:element ref="PropertyName" />
      <xs:element ref="Result" />
      <xs:element ref="Found" />
      <xs:element ref="Expected" />
    </xs:sequence>

<! -- Scanned product results complex element definition -->
<xs:element name="DetailedProductResultsElement">
  <xs:complexType>
    <xs:sequence>
      <xs:element ref="ProductCode" />
      <xs:element ref="ResultElement" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>
  </xs:complexType>
</xs:element>

<! --Detailed results complex element definition -->
<xs:element name="DetailedResults">
  <xs:complexType>
    <xs:sequence>
      <xs:element ref="DetailedProductResultsElement" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

An example of the output in the result XML file, with detailed results for multiple scanned products, is as follows:

     <DetailedResults>
            <DetailedProductResultsElement>
                <ProductCode>DMO</ProductCode>
                <ResultElement>
                    <PropertyName>OS Version</PropertyName>
                    <Result>FAIL</Result>
                    <Found>Microsoft Windows XP Professional Service Pack 3</Found>
                    <Expected>Windows 7 Ultimate</Expected>
                </ResultElement>
                <ResultElement>
                    <PropertyName>Memory</PropertyName>
                    <Result>PASS</Result>
                    <Found>1701MB</Found>
                    <Expected>128MB</Expected>
                </ResultElement>
            </DetailedProductResultsElement>   
            <DetailedProductResultsElement>
                <ProductCode>TCR</ProductCode>
                <ResultElement>
                    <PropertyName>os.totalPhysicalMemory</PropertyName>
                    <Result>PASS</Result>
                    <Found>3.00GB</Found>
                    <Expected>2GB</Expected>
                </ResultElement>  
                <ResultElement>
                    <PropertyName>intel.cpu</PropertyName>
                    <Result>PASS</Result>
                    <Found>2.34GHz</Found>
                    <Expected>2GHz</Expected>
                </ResultElement>
             </DetailedProductResultsElement>
        </DetailedResults>

AggregatedResults

This optional element defines the structure for the aggregated results information for all scanned products. It contains at least one ResultElement child element, with each child element that represents the aggregated results for common properties, such as disk space and memory, if these properties exist in the configuration files. The ResultElement contains the property name, the result of the check, the actual value, and the expected value.

<! --Aggregated complex element definition -->
<xs:element name="AggregatedResults">
  <xs:complexType>
    <xs:sequence>
      <xs:element ref="ResultElement" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

An example of the output in the result XML file is as follows:

         <AggregatedResults>
                <ResultElement>
                    <PropertyName>Memory</PropertyName>
                    <Result>PASS</Result>
                    <Found>1.66GB</Found>
                    <Expected>128MB</Expected>
                </ResultElement>
                <ResultElement>
                    <PropertyName>C:</PropertyName>
                    <Result>FAIL</Result>
                    <Found>1.32GB</Found>
                    <Expected>4.18GB</Expected>
                </ResultElement>
        </AggregatedResults>

ResultSummary

This required element defines the overall result of the scan, which is defined as an enumeration. It also defines the overall result of every scanned product and component.

<!-- Supported result types -->
<xs:simpleType name="resultType"> 
    <xs:restriction base="xs:string">
        <xs:enumeration value="PASS"/>
        <xs:enumeration value="FAIL"/>
        <xs:enumeration value="WARNING"/>
    </xs:restriction>
</xs:simpleType>
<!-- Overall result simple element definition --> 
<xs:element name="OverallResult" type="resultType" />
 
<!-- Result summary complex element definition -->
<xs:element name="ResultSummay">
	<xs:complexType>
		<xs:sequence>
			<xs:element ref="OverallResult" minOccurs="1" maxOccurs="1" />
			<xs:element ref="ProductResult" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
</xs:element>

An example of the output in the result XML file is as follows:

<ResultSummary>
	<OverallResult>FAIL</OverallResult>
	<ProductResult>
		<ProductCode>DMO</ProductCode>
		<Result>FAIL</Result>
	</ProductResult>
	<ProductResult>
		<ProductCode>TCR</ProductCode>
		<Result>FAIL</Result>
	</ProductResult>
</ResultSummary>

Warnings

This optional element defines the structure for any warning messages. It contains at least one Message child element.

<!-- Message simple element definition-->
<xs:element name="Message" type="xs:string" />

<!-- Warnings complex element definition-->
<xs:element name="Warnings">
  <xs:complexType>
    <xs:sequence>
      <xs:element ref="Message" minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>