<?xml version="1.0" encoding="UTF-8"?>
<!--W3C Schema generated by XMLSPY v5 rel. 3 U (http://www.xmlspy.com)-->
<!--Honeywell International, ACS, Industry Solutions-->
<!--Experion PKS – Knowledge Builder Tools-->
<!--Favorites Verification Report Stylesheet-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xsl:template match="/">
	<!-- Style sheet for displaying the data generated by a User or Site Favorites Verification from the KB Administation Utility -->
	<!-- Referenced in the KB_VerifyReport.xml data file that is dynamically produced by the verification function -->
	<html>
		<head/>
			<body>
				<xsl:for-each select="KB_VerifyReport">
					<!-- Writes the Verification Report heading in the displayed output -->
					<xsl:for-each select="KB_ReportHeading">
						<!-- Writes the first two heading lines in the displayed file -->
						<xsl:for-each select="KB_ReportType">
							<!-- Writes the static "Knowledge Builder" heading line 1 text -->
							<span style="font-family:Arial; font-size:small; font-style:normal; font-weight:bold">
								Knowledge Builder 
							</span>
							<br/>
							<!-- Writes the first word in the heading line 2 text from the data in the XML data files <KB_ReportType> tag -->
							<!-- This data will be either "User" or "Site" depending on the Favorites Verificatioin function request that gnerarted the report -->
							<span style="font-family:Arial; font-size:larger; font-style:normal; font-weight:bold">
								<xsl:apply-templates/>
							</span>
						</xsl:for-each>
							<span style="font-family:Arial; font-size:larger; font-style:normal; font-weight:bold">&#160;</span>
						<xsl:for-each select="KB_ReportName">
							<!-- Writes the report name heading line 2, after the data from the <KB-ReportType> tag data from the data in the XML data files <KB_ReportName> tag -->
							<span style="font-family:Arial; font-size:larger; font-style:normal; font-weight:bold">
								<xsl:apply-templates/>
							</span>
						</xsl:for-each>
						<br/>
						<!-- Writes the name of the Site Favorites node, where the Favorites Verification was initiated, in the heading line 3 from the data in the XML data files <KB_SiteFavname> tag -->
						<xsl:for-each select="KB_SiteFavName">
							<xsl:apply-templates/>
						</xsl:for-each>
						<br/>
						<!-- Writes the 'who/when' data of the Favorites Verification results in the displayed output -->
						<table border="0" width="100%">
							<tbody>
								<!-- Writes the logon name of the user logged on to the machine from where the KB Administration utility's Favorites Verification function was executed -->
								<tr>
									<!-- Static boilerplate text -->
									<td  valign="baseline" width="150">
										<span style="font-family:Arial; font-size:smaller">Logged on to KB Client:</span>
									</td>
									<!-- Dyanmic text from the XML data files <KB_UserName> tag -->
									<td  valign="baseline">
										<xsl:for-each select="KB_UserName">
											<span style="font-family:Arial; font-weight:bold">
												<xsl:apply-templates/>
											</span>
										</xsl:for-each>
									</td>
								</tr>
								<!-- Writes the report generation date/time when the KB Administration utility's Favorites Verification function was executed -->
								<tr>
									<!-- Static boilerplate text -->
									<td  valign="baseline" width="150">
										<span style="font-family:Arial; font-size:smaller">Report Date/Time:</span>
									</td>
									<!-- Dyanmic text from the XML data files <KB_Reportdate> and <KB_ReportTime> tag -->
									<td  valign="baseline">
										<xsl:for-each select="KB_ReportDate">
											<span style="font-family:Arial; font-size:smaller; font-weight:bold">
												<xsl:apply-templates/>
											</span>
										</xsl:for-each> - <xsl:for-each select="KB_ReportTime">
											<span style="font-family:Arial; font-size:smaller; font-weight:bold">
												<xsl:apply-templates/>
											</span>
										</xsl:for-each>
									</td>
								</tr>
							</tbody>
						</table>
							</xsl:for-each>
								<xsl:for-each select="KB_ReportLinks">
							<br/>
						<!-- Writes the Favorites Verification results in the displayed output -->
						<table align="center" bgcolor="silver" width="100%">
							<tbody>
								<!-- Static boilerplate table column heading text -->
								<tr valign="middle">
									<td width="50" align="center">
										<span style="font-family:Arial; font-size:smaller; font-weight:bold">Status</span>
									</td>
									<td width="300" align="center">
										<span style="font-family:Arial; font-size:smaller; font-weight:bold">Link Location</span>
									</td>
									<td align="center">
										<span style="font-family:Arial; font-size:smaller; font-weight:bold">Link Name</span>
									</td>
									<td align="center">
										<span style="font-family:Arial; font-size:smaller; font-weight:bold">Path</span>
									</td>
								</tr>
								<!-- Sorts the Favorites Verification results by the data in the XML data file's <Status> tag -->
								<xsl:for-each select="KB_Link">
									<xsl:sort select="Status" order="ascending" data-type="text"/>
								<!-- Writes the status of each favorites link -->
								<tr bgcolor="white">
									<!-- Dyanmic text from the XML data files <Status> tag -->
									<!-- Tests for the condition of the data: If Bad, then write text in red; if OK, write text in green -->
									<td valign="top" align="center">
										<xsl:if test="Status[.='Bad']">									
										<xsl:for-each select="Status">
											<span style="font-family:Arial; font-size:x-small; font-weight:bold; color:red">
												<xsl:apply-templates/>
											</span>	
										</xsl:for-each>
										</xsl:if>
										<xsl:if test="Status[.='OK']">									
										<xsl:for-each select="Status">
											<span style="font-family:Arial; font-size:x-small; font-weight:bold; color:green">
												<xsl:apply-templates/>
											</span>	
										</xsl:for-each>
										</xsl:if>
									</td>
									<!-- Writes the name of the favorites link, as displayed to the user in the KB Client UIs, from the data in the XML data files <Link_Name> tag -->
									<td width="250" valign="top">
										<xsl:for-each select="Link_Location">
											<span style="font-family:Arial; font-size:x-small; font-style:normal">
												<xsl:apply-templates/>
											</span>
										</xsl:for-each>
									</td>
									<!-- Writes the physical path of the favorites link from the data in the XML data files <Link_Path> tag -->
									<td valign="top">
										<xsl:for-each select="Link_Name">
											<span style="font-family:Arial; font-size:x-small; font-style:normal">
												<xsl:apply-templates/>
											</span>
										</xsl:for-each>
									</td>
									<td valign="top">
										<xsl:for-each select="Link_Path">
											<span style="font-family:Arial; font-size:x-small; font-style:normal">
												<xsl:apply-templates/>
											</span>
										</xsl:for-each>
									</td>
								</tr>
								</xsl:for-each>
							</tbody>
						</table>
						<br/>
						<!-- Static boilerplate text indicating the end of the report -->
						<p style="font-family:Arial; font-size:smaller">End Report</p>
					</xsl:for-each>
			</xsl:for-each>
		</body>
	</html>
</xsl:template>
</xsl:stylesheet>