<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<HTML>
<head>
<style type="text/css">
table,th,td{ valign:middle;margin:3px padding:10px border:1px solid 999999;}
td {padding:5px;}
th {padding:5px;}
table{border-collapse:collapse;}
table{width:100%;} th{height:30px;}
body { font-family: Arial; }p { font-size: 8px; }h2 { font-size: 24px; font-style: italic;}ul { font-weight: bolder; }
</style>
</head>
<BODY>
<xsl:apply-templates/>
</BODY>
</HTML>
</xsl:template>
<xsl:template match="/*">
<TABLE style="table-layout: fixed;width: 600px;border-style:solid; border-color:555555" bgColor="ffD600">
<h1>SIMATIC WinCC License Diagnostic Information</h1>
<h3>Overview</h3>
<xsl:for-each select="InfoNode/*">
<TR>
<TD>
<xsl:value-of select="@Name"/>
</TD>
<TD>
<xsl:value-of select="@Value"/>
</TD>
</TR>
</xsl:for-each>
</TABLE>
<br>
</br>
<br>
</br>
<TABLE style="table-layout: fixed;width: 600px;border-style:solid; border-color:555555" bgColor="ffD600">
<h3>DemoData</h3>
<tr align="left">
<th width="150px">Type</th>
<th width="150px">Start</th>
<th width="100px">Runs</th>
<th width="100px">MinutesLeft</th>
<th width="100px">Finished</th>
</tr>
<xsl:for-each select="DemoManager/*">
<TR>
<TD>
<xsl:value-of select="@Type"/>
</TD>
<TD>
<xsl:value-of select="@StartTime"/>
</TD>
<TD>
<xsl:value-of select="@MinutesRun"/>
</TD>
<TD>
<xsl:value-of select="@MinutesLeft"/>
</TD>
<TD>
<xsl:value-of select="@DemoTimeFinished"/>
</TD>
</TR>
</xsl:for-each>
</TABLE>
<p/>
<br/>
<h3>Key</h3>
<table style="table-layout: fixed;width: 600px;">
<tr width="150px" bgcolor="00ff00">Group/License is requested and is OK</tr>
<tr width="150px" bgcolor="ff0000">Group is requested and has problems or License is Missing/Exceeded</tr>
<tr width="150px" bgcolor="ffD600">Group is requested, but not mandatory</tr>
<br/>
</table>
<br>
</br>
<h3>License groups</h3>
<table align="left" style="border-style:solid; border-color:555555" bgcolor="d0d0d0">
<tr align="left">
<th align="left" width="200px">License Group</th>
<th align="left" width="45px">Relevant</th>
<th align="left" width="150px">Type</th>
<th align="left" width="45px">Used</th>
<th align="left" width="45px">Limit</th>
<th align="left" width="45px">OK</th>
<th align="left" width="45px">-spam-</th>
<th align="left" width="45px">Setups Demo</th>
<th align="left" width="45px">Runs Demo</th>
<th align="left" width="45px">Demo Finished</th>
<th align="left" width="45px">Activate Trial</th>
<th align="left" width="45px">Was active</th>
<th align="left" width="45px">ActiveCount</th>
</tr>
<xsl:apply-templates/>
</table>
</xsl:template>
<xsl:template match="Groups/*">
<TR>
<xsl:if test="@WasActive='1' and @AllRelevantLicensesOK='1' and @-spam-='0'">
<TD bgcolor="00ff00">
<xsl:value-of select="@GroupKey"/>
</TD>
</xsl:if>
<xsl:if test="@WasActive='1' and ( @AllRelevantLicensesOK='0' or @-spam-='1') and @IsGroupCustomerRelevant='1'">
<TD bgcolor="ff0000">
<xsl:value-of select="@GroupKey"/>
</TD>
</xsl:if>
<xsl:if test="@WasActive='1' and ( @AllRelevantLicensesOK='0' or @-spam-='1') and @IsGroupCustomerRelevant='0' ">
<TD bgcolor="ffD600">
<xsl:value-of select="@GroupKey"/>
</TD>
</xsl:if>
<xsl:if test="@WasActive=0">
<TD>
<xsl:value-of select="@GroupKey"/>
</TD>
</xsl:if>
<TD>
<xsl:value-of select="@IsGroupCustomerRelevant"/>
</TD>
<TD>
<xsl:value-of select="@LicType"/>
</TD>
<TD>
<xsl:value-of select="@UsedObjectCount"/>
</TD>
<TD>
<xsl:value-of select="@AccuLicensedObjectCount"/>
</TD>
<TD>
<xsl:value-of select="@AllRelevantLicensesOK"/>
</TD>
<TD>
<xsl:value-of select="@-spam-"/>
</TD>
<TD>
<xsl:value-of select="@SetupsDemoMode"/>
</TD>
<TD>
<xsl:value-of select="@RunsInDemoMode"/>
</TD>
<TD>
<xsl:value-of select="@DemoTimeEnded"/>
</TD>
<TD>
<xsl:value-of select="@AllowActivateTrial"/>
</TD>
<TD>
<xsl:value-of select="@WasActive"/>
</TD>
<TD>
<xsl:value-of select="@ActiveCount"/>
</TD>
</TR>
<TR>
<td colspan="13">
<table border="1" bgColor="ffffff">
<tbody align="left">
<tr>
<th width="50px">IsInstalled</th>
<th width="50px">Relevant</th>
<th width="400px">LicenseName</th>
<th width="150px">LicenseKey</th>
<th width="150px">LicenseKeyALM</th>
<th width="150px">Limit</th>
<th width="50px">IsGranted</th>
<th width="250px">GrantedText</th>
<th width="70px">Type</th>
<th width="70px">ALMType</th>
</tr>
<xsl:for-each select="current()/License">
<tr>
<TD>
<xsl:value-of select="@IsInstalled"/>
</TD>
<TD>
<xsl:value-of select="@IsCustomerRelevant"/>
</TD>
<TD>
<xsl:value-of select="@LicenseName"/>
</TD>
<xsl:if test="@IsCustomerRelevant='1' and @IsInstalled='1'">
<TD bgcolor="00ff00">
<xsl:value-of select="@LicenseKey"/>
</TD>
</xsl:if>
<xsl:if test="@IsCustomerRelevant='1' and @IsInstalled='0'">
<TD bgcolor="ff0000">
<xsl:value-of select="@LicenseKey"/>
</TD>
</xsl:if>
<xsl:if test="@IsCustomerRelevant=0">
<TD>
<xsl:value-of select="@LicenseKey"/>
</TD>
</xsl:if>
<TD>
<xsl:value-of select="@LicenseKeyGranted"/>
</TD>
<TD>
<xsl:value-of select="@LicensedObjectCount"/>
</TD>
<TD>
<xsl:value-of select="@IsGranted"/>
</TD>
<TD>
<xsl:value-of select="@LicenseText"/>
</TD>
<TD>
<xsl:value-of select="@LicenseInfoType"/>
</TD>
<TD>
<xsl:value-of select="@ALMType"/>
</TD>
</tr>
</xsl:for-each>
</tbody>
</table>
</td>
</TR>
</xsl:template>
<!-- <xsl:template match="License/*">
<TD>
<xsl:value-of select="@LicenseName"/>
</TD>
</xsl:template>
-->
</xsl:stylesheet>