- 0 minutes to read

New 6.1.0.112 New 7.x

Use the Liquid Stylesheet below to view a single line EDIFACT file with line breaks.

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:XsltExtensionHelper="ext:XsltExtensionHelper" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl" xmlns:cs="urn:cs">
	<xsl:output omit-xml-declaration="yes" method="html" version="1.0" indent="yes" encoding="utf-8" />
	<xsl:template match="CustomMetaDatas">
		<xsl:if test="CustomMetaData">
			<tr>
				<td colspan="6">
					<table class="integration" style="border-collapse:collapse;border-spacing:0;width:100%;border-style:solid;border-width:1px;border-color:#ccc;">
						<colgroup>
							<col style="width: 30%;" />
							<col style="width: 70%;" />
						</colgroup>
						<thead>
							<tr>
								<th style="text-align: left;font-family:Arial,sans-serif;font-size:1.0em;padding:0.62em 0.31em;overflow:hidden;">Custom Meta Data</th>
								<th style="text-align: left;font-family:Arial,sans-serif;font-size:1.0em;padding:0.62em 0.31em;overflow:hidden;">Value(s)</th>
							</tr>
						</thead>
						<tbody>
							<xsl:for-each select="CustomMetaData">
								<xsl:sort order="ascending" select="Name"/>
								<xsl:choose>
									<xsl:when test="DataType = 'Markdown' or DataType = 'MermaidDiagram'">
										<!-- cannot render these -->
									</xsl:when>
									<xsl:otherwise>
										<tr>
											<td>
												<xsl:choose>
													<xsl:when test="(position() mod 2) != 0">
														<xsl:attribute name="style">
															font-family:Arial,sans-serif;width: 30%; background-color: #fafafa;
														</xsl:attribute>
													</xsl:when>
													<xsl:otherwise>
														<xsl:attribute name="style">
															font-family:Arial,sans-serif; width: 30%; background-color: #eaeaea;
														</xsl:attribute>
													</xsl:otherwise>
												</xsl:choose>
												<xsl:attribute name="colrow">
													<xsl:value-of select="count(CustomValues/CustomValue)"/>
												</xsl:attribute>
												<xsl:value-of select="Name"/>
											</td>
											<td style="font-family:Arial,sans-serif;width:70%;">
												<xsl:choose>
													<xsl:when test="(position() mod 2) != 0">
														<xsl:attribute name="style">
															width: 70%; background-color: #fafafa;
														</xsl:attribute>
													</xsl:when>
													<xsl:otherwise>
														<xsl:attribute name="style">
															width: 70%; background-color: #eaeaea;
														</xsl:attribute>
													</xsl:otherwise>
												</xsl:choose>
												<!-- Loop data -->
												<xsl:choose>
													<xsl:when test="DataType = 'Table'">
														<div>
															<xsl:for-each select="CustomValues/CustomValue">
																<xsl:sort order="ascending" select="Value"/>
																<xsl:for-each select="XsltExtensionHelper:jsonToXmlDocument(Value)/Table">
																	<table style="border-collapse:collapse;border-spacing:0;width:100%;border-style:solid;border-width:1px;border-color:#ccc;">
																		<tr style="background-color: #cccccc;font-weight: bold;">
																			<xsl:for-each select="Columns">
																				<td>
																					<xsl:value-of select="Name" />
																				</td>
																			</xsl:for-each>
																		</tr>
																		<xsl:for-each select="Data">
																			<xsl:variable name="parent-position" select="position()" />
																			<tr>
																				<xsl:for-each select="Data">
																					<td>
																						<xsl:choose>
																							<xsl:when test="($parent-position mod 2) != 0">
																								<xsl:attribute name="style">
																									background-color: #fafafa;
																								</xsl:attribute>
																							</xsl:when>
																							<xsl:otherwise>
																								<xsl:attribute name="style">
																									background-color: #eaeaea;
																								</xsl:attribute>
																							</xsl:otherwise>
																						</xsl:choose>
																						<xsl:value-of select="text()" />
																					</td>
																				</xsl:for-each>
																			</tr>
																		</xsl:for-each>
																	</table>
																</xsl:for-each>
															</xsl:for-each>
															<br/>
															<p style="margin: 0; padding: 0; color: rgba(0,0,0,.5); font-size: 80%; font-weight: 400;">
																<xsl:if test="Description != ''">
																	Description: <xsl:value-of select="Description" />
																</xsl:if>
															</p>
														</div>
													</xsl:when>
												</xsl:choose>
												<xsl:choose>
													<xsl:when test="DataType = 'Attachment'">
														<xsl:for-each select="CustomValues/CustomValue">
															<xsl:sort order="ascending" select="Value"/>
															<div>
																<xsl:choose>
																	<xsl:when test="position() > 1">
																		<xsl:attribute name="style">
																			font-family:Arial,sans-serif;padding-top:0.62em; padding-bottom:0.62em; border-top: 0.0626em solid #ccc;
																		</xsl:attribute>
																	</xsl:when>
																	<xsl:otherwise>
																		<xsl:attribute name="style">
																			font-family:Arial,sans-serif;padding-top:0.62em; padding-bottom:0.62em;
																		</xsl:attribute>
																	</xsl:otherwise>
																</xsl:choose>
																<a target="_blank" style="color: #e15046;">
																	<xsl:attribute name="href">
																		<xsl:value-of select="//WebClientUrl" />CustomValues/File/<xsl:value-of select="CustomValueId"/>
																	</xsl:attribute>
																	<xsl:value-of select="Value" />
																</a>
																<br/>
																<p style="margin: 0; padding: 0; color: rgba(0,0,0,.5); font-size: 80%; font-weight: 400;">
																	Description: <xsl:value-of select="Description" />
																</p>
															</div>
														</xsl:for-each>
													</xsl:when>
													<xsl:when test="DataType = 'Link'">
														<xsl:for-each select="CustomValues/CustomValue">
															<xsl:sort order="ascending" select="Value"/>
															<div>
																<xsl:choose>
																	<xsl:when test="position() > 1">
																		<xsl:attribute name="style">
																			font-family:Arial,sans-serif;padding-top:0.62em; padding-bottom:0.62em; border-top: 0.0626em solid #ccc;
																		</xsl:attribute>
																	</xsl:when>
																	<xsl:otherwise>
																		<xsl:attribute name="style">
																			font-family:Arial,sans-serif;padding-top:0.62em; padding-bottom:0.62em;
																		</xsl:attribute>
																	</xsl:otherwise>
																</xsl:choose>
																<a target="_blank" style="color: #e15046;">
																	<xsl:attribute name="href">
																		<xsl:value-of select="Value"/>
																	</xsl:attribute>
																	<xsl:value-of select="Value" />
																</a>
																<br/>
																<p style="margin: 0; padding: 0; color: rgba(0,0,0,.5); font-size: 80%; font-weight: 400;">
																	<xsl:if test="Description != ''">
																		Description: <xsl:value-of select="Description" />
																	</xsl:if>
																</p>
															</div>
														</xsl:for-each>
													</xsl:when>
													<xsl:when test="DataType = 'TextField' or DataType = 'TextArea' or DataType='Select' or DataType='CheckBox'">
														<xsl:for-each select="CustomValues/CustomValue">
															<xsl:sort order="ascending" select="Value"/>
															<div>
																<xsl:choose>
																	<xsl:when test="position() > 1">
																		<xsl:attribute name="style">
																			font-family:Arial,sans-serif;padding-top:0.62em; padding-bottom:0.62em; border-top: 0.0626em solid #ccc;
																		</xsl:attribute>
																	</xsl:when>
																	<xsl:otherwise>
																		<xsl:attribute name="style">
																			font-family:Arial,sans-serif;padding-top:0.62em; padding-bottom:0.62em;
																		</xsl:attribute>
																	</xsl:otherwise>
																</xsl:choose>
																<xsl:choose>
																	<xsl:when test="WebSite != ''">
																		<a target="_blank" style="color: #e15046;">
																			<xsl:attribute name="href">
																				<xsl:value-of select="WebSite"/>
																			</xsl:attribute>
																			<xsl:value-of select="Value" />
																		</a>
																	</xsl:when>
																	<xsl:otherwise>
																		<xsl:value-of select="Value"/>
																	</xsl:otherwise>
																</xsl:choose>
																<br/>
																<p style="margin: 0; padding: 0; color: rgba(0,0,0,.5); font-size: 80%; font-weight: 400;">
																	<xsl:if test="Description != ''">
																		Description: <xsl:value-of select="Description" />
																	</xsl:if>
																</p>
															</div>
														</xsl:for-each>
													</xsl:when>
												</xsl:choose>
											</td>
										</tr>
									</xsl:otherwise>
								</xsl:choose>
							</xsl:for-each>
						</tbody>
					</table>
				</td>
			</tr>
		</xsl:if>
	</xsl:template>
	
	<xsl:template match="AlarmObject">
		<xsl:text disable-output-escaping="yes">&lt;!DOCTYPE html&gt;</xsl:text>
		<html style="font-family:Arial,sans-serif;">
			<head>
				<style type="text/css">
					table.summary th, table.summary td, table.listOfResources th, table.listOfResources td {
					padding:0.5em;
					}
					table.integrations th, table.integration th {
					padding:0.5em;
					}
					table.integrations td, table.integration td {
					padding:0.62em;
					}
				</style>
			</head>
			<body style="font-family:Arial,sans-serif;font-size:1.0em;">
				<p>
					<xsl:choose>
						<xsl:when test="MonitorViews/MonitorView/StatusCode/StatusCode[.>0]">
							One or more resources are not in the expected state and may require your attention.
						</xsl:when>
						<xsl:otherwise>
							All resources are in the expected state.
						</xsl:otherwise>
					</xsl:choose>
				</p>
				<xsl:for-each select="MonitorViews/MonitorView">
					<xsl:sort order="descending" select="StatusCode/StatusCode"/>
					<h3>
						Monitor View [<xsl:value-of select="position()" />/<xsl:value-of select="count(//MonitorViews/MonitorView)"/>] -
						<a target="_blank" style="color: #e15046;">
							<xsl:attribute name="href">
								<xsl:value-of select="//WebClientUrl" />Monitor/MonitorView/<xsl:value-of select="MonitorViewId"/>
							</xsl:attribute>
							<xsl:value-of select="Name" />
						</a>
					</h3>
					<h4>Information</h4>
					<table class="summary" style="border-collapse:collapse;border-spacing:0;width:100%;border-style:solid;border-width:1px;border-color:#ccc;">
						<colgroup>
							<col style="width: 30%;" />
							<col style="width: 70%;" />
						</colgroup>
						<tbody>
							<tr>
								<td style="font-family:Arial,sans-serif;width: 30%; background-color: #fafafa;">Status</td>
								<td style="font-family:Arial,sans-serif;width: 70%; background-color: #fafafa;">
									<xsl:value-of select="StatusCode/Name"/>
								</td>
							</tr>
							<tr>
								<td style="font-family:Arial,sans-serif;width: 30%; background-color: #eaeaea;">Description</td>
								<td style="font-family:Arial,sans-serif;width: 70%; background-color: #eaeaea;">
									<xsl:value-of select="Description" />
								</td>
							</tr>
							<tr>
								<td style="font-family:Arial,sans-serif;width: 30%; background-color: #fafafa;">Web Site</td>
								<td style="font-family:Arial,sans-serif;width: 70%; background-color: #fafafa;">
									<xsl:choose>
										<xsl:when test="WebSite != ''">
											<a target="_blank" style="color: #e15046;">
												<xsl:attribute name="href">
													<xsl:value-of select="WebSite"/>
												</xsl:attribute>
												<xsl:value-of select="WebSite" />
											</a>
										</xsl:when>
										<xsl:otherwise>
											<span style="color: #CCCCCC;">
												N/A
											</span>
										</xsl:otherwise>
									</xsl:choose>
								</td>
							</tr>
							<tr>
								<td style="font-family:Arial,sans-serif;width: 30%; background-color: #eaeaea;">Number of changed resources</td>
								<td style="font-family:Arial,sans-serif;width: 70%; background-color: #eaeaea;">
									<xsl:value-of select="count(ChangedResources/Resource)"/>
								</td>
							</tr>
							<tr>
								<td style="font-family:Arial,sans-serif;width: 30%; background-color: #fafafa;">Number of monitored resources</td>
								<td style="font-family:Arial,sans-serif;width: 70%; background-color: #fafafa;">
									<xsl:value-of select="NumberOfMonitoredResources"/>
								</td>
							</tr>
						</tbody>
					</table>
					<br />
					<h4>Resources with changed status</h4>
					<table class="listOfResources" style="border-collapse:collapse;border-spacing:0;width:100%;border-style:solid;border-width:1px;border-color:#ccc;">
						<colgroup>
							<col style="width:33%;" />
							<col style="width:15%;" />
							<col style="width:15%;" />
							<col style="width:15%;" />
							<col style="width:15%;" />
							<col style="width:8%;" />
						</colgroup>
						<thead>
							<tr>
								<th style="text-align:left; width:33%; font-weight: bold;font-family:Arial,sans-serif;font-size:1.0em;padding:0.62em 0.31em;overflow:hidden;background:#eaeaea;color:#000;">Name</th>
								<th style="text-align:left; width:15%; font-weight: bold;font-family:Arial,sans-serif;font-size:1.0em;padding:0.62em 0.31em;overflow:hidden;background:#eaeaea;color:#000;">Source</th>
								<th style="text-align:left; width:15%; font-weight: bold;font-family:Arial,sans-serif;font-size:1.0em;padding:0.62em 0.31em;overflow:hidden;background:#eaeaea;color:#000;">Application</th>
								<th style="text-align:left; width:15%; font-weight: bold;font-family:Arial,sans-serif;font-size:1.0em;padding:0.62em 0.31em;overflow:hidden;background:#eaeaea;color:#000;">Category</th>
								<th style="text-align:left; width:15%; font-weight: bold;font-family:Arial,sans-serif;font-size:1.0em;padding:0.62em 0.31em;overflow:hidden;background:#eaeaea;color:#000;">LogText</th>
								<th style="text-align:left; width:8%; font-weight: bold;font-family:Arial,sans-serif;font-size:1.0em;padding:0.62em 0.31em;overflow:hidden;background:#eaeaea;color:#000;">Status</th>
							</tr>
						</thead>
						<tbody>
							<xsl:for-each select="ChangedResources/Resource">
								<xsl:sort order="descending" select="StatusCode/StatusCode"/>
								<tr>
									<td>
										<xsl:attribute name="style">
											<xsl:choose>
												<xsl:when test="StatusCode/StatusCode = 4">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#373534; color: #fff;
												</xsl:when>
												<xsl:when test="StatusCode/StatusCode = 3 and (position() mod 2) != 0">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#b3b3b3;
												</xsl:when>
												<xsl:when test="StatusCode/StatusCode = 3">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#cccccc;
												</xsl:when>
												<xsl:when test="StatusCode/StatusCode = 2">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#e15046; color: #fff;
												</xsl:when>
												<xsl:when test="StatusCode/StatusCode = 1">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#f39655;
												</xsl:when>
												<xsl:otherwise>
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#68a19b; color: #fff;
												</xsl:otherwise>
											</xsl:choose>
										</xsl:attribute>
										<xsl:choose>
											<xsl:when test="WebSite != ''">
												<a>
													<xsl:attribute name="style">
														<xsl:choose>
															<xsl:when test="StatusCode/StatusCode >= 2">
																color: #fff;
															</xsl:when>
															<xsl:when test="StatusCode/StatusCode = 1">
																color: #000;
															</xsl:when>
															<xsl:otherwise>
																color: #fff;
															</xsl:otherwise>
														</xsl:choose>
													</xsl:attribute>
													<xsl:attribute name="href">
														<xsl:value-of select="WebSite" />
													</xsl:attribute>
													<xsl:value-of select="Name"/>
												</a>
											</xsl:when>
											<xsl:otherwise>
												<span>
													<xsl:value-of select="Name"/>
												</span>
											</xsl:otherwise>
										</xsl:choose>
										<br />
										<p style="margin: 0; padding: 0; font-size: 0.8em;">
											<xsl:value-of select="Description" />
										</p>
									</td>
									<td>
										<xsl:attribute name="style">
											<xsl:choose>
												<xsl:when test="StatusCode/StatusCode = 4">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#373534; color: #fff;
												</xsl:when>
												<xsl:when test="StatusCode/StatusCode = 3 and (position() mod 2) != 0">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#b3b3b3;
												</xsl:when>
												<xsl:when test="StatusCode/StatusCode = 3">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#cccccc;
												</xsl:when>
												<xsl:when test="StatusCode/StatusCode = 2">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#e15046; color: #fff;
												</xsl:when>
												<xsl:when test="StatusCode/StatusCode = 1">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#f39655;
												</xsl:when>
												<xsl:otherwise>
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#68a19b; color: #fff;
												</xsl:otherwise>
											</xsl:choose>
										</xsl:attribute>
										<xsl:choose>
											<xsl:when test="Source/WebSite != ''">
												<a>
													<xsl:attribute name="style">
														<xsl:choose>
															<xsl:when test="StatusCode/StatusCode >= 2">
																color: #fff;
															</xsl:when>
															<xsl:when test="StatusCode/StatusCode = 1">
																color: #000;
															</xsl:when>
															<xsl:otherwise>
																color: #fff;
															</xsl:otherwise>
														</xsl:choose>
													</xsl:attribute>
													<xsl:attribute name="href">
														<xsl:value-of select="Source/WebSite" />
													</xsl:attribute>
													<xsl:value-of select="Source/Name"/>
												</a>
											</xsl:when>
											<xsl:otherwise>
												<xsl:value-of select="Source/Name"/>
											</xsl:otherwise>
										</xsl:choose>
										<br />
										<p style="margin: 0; padding: 0; font-size: 0.8em;">
											<xsl:value-of select="Source/Description" />
										</p>
									</td>
									<td>
										<xsl:attribute name="style">
											<xsl:choose>
												<xsl:when test="StatusCode/StatusCode = 4">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#373534; color: #fff;
												</xsl:when>
												<xsl:when test="StatusCode/StatusCode = 3 and (position() mod 2) != 0">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#b3b3b3;
												</xsl:when>
												<xsl:when test="StatusCode/StatusCode = 3">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#cccccc;
												</xsl:when>
												<xsl:when test="StatusCode/StatusCode = 2">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#e15046; color: #fff;
												</xsl:when>
												<xsl:when test="StatusCode/StatusCode = 1">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#f39655;
												</xsl:when>
												<xsl:otherwise>
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#68a19b; color: #fff;
												</xsl:otherwise>
											</xsl:choose>
										</xsl:attribute>
										<xsl:choose>
											<xsl:when test="Application/WebSite != ''">
												<a>
													<xsl:attribute name="style">
														<xsl:choose>
															<xsl:when test="StatusCode/StatusCode = 4">
																color: #fff;
															</xsl:when>
															<xsl:when test="StatusCode/StatusCode = 3">
																color: #000;
															</xsl:when>
															<xsl:when test="StatusCode/StatusCode = 2">
																color: #fff;
															</xsl:when>
															<xsl:when test="StatusCode/StatusCode = 1">
																color: #000;
															</xsl:when>
															<xsl:otherwise>
																color: #fff;
															</xsl:otherwise>
														</xsl:choose>
													</xsl:attribute>
													<xsl:attribute name="href">
														<xsl:value-of select="Application/WebSite" />
													</xsl:attribute>
													<xsl:value-of select="Application/Name"/>
												</a>
											</xsl:when>
											<xsl:otherwise>
												<xsl:value-of select="Application/Name"/>
											</xsl:otherwise>
										</xsl:choose>
										<br />
										<p style="margin: 0; padding: 0; font-size: 0.8em;">
											<xsl:value-of select="Application/Description" />
										</p>
									</td>
									<td>
										<xsl:attribute name="style">
											<xsl:choose>
												<xsl:when test="StatusCode/StatusCode = 4">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#373534; color: #fff;
												</xsl:when>
												<xsl:when test="StatusCode/StatusCode = 3 and (position() mod 2) != 0">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#b3b3b3;
												</xsl:when>
												<xsl:when test="StatusCode/StatusCode = 3">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#cccccc;
												</xsl:when>
												<xsl:when test="StatusCode/StatusCode = 2">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#e15046; color: #fff;
												</xsl:when>
												<xsl:when test="StatusCode/StatusCode = 1">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#f39655;
												</xsl:when>
												<xsl:otherwise>
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#68a19b; color: #fff;
												</xsl:otherwise>
											</xsl:choose>
										</xsl:attribute>
										<xsl:choose>
											<xsl:when test="Category/WebSite != ''">
												<a>
													<xsl:attribute name="style">
														<xsl:choose>
															<xsl:when test="StatusCode/StatusCode >= 2">
																color: #fff;
															</xsl:when>
															<xsl:when test="StatusCode/StatusCode = 1">
																color: #000;
															</xsl:when>
															<xsl:otherwise>
																color: #fff;
															</xsl:otherwise>
														</xsl:choose>
													</xsl:attribute>
													<xsl:attribute name="href">
														<xsl:value-of select="Category/WebSite" />
													</xsl:attribute>
													<xsl:value-of select="Category/Name"/>
												</a>
											</xsl:when>
											<xsl:otherwise>
												<xsl:value-of select="Category/Name"/>
											</xsl:otherwise>
										</xsl:choose>
										<br />
										<p style="margin: 0; padding: 0; font-size: 0.8em;">
											<xsl:value-of select="Category/Description" />
										</p>
									</td>
									<td>
										<xsl:attribute name="style">
											<xsl:choose>
												<xsl:when test="StatusCode/StatusCode = 4">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#373534; color: #fff;
												</xsl:when>
												<xsl:when test="StatusCode/StatusCode = 3 and (position() mod 2) != 0">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#b3b3b3;
												</xsl:when>
												<xsl:when test="StatusCode/StatusCode = 3">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#cccccc;
												</xsl:when>
												<xsl:when test="StatusCode/StatusCode = 2">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#e15046; color: #fff;
												</xsl:when>
												<xsl:when test="StatusCode/StatusCode = 1">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#f39655;
												</xsl:when>
												<xsl:otherwise>
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#68a19b; color: #fff;
												</xsl:otherwise>
											</xsl:choose>
										</xsl:attribute>
										<xsl:value-of select="LogText"/>
									</td>
									<td>
										<xsl:attribute name="style">
											<xsl:choose>
												<xsl:when test="StatusCode/StatusCode = 4">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#373534; color: #fff;
												</xsl:when>
												<xsl:when test="StatusCode/StatusCode = 3 and (position() mod 2) != 0">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#b3b3b3;
												</xsl:when>
												<xsl:when test="StatusCode/StatusCode = 3">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#cccccc;
												</xsl:when>
												<xsl:when test="StatusCode/StatusCode = 2">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#e15046; color: #fff;
												</xsl:when>
												<xsl:when test="StatusCode/StatusCode = 1">
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#f39655;
												</xsl:when>
												<xsl:otherwise>
													border-top: 1px solid #dee2e6;font-family:Arial,sans-serif; background:#68a19b; color: #fff;
												</xsl:otherwise>
											</xsl:choose>
										</xsl:attribute>
										<xsl:value-of select="StatusCode/Name"/>
									</td>
								</tr>
								<!-- CustomMetaDatas -->
								<xsl:apply-templates select="CustomMetaDatas" />
							</xsl:for-each>
						</tbody>
					</table>
					<xsl:choose>
						<xsl:when test="count(Integrations/Integration) &gt; 0">
							<h4>
								Affected Integrations
							</h4>
							<xsl:for-each select="Integrations/Integration">
								<xsl:sort order="ascending" select="Name"/>
								<xsl:choose>
									<xsl:when test="position() > 1">
										<br />
									</xsl:when>
								</xsl:choose>
								<table class="integrations" style="border-collapse:collapse;border-spacing:0;width:100%;border-style:solid;border-width:1px;border-color:#ccc;">
									<thead>
										<tr>
											<th style="text-align:left; background-color:#000000; font-weight:bold;font-family:Arial,sans-serif;font-size:1.0em;padding:0.62em 0.31em;">
												<a target="_blank" style="color:#FFFFFF;">
													<xsl:attribute name="href">
														<xsl:value-of select="//WebClientUrl" />Repository/Integration/<xsl:value-of select="IntegrationId"/>
													</xsl:attribute>
													<xsl:value-of select="Name" />
												</a>
											</th>
										</tr>
									</thead>
									<tbody>
										<tr>
											<td style="font-family:Arial,sans-serif;">
												<p style="margin: 4px; padding: 0;">
													<span style="font-family:Arial,sans-serif; font-weight: bold;">Description: </span>
													<xsl:value-of select="Description" />
												</p>
												<p style="margin: 4px; padding: 0;">
													<span style="font-family:Arial,sans-serif; font-weight: bold;">Web Site: </span>
													<xsl:choose>
														<xsl:when test="WebSite != ''">
															<a target="_blank" style="color: #e15046;">
																<xsl:attribute name="href">
																	<xsl:value-of select="WebSite"/>
																</xsl:attribute>
																<xsl:value-of select="WebSite" />
															</a>
														</xsl:when>
														<xsl:otherwise>
															<span style="color: #CCCCCC;">
																N/A
															</span>
														</xsl:otherwise>
													</xsl:choose>
												</p>
												<br/>
												<xsl:choose>
													<xsl:when test="CustomFields != ''">
														<table class="integration" style="border-collapse:collapse;border-spacing:0;width:100%;border-style:solid;border-width:1px;border-color:#ccc;">
															<colgroup>
																<col style="width: 30%;" />
																<col style="width: 70%;" />
															</colgroup>
															<thead>
																<tr>
																	<th style="text-align: left;font-family:Arial,sans-serif;font-size:1.0em;padding:0.62em 0.31em;overflow:hidden;background-color:#edece9;">Custom Field</th>
																	<th style="text-align: left;font-family:Arial,sans-serif;font-size:1.0em;padding:0.62em 0.31em;overflow:hidden;background-color:#edece9;">Value(s)</th>
																</tr>
															</thead>
															<tbody>
																<xsl:for-each select="CustomFields/CustomField">
																	<xsl:sort order="ascending" select="Name"/>
																	<tr>
																		<td>
																			<xsl:choose>
																				<xsl:when test="(position() mod 2) != 0">
																					<xsl:attribute name="style">
																						font-family:Arial,sans-serif;font-weight: bold; width: 30%; background-color: #fafafa;
																					</xsl:attribute>
																				</xsl:when>
																				<xsl:otherwise>
																					<xsl:attribute name="style">
																						font-family:Arial,sans-serif;font-weight: bold; width: 30%; background-color: #eaeaea;
																					</xsl:attribute>
																				</xsl:otherwise>
																			</xsl:choose>
																			<xsl:attribute name="colrow">
																				<xsl:value-of select="count(CustomValues/CustomValue)"/>
																			</xsl:attribute>
																			<xsl:value-of select="Name"/>
																		</td>
																		<td style="font-family:Arial,sans-serif;width:70%;">
																			<xsl:choose>
																				<xsl:when test="(position() mod 2) != 0">
																					<xsl:attribute name="style">
																						width: 70%; background-color: #fafafa;
																					</xsl:attribute>
																				</xsl:when>
																				<xsl:otherwise>
																					<xsl:attribute name="style">
																						width: 70%; background-color: #eaeaea;
																					</xsl:attribute>
																				</xsl:otherwise>
																			</xsl:choose>
																			<xsl:for-each select="CustomValues/CustomValue">
																				<xsl:sort order="ascending" select="Value"/>
																				<div>
																					<xsl:choose>
																						<xsl:when test="position() > 1">
																							<xsl:attribute name="style">
																								font-family:Arial,sans-serif;padding-top:0.62em; padding-bottom:0.62em; border-top: 0.0626em solid #ccc;
																							</xsl:attribute>
																						</xsl:when>
																						<xsl:otherwise>
																							<xsl:attribute name="style">
																								font-family:Arial,sans-serif;padding-top:0.62em; padding-bottom:0.62em;
																							</xsl:attribute>
																						</xsl:otherwise>
																					</xsl:choose>
																					<xsl:choose>
																						<xsl:when test="ValueType/Name = 'Text'">
																							<xsl:choose>
																								<xsl:when test="WebSite != ''">
																									<a target="_blank" style="color: #e15046;">
																										<xsl:attribute name="href">
																											<xsl:value-of select="WebSite"/>
																										</xsl:attribute>
																										<xsl:value-of select="Value" />
																									</a>
																								</xsl:when>
																								<xsl:otherwise>
																									<xsl:value-of select="Value"/>
																								</xsl:otherwise>
																							</xsl:choose>
																						</xsl:when>
																						<xsl:when test="ValueType/Name = 'File'">
																							<a target="_blank" style="color: #e15046;">
																								<xsl:attribute name="href">
																									<xsl:value-of select="//WebClientUrl" />CustomValues/File/<xsl:value-of select="CustomValueId"/>
																								</xsl:attribute>
																								<xsl:value-of select="Value" />
																							</a>
																						</xsl:when>
																						<xsl:otherwise>
																							<xsl:choose>
																								<xsl:when test="WebSite != ''">
																									<a target="_blank" style="color: #e15046;">
																										<xsl:attribute name="href">
																											<xsl:value-of select="WebSite"/>
																										</xsl:attribute>
																										<xsl:value-of select="Value" />
																									</a>
																								</xsl:when>
																								<xsl:otherwise>
																									<xsl:value-of select="Value"/>
																								</xsl:otherwise>
																							</xsl:choose>
																						</xsl:otherwise>
																					</xsl:choose>
																					<br/>
																					<p style="margin: 0; padding: 0; color: rgba(0,0,0,.5); font-size: 80%; font-weight: 400;">
																						Description: <xsl:value-of select="Description" />
																					</p>
																				</div>
																			</xsl:for-each>
																		</td>
																	</tr>
																</xsl:for-each>
															</tbody>
														</table>
													</xsl:when>
												</xsl:choose>
											</td>
										</tr>
										<!-- CustomMetaDatas -->
										<xsl:apply-templates select="CustomMetaDatas" />
									</tbody>
								</table>
							</xsl:for-each>
						</xsl:when>
					</xsl:choose>
					<hr style="margin: 1.8em 0;" />
				</xsl:for-each>
				<p style="color: rgba(0,0,0,.5); font-size: 80%; font-weight: 400;">
					Alarm distribution time <xsl:value-of select="XsltExtensionHelper:datenow(Created)" /> using the email with options alarm plugin. Environment: '<xsl:value-of select="Environment" />', Customer: '<xsl:value-of select="Customer" />', Version: <xsl:value-of select="Version" />
				</p>
			</body>
		</html>
	</xsl:template>
</xsl:stylesheet>