HP Matrix Operating Environment Chargeback
Technical white paper | HP Matrix Operating Environment Chargeback 
12 
IpAddresses 
The list of IP addresses is represented by the <ipAddresses> element. In this list, each IP is represented by the 
<ipAddressUsageDetail> element. Figure 14 shows a partial example of an XML file containing IP allocation metrics. 
Figure 14. XML element containing IP allocation metrics 
<resourceUsageDetail> 
 <ipAddresses> 
 <ipAddressUsageDetail> 
 <allocationCost>0.1217</allocationCost> 
 <allocationHours>8.7528</allocationHours> 
 <ipAddress>intranet02.hp.domain</ipAddress> 
 <ipAssignmentType>DHCP</ipAssignmentType> 
 <isInCloud>false</isInCloud> 
 </ipAddressUsageDetail> 
 <ipAddressUsageDetail> 
 <allocationCost>0.1217</allocationCost> 
 <allocationHours>8.7528</allocationHours> 
 <ipAddress>intranet01.hp.domain</ipAddress> 
 <ipAssignmentType>DHCP</ipAssignmentType> 
 <isInCloud>false</isInCloud> 
 </ipAddressUsageDetail> 
 </ipAddresses> 
</resourceUsageDetail> 
Note 
Matrix infrastructure orchestration version 7.3 (API version 3) added the <isInCloud> element to IP addresses. 
Creating formatted reports 
Extensible Stylesheet Language (XSL) is a family of components used to render XML. An XSL file describes how to select and 
format content from the XML document. Extensible Stylesheet Language Transformations (XSLT) is an XML based language 
used to transform an XML document into another format such as HTML, XHTML, or text. 
This paper shows how to create custom reports by converting the XML allocation data into an HTML page, which allows the 
user to see the reports in applications that are able to process XSL files such as web browsers and Excel. 
The XSLT language allows formatting every aspect of a report including adding images, tables, and changing colors and font 
styles. In addition, the report does not need to include all of the information available in the source XML file. The user can 
decide which data to include during the creation of a new report. 
Learning the basic XSLT elements 
The XSLT offers several tags to transform XML files. The main tags used in the examples to handle transformation are listed 
in Table 2. 
Table 2. Common XSLT transformation tags 
XSLT Element 
Description 
<xsl:output> 
Defines the format of the output document. 
The following example indicates that output document is HTML. 
<xsl:output method="html"/> 
<xsl:for-each> 
The following example iterates through a list of ServiceUsageDetail elements inside the node 
GetServiceUsageDetail: 
<xsl:for-each select="GetServiceUsageDetail/ServiceUsageDetail"> 
The select attribute contains an XPath expression that specifies which list element to iterate. 










