<?xml version="1.0" encoding="UTF-8"?>
<!--Designed and generated by Altova StyleVision Enterprise Edition 2018 rel. 2 sp1 - see http://www.altova.com/stylevision for more information.-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:altova="http://www.altova.com" xmlns:altova-xfi="http://www.altova.com/xslt-extensions/xbrl" xmlns:altovaext="http://www.altova.com/xslt-extensions" xmlns:array="http://www.w3.org/2005/xpath-functions/array" xmlns:clitype="clitype" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:iso4217="http://www.xbrl.org/2003/iso4217" xmlns:java="java" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:map="http://www.w3.org/2005/xpath-functions/map" xmlns:math="http://www.w3.org/2005/xpath-functions/math" xmlns:sps="http://www.altova.com/StyleVision/user-xpath-functions" xmlns:xbrldi="http://xbrl.org/2006/xbrldi" xmlns:xbrli="http://www.xbrl.org/2003/instance" xmlns:xff="http://www.xbrl.org/2010/function/formula" xmlns:xfi="http://www.xbrl.org/2008/function/instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" exclude-result-prefixes="altova altova-xfi altovaext array clitype fn iso4217 java link map math sps xbrldi xbrli xff xfi xlink xs xsi">
	<xsl:output version="4.0" method="html" indent="no" encoding="UTF-8" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
	<xsl:param name="SV_OutputFormat" select="'HTML'"/>
	<xsl:variable name="XML1" select="/"/>
	<xsl:variable name="altova:nPxPerIn" select="96"/>
	<xsl:template match="/">
		<html>
			<head>
				<title/>
				<meta name="generator" content="Altova StyleVision Enterprise Edition 2018 rel. 2 sp1 (http://www.altova.com)"/>
				<meta http-equiv="X-UA-Compatible" content="IE=5"/>
				<xsl:comment>[if IE]&gt;&lt;STYLE type=&quot;text/css&quot;&gt;.altova-rotate-left-textbox{filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3)} .altova-rotate-right-textbox{filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1)} &lt;/STYLE&gt;&lt;![endif]</xsl:comment>
				<xsl:comment>[if !IE]&gt;&lt;!</xsl:comment>
				<style type="text/css">.altova-rotate-left-textbox{-webkit-transform: rotate(-90deg) translate(-100%, 0%); -webkit-transform-origin: 0% 0%;-moz-transform: rotate(-90deg) translate(-100%, 0%); -moz-transform-origin: 0% 0%;-ms-transform: rotate(-90deg) translate(-100%, 0%); -ms-transform-origin: 0% 0%;}.altova-rotate-right-textbox{-webkit-transform: rotate(90deg) translate(0%, -100%); -webkit-transform-origin: 0% 0%;-moz-transform: rotate(90deg) translate(0%, -100%); -moz-transform-origin: 0% 0%;-ms-transform: rotate(90deg) translate(0%, -100%); -ms-transform-origin: 0% 0%;}</style>
				<xsl:comment>&lt;![endif]</xsl:comment>
				<style type="text/css">@page { margin-left:0.6in; margin-right:0.6in; margin-top:0.79in; margin-bottom:0.79in } @media print { br.altova-page-break { page-break-before: always; } div.altova-page-break { page-break-before: always; } }</style>
			</head>
			<body>
				<xsl:for-each select="$XML1">
					<xsl:for-each select="MICEX_DOC">
						<xsl:if test="string-length(DOC_REQUISITES/@DOC_NO) &gt; 0">
							<div>
								<span style="font-family:Arial; font-size:10; font-style:italic; ">
									<xsl:text>Исх. №: </xsl:text>
								</span>
								<xsl:for-each select="DOC_REQUISITES">
									<xsl:for-each select="@DOC_NO">
										<span style="font-family:Arial; font-size:10; font-style:italic; font-weight:bold; ">
											<xsl:value-of select="string(.)"/>
										</span>
									</xsl:for-each>
									<span style="font-family:Arial; font-size:10; font-style:italic; ">
										<xsl:text> от </xsl:text>
									</span>
									<xsl:for-each select="@DOC_DATE">
										<span style="font-family:Arial; font-size:10; font-style:italic; font-weight:bold; ">
											<xsl:variable name="altova:seqContentStrings_0">
												<xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), '00')"/>
												<xsl:text>.</xsl:text>
												<xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), '00')"/>
												<xsl:text>.</xsl:text>
												<xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), '0000')"/>
											</xsl:variable>
											<xsl:variable name="altova:sContent_0" select="string($altova:seqContentStrings_0)"/>
											<xsl:value-of select="$altova:sContent_0"/>
										</span>
									</xsl:for-each>
								</xsl:for-each>
							</div>
						</xsl:if>
						<table style="border:0; border-collapse:collapse; " border="1" width="100%">
							<xsl:variable name="altova:CurrContextGrid_1" select="."/>
							<tbody>
								<tr style="height:19px; ">
									<td style="border:0; font:Arial; font-size:12; font-weight:bold; ">
										<span style="font-family:Arial; ">
											<xsl:text>ПАО Московская Биржа</xsl:text>
										</span>
									</td>
									<td style="border:0; "/>
									<td style="border:0; "/>
									<td style="border:0; "/>
									<td style="border:0; "/>
									<td style="border:0; "/>
									<td style="border:0; "/>
									<td style="border:0; "/>
									<td style="border:0; font:Arial; font-size:12; font-weight:bold; text-align:right; ">
										<span style="font-family:Arial; font-size:12; ">
											<xsl:text>CUX131</xsl:text>
										</span>
									</td>
								</tr>
							</tbody>
						</table>
						<xsl:for-each select="CUX131">
							<div style="font:Arial; font-family:Arial; font-size:14; font-weight:bold; text-align:center; ">
								<span style="font-size:.; ">
									<xsl:text>Ежемесячный отчет об исполнении обязательств Маркет-мейкера</xsl:text>
								</span>
							</div>
							<div style="font-family:Arial; font-size:12; font-weight:bold; text-align:center; ">
								<span>
									<xsl:text>Дата формирования отчета:&#160; </xsl:text>
								</span>
								<xsl:for-each select="@ReportDate">
									<span style="font:Arial; font-family:Arial; font-size:12; ">
										<xsl:variable name="altova:seqContentStrings_2">
											<xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), '00')"/>
											<xsl:text>.</xsl:text>
											<xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), '00')"/>
											<xsl:text>.</xsl:text>
											<xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), '0000')"/>
										</xsl:variable>
										<xsl:variable name="altova:sContent_2" select="string($altova:seqContentStrings_2)"/>
										<xsl:value-of select="$altova:sContent_2"/>
									</span>
								</xsl:for-each>
							</div>
							<br/>
							<span style="font-family:Arial; font-size:12; ">
								<xsl:text>Администратор: </xsl:text>
							</span>
							<span style="font-family:Arial; font-size:12; font-weight:bold; ">
								<xsl:text>ПАО Московская Биржа</xsl:text>
							</span>
							<br/>
							<span style="font-family:Arial; font-size:12; ">
								<xsl:text>Участник торгов:</xsl:text>
							</span>
							<span>
								<xsl:text>&#160;</xsl:text>
							</span>
							<xsl:for-each select="@ExtSettleCode">
								<span style="font-family:Arial; font-size:12; font-weight:bold; ">
									<xsl:value-of select="string(.)"/>
								</span>
							</xsl:for-each>
							<span style="font-weight:bold; ">
								<xsl:text>, </xsl:text>
							</span>
							<xsl:for-each select="@FirmId">
								<span style="font-family:Arial; font-size:12; font-weight:bold; ">
									<xsl:value-of select="string(.)"/>
								</span>
							</xsl:for-each>
							<span style="font-weight:bold; ">
								<xsl:text>, </xsl:text>
							</span>
							<xsl:for-each select="@FirmName">
								<span style="font-family:Arial; font-size:12; font-weight:bold; ">
									<xsl:value-of select="string(.)"/>
								</span>
							</xsl:for-each>
							<br/>
							<br/>
							<span style="font-family:Arial; font-size:12; ">
								<xsl:text>Период с </xsl:text>
							</span>
							<xsl:for-each select="@BeginDate">
								<span style="font-family:Arial; font-size:12; font-weight:bold; ">
									<xsl:variable name="altova:seqContentStrings_3">
										<xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), '00')"/>
										<xsl:text>.</xsl:text>
										<xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), '00')"/>
										<xsl:text>.</xsl:text>
										<xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), '0000')"/>
									</xsl:variable>
									<xsl:variable name="altova:sContent_3" select="string($altova:seqContentStrings_3)"/>
									<xsl:value-of select="$altova:sContent_3"/>
								</span>
							</xsl:for-each>
							<span style="font-family:Arial; font-size:12; ">
								<xsl:text> по</xsl:text>
							</span>
							<span>
								<xsl:text>&#160;</xsl:text>
							</span>
							<xsl:for-each select="@EndDate">
								<span style="font-family:Arial; font-size:12; font-weight:bold; ">
									<xsl:variable name="altova:seqContentStrings_4">
										<xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), '00')"/>
										<xsl:text>.</xsl:text>
										<xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), '00')"/>
										<xsl:text>.</xsl:text>
										<xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), '0000')"/>
									</xsl:variable>
									<xsl:variable name="altova:sContent_4" select="string($altova:seqContentStrings_4)"/>
									<xsl:value-of select="$altova:sContent_4"/>
								</span>
							</xsl:for-each>
							<br/>
							<br/>
							<xsl:for-each select="MMTYPE">
								<span style="font-family:Arial; font-size:12; ">
									<xsl:text>Идентификатор маркет-мейкерской схемы:&#160; </xsl:text>
								</span>
								<xsl:for-each select="@SchemaId">
									<span style="font-family:Arial; font-size:12; font-weight:bold; ">
										<xsl:value-of select="string(.)"/>
									</span>
								</xsl:for-each>
								<br/>
								<xsl:for-each select="TRDACC">
									<xsl:choose>
										<xsl:when test="not(@FirmAcc)"/>
										<xsl:otherwise>
											<span style="font-family:Arial; font-size:12; ">
												<xsl:text>Торгово-клиринговый счет: </xsl:text>
											</span>
											<xsl:for-each select="@FirmAcc">
												<span style="font-family:Arial; font-size:12; font-weight:bold; ">
													<xsl:value-of select="string(.)"/>
												</span>
											</xsl:for-each>
											<br/>
										</xsl:otherwise>
									</xsl:choose>
									<xsl:for-each select="CURRPAIR">
										<br/>
										<table style="border:0; border-collapse:collapse; " border="1" width="100%">
											<xsl:variable name="altova:CurrContextGrid_5" select="."/>
											<tbody>
												<tr>
													<td style="background-color:#e1e1e1; border:0; text-align:right; ">
														<span style="font-family:Arial; font-size:12; ">
															<xsl:text>Валюта лота: </xsl:text>
														</span>
													</td>
													<td style="background-color:#e1e1e1; border:0; text-align:left; ">
														<xsl:for-each select="@CurrencyName">
															<span style="font-family:Arial; font-size:12; font-weight:bold; ">
																<xsl:value-of select="string(.)"/>
															</span>
														</xsl:for-each>
													</td>
													<td style="background-color:#e1e1e1; border:0; text-align:right; ">
														<span style="font-family:Arial; font-size:12; ">
															<xsl:text>Сопряженная валюта: </xsl:text>
														</span>
													</td>
													<td style="background-color:#e1e1e1; border:0; text-align:left; ">
														<xsl:for-each select="@CoCurrencyName">
															<span style="font-family:Arial; font-size:12; font-weight:bold; ">
																<xsl:value-of select="string(.)"/>
															</span>
														</xsl:for-each>
													</td>
													<td style="background-color:#e1e1e1; border:0; "/>
													<td style="background-color:#e1e1e1; border:0; "/>
													<td style="background-color:#e1e1e1; border:0; "/>
													<td style="background-color:#e1e1e1; border:0; "/>
													<td style="background-color:#e1e1e1; border:0; "/>
												</tr>
											</tbody>
										</table>
										<br/>
										<span style="font-family:Arial; font-size:12; ">
											<xsl:text>Количество рабочих дней: </xsl:text>
										</span>
										<xsl:for-each select="@TradeDaysCount">
											<span style="font-family:Arial; font-size:12; font-weight:bold; ">
												<xsl:value-of select="string(.)"/>
											</span>
										</xsl:for-each>
										<br/>
										<br/>
										<table style="border-collapse:collapse; font-family:Arial; font-size:12; " border="1">
											<xsl:variable name="altova:CurrContextGrid_6" select="."/>
											<thead>
												<tr>
													<th style="font-family:Arial; font-size:12; padding-left:5; padding-right:5; ">
														<span>
															<xsl:text>Дата</xsl:text>
														</span>
													</th>
													<th style="font-family:Arial; font-size:12; padding-left:5; padding-right:5; ">
														<span>
															<xsl:text>Период</xsl:text>
														</span>
													</th>
													<th style="font-family:Arial; font-size:12; margin:0; padding:0; vertical-align:bottom; ">
														<span>
															<xsl:text>Период времени</xsl:text>
														</span>
														<br/>
														<span>
															<xsl:text>в ходе торгов, </xsl:text>
														</span>
														<br/>
														<span>
															<xsl:text>в течение которого</xsl:text>
														</span>
														<br/>
														<span>
															<xsl:text>выполнялись </xsl:text>
														</span>
														<br/>
														<span>
															<xsl:text>обязательства</xsl:text>
														</span>
														<br/>
													</th>
													<th style="font-family:Arial; font-size:12; vertical-align:middle; ">
														<span>
															<xsl:text>Итого за </xsl:text>
														</span>
														<br/>
														<span>
															<xsl:text>день</xsl:text>
														</span>
													</th>
												</tr>
											</thead>
											<tbody>
												<xsl:for-each select="DATE">
													<tr>
														<td style="text-align:center; ">
															<xsl:for-each select="@TradeDate">
																<span>
																	<xsl:variable name="altova:seqContentStrings_7">
																		<xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), '00')"/>
																		<xsl:text>.</xsl:text>
																		<xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), '00')"/>
																		<xsl:text>.</xsl:text>
																		<xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), '0000')"/>
																	</xsl:variable>
																	<xsl:variable name="altova:sContent_7" select="string($altova:seqContentStrings_7)"/>
																	<xsl:value-of select="$altova:sContent_7"/>
																</span>
															</xsl:for-each>
														</td>
														<td/>
														<td/>
														<td/>
													</tr>
													<xsl:for-each select="TRADE_PERIOD">
														<tr>
															<td style="font-family:Arial; font-size:12; padding-left:5; padding-right:5; text-align:center; vertical-align:middle; "/>
															<td style="font-family:Arial; font-size:12; padding-left:5; padding-right:5; text-align:left; ">
																<xsl:for-each select="@TradePeriod">
																	<span>
																		<xsl:value-of select="string(.)"/>
																	</span>
																</xsl:for-each>
															</td>
															<td style="font-family:Arial; font-size:12; margin:0; padding:0; text-align:right; ">
																<span>
																	<xsl:text>&#160;</xsl:text>
																</span>
																<xsl:for-each select="@KeepPercent">
																	<span>
																		<xsl:variable name="altova:seqContentStrings_8">
																			<xsl:value-of select="format-number(number(string(.)), '###,##0.00')"/>
																		</xsl:variable>
																		<xsl:variable name="altova:sContent_8" select="string($altova:seqContentStrings_8)"/>
																		<xsl:value-of select="$altova:sContent_8"/>
																	</span>
																</xsl:for-each>
																<span>
																	<xsl:text>%</xsl:text>
																</span>
															</td>
															<td style="font-family:Arial; font-size:12; text-align:center; vertical-align:middle; ">
																<xsl:choose>
																	<xsl:when test="@TotalResult=&quot;Y&quot;">
																		<span>
																			<xsl:text>Исполн.</xsl:text>
																		</span>
																	</xsl:when>
																	<xsl:otherwise>
																		<span>
																			<xsl:text>Не исполн.</xsl:text>
																		</span>
																	</xsl:otherwise>
																</xsl:choose>
															</td>
														</tr>
													</xsl:for-each>
													<tr>
														<td style="font-family:Arial; font-size:12; padding-left:5; padding-right:5; text-align:right; vertical-align:middle; ">
															<span>
																<xsl:text>Итого</xsl:text>
															</span>
														</td>
														<td style="font-family:Arial; font-size:12; padding-left:5; padding-right:5; text-align:center; "/>
														<td style="font-family:Arial; font-size:12; margin:0; padding:0; "/>
														<td style="font-family:Arial; font-size:12; text-align:center; vertical-align:middle; ">
															<xsl:choose>
																<xsl:when test="@DayTotResult=&quot;Y&quot;">
																	<span>
																		<xsl:text>Исполн.</xsl:text>
																	</span>
																</xsl:when>
																<xsl:otherwise>
																	<span>
																		<xsl:text>Не исполн.</xsl:text>
																	</span>
																</xsl:otherwise>
															</xsl:choose>
														</td>
													</tr>
												</xsl:for-each>
											</tbody>
										</table>
										<br/>
										<span style="font-family:Arial; font-size:12; font-weight:bold; ">
											<xsl:text>ИТОГО за период:&#160;&#160; </xsl:text>
										</span>
										<br/>
										<span style="font-family:Arial; font-size:12; font-weight:bold; ">
											<xsl:text>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Выполнено,&#160; дней: </xsl:text>
										</span>
										<xsl:for-each select="@GoodDaysCount">
											<span style="font-family:Arial; font-size:12; font-weight:bold; ">
												<xsl:value-of select="string(.)"/>
											</span>
										</xsl:for-each>
										<br/>
										<span>
											<xsl:text>&#160;&#160;&#160;&#160;&#160;&#160; </xsl:text>
										</span>
										<span style="font-family:Arial; font-size:12; font-weight:bold; ">
											<xsl:text>Не выполнено,&#160; дней: </xsl:text>
										</span>
										<xsl:for-each select="@BadDaysCount">
											<span style="font-family:Arial; font-size:12; font-weight:bold; ">
												<xsl:value-of select="string(.)"/>
											</span>
										</xsl:for-each>
										<br/>
										<span style="font-family:Arial; font-size:12; font-weight:bold; ">
											<xsl:text>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Выполнено,&#160; дней в %: </xsl:text>
										</span>
										<xsl:for-each select="@GoodDaysPercent">
											<span style="font-family:Arial; font-size:12; font-weight:bold; ">
												<xsl:value-of select="string(.)"/>
											</span>
										</xsl:for-each>
										<span>
											<xsl:text>&#160;</xsl:text>
										</span>
										<br/>
										<br/>
										<span style="font-family:Arial; font-size:12; ">
											<xsl:text>Размер вознаграждения по договору за период:</xsl:text>
										</span>
										<span>
											<xsl:text>&#160;</xsl:text>
										</span>
										<xsl:for-each select="@SumFee">
											<span style="font-family:Arial; font-size:12; font-weight:bold; ">
												<xsl:variable name="altova:seqContentStrings_9">
													<xsl:value-of select="format-number(number(string(.)), '###,##0.00')"/>
												</xsl:variable>
												<xsl:variable name="altova:sContent_9" select="string($altova:seqContentStrings_9)"/>
												<xsl:value-of select="$altova:sContent_9"/>
											</span>
										</xsl:for-each>
										<span style="font-family:Arial; font-size:12; ">
											<xsl:text>, руб</xsl:text>
										</span>
										<br/>
										<br/>
									</xsl:for-each>
								</xsl:for-each>
							</xsl:for-each>
							<br/>
							<br/>
						</xsl:for-each>
						<br/>
						<br/>
						<span>
							<xsl:text>_____________________ /</xsl:text>
						</span>
						<xsl:for-each select="DOC_REQUISITES">
							<xsl:choose>
								<xsl:when test="string-length( @SIGNAUTHOR ) &gt; 0">
									<xsl:for-each select="@SIGNAUTHOR">
										<span style="font-family:Arial; font-size:12; ">
											<xsl:value-of select="string(.)"/>
										</span>
									</xsl:for-each>
								</xsl:when>
								<xsl:otherwise>
									<span>
										<xsl:text>____________________</xsl:text>
									</span>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:for-each>
						<span>
							<xsl:text>/</xsl:text>
						</span>
					</xsl:for-each>
				</xsl:for-each>
			</body>
		</html>
	</xsl:template>
	<xsl:template name="altova:xml-table-generate-table-matrix-nextrow-rowspan">
		<xsl:param name="pos"/>
		<xsl:param name="endpos"/>
		<xsl:param name="rowinfo"/>
		<xsl:variable name="rowspan">
			<xsl:call-template name="altova:vector-get-value">
				<xsl:with-param name="index" select="($pos - 1) * 2 + 2"/>
				<xsl:with-param name="vector" select="$rowinfo"/>
				<xsl:with-param name="separator" select="';'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:choose>
			<xsl:when test="number($rowspan) > 0">
				<xsl:if test="$endpos = -1 or $pos &lt; $endpos">
					<xsl:variable name="colspan">
						<xsl:call-template name="altova:vector-get-value">
							<xsl:with-param name="index" select="($pos - 1) * 2 + 1"/>
							<xsl:with-param name="vector" select="$rowinfo"/>
							<xsl:with-param name="separator" select="';'"/>
						</xsl:call-template>
					</xsl:variable>
					<xsl:value-of select="concat($colspan,';',number($rowspan) - 1,';')"/>
					<xsl:call-template name="altova:xml-table-generate-table-matrix-nextrow-rowspan">
						<xsl:with-param name="pos" select="$pos + 1"/>
						<xsl:with-param name="endpos" select="$endpos"/>
						<xsl:with-param name="rowinfo" select="$rowinfo"/>
					</xsl:call-template>
				</xsl:if>
			</xsl:when>
			<xsl:otherwise>
				<xsl:if test="$endpos != -1 and $pos &lt; $endpos">
					<xsl:value-of select="'0;0;'"/>
					<xsl:call-template name="altova:xml-table-generate-table-matrix-nextrow-rowspan">
						<xsl:with-param name="pos" select="$pos + 1"/>
						<xsl:with-param name="endpos" select="$endpos"/>
						<xsl:with-param name="rowinfo" select="$rowinfo"/>
					</xsl:call-template>
				</xsl:if>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:xml-table-fill-table-matrix-with-dummy-cells">
		<xsl:param name="pos"/>
		<xsl:param name="endpos"/>
		<xsl:param name="rowinfo"/>
		<xsl:variable name="rowspan">
			<xsl:call-template name="altova:vector-get-value">
				<xsl:with-param name="index" select="($pos - 1) * 2 + 2"/>
				<xsl:with-param name="vector" select="$rowinfo"/>
				<xsl:with-param name="separator" select="';'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:choose>
			<xsl:when test="number($rowspan) > 0">
				<xsl:if test="$endpos = -1 or $pos &lt; $endpos">
					<xsl:variable name="colspan">
						<xsl:call-template name="altova:vector-get-value">
							<xsl:with-param name="index" select="($pos - 1) * 2 + 1"/>
							<xsl:with-param name="vector" select="$rowinfo"/>
							<xsl:with-param name="separator" select="';'"/>
						</xsl:call-template>
					</xsl:variable>
					<xsl:choose>
						<xsl:when test="number($colspan) > 0">5</xsl:when>
						<xsl:otherwise>3</xsl:otherwise>
					</xsl:choose>
					<xsl:call-template name="altova:xml-table-fill-table-matrix-with-dummy-cells">
						<xsl:with-param name="pos" select="$pos + 1"/>
						<xsl:with-param name="endpos" select="$endpos"/>
						<xsl:with-param name="rowinfo" select="$rowinfo"/>
					</xsl:call-template>
				</xsl:if>
			</xsl:when>
			<xsl:otherwise>
				<xsl:if test="$endpos != -1 and $pos &lt; $endpos">
					<xsl:value-of select="'2'"/>
					<xsl:call-template name="altova:xml-table-fill-table-matrix-with-dummy-cells">
						<xsl:with-param name="pos" select="$pos + 1"/>
						<xsl:with-param name="endpos" select="$endpos"/>
						<xsl:with-param name="rowinfo" select="$rowinfo"/>
					</xsl:call-template>
				</xsl:if>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:xml-table-table-matrix-get-master-cell-colnum">
		<xsl:param name="colnum"/>
		<xsl:param name="rownum"/>
		<xsl:param name="col-count"/>
		<xsl:param name="table-matrix"/>
		<xsl:variable name="rowstart" select="$col-count * ($rownum - 1)"/>
		<xsl:variable name="entry-type" select="substring($table-matrix,$rowstart + $colnum,1)"/>
		<xsl:choose>
			<xsl:when test="$entry-type='4' or $entry-type='5'">
				<xsl:call-template name="altova:xml-table-table-matrix-get-master-cell-colnum">
					<xsl:with-param name="colnum" select="$colnum - 1"/>
					<xsl:with-param name="rownum" select="$rownum"/>
					<xsl:with-param name="col-count" select="$col-count"/>
					<xsl:with-param name="table-matrix" select="$table-matrix"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$colnum"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:xml-table-table-matrix-get-master-cell-rownum">
		<xsl:param name="colnum"/>
		<xsl:param name="rownum"/>
		<xsl:param name="col-count"/>
		<xsl:param name="table-matrix"/>
		<xsl:variable name="rowstart" select="$col-count * ($rownum - 1)"/>
		<xsl:variable name="entry-type" select="substring($table-matrix,$rowstart + $colnum,1)"/>
		<xsl:choose>
			<xsl:when test="$entry-type='3'">
				<xsl:call-template name="altova:xml-table-table-matrix-get-master-cell-rownum">
					<xsl:with-param name="colnum" select="$colnum"/>
					<xsl:with-param name="rownum" select="$rownum - 1"/>
					<xsl:with-param name="col-count" select="$col-count"/>
					<xsl:with-param name="table-matrix" select="$table-matrix"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$rownum"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:xml-table-table-matrix-calc-spanned-cols">
		<xsl:param name="colnum"/>
		<xsl:param name="rownum"/>
		<xsl:param name="col-count"/>
		<xsl:param name="table-matrix"/>
		<xsl:call-template name="altova:xml-table-table-matrix-calc-spanned-cols-helper">
			<xsl:with-param name="spanned-cols" select="0"/>
			<xsl:with-param name="colnum" select="$colnum + 1"/>
			<xsl:with-param name="rownum" select="$rownum"/>
			<xsl:with-param name="col-count" select="$col-count"/>
			<xsl:with-param name="table-matrix" select="$table-matrix"/>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="altova:xml-table-table-matrix-calc-spanned-cols-helper">
		<xsl:param name="spanned-cols"/>
		<xsl:param name="colnum"/>
		<xsl:param name="rownum"/>
		<xsl:param name="col-count"/>
		<xsl:param name="table-matrix"/>
		<xsl:choose>
			<xsl:when test="$colnum &lt;= $col-count">
				<xsl:variable name="rowstart" select="$col-count * ($rownum - 1)"/>
				<xsl:variable name="entry-type" select="substring($table-matrix,$rowstart + $colnum,1)"/>
				<xsl:choose>
					<xsl:when test="$entry-type='4' or $entry-type='5'">
						<xsl:call-template name="altova:xml-table-table-matrix-calc-spanned-cols-helper">
							<xsl:with-param name="spanned-cols" select="$spanned-cols + 1"/>
							<xsl:with-param name="colnum" select="$colnum + 1"/>
							<xsl:with-param name="rownum" select="$rownum"/>
							<xsl:with-param name="col-count" select="$col-count"/>
							<xsl:with-param name="table-matrix" select="$table-matrix"/>
						</xsl:call-template>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="$spanned-cols"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$spanned-cols"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:xml-table-table-matrix-calc-spanned-rows">
		<xsl:param name="colnum"/>
		<xsl:param name="rownum"/>
		<xsl:param name="col-count"/>
		<xsl:param name="row-count"/>
		<xsl:param name="table-matrix"/>
		<xsl:call-template name="altova:xml-table-table-matrix-calc-spanned-rows-helper">
			<xsl:with-param name="spanned-rows" select="0"/>
			<xsl:with-param name="colnum" select="$colnum"/>
			<xsl:with-param name="rownum" select="$rownum + 1"/>
			<xsl:with-param name="col-count" select="$col-count"/>
			<xsl:with-param name="row-count" select="$row-count"/>
			<xsl:with-param name="table-matrix" select="$table-matrix"/>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="altova:xml-table-table-matrix-calc-spanned-rows-helper">
		<xsl:param name="spanned-rows"/>
		<xsl:param name="colnum"/>
		<xsl:param name="rownum"/>
		<xsl:param name="col-count"/>
		<xsl:param name="row-count"/>
		<xsl:param name="table-matrix"/>
		<xsl:choose>
			<xsl:when test="$rownum &lt;= $row-count">
				<xsl:variable name="rowstart" select="$col-count * ($rownum - 1)"/>
				<xsl:variable name="entry-type" select="substring($table-matrix,$rowstart + $colnum,1)"/>
				<xsl:choose>
					<xsl:when test="$entry-type='3' or $entry-type='5'">
						<xsl:call-template name="altova:xml-table-table-matrix-calc-spanned-rows-helper">
							<xsl:with-param name="spanned-rows" select="$spanned-rows + 1"/>
							<xsl:with-param name="colnum" select="$colnum"/>
							<xsl:with-param name="rownum" select="$rownum + 1"/>
							<xsl:with-param name="col-count" select="$col-count"/>
							<xsl:with-param name="row-count" select="$row-count"/>
							<xsl:with-param name="table-matrix" select="$table-matrix"/>
						</xsl:call-template>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="$spanned-rows"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$spanned-rows"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:vector-count">
		<xsl:param name="vector"/>
		<xsl:param name="separator"/>
		<xsl:call-template name="altova:vector-count-helper">
			<xsl:with-param name="vector" select="$vector"/>
			<xsl:with-param name="separator" select="$separator"/>
			<xsl:with-param name="count" select="0"/>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="altova:vector-count-helper">
		<xsl:param name="vector"/>
		<xsl:param name="separator"/>
		<xsl:param name="count"/>
		<xsl:choose>
			<xsl:when test="not($vector)">
				<xsl:value-of select="$count"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="altova:vector-count-helper">
					<xsl:with-param name="vector" select="substring-after($vector,$separator)"/>
					<xsl:with-param name="separator" select="$separator"/>
					<xsl:with-param name="count" select="$count + 1"/>
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:vector-count-value">
		<xsl:param name="value"/>
		<xsl:param name="vector"/>
		<xsl:param name="separator"/>
		<xsl:call-template name="altova:vector-count-value-helper">
			<xsl:with-param name="value" select="$value"/>
			<xsl:with-param name="vector" select="$vector"/>
			<xsl:with-param name="separator" select="$separator"/>
			<xsl:with-param name="count" select="0"/>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="altova:vector-count-value-helper">
		<xsl:param name="value"/>
		<xsl:param name="vector"/>
		<xsl:param name="separator"/>
		<xsl:param name="count"/>
		<xsl:choose>
			<xsl:when test="string($vector)">
				<xsl:variable name="current-value">
					<xsl:choose>
						<xsl:when test="contains($vector,$separator)">
							<xsl:value-of select="substring-before($vector,$separator)"/>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="$vector"/>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:variable>
				<xsl:variable name="new-count">
					<xsl:choose>
						<xsl:when test="$value=string($current-value)">
							<xsl:value-of select="$count + 1"/>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="$count"/>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:variable>
				<xsl:call-template name="altova:vector-count-value-helper">
					<xsl:with-param name="value" select="$value"/>
					<xsl:with-param name="vector" select="substring-after($vector,$separator)"/>
					<xsl:with-param name="separator" select="$separator"/>
					<xsl:with-param name="count" select="number($new-count)"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$count"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:vector-multiply-values">
		<xsl:param name="multiplier"/>
		<xsl:param name="vector"/>
		<xsl:param name="separator"/>
		<xsl:if test="string($vector)">
			<xsl:variable name="current-value">
				<xsl:choose>
					<xsl:when test="contains($vector,$separator)">
						<xsl:value-of select="substring-before($vector,$separator)"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="$vector"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:variable>
			<xsl:if test="string($current-value)">
				<xsl:value-of select="number($current-value) * $multiplier"/>
				<xsl:value-of select="$separator"/>
			</xsl:if>
			<xsl:call-template name="altova:vector-multiply-values">
				<xsl:with-param name="multiplier" select="$multiplier"/>
				<xsl:with-param name="vector" select="substring-after($vector,$separator)"/>
				<xsl:with-param name="separator" select="$separator"/>
			</xsl:call-template>
		</xsl:if>
	</xsl:template>
	<xsl:template name="altova:vector-replace-value">
		<xsl:param name="old-value"/>
		<xsl:param name="new-value"/>
		<xsl:param name="vector"/>
		<xsl:param name="separator"/>
		<xsl:if test="string($vector)">
			<xsl:variable name="current-value">
				<xsl:choose>
					<xsl:when test="contains($vector,$separator)">
						<xsl:value-of select="substring-before($vector,$separator)"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="$vector"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:variable>
			<xsl:choose>
				<xsl:when test="$current-value = $old-value">
					<xsl:value-of select="$new-value"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="$current-value"/>
				</xsl:otherwise>
			</xsl:choose>
			<xsl:value-of select="$separator"/>
			<xsl:call-template name="altova:vector-replace-value">
				<xsl:with-param name="old-value" select="$old-value"/>
				<xsl:with-param name="new-value" select="$new-value"/>
				<xsl:with-param name="vector" select="substring-after($vector,$separator)"/>
				<xsl:with-param name="separator" select="$separator"/>
			</xsl:call-template>
		</xsl:if>
	</xsl:template>
	<xsl:template name="altova:vector-reverse">
		<xsl:param name="vector"/>
		<xsl:param name="separator"/>
		<xsl:if test="$vector">
			<xsl:call-template name="altova:vector-reverse">
				<xsl:with-param name="vector" select="substring-after($vector,$separator)"/>
				<xsl:with-param name="separator" select="$separator"/>
			</xsl:call-template>
			<xsl:choose>
				<xsl:when test="contains($vector,$separator)">
					<xsl:value-of select="concat(substring-before($vector,$separator),$separator)"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="concat($vector,$separator)"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:if>
	</xsl:template>
	<xsl:template name="altova:vector-get-value">
		<xsl:param name="index"/>
		<xsl:param name="vector"/>
		<xsl:param name="separator"/>
		<xsl:choose>
			<xsl:when test="$index = 1">
				<xsl:choose>
					<xsl:when test="contains($vector,$separator)">
						<xsl:value-of select="substring-before($vector,$separator)"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="$vector"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="altova:vector-get-value">
					<xsl:with-param name="index" select="$index - 1"/>
					<xsl:with-param name="vector" select="substring-after($vector,$separator)"/>
					<xsl:with-param name="separator" select="$separator"/>
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:vector-append">
		<xsl:param name="count"/>
		<xsl:param name="value"/>
		<xsl:param name="separator"/>
		<xsl:if test="$count > 0">
			<xsl:value-of select="concat($value,$separator)"/>
			<xsl:call-template name="altova:vector-append">
				<xsl:with-param name="count" select="$count - 1"/>
				<xsl:with-param name="value" select="$value"/>
				<xsl:with-param name="separator" select="$separator"/>
			</xsl:call-template>
		</xsl:if>
	</xsl:template>
	<xsl:template name="altova:vector-calc-sum">
		<xsl:param name="start-sum"/>
		<xsl:param name="vector"/>
		<xsl:param name="separator"/>
		<xsl:choose>
			<xsl:when test="string($vector)">
				<xsl:variable name="value">
					<xsl:choose>
						<xsl:when test="contains($vector,$separator)">
							<xsl:value-of select="substring-before($vector,$separator)"/>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="$vector"/>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:variable>
				<xsl:call-template name="altova:vector-calc-sum">
					<xsl:with-param name="start-sum" select="$start-sum + number($value)"/>
					<xsl:with-param name="vector" select="substring-after($vector,$separator)"/>
					<xsl:with-param name="separator" select="$separator"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$start-sum"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:vector-calc-sum-range">
		<xsl:param name="start-sum"/>
		<xsl:param name="from"/>
		<xsl:param name="to"/>
		<xsl:param name="vector"/>
		<xsl:param name="separator"/>
		<xsl:call-template name="altova:vector-calc-sum-range-helper">
			<xsl:with-param name="start-sum" select="$start-sum"/>
			<xsl:with-param name="pos" select="1"/>
			<xsl:with-param name="from" select="$from"/>
			<xsl:with-param name="to" select="$to"/>
			<xsl:with-param name="vector" select="$vector"/>
			<xsl:with-param name="separator" select="$separator"/>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="altova:vector-calc-sum-range-helper">
		<xsl:param name="start-sum"/>
		<xsl:param name="pos"/>
		<xsl:param name="from"/>
		<xsl:param name="to"/>
		<xsl:param name="vector"/>
		<xsl:param name="separator"/>
		<xsl:choose>
			<xsl:when test="$pos &lt; $from">
				<xsl:call-template name="altova:vector-calc-sum-range-helper">
					<xsl:with-param name="start-sum" select="$start-sum"/>
					<xsl:with-param name="pos" select="$pos + 1"/>
					<xsl:with-param name="from" select="$from"/>
					<xsl:with-param name="to" select="$to"/>
					<xsl:with-param name="vector" select="substring-after($vector,$separator)"/>
					<xsl:with-param name="separator" select="$separator"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:when test="$pos &gt; $to">
				<xsl:value-of select="$start-sum"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:variable name="value">
					<xsl:choose>
						<xsl:when test="contains($vector,$separator)">
							<xsl:value-of select="substring-before($vector,$separator)"/>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="$vector"/>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:variable>
				<xsl:call-template name="altova:vector-calc-sum-range-helper">
					<xsl:with-param name="start-sum" select="$start-sum + number($value)"/>
					<xsl:with-param name="pos" select="$pos + 1"/>
					<xsl:with-param name="from" select="$from"/>
					<xsl:with-param name="to" select="$to"/>
					<xsl:with-param name="vector" select="substring-after($vector,$separator)"/>
					<xsl:with-param name="separator" select="$separator"/>
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:vector-merge-vectors-using-max-value">
		<xsl:param name="vector1"/>
		<xsl:param name="vector2"/>
		<xsl:param name="separator"/>
		<xsl:choose>
			<xsl:when test="string($vector1) and string($vector2)">
				<xsl:variable name="value1">
					<xsl:choose>
						<xsl:when test="contains($vector1,$separator)">
							<xsl:value-of select="substring-before($vector1,$separator)"/>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="$vector1"/>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:variable>
				<xsl:variable name="value2">
					<xsl:choose>
						<xsl:when test="contains($vector2,$separator)">
							<xsl:value-of select="substring-before($vector2,$separator)"/>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="$vector2"/>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:variable>
				<xsl:choose>
					<xsl:when test="number($value1) > number($value2)">
						<xsl:value-of select="$value1"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="$value2"/>
					</xsl:otherwise>
				</xsl:choose>
				<xsl:value-of select="$separator"/>
				<xsl:call-template name="altova:vector-merge-vectors-using-max-value">
					<xsl:with-param name="vector1" select="substring-after($vector1,$separator)"/>
					<xsl:with-param name="vector2" select="substring-after($vector2,$separator)"/>
					<xsl:with-param name="separator" select="$separator"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:when test="string($vector1)">
				<xsl:value-of select="$vector1"/>
			</xsl:when>
			<xsl:when test="string($vector2)">
				<xsl:value-of select="$vector2"/>
			</xsl:when>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:char-vector-append">
		<xsl:param name="count"/>
		<xsl:param name="char"/>
		<xsl:if test="$count > 0">
			<xsl:value-of select="$char"/>
			<xsl:call-template name="altova:char-vector-append">
				<xsl:with-param name="count" select="$count - 1"/>
				<xsl:with-param name="char" select="$char"/>
			</xsl:call-template>
		</xsl:if>
	</xsl:template>
	<xsl:template name="altova:char-vector-calc-index-of-nth-char">
		<xsl:param name="n"/>
		<xsl:param name="char"/>
		<xsl:param name="char-vector"/>
		<xsl:call-template name="altova:char-vector-calc-index-of-nth-char-helper">
			<xsl:with-param name="pos" select="1"/>
			<xsl:with-param name="count" select="0"/>
			<xsl:with-param name="n" select="$n"/>
			<xsl:with-param name="char" select="$char"/>
			<xsl:with-param name="char-vector" select="$char-vector"/>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="altova:char-vector-calc-index-of-nth-char-helper">
		<xsl:param name="pos"/>
		<xsl:param name="count"/>
		<xsl:param name="n"/>
		<xsl:param name="char"/>
		<xsl:param name="char-vector"/>
		<xsl:choose>
			<xsl:when test="substring($char-vector,$pos,1)=$char">
				<xsl:choose>
					<xsl:when test="$n = $count+1">
						<xsl:value-of select="$pos"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:if test="$pos &lt; string-length($char-vector)">
							<xsl:call-template name="altova:char-vector-calc-index-of-nth-char-helper">
								<xsl:with-param name="pos" select="$pos + 1"/>
								<xsl:with-param name="count" select="$count + 1"/>
								<xsl:with-param name="n" select="$n"/>
								<xsl:with-param name="char" select="$char"/>
								<xsl:with-param name="char-vector" select="$char-vector"/>
							</xsl:call-template>
						</xsl:if>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>
				<xsl:if test="$pos &lt; string-length($char-vector)">
					<xsl:call-template name="altova:char-vector-calc-index-of-nth-char-helper">
						<xsl:with-param name="pos" select="$pos + 1"/>
						<xsl:with-param name="count" select="$count"/>
						<xsl:with-param name="n" select="$n"/>
						<xsl:with-param name="char" select="$char"/>
						<xsl:with-param name="char-vector" select="$char-vector"/>
					</xsl:call-template>
				</xsl:if>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:css-styles-get-property">
		<xsl:param name="property"/>
		<xsl:param name="css-styles"/>
		<xsl:choose>
			<xsl:when test="not($css-styles)"/>
			<xsl:when test="normalize-space(substring-before($css-styles,':'))=$property">
				<xsl:choose>
					<xsl:when test="contains($css-styles,';')">
						<xsl:value-of select="normalize-space(substring-after(substring-before($css-styles,';'),':'))"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="normalize-space(substring-after($css-styles,':'))"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="altova:css-styles-get-property">
					<xsl:with-param name="property" select="$property"/>
					<xsl:with-param name="css-styles" select="substring-after($css-styles,';')"/>
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:css-styles-remove-property">
		<xsl:param name="property"/>
		<xsl:param name="css-styles"/>
		<xsl:if test="string($css-styles)">
			<xsl:variable name="actual-property" select="normalize-space(substring-before($css-styles,':'))"/>
			<xsl:if test="not(contains($actual-property,';'))">
				<xsl:if test="$actual-property!=$property">
					<xsl:variable name="value">
						<xsl:choose>
							<xsl:when test="contains($css-styles,';')">
								<xsl:value-of select="normalize-space(substring-after(substring-before($css-styles,';'),':'))"/>
							</xsl:when>
							<xsl:otherwise>
								<xsl:value-of select="normalize-space(substring-after($css-styles,':'))"/>
							</xsl:otherwise>
						</xsl:choose>
					</xsl:variable>
					<xsl:value-of select="concat($actual-property,':',$value,';')"/>
				</xsl:if>
			</xsl:if>
			<xsl:call-template name="altova:css-styles-remove-property">
				<xsl:with-param name="property" select="$property"/>
				<xsl:with-param name="css-styles" select="substring-after($css-styles,';')"/>
			</xsl:call-template>
		</xsl:if>
	</xsl:template>
	<xsl:template name="altova:css-styles-get-inherited-styles-for-table-cell">
		<xsl:param name="css-styles"/>
		<xsl:if test="string($css-styles)">
			<xsl:variable name="property" select="normalize-space(substring-before($css-styles,':'))"/>
			<xsl:variable name="value">
				<xsl:choose>
					<xsl:when test="contains($css-styles,';')">
						<xsl:value-of select="normalize-space(substring-after(substring-before($css-styles,';'),':'))"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="normalize-space(substring-after($css-styles,':'))"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:variable>
			<xsl:choose>
				<xsl:when test="$property='background'">
					<xsl:value-of select="concat($property,':',$value,';')"/>
				</xsl:when>
				<xsl:when test="$property='background-color'">
					<xsl:value-of select="concat($property,':',$value,';')"/>
				</xsl:when>
				<xsl:when test="$property='color'">
					<xsl:value-of select="concat($property,':',$value,';')"/>
				</xsl:when>
				<xsl:when test="$property='font'">
					<xsl:value-of select="concat($property,':',$value,';')"/>
				</xsl:when>
				<xsl:when test="$property='font-family'">
					<xsl:value-of select="concat($property,':',$value,';')"/>
				</xsl:when>
				<xsl:when test="$property='font-size'">
					<xsl:value-of select="concat($property,':',$value,';')"/>
				</xsl:when>
				<xsl:when test="$property='font-style'">
					<xsl:value-of select="concat($property,':',$value,';')"/>
				</xsl:when>
				<xsl:when test="$property='font-variant'">
					<xsl:value-of select="concat($property,':',$value,';')"/>
				</xsl:when>
				<xsl:when test="$property='font-weight'">
					<xsl:value-of select="concat($property,':',$value,';')"/>
				</xsl:when>
				<xsl:when test="$property='letter-spacing'">
					<xsl:value-of select="concat($property,':',$value,';')"/>
				</xsl:when>
				<xsl:when test="$property='text-align'">
					<xsl:value-of select="concat($property,':',$value,';')"/>
				</xsl:when>
				<xsl:when test="$property='text-decoration'">
					<xsl:value-of select="concat($property,':',$value,';')"/>
				</xsl:when>
				<xsl:when test="$property='text-indent'">
					<xsl:value-of select="concat($property,':',$value,';')"/>
				</xsl:when>
				<xsl:when test="$property='text-transform'">
					<xsl:value-of select="concat($property,':',$value,';')"/>
				</xsl:when>
				<xsl:when test="$property='vertical-align'">
					<xsl:value-of select="concat($property,':',$value,';')"/>
				</xsl:when>
			</xsl:choose>
			<xsl:call-template name="altova:css-styles-get-inherited-styles-for-table-cell">
				<xsl:with-param name="css-styles" select="substring-after($css-styles,';')"/>
			</xsl:call-template>
		</xsl:if>
	</xsl:template>
	<xsl:template name="altova:css-styles-split-shorthand-styles">
		<xsl:param name="css-styles"/>
		<xsl:if test="string($css-styles)">
			<xsl:variable name="property" select="normalize-space(substring-before($css-styles,':'))"/>
			<xsl:if test="string($property) and not(contains($property,';'))">
				<xsl:variable name="value">
					<xsl:choose>
						<xsl:when test="contains($css-styles,';')">
							<xsl:value-of select="normalize-space(substring-after(substring-before($css-styles,';'),':'))"/>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="normalize-space(substring-after($css-styles,':'))"/>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:variable>
				<xsl:choose>
					<xsl:when test="$property='background'">
						<xsl:call-template name="altova:css-styles-split-background">
							<xsl:with-param name="value" select="string($value)"/>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="$property='border'">
						<xsl:call-template name="altova:css-styles-split-border">
							<xsl:with-param name="value" select="string($value)"/>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="$property='border-top'">
						<xsl:call-template name="altova:css-styles-split-border-top">
							<xsl:with-param name="value" select="string($value)"/>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="$property='border-right'">
						<xsl:call-template name="altova:css-styles-split-border-right">
							<xsl:with-param name="value" select="string($value)"/>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="$property='border-bottom'">
						<xsl:call-template name="altova:css-styles-split-border-bottom">
							<xsl:with-param name="value" select="string($value)"/>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="$property='border-left'">
						<xsl:call-template name="altova:css-styles-split-border-left">
							<xsl:with-param name="value" select="string($value)"/>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="$property='border-color'">
						<xsl:call-template name="altova:css-styles-split-border-color">
							<xsl:with-param name="value" select="string($value)"/>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="$property='border-style'">
						<xsl:call-template name="altova:css-styles-split-border-style">
							<xsl:with-param name="value" select="string($value)"/>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="$property='border-width'">
						<xsl:call-template name="altova:css-styles-split-border-width">
							<xsl:with-param name="value" select="string($value)"/>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="$property='font'">
						<xsl:call-template name="altova:css-styles-split-font-style">
							<xsl:with-param name="value" select="string($value)"/>
							<xsl:with-param name="font-style" select="'normal'"/>
							<xsl:with-param name="font-variant" select="'normal'"/>
							<xsl:with-param name="font-weight" select="'normal'"/>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="$property='margin'">
						<xsl:call-template name="altova:css-styles-split-margin-style">
							<xsl:with-param name="value" select="string($value)"/>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="$property='padding'">
						<xsl:call-template name="altova:css-styles-split-padding-style">
							<xsl:with-param name="value" select="string($value)"/>
						</xsl:call-template>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="concat($property,':',$value,';')"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:if>
			<xsl:call-template name="altova:css-styles-split-shorthand-styles">
				<xsl:with-param name="css-styles" select="substring-after($css-styles,';')"/>
			</xsl:call-template>
		</xsl:if>
	</xsl:template>
	<xsl:template name="altova:css-styles-is-value-length">
		<xsl:param name="value"/>
		<xsl:variable name="unit" select="translate($value,'0123456789+-.','')"/>
		<xsl:choose>
			<xsl:when test="$unit='em'">1</xsl:when>
			<xsl:when test="$unit='ex'">1</xsl:when>
			<xsl:when test="$unit='px'">1</xsl:when>
			<xsl:when test="$unit='in'">1</xsl:when>
			<xsl:when test="$unit='cm'">1</xsl:when>
			<xsl:when test="$unit='mm'">1</xsl:when>
			<xsl:when test="$unit='pt'">1</xsl:when>
			<xsl:when test="$unit='pc'">1</xsl:when>
			<xsl:when test="$unit=''">
				<xsl:variable name="number" select="translate($value,'ceimnptx','')"/>
				<xsl:choose>
					<xsl:when test="number($number)=0">1</xsl:when>
					<xsl:otherwise>0</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>0</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:css-styles-is-value-background-color">
		<xsl:param name="value"/>
		<xsl:choose>
			<xsl:when test="$value='transparent'">1</xsl:when>
			<xsl:otherwise>
				<xsl:variable name="is-color">
					<xsl:call-template name="altova:css-styles-is-value-color">
						<xsl:with-param name="value" select="$value"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:choose>
					<xsl:when test="$is-color='1'">1</xsl:when>
					<xsl:otherwise>0</xsl:otherwise>
				</xsl:choose>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:css-styles-is-value-background-image">
		<xsl:param name="value"/>
		<xsl:choose>
			<xsl:when test="$value='none'">1</xsl:when>
			<xsl:otherwise>
				<xsl:variable name="is-uri">
					<xsl:call-template name="altova:css-styles-is-value-uri">
						<xsl:with-param name="value" select="$value"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:choose>
					<xsl:when test="$is-uri='1'">1</xsl:when>
					<xsl:otherwise>0</xsl:otherwise>
				</xsl:choose>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:css-styles-is-value-background-repeat">
		<xsl:param name="value"/>
		<xsl:choose>
			<xsl:when test="$value='repeat'">1</xsl:when>
			<xsl:when test="$value='repeat-x'">1</xsl:when>
			<xsl:when test="$value='repeat-y'">1</xsl:when>
			<xsl:when test="$value='no-repeat'">1</xsl:when>
			<xsl:otherwise>0</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:css-styles-is-value-background-attachment">
		<xsl:param name="value"/>
		<xsl:choose>
			<xsl:when test="$value='scroll'">1</xsl:when>
			<xsl:when test="$value='fixed'">1</xsl:when>
			<xsl:otherwise>0</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:css-styles-is-value-color">
		<xsl:param name="value"/>
		<xsl:choose>
			<xsl:when test="$value='aqua'">1</xsl:when>
			<xsl:when test="$value='black'">1</xsl:when>
			<xsl:when test="$value='blue'">1</xsl:when>
			<xsl:when test="$value='fuchsia'">1</xsl:when>
			<xsl:when test="$value='gray'">1</xsl:when>
			<xsl:when test="$value='green'">1</xsl:when>
			<xsl:when test="$value='lime'">1</xsl:when>
			<xsl:when test="$value='maroon'">1</xsl:when>
			<xsl:when test="$value='navy'">1</xsl:when>
			<xsl:when test="$value='olive'">1</xsl:when>
			<xsl:when test="$value='orange'">1</xsl:when>
			<xsl:when test="$value='purple'">1</xsl:when>
			<xsl:when test="$value='red'">1</xsl:when>
			<xsl:when test="$value='silver'">1</xsl:when>
			<xsl:when test="$value='teal'">1</xsl:when>
			<xsl:when test="$value='white'">1</xsl:when>
			<xsl:when test="$value='yellow'">1</xsl:when>
			<xsl:when test="starts-with($value,'#')">1</xsl:when>
			<xsl:when test="starts-with($value,'rgb(')">1</xsl:when>
			<xsl:otherwise>0</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:css-styles-is-value-border-width">
		<xsl:param name="value"/>
		<xsl:choose>
			<xsl:when test="$value='thin'">1</xsl:when>
			<xsl:when test="$value='medium'">1</xsl:when>
			<xsl:when test="$value='thick'">1</xsl:when>
			<xsl:otherwise>
				<xsl:variable name="is-length">
					<xsl:call-template name="altova:css-styles-is-value-length">
						<xsl:with-param name="value" select="$value"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:choose>
					<xsl:when test="$is-length='1'">1</xsl:when>
					<xsl:otherwise>0</xsl:otherwise>
				</xsl:choose>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:css-styles-is-value-border-style">
		<xsl:param name="value"/>
		<xsl:choose>
			<xsl:when test="$value='none'">1</xsl:when>
			<xsl:when test="$value='hidden'">1</xsl:when>
			<xsl:when test="$value='dotted'">1</xsl:when>
			<xsl:when test="$value='dashed'">1</xsl:when>
			<xsl:when test="$value='solid'">1</xsl:when>
			<xsl:when test="$value='double'">1</xsl:when>
			<xsl:when test="$value='groove'">1</xsl:when>
			<xsl:when test="$value='ridge'">1</xsl:when>
			<xsl:when test="$value='inset'">1</xsl:when>
			<xsl:when test="$value='outset'">1</xsl:when>
			<xsl:otherwise>0</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:css-styles-is-value-border-color">
		<xsl:param name="value"/>
		<xsl:choose>
			<xsl:when test="$value='transparent'">1</xsl:when>
			<xsl:otherwise>
				<xsl:variable name="is-color">
					<xsl:call-template name="altova:css-styles-is-value-color">
						<xsl:with-param name="value" select="$value"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:choose>
					<xsl:when test="$is-color='1'">1</xsl:when>
					<xsl:otherwise>0</xsl:otherwise>
				</xsl:choose>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:css-styles-is-value-font-style">
		<xsl:param name="value"/>
		<xsl:choose>
			<xsl:when test="$value='normal'">1</xsl:when>
			<xsl:when test="$value='italic'">1</xsl:when>
			<xsl:when test="$value='oblique'">1</xsl:when>
			<xsl:otherwise>0</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:css-styles-is-value-font-variant">
		<xsl:param name="value"/>
		<xsl:choose>
			<xsl:when test="$value='normal'">1</xsl:when>
			<xsl:when test="$value='small-caps'">1</xsl:when>
			<xsl:otherwise>0</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:css-styles-is-value-font-weight">
		<xsl:param name="value"/>
		<xsl:choose>
			<xsl:when test="$value='normal'">1</xsl:when>
			<xsl:when test="$value='bold'">1</xsl:when>
			<xsl:when test="$value='bolder'">1</xsl:when>
			<xsl:when test="$value='lighter'">1</xsl:when>
			<xsl:when test="$value='100'">1</xsl:when>
			<xsl:when test="$value='200'">1</xsl:when>
			<xsl:when test="$value='300'">1</xsl:when>
			<xsl:when test="$value='400'">1</xsl:when>
			<xsl:when test="$value='500'">1</xsl:when>
			<xsl:when test="$value='600'">1</xsl:when>
			<xsl:when test="$value='700'">1</xsl:when>
			<xsl:when test="$value='800'">1</xsl:when>
			<xsl:when test="$value='900'">1</xsl:when>
			<xsl:otherwise>0</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:css-styles-is-value-uri">
		<xsl:param name="value"/>
		<xsl:choose>
			<xsl:when test="starts-with($value,'url(')">1</xsl:when>
			<xsl:otherwise>0</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:css-styles-split-background">
		<xsl:param name="value"/>
		<xsl:if test="$value">
			<xsl:variable name="first-value">
				<xsl:choose>
					<xsl:when test="contains($value,' ')">
						<xsl:value-of select="substring-before($value,' ')"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="$value"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:variable>
			<xsl:variable name="is-background-color">
				<xsl:call-template name="altova:css-styles-is-value-background-color">
					<xsl:with-param name="value" select="$first-value"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:variable name="is-background-image">
				<xsl:call-template name="altova:css-styles-is-value-background-image">
					<xsl:with-param name="value" select="$first-value"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:variable name="is-background-repeat">
				<xsl:call-template name="altova:css-styles-is-value-background-repeat">
					<xsl:with-param name="value" select="$first-value"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:variable name="is-background-attachment">
				<xsl:call-template name="altova:css-styles-is-value-background-attachment">
					<xsl:with-param name="value" select="$first-value"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:choose>
				<xsl:when test="$is-background-color='1'">
					<xsl:value-of select="concat('background-color:',$first-value,';')"/>
				</xsl:when>
				<xsl:when test="$is-background-image='1'">
					<xsl:value-of select="concat('background-image:',$first-value,';')"/>
				</xsl:when>
				<xsl:when test="$is-background-repeat='1'">
					<xsl:value-of select="concat('background-repeat:',$first-value,';')"/>
				</xsl:when>
				<xsl:when test="$is-background-attachment='1'">
					<xsl:value-of select="concat('background-attachment:',$first-value,';')"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="concat('background-position:',$first-value,';')"/>
				</xsl:otherwise>
			</xsl:choose>
			<xsl:call-template name="altova:css-styles-split-background">
				<xsl:with-param name="value" select="substring-after($value,' ')"/>
			</xsl:call-template>
		</xsl:if>
	</xsl:template>
	<xsl:template name="altova:css-styles-split-border">
		<xsl:param name="value"/>
		<xsl:if test="$value">
			<xsl:variable name="first-value">
				<xsl:choose>
					<xsl:when test="contains($value,' ')">
						<xsl:value-of select="substring-before($value,' ')"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="$value"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:variable>
			<xsl:variable name="is-border-width">
				<xsl:call-template name="altova:css-styles-is-value-border-width">
					<xsl:with-param name="value" select="$first-value"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:variable name="is-border-style">
				<xsl:call-template name="altova:css-styles-is-value-border-style">
					<xsl:with-param name="value" select="$first-value"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:variable name="is-border-color">
				<xsl:call-template name="altova:css-styles-is-value-border-color">
					<xsl:with-param name="value" select="$first-value"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:choose>
				<xsl:when test="$is-border-width='1'">
					<xsl:value-of select="concat('border-top-width:',$first-value,';')"/>
					<xsl:value-of select="concat('border-right-width:',$first-value,';')"/>
					<xsl:value-of select="concat('border-bottom-width:',$first-value,';')"/>
					<xsl:value-of select="concat('border-left-width:',$first-value,';')"/>
				</xsl:when>
				<xsl:when test="$is-border-style='1'">
					<xsl:value-of select="concat('border-top-style:',$first-value,';')"/>
					<xsl:value-of select="concat('border-right-style:',$first-value,';')"/>
					<xsl:value-of select="concat('border-bottom-style:',$first-value,';')"/>
					<xsl:value-of select="concat('border-left-style:',$first-value,';')"/>
				</xsl:when>
				<xsl:when test="$is-border-color='1'">
					<xsl:value-of select="concat('border-top-color:',$first-value,';')"/>
					<xsl:value-of select="concat('border-right-color:',$first-value,';')"/>
					<xsl:value-of select="concat('border-bottom-color:',$first-value,';')"/>
					<xsl:value-of select="concat('border-left-color:',$first-value,';')"/>
				</xsl:when>
			</xsl:choose>
			<xsl:call-template name="altova:css-styles-split-border">
				<xsl:with-param name="value" select="substring-after($value,' ')"/>
			</xsl:call-template>
		</xsl:if>
	</xsl:template>
	<xsl:template name="altova:css-styles-split-border-top">
		<xsl:param name="value"/>
		<xsl:if test="$value">
			<xsl:variable name="first-value">
				<xsl:choose>
					<xsl:when test="contains($value,' ')">
						<xsl:value-of select="substring-before($value,' ')"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="$value"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:variable>
			<xsl:variable name="is-border-width">
				<xsl:call-template name="altova:css-styles-is-value-border-width">
					<xsl:with-param name="value" select="$first-value"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:variable name="is-border-style">
				<xsl:call-template name="altova:css-styles-is-value-border-style">
					<xsl:with-param name="value" select="$first-value"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:variable name="is-border-color">
				<xsl:call-template name="altova:css-styles-is-value-border-color">
					<xsl:with-param name="value" select="$first-value"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:choose>
				<xsl:when test="$is-border-width='1'">
					<xsl:value-of select="concat('border-top-width:',$first-value,';')"/>
				</xsl:when>
				<xsl:when test="$is-border-style='1'">
					<xsl:value-of select="concat('border-top-style:',$first-value,';')"/>
				</xsl:when>
				<xsl:when test="$is-border-color='1'">
					<xsl:value-of select="concat('border-top-color:',$first-value,';')"/>
				</xsl:when>
			</xsl:choose>
			<xsl:call-template name="altova:css-styles-split-border-top">
				<xsl:with-param name="value" select="substring-after($value,' ')"/>
			</xsl:call-template>
		</xsl:if>
	</xsl:template>
	<xsl:template name="altova:css-styles-split-border-right">
		<xsl:param name="value"/>
		<xsl:if test="$value">
			<xsl:variable name="first-value">
				<xsl:choose>
					<xsl:when test="contains($value,' ')">
						<xsl:value-of select="substring-before($value,' ')"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="$value"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:variable>
			<xsl:variable name="is-border-width">
				<xsl:call-template name="altova:css-styles-is-value-border-width">
					<xsl:with-param name="value" select="$first-value"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:variable name="is-border-style">
				<xsl:call-template name="altova:css-styles-is-value-border-style">
					<xsl:with-param name="value" select="$first-value"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:variable name="is-border-color">
				<xsl:call-template name="altova:css-styles-is-value-border-color">
					<xsl:with-param name="value" select="$first-value"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:choose>
				<xsl:when test="$is-border-width='1'">
					<xsl:value-of select="concat('border-right-width:',$first-value,';')"/>
				</xsl:when>
				<xsl:when test="$is-border-style='1'">
					<xsl:value-of select="concat('border-right-style:',$first-value,';')"/>
				</xsl:when>
				<xsl:when test="$is-border-color='1'">
					<xsl:value-of select="concat('border-right-color:',$first-value,';')"/>
				</xsl:when>
			</xsl:choose>
			<xsl:call-template name="altova:css-styles-split-border-right">
				<xsl:with-param name="value" select="substring-after($value,' ')"/>
			</xsl:call-template>
		</xsl:if>
	</xsl:template>
	<xsl:template name="altova:css-styles-split-border-bottom">
		<xsl:param name="value"/>
		<xsl:if test="$value">
			<xsl:variable name="first-value">
				<xsl:choose>
					<xsl:when test="contains($value,' ')">
						<xsl:value-of select="substring-before($value,' ')"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="$value"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:variable>
			<xsl:variable name="is-border-width">
				<xsl:call-template name="altova:css-styles-is-value-border-width">
					<xsl:with-param name="value" select="$first-value"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:variable name="is-border-style">
				<xsl:call-template name="altova:css-styles-is-value-border-style">
					<xsl:with-param name="value" select="$first-value"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:variable name="is-border-color">
				<xsl:call-template name="altova:css-styles-is-value-border-color">
					<xsl:with-param name="value" select="$first-value"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:choose>
				<xsl:when test="$is-border-width='1'">
					<xsl:value-of select="concat('border-bottom-width:',$first-value,';')"/>
				</xsl:when>
				<xsl:when test="$is-border-style='1'">
					<xsl:value-of select="concat('border-bottom-style:',$first-value,';')"/>
				</xsl:when>
				<xsl:when test="$is-border-color='1'">
					<xsl:value-of select="concat('border-bottom-color:',$first-value,';')"/>
				</xsl:when>
			</xsl:choose>
			<xsl:call-template name="altova:css-styles-split-border-bottom">
				<xsl:with-param name="value" select="substring-after($value,' ')"/>
			</xsl:call-template>
		</xsl:if>
	</xsl:template>
	<xsl:template name="altova:css-styles-split-border-left">
		<xsl:param name="value"/>
		<xsl:if test="$value">
			<xsl:variable name="first-value">
				<xsl:choose>
					<xsl:when test="contains($value,' ')">
						<xsl:value-of select="substring-before($value,' ')"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="$value"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:variable>
			<xsl:variable name="is-border-width">
				<xsl:call-template name="altova:css-styles-is-value-border-width">
					<xsl:with-param name="value" select="$first-value"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:variable name="is-border-style">
				<xsl:call-template name="altova:css-styles-is-value-border-style">
					<xsl:with-param name="value" select="$first-value"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:variable name="is-border-color">
				<xsl:call-template name="altova:css-styles-is-value-border-color">
					<xsl:with-param name="value" select="$first-value"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:choose>
				<xsl:when test="$is-border-width='1'">
					<xsl:value-of select="concat('border-left-width:',$first-value,';')"/>
				</xsl:when>
				<xsl:when test="$is-border-style='1'">
					<xsl:value-of select="concat('border-left-style:',$first-value,';')"/>
				</xsl:when>
				<xsl:when test="$is-border-color='1'">
					<xsl:value-of select="concat('border-left-color:',$first-value,';')"/>
				</xsl:when>
			</xsl:choose>
			<xsl:call-template name="altova:css-styles-split-border-left">
				<xsl:with-param name="value" select="substring-after($value,' ')"/>
			</xsl:call-template>
		</xsl:if>
	</xsl:template>
	<xsl:template name="altova:css-styles-split-border-color">
		<xsl:param name="value"/>
		<xsl:variable name="count">
			<xsl:call-template name="altova:vector-count">
				<xsl:with-param name="vector" select="$value"/>
				<xsl:with-param name="separator" select="' '"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:choose>
			<xsl:when test="number($count)=1">
				<xsl:variable name="value1">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="1"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:value-of select="concat('border-top-color:',$value1,';')"/>
				<xsl:value-of select="concat('border-right-color:',$value1,';')"/>
				<xsl:value-of select="concat('border-bottom-color:',$value1,';')"/>
				<xsl:value-of select="concat('border-left-color:',$value1,';')"/>
			</xsl:when>
			<xsl:when test="number($count)=2">
				<xsl:variable name="value1">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="1"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value2">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="2"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:value-of select="concat('border-top-color:',$value1,';')"/>
				<xsl:value-of select="concat('border-right-color:',$value2,';')"/>
				<xsl:value-of select="concat('border-bottom-color:',$value1,';')"/>
				<xsl:value-of select="concat('border-left-color:',$value2,';')"/>
			</xsl:when>
			<xsl:when test="number($count)=3">
				<xsl:variable name="value1">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="1"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value2">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="2"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value3">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="3"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:value-of select="concat('border-top-color:',$value1,';')"/>
				<xsl:value-of select="concat('border-right-color:',$value2,';')"/>
				<xsl:value-of select="concat('border-bottom-color:',$value3,';')"/>
				<xsl:value-of select="concat('border-left-color:',$value2,';')"/>
			</xsl:when>
			<xsl:when test="number($count)=4">
				<xsl:variable name="value1">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="1"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value2">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="2"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value3">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="3"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value4">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="4"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:value-of select="concat('border-top-color:',$value1,';')"/>
				<xsl:value-of select="concat('border-right-color:',$value2,';')"/>
				<xsl:value-of select="concat('border-bottom-color:',$value3,';')"/>
				<xsl:value-of select="concat('border-left-color:',$value4,';')"/>
			</xsl:when>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:css-styles-split-border-style">
		<xsl:param name="value"/>
		<xsl:variable name="count">
			<xsl:call-template name="altova:vector-count">
				<xsl:with-param name="vector" select="$value"/>
				<xsl:with-param name="separator" select="' '"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:choose>
			<xsl:when test="number($count)=1">
				<xsl:variable name="value1">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="1"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:value-of select="concat('border-top-style:',$value1,';')"/>
				<xsl:value-of select="concat('border-right-style:',$value1,';')"/>
				<xsl:value-of select="concat('border-bottom-style:',$value1,';')"/>
				<xsl:value-of select="concat('border-left-style:',$value1,';')"/>
			</xsl:when>
			<xsl:when test="number($count)=2">
				<xsl:variable name="value1">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="1"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value2">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="2"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:value-of select="concat('border-top-style:',$value1,';')"/>
				<xsl:value-of select="concat('border-right-style:',$value2,';')"/>
				<xsl:value-of select="concat('border-bottom-style:',$value1,';')"/>
				<xsl:value-of select="concat('border-left-style:',$value2,';')"/>
			</xsl:when>
			<xsl:when test="number($count)=3">
				<xsl:variable name="value1">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="1"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value2">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="2"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value3">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="3"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:value-of select="concat('border-top-style:',$value1,';')"/>
				<xsl:value-of select="concat('border-right-style:',$value2,';')"/>
				<xsl:value-of select="concat('border-bottom-style:',$value3,';')"/>
				<xsl:value-of select="concat('border-left-style:',$value2,';')"/>
			</xsl:when>
			<xsl:when test="number($count)=4">
				<xsl:variable name="value1">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="1"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value2">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="2"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value3">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="3"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value4">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="4"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:value-of select="concat('border-top-style:',$value1,';')"/>
				<xsl:value-of select="concat('border-right-style:',$value2,';')"/>
				<xsl:value-of select="concat('border-bottom-style:',$value3,';')"/>
				<xsl:value-of select="concat('border-left-style:',$value4,';')"/>
			</xsl:when>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:css-styles-split-border-width">
		<xsl:param name="value"/>
		<xsl:variable name="count">
			<xsl:call-template name="altova:vector-count">
				<xsl:with-param name="vector" select="$value"/>
				<xsl:with-param name="separator" select="' '"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:choose>
			<xsl:when test="number($count)=1">
				<xsl:variable name="value1">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="1"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:value-of select="concat('border-top-width:',$value1,';')"/>
				<xsl:value-of select="concat('border-right-width:',$value1,';')"/>
				<xsl:value-of select="concat('border-bottom-width:',$value1,';')"/>
				<xsl:value-of select="concat('border-left-width:',$value1,';')"/>
			</xsl:when>
			<xsl:when test="number($count)=2">
				<xsl:variable name="value1">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="1"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value2">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="2"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:value-of select="concat('border-top-width:',$value1,';')"/>
				<xsl:value-of select="concat('border-right-width:',$value2,';')"/>
				<xsl:value-of select="concat('border-bottom-width:',$value1,';')"/>
				<xsl:value-of select="concat('border-left-width:',$value2,';')"/>
			</xsl:when>
			<xsl:when test="number($count)=3">
				<xsl:variable name="value1">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="1"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value2">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="2"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value3">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="3"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:value-of select="concat('border-top-width:',$value1,';')"/>
				<xsl:value-of select="concat('border-right-width:',$value2,';')"/>
				<xsl:value-of select="concat('border-bottom-width:',$value3,';')"/>
				<xsl:value-of select="concat('border-left-width:',$value2,';')"/>
			</xsl:when>
			<xsl:when test="number($count)=4">
				<xsl:variable name="value1">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="1"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value2">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="2"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value3">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="3"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value4">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="4"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:value-of select="concat('border-top-width:',$value1,';')"/>
				<xsl:value-of select="concat('border-right-width:',$value2,';')"/>
				<xsl:value-of select="concat('border-bottom-width:',$value3,';')"/>
				<xsl:value-of select="concat('border-left-width:',$value4,';')"/>
			</xsl:when>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:css-styles-split-font-style">
		<xsl:param name="value"/>
		<xsl:param name="font-style"/>
		<xsl:param name="font-variant"/>
		<xsl:param name="font-weight"/>
		<xsl:if test="$value">
			<xsl:variable name="first-value">
				<xsl:choose>
					<xsl:when test="contains($value,' ')">
						<xsl:value-of select="substring-before($value,' ')"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="$value"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:variable>
			<xsl:variable name="is-font-style">
				<xsl:call-template name="altova:css-styles-is-value-font-style">
					<xsl:with-param name="value" select="$first-value"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:variable name="is-font-variant">
				<xsl:call-template name="altova:css-styles-is-value-font-variant">
					<xsl:with-param name="value" select="$first-value"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:variable name="is-font-weight">
				<xsl:call-template name="altova:css-styles-is-value-font-weight">
					<xsl:with-param name="value" select="$first-value"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:choose>
				<xsl:when test="$is-font-style='1' and $is-font-variant='1' and $is-font-weight='1'">
					<xsl:call-template name="altova:css-styles-split-font-style">
						<xsl:with-param name="value" select="substring-after($value,' ')"/>
						<xsl:with-param name="font-style" select="$font-style"/>
						<xsl:with-param name="font-variant" select="$font-variant"/>
						<xsl:with-param name="font-weight" select="$font-weight"/>
					</xsl:call-template>
				</xsl:when>
				<xsl:when test="$is-font-style='1'">
					<xsl:call-template name="altova:css-styles-split-font-style">
						<xsl:with-param name="value" select="substring-after($value,' ')"/>
						<xsl:with-param name="font-style" select="$first-value"/>
						<xsl:with-param name="font-variant" select="$font-variant"/>
						<xsl:with-param name="font-weight" select="$font-weight"/>
					</xsl:call-template>
				</xsl:when>
				<xsl:when test="$is-font-variant='1'">
					<xsl:call-template name="altova:css-styles-split-font-style">
						<xsl:with-param name="value" select="substring-after($value,' ')"/>
						<xsl:with-param name="font-style" select="$font-style"/>
						<xsl:with-param name="font-variant" select="$first-value"/>
						<xsl:with-param name="font-weight" select="$font-weight"/>
					</xsl:call-template>
				</xsl:when>
				<xsl:when test="$is-font-weight='1'">
					<xsl:call-template name="altova:css-styles-split-font-style">
						<xsl:with-param name="value" select="substring-after($value,' ')"/>
						<xsl:with-param name="font-style" select="$font-style"/>
						<xsl:with-param name="font-variant" select="$font-variant"/>
						<xsl:with-param name="font-weight" select="$first-value"/>
					</xsl:call-template>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="concat('font-style:',$font-style,';')"/>
					<xsl:value-of select="concat('font-variant:',$font-variant,';')"/>
					<xsl:value-of select="concat('font-weight:',$font-weight,';')"/>
					<xsl:choose>
						<xsl:when test="contains($first-value,'/')">
							<xsl:value-of select="concat('font-size:',substring-before($first-value,'/'),';')"/>
							<xsl:value-of select="concat('line-height:',substring-after($first-value,'/'),';')"/>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="concat('font-size:',$first-value,';')"/>
						</xsl:otherwise>
					</xsl:choose>
					<xsl:value-of select="concat('font-family:',substring-after($value,' '),';')"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:if>
	</xsl:template>
	<xsl:template name="altova:css-styles-split-margin-style">
		<xsl:param name="value"/>
		<xsl:variable name="count">
			<xsl:call-template name="altova:vector-count">
				<xsl:with-param name="vector" select="$value"/>
				<xsl:with-param name="separator" select="' '"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:choose>
			<xsl:when test="number($count)=1">
				<xsl:variable name="value1">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="1"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:value-of select="concat('margin-top:',$value1,';')"/>
				<xsl:value-of select="concat('margin-right:',$value1,';')"/>
				<xsl:value-of select="concat('margin-bottom:',$value1,';')"/>
				<xsl:value-of select="concat('margin-left:',$value1,';')"/>
			</xsl:when>
			<xsl:when test="number($count)=2">
				<xsl:variable name="value1">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="1"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value2">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="2"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:value-of select="concat('margin-top:',$value1,';')"/>
				<xsl:value-of select="concat('margin-right:',$value2,';')"/>
				<xsl:value-of select="concat('margin-bottom:',$value1,';')"/>
				<xsl:value-of select="concat('margin-left:',$value2,';')"/>
			</xsl:when>
			<xsl:when test="number($count)=3">
				<xsl:variable name="value1">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="1"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value2">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="2"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value3">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="3"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:value-of select="concat('margin-top:',$value1,';')"/>
				<xsl:value-of select="concat('margin-right:',$value2,';')"/>
				<xsl:value-of select="concat('margin-bottom:',$value3,';')"/>
				<xsl:value-of select="concat('margin-left:',$value2,';')"/>
			</xsl:when>
			<xsl:when test="number($count)=4">
				<xsl:variable name="value1">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="1"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value2">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="2"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value3">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="3"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value4">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="4"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:value-of select="concat('margin-top:',$value1,';')"/>
				<xsl:value-of select="concat('margin-right:',$value2,';')"/>
				<xsl:value-of select="concat('margin-bottom:',$value3,';')"/>
				<xsl:value-of select="concat('margin-left:',$value4,';')"/>
			</xsl:when>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:css-styles-split-padding-style">
		<xsl:param name="value"/>
		<xsl:variable name="count">
			<xsl:call-template name="altova:vector-count">
				<xsl:with-param name="vector" select="$value"/>
				<xsl:with-param name="separator" select="' '"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:choose>
			<xsl:when test="number($count)=1">
				<xsl:variable name="value1">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="1"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:value-of select="concat('padding-top:',$value1,';')"/>
				<xsl:value-of select="concat('padding-right:',$value1,';')"/>
				<xsl:value-of select="concat('padding-bottom:',$value1,';')"/>
				<xsl:value-of select="concat('padding-left:',$value1,';')"/>
			</xsl:when>
			<xsl:when test="number($count)=2">
				<xsl:variable name="value1">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="1"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value2">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="2"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:value-of select="concat('padding-top:',$value1,';')"/>
				<xsl:value-of select="concat('padding-right:',$value2,';')"/>
				<xsl:value-of select="concat('padding-bottom:',$value1,';')"/>
				<xsl:value-of select="concat('padding-left:',$value2,';')"/>
			</xsl:when>
			<xsl:when test="number($count)=3">
				<xsl:variable name="value1">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="1"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value2">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="2"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value3">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="3"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:value-of select="concat('padding-top:',$value1,';')"/>
				<xsl:value-of select="concat('padding-right:',$value2,';')"/>
				<xsl:value-of select="concat('padding-bottom:',$value3,';')"/>
				<xsl:value-of select="concat('padding-left:',$value2,';')"/>
			</xsl:when>
			<xsl:when test="number($count)=4">
				<xsl:variable name="value1">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="1"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value2">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="2"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value3">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="3"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="value4">
					<xsl:call-template name="altova:vector-get-value">
						<xsl:with-param name="index" select="4"/>
						<xsl:with-param name="vector" select="$value"/>
						<xsl:with-param name="separator" select="' '"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:value-of select="concat('padding-top:',$value1,';')"/>
				<xsl:value-of select="concat('padding-right:',$value2,';')"/>
				<xsl:value-of select="concat('padding-bottom:',$value3,';')"/>
				<xsl:value-of select="concat('padding-left:',$value4,';')"/>
			</xsl:when>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:css-styles-output-fo-attributes">
		<xsl:param name="css-styles"/>
		<xsl:variable name="splitted-styles">
			<xsl:call-template name="altova:css-styles-split-shorthand-styles">
				<xsl:with-param name="css-styles" select="string($css-styles)"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:call-template name="altova:css-styles-output-fo-attributes-helper">
			<xsl:with-param name="css-styles" select="$splitted-styles"/>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="altova:css-styles-output-fo-attributes-helper">
		<xsl:param name="css-styles"/>
		<xsl:variable name="property" select="normalize-space(substring-before($css-styles,':'))"/>
		<xsl:if test="string($property) and not(contains($property,';'))">
			<xsl:choose>
				<xsl:when test="$property='html-table-align'"/>
				<xsl:when test="$property='vertical-align'">
					<xsl:attribute name="display-align">
						<xsl:variable name="value" select="normalize-space(substring-after(substring-before($css-styles,';'),':'))"/>
						<xsl:choose>
							<xsl:when test="$value='top'">before</xsl:when>
							<xsl:when test="$value='middle'">center</xsl:when>
							<xsl:when test="$value='bottom'">after</xsl:when>
							<xsl:otherwise>auto</xsl:otherwise>
						</xsl:choose>
					</xsl:attribute>
				</xsl:when>
				<xsl:otherwise>
					<xsl:attribute name="{$property}">
						<xsl:value-of select="normalize-space(substring-after(substring-before($css-styles,';'),':'))"/>
					</xsl:attribute>
				</xsl:otherwise>
			</xsl:choose>
			<xsl:call-template name="altova:css-styles-output-fo-attributes-helper">
				<xsl:with-param name="css-styles" select="substring-after($css-styles,';')"/>
			</xsl:call-template>
		</xsl:if>
	</xsl:template>
	<xsl:template name="altova:css-styles-convert-length-to-twips">
		<xsl:param name="css-length"/>
		<xsl:param name="dpi" select="96"/>
		<xsl:param name="em-height-pt" select="12"/>
		<xsl:param name="parent-length-twips" select="0"/>
		<xsl:choose>
			<xsl:when test="contains($css-length,'cm')">
				<xsl:value-of select="(number(substring-before($css-length,'cm')) * 1440) div 2.54"/>
			</xsl:when>
			<xsl:when test="contains($css-length,'mm')">
				<xsl:value-of select="(number(substring-before($css-length,'mm')) * 1440) div 25.4"/>
			</xsl:when>
			<xsl:when test="contains($css-length,'in')">
				<xsl:value-of select="number(substring-before($css-length,'in')) * 1440"/>
			</xsl:when>
			<xsl:when test="contains($css-length,'pc')">
				<xsl:value-of select="number(substring-before($css-length,'pc')) * 240"/>
			</xsl:when>
			<xsl:when test="contains($css-length,'pt')">
				<xsl:value-of select="number(substring-before($css-length,'pt')) * 20"/>
			</xsl:when>
			<xsl:when test="contains($css-length,'px')">
				<xsl:value-of select="(number(substring-before($css-length,'px')) * 1440) div $dpi"/>
			</xsl:when>
			<xsl:when test="contains($css-length,'em')">
				<xsl:value-of select="number(substring-before($css-length,'em')) * 20 * $em-height-pt"/>
			</xsl:when>
			<xsl:when test="contains($css-length,'ex')">
				<xsl:value-of select="number(substring-before($css-length,'ex')) * 10 * $em-height-pt"/>
			</xsl:when>
			<xsl:when test="contains($css-length,'%')">
				<xsl:value-of select="(number(substring-before($css-length,'%')) * $parent-length-twips) div 100"/>
			</xsl:when>
			<xsl:otherwise>0</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-calc-entry-effective-valign">
		<xsl:param name="colnum"/>
		<xsl:param name="rownum"/>
		<xsl:param name="row"/>
		<xsl:param name="entry"/>
		<xsl:param name="col-vector"/>
		<xsl:choose>
			<xsl:when test="$entry">
				<xsl:choose>
					<xsl:when test="$entry/@valign">
						<xsl:value-of select="$entry/@valign"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:call-template name="altova:cals-table-calc-row-effective-valign">
							<xsl:with-param name="row" select="$row"/>
						</xsl:call-template>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="altova:cals-table-calc-row-effective-valign">
					<xsl:with-param name="row" select="$row"/>
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-calc-row-effective-valign">
		<xsl:param name="row"/>
		<xsl:choose>
			<xsl:when test="$row/@valign">
				<xsl:value-of select="$row/@valign"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="altova:cals-table-calc-tbody-effective-valign">
					<xsl:with-param name="tbody" select="$row/.."/>
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-calc-tbody-effective-valign">
		<xsl:param name="tbody"/>
		<xsl:if test="$tbody/@valign">
			<xsl:value-of select="$tbody/@valign"/>
		</xsl:if>
	</xsl:template>
	<xsl:template name="altova:cals-table-map-colspec-colwidth-to-fo-column-width">
		<xsl:param name="colwidth"/>
		<xsl:variable name="proportional-width" select="normalize-space(substring-before($colwidth,'*'))"/>
		<xsl:variable name="absolute-width">
			<xsl:choose>
				<xsl:when test="contains($colwidth,'*')">
					<xsl:value-of select="normalize-space(substring-after($colwidth,'*'))"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="normalize-space($colwidth)"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:if test="$proportional-width">
			<xsl:value-of select="concat('proportional-column-width(',$proportional-width,')')"/>
		</xsl:if>
		<xsl:if test="string($absolute-width)">
			<xsl:choose>
				<xsl:when test="contains($absolute-width,'pi')">
					<xsl:value-of select="concat(substring-before($absolute-width,'pi'),'pc')"/>
				</xsl:when>
				<xsl:when test="not(normalize-space(translate($absolute-width,'0123456789.-+','')))">
					<xsl:value-of select="concat(normalize-space($absolute-width),'pt')"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="$absolute-width"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:if>
	</xsl:template>
	<xsl:template name="altova:cals-table-map-colspec-colwidth-to-width-style">
		<xsl:param name="colwidth"/>
		<xsl:param name="colwidth-proportional-total"/>
		<xsl:choose>
			<xsl:when test="contains($colwidth,'*')">
				<xsl:variable name="proportional-width" select="number(substring-before($colwidth,'*'))"/>
				<xsl:value-of select="concat('width:',round(($proportional-width * 100) div $colwidth-proportional-total),'%;')"/>
			</xsl:when>
			<xsl:when test="contains($colwidth,'pi')">
				<xsl:value-of select="concat('width:',substring-before($colwidth,'pi'),'pc;')"/>
			</xsl:when>
			<xsl:when test="not(normalize-space(translate($colwidth,'0123456789.-+','')))">
				<xsl:value-of select="concat('width:',normalize-space($colwidth),'pt;')"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="concat('width:',$colwidth,';')"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-calc-effective-colwidth-in-twips">
		<xsl:param name="effective-colwidth"/>
		<xsl:param name="proportional-unit-width-twips"/>
		<xsl:variable name="proportional-width">
			<xsl:choose>
				<xsl:when test="contains($effective-colwidth,'*')">
					<xsl:value-of select="substring-before($effective-colwidth,'*')"/>
				</xsl:when>
				<xsl:otherwise>0</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="absolute-width-twips">
			<xsl:call-template name="altova:cals-table-convert-colwidth-to-twips">
				<xsl:with-param name="colwidth" select="$effective-colwidth"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:value-of select="number($proportional-width) * $proportional-unit-width-twips + number($absolute-width-twips)"/>
	</xsl:template>
	<xsl:template name="altova:cals-table-calc-entry-spanned-rows">
		<xsl:param name="entry"/>
		<xsl:choose>
			<xsl:when test="$entry">
				<xsl:choose>
					<xsl:when test="$entry/@morerows">
						<xsl:value-of select="$entry/@morerows"/>
					</xsl:when>
					<xsl:otherwise>0</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>0</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-map-entry-colrowsep-to-border-style">
		<xsl:param name="colsep"/>
		<xsl:param name="rowsep"/>
		<xsl:param name="is-not-last-col"/>
		<xsl:param name="is-not-last-row"/>
		<xsl:param name="entry-styles"/>
		<xsl:text>border-top-style:none;</xsl:text>
		<xsl:variable name="border-right-style">
			<xsl:variable name="user-value">
				<xsl:call-template name="altova:css-styles-get-property">
					<xsl:with-param name="css-styles" select="$entry-styles"/>
					<xsl:with-param name="property" select="'border-right-style'"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:choose>
				<xsl:when test="$colsep!='0' and $is-not-last-col">
					<xsl:if test="not(string($user-value))">solid</xsl:if>
				</xsl:when>
				<xsl:otherwise>none</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:if test="string($border-right-style)">
			<xsl:value-of select="concat('border-right-style:',$border-right-style,';')"/>
		</xsl:if>
		<xsl:variable name="border-bottom-style">
			<xsl:variable name="user-value">
				<xsl:call-template name="altova:css-styles-get-property">
					<xsl:with-param name="css-styles" select="$entry-styles"/>
					<xsl:with-param name="property" select="'border-bottom-style'"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:choose>
				<xsl:when test="$rowsep!='0' and $is-not-last-row">
					<xsl:if test="not(string($user-value))">solid</xsl:if>
				</xsl:when>
				<xsl:otherwise>none</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:if test="string($border-bottom-style)">
			<xsl:value-of select="concat('border-bottom-style:',$border-bottom-style,';')"/>
		</xsl:if>
		<xsl:text>border-left-style:none;</xsl:text>
	</xsl:template>
	<xsl:template name="altova:cals-table-calc-table-effective-frame">
		<xsl:param name="table"/>
		<xsl:choose>
			<xsl:when test="$table/@frame">
				<xsl:choose>
					<xsl:when test="string($table/@frame)='top'">top</xsl:when>
					<xsl:when test="string($table/@frame)='bottom'">bottom</xsl:when>
					<xsl:when test="string($table/@frame)='topbot'">topbot</xsl:when>
					<xsl:when test="string($table/@frame)='all'">all</xsl:when>
					<xsl:when test="string($table/@frame)='sides'">sides</xsl:when>
					<xsl:when test="string($table/@frame)='none'">none</xsl:when>
					<xsl:otherwise>all</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>all</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-calc-table-effective-pgwide">
		<xsl:param name="table"/>
		<xsl:choose>
			<xsl:when test="$table/@pgwide">
				<xsl:choose>
					<xsl:when test="number($table/@pgwide)=0">0</xsl:when>
					<xsl:otherwise>1</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>0</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-calc-table-effective-colsep">
		<xsl:param name="table"/>
		<xsl:choose>
			<xsl:when test="$table/@colsep">
				<xsl:choose>
					<xsl:when test="number($table/@colsep)=0">0</xsl:when>
					<xsl:otherwise>1</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>1</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-calc-table-effective-rowsep">
		<xsl:param name="table"/>
		<xsl:choose>
			<xsl:when test="$table/@rowsep">
				<xsl:choose>
					<xsl:when test="number($table/@rowsep)=0">0</xsl:when>
					<xsl:otherwise>1</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>1</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-calc-tgroup-effective-colsep">
		<xsl:param name="tgroup"/>
		<xsl:choose>
			<xsl:when test="$tgroup/@colsep">
				<xsl:choose>
					<xsl:when test="number($tgroup/@colsep)=0">0</xsl:when>
					<xsl:otherwise>1</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="altova:cals-table-calc-table-effective-colsep">
					<xsl:with-param name="table" select="$tgroup/.."/>
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-calc-tgroup-effective-rowsep">
		<xsl:param name="tgroup"/>
		<xsl:choose>
			<xsl:when test="$tgroup/@rowsep">
				<xsl:choose>
					<xsl:when test="number($tgroup/@rowsep)=0">0</xsl:when>
					<xsl:otherwise>1</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="altova:cals-table-calc-table-effective-rowsep">
					<xsl:with-param name="table" select="$tgroup/.."/>
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-convert-colwidth-to-twips">
		<xsl:param name="colwidth"/>
		<xsl:variable name="absolute-width">
			<xsl:choose>
				<xsl:when test="contains($colwidth,'*')">
					<xsl:value-of select="normalize-space(substring-after($colwidth,'*'))"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="normalize-space($colwidth)"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:choose>
			<xsl:when test="contains($absolute-width,'cm')">
				<xsl:value-of select="(number(substring-before($absolute-width,'cm')) * 1440) div 2.54"/>
			</xsl:when>
			<xsl:when test="contains($absolute-width,'mm')">
				<xsl:value-of select="(number(substring-before($absolute-width,'mm')) * 1440) div 25.4"/>
			</xsl:when>
			<xsl:when test="contains($absolute-width,'in')">
				<xsl:value-of select="number(substring-before($absolute-width,'in')) * 1440"/>
			</xsl:when>
			<xsl:when test="contains($absolute-width,'pi')">
				<xsl:value-of select="number(substring-before($absolute-width,'pi')) * 240"/>
			</xsl:when>
			<xsl:when test="contains($absolute-width,'pt')">
				<xsl:value-of select="number(substring-before($absolute-width,'pt')) * 20"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:choose>
					<xsl:when test="string($absolute-width)">
						<xsl:value-of select="number($absolute-width) * 20"/>
					</xsl:when>
					<xsl:otherwise>0</xsl:otherwise>
				</xsl:choose>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-get-table-user-styles"/>
	<xsl:template name="altova:cals-table-DATE-get-title-user-styles"/>
	<xsl:template name="altova:cals-table-DATE-get-tgroup-user-styles"/>
	<xsl:template name="altova:cals-table-DATE-get-thead-user-styles"/>
	<xsl:template name="altova:cals-table-DATE-get-tfoot-user-styles"/>
	<xsl:template name="altova:cals-table-DATE-get-tbody-user-styles"/>
	<xsl:template name="altova:cals-table-DATE-get-row-user-styles">
		<xsl:param name="rownum"/>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-get-entry-user-styles">
		<xsl:param name="colnum"/>
		<xsl:param name="rownum"/>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-get-entrytbl-user-styles">
		<xsl:param name="colnum"/>
		<xsl:param name="rownum"/>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-get-colspec-user-styles">
		<xsl:param name="colnum"/>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-get-spanspec-user-styles"/>
	<xsl:template name="altova:cals-table-DATE-is-last-table-row">
		<xsl:param name="row"/>
		<xsl:choose>
			<xsl:when test="$row/../../following-sibling::tgroup">0</xsl:when>
			<xsl:when test="$row/parent::altova:no-elem">0</xsl:when>
			<xsl:when test="$row/parent::altova:no-elem">
				<xsl:choose>
					<xsl:when test="$row/following-sibling::row">0</xsl:when>
					<xsl:otherwise>1</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$row/parent::tbody">
				<xsl:choose>
					<xsl:when test="$row/../preceding-sibling::altova:no-elem">0</xsl:when>
					<xsl:when test="$row/../following-sibling::tbody">0</xsl:when>
					<xsl:when test="$row/following-sibling::row">0</xsl:when>
					<xsl:otherwise>1</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-calc-entry-effective-colsep">
		<xsl:param name="colnum"/>
		<xsl:param name="rownum"/>
		<xsl:param name="row"/>
		<xsl:param name="entry"/>
		<xsl:param name="col-vector"/>
		<xsl:choose>
			<xsl:when test="$entry">
				<xsl:choose>
					<xsl:when test="$entry/@colsep">
						<xsl:choose>
							<xsl:when test="number($entry/@colsep)=0">0</xsl:when>
							<xsl:otherwise>1</xsl:otherwise>
						</xsl:choose>
					</xsl:when>
					<xsl:when test="$entry/@spanname">
						<xsl:call-template name="altova:cals-table-DATE-calc-spanspec-effective-colsep">
							<xsl:with-param name="spanspec" select="$entry/../../../altova:no-elem[@spanname=$entry/@spanname]"/>
							<xsl:with-param name="colnum" select="$colnum"/>
							<xsl:with-param name="tgroup" select="$row/../.."/>
							<xsl:with-param name="col-vector" select="$col-vector"/>
						</xsl:call-template>
					</xsl:when>
					<xsl:otherwise>
						<xsl:call-template name="altova:cals-table-DATE-calc-colspec-effective-colsep">
							<xsl:with-param name="colnum" select="$colnum"/>
							<xsl:with-param name="tgroup" select="$row/../.."/>
							<xsl:with-param name="col-vector" select="$col-vector"/>
						</xsl:call-template>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="altova:cals-table-DATE-calc-colspec-effective-colsep">
					<xsl:with-param name="colnum" select="$colnum"/>
					<xsl:with-param name="tgroup" select="$row/../.."/>
					<xsl:with-param name="col-vector" select="$col-vector"/>
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-calc-entry-effective-rowsep">
		<xsl:param name="colnum"/>
		<xsl:param name="rownum"/>
		<xsl:param name="row"/>
		<xsl:param name="entry"/>
		<xsl:param name="col-vector"/>
		<xsl:choose>
			<xsl:when test="$entry">
				<xsl:choose>
					<xsl:when test="$entry/@rowsep">
						<xsl:choose>
							<xsl:when test="number($entry/@rowsep)=0">0</xsl:when>
							<xsl:otherwise>1</xsl:otherwise>
						</xsl:choose>
					</xsl:when>
					<xsl:when test="$row/@rowsep">
						<xsl:choose>
							<xsl:when test="number($row/@rowsep)=0">0</xsl:when>
							<xsl:otherwise>1</xsl:otherwise>
						</xsl:choose>
					</xsl:when>
					<xsl:when test="$entry/@spanname">
						<xsl:call-template name="altova:cals-table-DATE-calc-spanspec-effective-rowsep">
							<xsl:with-param name="spanspec" select="$entry/../../../altova:no-elem[@spanname=$entry/@spanname]"/>
							<xsl:with-param name="colnum" select="$colnum"/>
							<xsl:with-param name="tgroup" select="$row/../.."/>
							<xsl:with-param name="col-vector" select="$col-vector"/>
						</xsl:call-template>
					</xsl:when>
					<xsl:otherwise>
						<xsl:call-template name="altova:cals-table-DATE-calc-colspec-effective-rowsep">
							<xsl:with-param name="colnum" select="$colnum"/>
							<xsl:with-param name="tgroup" select="$row/../.."/>
							<xsl:with-param name="col-vector" select="$col-vector"/>
						</xsl:call-template>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>
				<xsl:choose>
					<xsl:when test="$row/@rowsep">
						<xsl:choose>
							<xsl:when test="number($row/@rowsep)=0">0</xsl:when>
							<xsl:otherwise>1</xsl:otherwise>
						</xsl:choose>
					</xsl:when>
					<xsl:otherwise>
						<xsl:call-template name="altova:cals-table-DATE-calc-colspec-effective-rowsep">
							<xsl:with-param name="colnum" select="$colnum"/>
							<xsl:with-param name="tgroup" select="$row/../.."/>
							<xsl:with-param name="col-vector" select="$col-vector"/>
						</xsl:call-template>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-calc-entry-effective-align">
		<xsl:param name="colnum"/>
		<xsl:param name="rownum"/>
		<xsl:param name="row"/>
		<xsl:param name="entry"/>
		<xsl:param name="col-vector"/>
		<xsl:choose>
			<xsl:when test="$entry">
				<xsl:choose>
					<xsl:when test="$entry/@align">
						<xsl:value-of select="$entry/@align"/>
					</xsl:when>
					<xsl:when test="$entry/@spanname">
						<xsl:call-template name="altova:cals-table-DATE-calc-spanspec-effective-align">
							<xsl:with-param name="spanspec" select="$entry/../../../altova:no-elem[@spanname=$entry/@spanname]"/>
							<xsl:with-param name="colnum" select="$colnum"/>
							<xsl:with-param name="tgroup" select="$row/../.."/>
							<xsl:with-param name="col-vector" select="$col-vector"/>
						</xsl:call-template>
					</xsl:when>
					<xsl:otherwise>
						<xsl:call-template name="altova:cals-table-DATE-calc-colspec-effective-align">
							<xsl:with-param name="colnum" select="$colnum"/>
							<xsl:with-param name="tgroup" select="$row/../.."/>
							<xsl:with-param name="col-vector" select="$col-vector"/>
						</xsl:call-template>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="altova:cals-table-DATE-calc-colspec-effective-align">
					<xsl:with-param name="colnum" select="$colnum"/>
					<xsl:with-param name="tgroup" select="$row/../.."/>
					<xsl:with-param name="col-vector" select="$col-vector"/>
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-get-column-index">
		<xsl:param name="colname"/>
		<xsl:param name="tgroup"/>
		<xsl:param name="col-vector"/>
		<xsl:call-template name="altova:char-vector-calc-index-of-nth-char">
			<xsl:with-param name="n" select="count($tgroup/colspec[@colname=$colname]/preceding-sibling::colspec) + 1"/>
			<xsl:with-param name="char" select="'1'"/>
			<xsl:with-param name="char-vector" select="$col-vector"/>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-get-entry-referenced-column-index">
		<xsl:param name="entry"/>
		<xsl:param name="col-vector"/>
		<xsl:choose>
			<xsl:when test="$entry/@spanname">
				<xsl:call-template name="altova:cals-table-DATE-get-column-index">
					<xsl:with-param name="colname" select="$entry/../../../altova:no-elem[@spanname=$entry/@spanname]/@namest"/>
					<xsl:with-param name="tgroup" select="$entry/../../.."/>
					<xsl:with-param name="col-vector" select="$col-vector"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:when test="$entry/@namest">
				<xsl:call-template name="altova:cals-table-DATE-get-column-index">
					<xsl:with-param name="colname" select="$entry/@namest"/>
					<xsl:with-param name="tgroup" select="$entry/../../.."/>
					<xsl:with-param name="col-vector" select="$col-vector"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:when test="$entry/@colname">
				<xsl:call-template name="altova:cals-table-DATE-get-column-index">
					<xsl:with-param name="colname" select="$entry/@colname"/>
					<xsl:with-param name="tgroup" select="$entry/../../.."/>
					<xsl:with-param name="col-vector" select="$col-vector"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>-1</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-calc-entry-spanned-cols">
		<xsl:param name="entry"/>
		<xsl:param name="col-vector"/>
		<xsl:choose>
			<xsl:when test="$entry">
				<xsl:choose>
					<xsl:when test="$entry/@spanname">
						<xsl:variable name="startcol">
							<xsl:call-template name="altova:cals-table-DATE-get-column-index">
								<xsl:with-param name="colname" select="$entry/../../../altova:no-elem[@spanname=$entry/@spanname]/@namest"/>
								<xsl:with-param name="tgroup" select="$entry/../../.."/>
								<xsl:with-param name="col-vector" select="$col-vector"/>
							</xsl:call-template>
						</xsl:variable>
						<xsl:variable name="endcol">
							<xsl:call-template name="altova:cals-table-DATE-get-column-index">
								<xsl:with-param name="colname" select="$entry/../../../altova:no-elem[@spanname=$entry/@spanname]/@nameend"/>
								<xsl:with-param name="tgroup" select="$entry/../../.."/>
								<xsl:with-param name="col-vector" select="$col-vector"/>
							</xsl:call-template>
						</xsl:variable>
						<xsl:value-of select="number($endcol) - number($startcol)"/>
					</xsl:when>
					<xsl:when test="$entry/@nameend">
						<xsl:variable name="startcol">
							<xsl:call-template name="altova:cals-table-DATE-get-column-index">
								<xsl:with-param name="colname" select="$entry/@namest"/>
								<xsl:with-param name="tgroup" select="$entry/../../.."/>
								<xsl:with-param name="col-vector" select="$col-vector"/>
							</xsl:call-template>
						</xsl:variable>
						<xsl:variable name="endcol">
							<xsl:call-template name="altova:cals-table-DATE-get-column-index">
								<xsl:with-param name="colname" select="$entry/@nameend"/>
								<xsl:with-param name="tgroup" select="$entry/../../.."/>
								<xsl:with-param name="col-vector" select="$col-vector"/>
							</xsl:call-template>
						</xsl:variable>
						<xsl:value-of select="number($endcol) - number($startcol)"/>
					</xsl:when>
					<xsl:otherwise>0</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>0</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-map-table-frame-to-border-style">
		<xsl:param name="frame"/>
		<xsl:param name="tgroup"/>
		<xsl:param name="table-styles"/>
		<xsl:variable name="border-top-style">
			<xsl:variable name="user-value">
				<xsl:call-template name="altova:css-styles-get-property">
					<xsl:with-param name="css-styles" select="$table-styles"/>
					<xsl:with-param name="property" select="'border-top-style'"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:choose>
				<xsl:when test="$frame='all' and count($tgroup/preceding-sibling::tgroup)=0">
					<xsl:if test="not(string($user-value))">solid</xsl:if>
				</xsl:when>
				<xsl:when test="$frame='top' and count($tgroup/preceding-sibling::tgroup)=0">
					<xsl:if test="not(string($user-value))">solid</xsl:if>
				</xsl:when>
				<xsl:when test="$frame='topbot' and count($tgroup/preceding-sibling::tgroup)=0">
					<xsl:if test="not(string($user-value))">solid</xsl:if>
				</xsl:when>
				<xsl:otherwise>none</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:if test="string($border-top-style)">
			<xsl:value-of select="concat('border-top-style:',$border-top-style,';')"/>
		</xsl:if>
		<xsl:variable name="border-right-style">
			<xsl:variable name="user-value">
				<xsl:call-template name="altova:css-styles-get-property">
					<xsl:with-param name="css-styles" select="$table-styles"/>
					<xsl:with-param name="property" select="'border-right-style'"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:choose>
				<xsl:when test="$frame='all'">
					<xsl:if test="not(string($user-value))">solid</xsl:if>
				</xsl:when>
				<xsl:when test="$frame='sides'">
					<xsl:if test="not(string($user-value))">solid</xsl:if>
				</xsl:when>
				<xsl:otherwise>none</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:if test="string($border-right-style)">
			<xsl:value-of select="concat('border-right-style:',$border-right-style,';')"/>
		</xsl:if>
		<xsl:variable name="border-bottom-style">
			<xsl:variable name="user-value">
				<xsl:call-template name="altova:css-styles-get-property">
					<xsl:with-param name="css-styles" select="$table-styles"/>
					<xsl:with-param name="property" select="'border-bottom-style'"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:choose>
				<xsl:when test="$frame='all' and count($tgroup/following-sibling::tgroup)=0">
					<xsl:if test="not(string($user-value))">solid</xsl:if>
				</xsl:when>
				<xsl:when test="$frame='bottom' and count($tgroup/following-sibling::tgroup)=0">
					<xsl:if test="not(string($user-value))">solid</xsl:if>
				</xsl:when>
				<xsl:when test="$frame='topbot' and count($tgroup/following-sibling::tgroup)=0">
					<xsl:if test="not(string($user-value))">solid</xsl:if>
				</xsl:when>
				<xsl:otherwise>none</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:if test="string($border-bottom-style)">
			<xsl:value-of select="concat('border-bottom-style:',$border-bottom-style,';')"/>
		</xsl:if>
		<xsl:variable name="border-left-style">
			<xsl:variable name="user-value">
				<xsl:call-template name="altova:css-styles-get-property">
					<xsl:with-param name="css-styles" select="$table-styles"/>
					<xsl:with-param name="property" select="'border-left-style'"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:choose>
				<xsl:when test="$frame='all'">
					<xsl:if test="not(string($user-value))">solid</xsl:if>
				</xsl:when>
				<xsl:when test="$frame='sides'">
					<xsl:if test="not(string($user-value))">solid</xsl:if>
				</xsl:when>
				<xsl:otherwise>none</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:if test="string($border-left-style)">
			<xsl:value-of select="concat('border-left-style:',$border-left-style,';')"/>
		</xsl:if>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-calc-colspec-effective-colsep">
		<xsl:param name="colnum"/>
		<xsl:param name="tgroup"/>
		<xsl:param name="col-vector"/>
		<xsl:variable name="defined" select="substring($col-vector,$colnum,1)"/>
		<xsl:choose>
			<xsl:when test="$defined='1'">
				<xsl:variable name="pos-in-xml" select="string-length(translate(substring($col-vector,1,$colnum),'10','1'))"/>
				<xsl:variable name="colspec" select="$tgroup/colspec[$pos-in-xml]"/>
				<xsl:choose>
					<xsl:when test="$colspec/@colsep">
						<xsl:choose>
							<xsl:when test="number($colspec/@colsep)=0">0</xsl:when>
							<xsl:otherwise>1</xsl:otherwise>
						</xsl:choose>
					</xsl:when>
					<xsl:otherwise>
						<xsl:call-template name="altova:cals-table-calc-tgroup-effective-colsep">
							<xsl:with-param name="tgroup" select="$tgroup"/>
						</xsl:call-template>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="altova:cals-table-calc-tgroup-effective-colsep">
					<xsl:with-param name="tgroup" select="$tgroup"/>
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-calc-colspec-effective-rowsep">
		<xsl:param name="colnum"/>
		<xsl:param name="tgroup"/>
		<xsl:param name="col-vector"/>
		<xsl:variable name="defined" select="substring($col-vector,$colnum,1)"/>
		<xsl:choose>
			<xsl:when test="$defined='1'">
				<xsl:variable name="pos-in-xml" select="string-length(translate(substring($col-vector,1,$colnum),'10','1'))"/>
				<xsl:variable name="colspec" select="$tgroup/colspec[$pos-in-xml]"/>
				<xsl:choose>
					<xsl:when test="$colspec/@rowsep">
						<xsl:choose>
							<xsl:when test="number($colspec/@rowsep)=0">0</xsl:when>
							<xsl:otherwise>1</xsl:otherwise>
						</xsl:choose>
					</xsl:when>
					<xsl:otherwise>
						<xsl:call-template name="altova:cals-table-calc-tgroup-effective-rowsep">
							<xsl:with-param name="tgroup" select="$tgroup"/>
						</xsl:call-template>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="altova:cals-table-calc-tgroup-effective-rowsep">
					<xsl:with-param name="tgroup" select="$tgroup"/>
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-calc-colspec-effective-align">
		<xsl:param name="colnum"/>
		<xsl:param name="tgroup"/>
		<xsl:param name="col-vector"/>
		<xsl:variable name="colspec-is-dummy" select="substring($col-vector,$colnum,1)='0'"/>
		<xsl:choose>
			<xsl:when test="not($colspec-is-dummy)">
				<xsl:variable name="pos-in-xml" select="string-length(translate(substring($col-vector,1,$colnum),'10','1'))"/>
				<xsl:variable name="colspec" select="$tgroup/colspec[$pos-in-xml]"/>
				<xsl:choose>
					<xsl:when test="$colspec/@align">
						<xsl:value-of select="$colspec/@align"/>
					</xsl:when>
					<xsl:when test="$tgroup/@align">
						<xsl:value-of select="$tgroup/@align"/>
					</xsl:when>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>
				<xsl:choose>
					<xsl:when test="$tgroup/@align">
						<xsl:value-of select="$tgroup/@align"/>
					</xsl:when>
				</xsl:choose>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-calc-colspec-effective-char">
		<xsl:param name="colnum"/>
		<xsl:param name="tgroup"/>
		<xsl:param name="col-vector"/>
		<xsl:variable name="colspec-is-dummy" select="substring($col-vector,$colnum,1)='0'"/>
		<xsl:if test="not($colspec-is-dummy)">
			<xsl:variable name="pos-in-xml" select="string-length(translate(substring($col-vector,1,$colnum),'10','1'))"/>
			<xsl:variable name="colspec" select="$tgroup/colspec[$pos-in-xml]"/>
			<xsl:value-of select="$colspec/@char"/>
		</xsl:if>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-calc-colspec-effective-charoff">
		<xsl:param name="colnum"/>
		<xsl:param name="tgroup"/>
		<xsl:param name="col-vector"/>
		<xsl:variable name="colspec-is-dummy" select="substring($col-vector,$colnum,1)='0'"/>
		<xsl:if test="not($colspec-is-dummy)">
			<xsl:variable name="pos-in-xml" select="string-length(translate(substring($col-vector,1,$colnum),'10','1'))"/>
			<xsl:variable name="colspec" select="$tgroup/colspec[$pos-in-xml]"/>
			<xsl:value-of select="$colspec/@charoff"/>
		</xsl:if>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-calc-colspec-effective-colwidth">
		<xsl:param name="colnum"/>
		<xsl:param name="tgroup"/>
		<xsl:param name="col-vector"/>
		<xsl:variable name="colspec-is-dummy" select="substring($col-vector,$colnum,1)='0'"/>
		<xsl:choose>
			<xsl:when test="not($colspec-is-dummy)">
				<xsl:variable name="pos-in-xml" select="string-length(translate(substring($col-vector,1,$colnum),'10','1'))"/>
				<xsl:variable name="colspec" select="$tgroup/colspec[$pos-in-xml]"/>
				<xsl:choose>
					<xsl:when test="string($colspec/@colwidth)">
						<xsl:choose>
							<xsl:when test="string($colspec/@colwidth) = '*'">1*</xsl:when>
							<xsl:otherwise>
								<xsl:value-of select="$colspec/@colwidth"/>
							</xsl:otherwise>
						</xsl:choose>
					</xsl:when>
					<xsl:otherwise>1*</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>1*</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-calc-colspec-colwidth-absolute-total-twips">
		<xsl:param name="tgroup"/>
		<xsl:param name="col-vector"/>
		<xsl:call-template name="altova:cals-table-DATE-calc-colspec-colwidth-absolute-total-twips-helper">
			<xsl:with-param name="total-twips" select="0"/>
			<xsl:with-param name="tgroup" select="$tgroup"/>
			<xsl:with-param name="colnum" select="1"/>
			<xsl:with-param name="col-count" select="string-length($col-vector)"/>
			<xsl:with-param name="col-vector" select="$col-vector"/>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-calc-colspec-colwidth-absolute-total-twips-helper">
		<xsl:param name="total-twips"/>
		<xsl:param name="tgroup"/>
		<xsl:param name="colnum"/>
		<xsl:param name="col-count"/>
		<xsl:param name="col-vector"/>
		<xsl:choose>
			<xsl:when test="$colnum &lt;= $col-count">
				<xsl:variable name="effective-colwidth">
					<xsl:call-template name="altova:cals-table-DATE-calc-colspec-effective-colwidth">
						<xsl:with-param name="colnum" select="$colnum"/>
						<xsl:with-param name="tgroup" select="$tgroup"/>
						<xsl:with-param name="col-vector" select="$col-vector"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="absolute-width-twips">
					<xsl:call-template name="altova:cals-table-convert-colwidth-to-twips">
						<xsl:with-param name="colwidth" select="$effective-colwidth"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:call-template name="altova:cals-table-DATE-calc-colspec-colwidth-absolute-total-twips-helper">
					<xsl:with-param name="total-twips" select="$total-twips + number($absolute-width-twips)"/>
					<xsl:with-param name="tgroup" select="$tgroup"/>
					<xsl:with-param name="colnum" select="$colnum + 1"/>
					<xsl:with-param name="col-count" select="$col-count"/>
					<xsl:with-param name="col-vector" select="$col-vector"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$total-twips"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-calc-colspec-colwidth-proportional-total">
		<xsl:param name="tgroup"/>
		<xsl:param name="col-vector"/>
		<xsl:call-template name="altova:cals-table-DATE-calc-colspec-colwidth-proportional-total-helper">
			<xsl:with-param name="total" select="0"/>
			<xsl:with-param name="tgroup" select="$tgroup"/>
			<xsl:with-param name="colnum" select="1"/>
			<xsl:with-param name="col-count" select="string-length($col-vector)"/>
			<xsl:with-param name="col-vector" select="$col-vector"/>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-calc-colspec-colwidth-proportional-total-helper">
		<xsl:param name="total"/>
		<xsl:param name="tgroup"/>
		<xsl:param name="colnum"/>
		<xsl:param name="col-count"/>
		<xsl:param name="col-vector"/>
		<xsl:choose>
			<xsl:when test="$colnum &lt;= $col-count">
				<xsl:variable name="effective-colwidth">
					<xsl:call-template name="altova:cals-table-DATE-calc-colspec-effective-colwidth">
						<xsl:with-param name="colnum" select="$colnum"/>
						<xsl:with-param name="tgroup" select="$tgroup"/>
						<xsl:with-param name="col-vector" select="$col-vector"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="proportional-width">
					<xsl:choose>
						<xsl:when test="contains($effective-colwidth,'*')">
							<xsl:value-of select="substring-before($effective-colwidth,'*')"/>
						</xsl:when>
						<xsl:otherwise>0</xsl:otherwise>
					</xsl:choose>
				</xsl:variable>
				<xsl:call-template name="altova:cals-table-DATE-calc-colspec-colwidth-proportional-total-helper">
					<xsl:with-param name="total" select="$total + number($proportional-width)"/>
					<xsl:with-param name="tgroup" select="$tgroup"/>
					<xsl:with-param name="colnum" select="$colnum + 1"/>
					<xsl:with-param name="col-count" select="$col-count"/>
					<xsl:with-param name="col-vector" select="$col-vector"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$total"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-calc-spanspec-effective-colsep">
		<xsl:param name="spanspec"/>
		<xsl:param name="colnum"/>
		<xsl:param name="tgroup"/>
		<xsl:param name="col-vector"/>
		<xsl:choose>
			<xsl:when test="$spanspec/@colsep">
				<xsl:choose>
					<xsl:when test="number($spanspec/@colsep)=0">0</xsl:when>
					<xsl:otherwise>1</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="altova:cals-table-DATE-calc-colspec-effective-colsep">
					<xsl:with-param name="colnum" select="$colnum"/>
					<xsl:with-param name="tgroup" select="$spanspec/.."/>
					<xsl:with-param name="col-vector" select="$col-vector"/>
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-calc-spanspec-effective-rowsep">
		<xsl:param name="spanspec"/>
		<xsl:param name="colnum"/>
		<xsl:param name="tgroup"/>
		<xsl:param name="col-vector"/>
		<xsl:choose>
			<xsl:when test="$spanspec/@rowsep">
				<xsl:choose>
					<xsl:when test="number($spanspec/@rowsep)=0">0</xsl:when>
					<xsl:otherwise>1</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="altova:cals-table-DATE-calc-colspec-effective-rowsep">
					<xsl:with-param name="colnum" select="$colnum"/>
					<xsl:with-param name="tgroup" select="$spanspec/.."/>
					<xsl:with-param name="col-vector" select="$col-vector"/>
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-calc-spanspec-effective-align">
		<xsl:param name="spanspec"/>
		<xsl:param name="colnum"/>
		<xsl:param name="tgroup"/>
		<xsl:param name="col-vector"/>
		<xsl:choose>
			<xsl:when test="$spanspec/@align">
				<xsl:value-of select="$spanspec/@align"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="altova:cals-table-DATE-calc-colspec-effective-align">
					<xsl:with-param name="colnum" select="$colnum"/>
					<xsl:with-param name="tgroup" select="$spanspec/.."/>
					<xsl:with-param name="col-vector" select="$col-vector"/>
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-generate-col-vector">
		<xsl:param name="tgroup"/>
		<xsl:variable name="col-vector">
			<xsl:call-template name="altova:cals-table-DATE-generate-col-vector-colspec">
				<xsl:with-param name="colspec" select="$tgroup/colspec[1]"/>
				<xsl:with-param name="pos" select="1"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:value-of select="$col-vector"/>
		<xsl:if test="string-length($col-vector) &lt; number($tgroup/@cols)">
			<xsl:call-template name="altova:char-vector-append">
				<xsl:with-param name="count" select="number($tgroup/@cols) - string-length($col-vector)"/>
				<xsl:with-param name="char" select="'0'"/>
			</xsl:call-template>
		</xsl:if>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-generate-col-vector-colspec">
		<xsl:param name="colspec"/>
		<xsl:param name="pos"/>
		<xsl:variable name="colnum">
			<xsl:choose>
				<xsl:when test="$colspec/@colnum">
					<xsl:value-of select="$colspec/@colnum"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="$pos"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:if test="$pos &lt; number($colnum)">
			<xsl:call-template name="altova:char-vector-append">
				<xsl:with-param name="count" select="number($colnum) - $pos"/>
				<xsl:with-param name="char" select="'0'"/>
			</xsl:call-template>
		</xsl:if>
		<xsl:call-template name="altova:char-vector-append">
			<xsl:with-param name="count" select="1"/>
			<xsl:with-param name="char" select="'1'"/>
		</xsl:call-template>
		<xsl:for-each select="$colspec/following-sibling::colspec[1]">
			<xsl:call-template name="altova:cals-table-DATE-generate-col-vector-colspec">
				<xsl:with-param name="colspec" select="."/>
				<xsl:with-param name="pos" select="number($colnum) + 1"/>
			</xsl:call-template>
		</xsl:for-each>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-generate-table-matrix">
		<xsl:param name="tbody"/>
		<xsl:param name="col-vector"/>
		<xsl:variable name="rowinfo">
			<xsl:call-template name="altova:vector-append">
				<xsl:with-param name="count" select="string-length($col-vector)*2"/>
				<xsl:with-param name="value" select="'0'"/>
				<xsl:with-param name="separator" select="';'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:call-template name="altova:cals-table-DATE-generate-table-matrix-row">
			<xsl:with-param name="row" select="$tbody/row[1]"/>
			<xsl:with-param name="rowinfo" select="$rowinfo"/>
			<xsl:with-param name="col-vector" select="$col-vector"/>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-generate-table-matrix-row">
		<xsl:param name="row"/>
		<xsl:param name="rowinfo"/>
		<xsl:param name="col-vector"/>
		<xsl:variable name="first-entry" select="($row/entry|$row/altova:no-elem)[1]"/>
		<xsl:call-template name="altova:cals-table-DATE-generate-table-matrix-entry">
			<xsl:with-param name="entry" select="$first-entry"/>
			<xsl:with-param name="pos" select="1"/>
			<xsl:with-param name="rowinfo" select="$rowinfo"/>
			<xsl:with-param name="col-vector" select="$col-vector"/>
		</xsl:call-template>
		<xsl:variable name="nextrowinfo">
			<xsl:call-template name="altova:cals-table-DATE-generate-table-matrix-nextrowinfo">
				<xsl:with-param name="entry" select="$first-entry"/>
				<xsl:with-param name="pos" select="1"/>
				<xsl:with-param name="rowinfo" select="$rowinfo"/>
				<xsl:with-param name="col-vector" select="$col-vector"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:for-each select="$row/following-sibling::row[1]">
			<xsl:call-template name="altova:cals-table-DATE-generate-table-matrix-row">
				<xsl:with-param name="row" select="."/>
				<xsl:with-param name="rowinfo" select="$nextrowinfo"/>
				<xsl:with-param name="col-vector" select="$col-vector"/>
			</xsl:call-template>
		</xsl:for-each>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-generate-table-matrix-entry">
		<xsl:param name="entry"/>
		<xsl:param name="pos"/>
		<xsl:param name="rowinfo"/>
		<xsl:param name="col-vector"/>
		<xsl:variable name="colpos">
			<xsl:call-template name="altova:cals-table-DATE-get-entry-referenced-column-index">
				<xsl:with-param name="entry" select="$entry"/>
				<xsl:with-param name="col-vector" select="$col-vector"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="dummy-cells">
			<xsl:call-template name="altova:xml-table-fill-table-matrix-with-dummy-cells">
				<xsl:with-param name="pos" select="$pos"/>
				<xsl:with-param name="endpos" select="$colpos"/>
				<xsl:with-param name="rowinfo" select="$rowinfo"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:value-of select="$dummy-cells"/>
		<xsl:value-of select="'1'"/>
		<xsl:variable name="colspan">
			<xsl:call-template name="altova:cals-table-DATE-calc-entry-spanned-cols">
				<xsl:with-param name="entry" select="$entry"/>
				<xsl:with-param name="col-vector" select="$col-vector"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:call-template name="altova:char-vector-append">
			<xsl:with-param name="count" select="number($colspan)"/>
			<xsl:with-param name="char" select="'4'"/>
		</xsl:call-template>
		<xsl:variable name="nextpos" select="$pos+string-length($dummy-cells)+1+number($colspan)"/>
		<xsl:choose>
			<xsl:when test="($entry/following-sibling::entry|$entry/following-sibling::altova:no-elem)[1]">
				<xsl:call-template name="altova:cals-table-DATE-generate-table-matrix-entry">
					<xsl:with-param name="entry" select="($entry/following-sibling::entry|$entry/following-sibling::altova:no-elem)[1]"/>
					<xsl:with-param name="pos" select="$nextpos"/>
					<xsl:with-param name="rowinfo" select="$rowinfo"/>
					<xsl:with-param name="col-vector" select="$col-vector"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="altova:xml-table-fill-table-matrix-with-dummy-cells">
					<xsl:with-param name="pos" select="$nextpos"/>
					<xsl:with-param name="endpos" select="string-length($col-vector)+1"/>
					<xsl:with-param name="rowinfo" select="$rowinfo"/>
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-generate-table-matrix-nextrowinfo">
		<xsl:param name="entry"/>
		<xsl:param name="pos"/>
		<xsl:param name="rowinfo"/>
		<xsl:param name="col-vector"/>
		<xsl:variable name="colpos">
			<xsl:call-template name="altova:cals-table-DATE-get-entry-referenced-column-index">
				<xsl:with-param name="entry" select="$entry"/>
				<xsl:with-param name="col-vector" select="$col-vector"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:call-template name="altova:xml-table-generate-table-matrix-nextrow-rowspan">
			<xsl:with-param name="pos" select="$pos"/>
			<xsl:with-param name="endpos" select="$colpos"/>
			<xsl:with-param name="rowinfo" select="$rowinfo"/>
		</xsl:call-template>
		<xsl:variable name="dummy-cells">
			<xsl:call-template name="altova:xml-table-fill-table-matrix-with-dummy-cells">
				<xsl:with-param name="pos" select="$pos"/>
				<xsl:with-param name="endpos" select="$colpos"/>
				<xsl:with-param name="rowinfo" select="$rowinfo"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="colspan">
			<xsl:call-template name="altova:cals-table-DATE-calc-entry-spanned-cols">
				<xsl:with-param name="entry" select="$entry"/>
				<xsl:with-param name="col-vector" select="$col-vector"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="rowspan">
			<xsl:call-template name="altova:cals-table-calc-entry-spanned-rows">
				<xsl:with-param name="entry" select="$entry"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:call-template name="altova:vector-append">
			<xsl:with-param name="count" select="1"/>
			<xsl:with-param name="value" select="concat('0;',$rowspan)"/>
			<xsl:with-param name="separator" select="';'"/>
		</xsl:call-template>
		<xsl:call-template name="altova:vector-append">
			<xsl:with-param name="count" select="number($colspan)"/>
			<xsl:with-param name="value" select="concat('1;',$rowspan)"/>
			<xsl:with-param name="separator" select="';'"/>
		</xsl:call-template>
		<xsl:variable name="nextpos" select="$pos+string-length($dummy-cells)+1+number($colspan)"/>
		<xsl:choose>
			<xsl:when test="($entry/following-sibling::entry|$entry/following-sibling::altova:no-elem)[1]">
				<xsl:call-template name="altova:cals-table-DATE-generate-table-matrix-nextrowinfo">
					<xsl:with-param name="entry" select="($entry/following-sibling::entry|$entry/following-sibling::altova:no-elem)[1]"/>
					<xsl:with-param name="pos" select="$nextpos"/>
					<xsl:with-param name="rowinfo" select="$rowinfo"/>
					<xsl:with-param name="col-vector" select="$col-vector"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="altova:xml-table-generate-table-matrix-nextrow-rowspan">
					<xsl:with-param name="pos" select="$nextpos"/>
					<xsl:with-param name="endpos" select="string-length($col-vector)+1"/>
					<xsl:with-param name="rowinfo" select="$rowinfo"/>
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-calc-table-cell-effective-styles">
		<xsl:param name="colnum"/>
		<xsl:param name="rownum"/>
		<xsl:param name="is-last-table-row"/>
		<xsl:param name="row"/>
		<xsl:param name="col-count"/>
		<xsl:param name="row-count"/>
		<xsl:param name="col-vector"/>
		<xsl:param name="table-matrix"/>
		<xsl:param name="table-user-styles"/>
		<xsl:param name="row-user-styles"/>
		<xsl:variable name="is-not-last-col" select="$colnum &lt; $col-count"/>
		<xsl:variable name="is-not-last-row" select="not($is-last-table-row)"/>
		<xsl:variable name="rowstart" select="$col-count * ($rownum - 1)"/>
		<xsl:variable name="entry-type" select="substring($table-matrix,$rowstart + $colnum,1)"/>
		<xsl:variable name="pos-in-xml">
			<xsl:choose>
				<xsl:when test="$entry-type='1'">
					<xsl:value-of select="string-length(translate(substring($table-matrix,$rowstart+1,$colnum),'102345','1'))"/>
				</xsl:when>
				<xsl:otherwise>0</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="entry" select="($row/entry|$row/altova:no-elem)[position()=number($pos-in-xml)]"/>
		<xsl:variable name="col-user-styles">
			<xsl:call-template name="altova:cals-table-DATE-calc-col-user-styles">
				<xsl:with-param name="colnum" select="$colnum"/>
				<xsl:with-param name="tgroup" select="$row/../.."/>
				<xsl:with-param name="col-vector" select="$col-vector"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="user-styles">
			<xsl:call-template name="altova:css-styles-get-inherited-styles-for-table-cell">
				<xsl:with-param name="css-styles" select="concat($table-user-styles,$col-user-styles,$row-user-styles)"/>
			</xsl:call-template>
			<xsl:choose>
				<xsl:when test="$entry">
					<xsl:for-each select="$entry">
						<xsl:call-template name="altova:cals-table-DATE-get-entry-user-styles">
							<xsl:with-param name="colnum" select="$colnum"/>
							<xsl:with-param name="rownum" select="$rownum"/>
						</xsl:call-template>
					</xsl:for-each>
				</xsl:when>
				<xsl:otherwise>
					<xsl:call-template name="altova:cals-table-DATE-get-entry-user-styles">
						<xsl:with-param name="colnum" select="$colnum"/>
						<xsl:with-param name="rownum" select="$rownum"/>
					</xsl:call-template>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="reversed-styles">
			<xsl:variable name="splitted-styles">
				<xsl:call-template name="altova:css-styles-split-shorthand-styles">
					<xsl:with-param name="css-styles" select="string($user-styles)"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:call-template name="altova:vector-reverse">
				<xsl:with-param name="vector" select="string($splitted-styles)"/>
				<xsl:with-param name="separator" select="';'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="effective-colsep">
			<xsl:call-template name="altova:cals-table-DATE-calc-entry-effective-colsep">
				<xsl:with-param name="colnum" select="$colnum"/>
				<xsl:with-param name="rownum" select="$rownum"/>
				<xsl:with-param name="row" select="$row"/>
				<xsl:with-param name="entry" select="$entry"/>
				<xsl:with-param name="col-vector" select="$col-vector"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="effective-rowsep">
			<xsl:call-template name="altova:cals-table-DATE-calc-entry-effective-rowsep">
				<xsl:with-param name="colnum" select="$colnum"/>
				<xsl:with-param name="rownum" select="$rownum"/>
				<xsl:with-param name="row" select="$row"/>
				<xsl:with-param name="entry" select="$entry"/>
				<xsl:with-param name="col-vector" select="$col-vector"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="border-style">
			<xsl:call-template name="altova:cals-table-map-entry-colrowsep-to-border-style">
				<xsl:with-param name="colsep" select="$effective-colsep"/>
				<xsl:with-param name="rowsep" select="$effective-rowsep"/>
				<xsl:with-param name="is-not-last-col" select="$is-not-last-col"/>
				<xsl:with-param name="is-not-last-row" select="$is-not-last-row"/>
				<xsl:with-param name="entry-styles" select="string($reversed-styles)"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="effective-align">
			<xsl:call-template name="altova:cals-table-DATE-calc-entry-effective-align">
				<xsl:with-param name="colnum" select="$colnum"/>
				<xsl:with-param name="rownum" select="$rownum"/>
				<xsl:with-param name="row" select="$row"/>
				<xsl:with-param name="entry" select="$entry"/>
				<xsl:with-param name="col-vector" select="$col-vector"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="effective-valign">
			<xsl:call-template name="altova:cals-table-calc-entry-effective-valign">
				<xsl:with-param name="colnum" select="$colnum"/>
				<xsl:with-param name="rownum" select="$rownum"/>
				<xsl:with-param name="row" select="$row"/>
				<xsl:with-param name="entry" select="$entry"/>
				<xsl:with-param name="col-vector" select="$col-vector"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:choose>
			<xsl:when test="$row/parent::altova:no-elem">
				<xsl:text>font-weight:bold;</xsl:text>
				<xsl:text>vertical-align:bottom;</xsl:text>
			</xsl:when>
			<xsl:otherwise>
				<xsl:text>vertical-align:top;</xsl:text>
			</xsl:otherwise>
		</xsl:choose>
		<xsl:choose>
			<xsl:when test="$entry/@spanname">
				<xsl:text>text-align:center;</xsl:text>
			</xsl:when>
			<xsl:otherwise>
				<xsl:text>text-align:left;</xsl:text>
			</xsl:otherwise>
		</xsl:choose>
		<xsl:value-of select="$user-styles"/>
		<xsl:value-of select="$border-style"/>
		<xsl:if test="string($effective-align)">
			<xsl:value-of select="concat('text-align:',$effective-align,';')"/>
		</xsl:if>
		<xsl:if test="string($effective-valign)">
			<xsl:value-of select="concat('vertical-align:',$effective-valign,';')"/>
		</xsl:if>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-calc-col-user-styles">
		<xsl:param name="colnum"/>
		<xsl:param name="tgroup"/>
		<xsl:param name="col-vector"/>
		<xsl:variable name="colspec-type" select="substring($col-vector,$colnum,1)"/>
		<xsl:variable name="pos-in-xml">
			<xsl:choose>
				<xsl:when test="$colspec-type='1'">
					<xsl:value-of select="string-length(translate(substring($col-vector,1,$colnum),'10','1'))"/>
				</xsl:when>
				<xsl:otherwise>0</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="colspec" select="$tgroup/colspec[$pos-in-xml]"/>
		<xsl:variable name="calc-styles">
			<xsl:choose>
				<xsl:when test="$colspec">
					<xsl:for-each select="$colspec">
						<xsl:call-template name="altova:cals-table-DATE-get-colspec-user-styles">
							<xsl:with-param name="colnum" select="$colnum"/>
						</xsl:call-template>
					</xsl:for-each>
				</xsl:when>
				<xsl:otherwise>
					<xsl:call-template name="altova:cals-table-DATE-get-colspec-user-styles">
						<xsl:with-param name="colnum" select="$colnum"/>
					</xsl:call-template>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:call-template name="altova:css-styles-split-shorthand-styles">
			<xsl:with-param name="css-styles" select="string($calc-styles)"/>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-calc-cell-width-twips">
		<xsl:param name="proportional-unit-width-twips"/>
		<xsl:param name="colnum"/>
		<xsl:param name="rownum"/>
		<xsl:param name="col-count"/>
		<xsl:param name="col-vector"/>
		<xsl:param name="table-matrix"/>
		<xsl:param name="tgroup"/>
		<xsl:param name="include-spanned-columns"/>
		<xsl:call-template name="altova:cals-table-DATE-calc-cell-width-twips-helper">
			<xsl:with-param name="previous-cell-width-twips" select="0"/>
			<xsl:with-param name="proportional-unit-width-twips" select="$proportional-unit-width-twips"/>
			<xsl:with-param name="colnum" select="$colnum"/>
			<xsl:with-param name="rownum" select="$rownum"/>
			<xsl:with-param name="col-count" select="$col-count"/>
			<xsl:with-param name="col-vector" select="$col-vector"/>
			<xsl:with-param name="table-matrix" select="$table-matrix"/>
			<xsl:with-param name="tgroup" select="$tgroup"/>
			<xsl:with-param name="include-spanned-columns" select="$include-spanned-columns"/>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-calc-cell-width-twips-helper">
		<xsl:param name="previous-cell-width-twips"/>
		<xsl:param name="proportional-unit-width-twips"/>
		<xsl:param name="colnum"/>
		<xsl:param name="rownum"/>
		<xsl:param name="col-count"/>
		<xsl:param name="col-vector"/>
		<xsl:param name="table-matrix"/>
		<xsl:param name="tgroup"/>
		<xsl:param name="include-spanned-columns"/>
		<xsl:variable name="effective-colwidth">
			<xsl:call-template name="altova:cals-table-DATE-calc-colspec-effective-colwidth">
				<xsl:with-param name="colnum" select="$colnum"/>
				<xsl:with-param name="tgroup" select="$tgroup"/>
				<xsl:with-param name="col-vector" select="$col-vector"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="cell-width-twips">
			<xsl:call-template name="altova:cals-table-calc-effective-colwidth-in-twips">
				<xsl:with-param name="effective-colwidth" select="$effective-colwidth"/>
				<xsl:with-param name="proportional-unit-width-twips" select="$proportional-unit-width-twips"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:choose>
			<xsl:when test="$include-spanned-columns and ($colnum &lt; $col-count)">
				<xsl:variable name="rowstart" select="$col-count * ($rownum - 1)"/>
				<xsl:variable name="entry-type" select="substring($table-matrix,$rowstart + $colnum + 1,1)"/>
				<xsl:choose>
					<xsl:when test="$entry-type='4'">
						<xsl:call-template name="altova:cals-table-DATE-calc-cell-width-twips-helper">
							<xsl:with-param name="previous-cell-width-twips" select="$previous-cell-width-twips + number($cell-width-twips)"/>
							<xsl:with-param name="proportional-unit-width-twips" select="$proportional-unit-width-twips"/>
							<xsl:with-param name="colnum" select="$colnum + 1"/>
							<xsl:with-param name="rownum" select="$rownum"/>
							<xsl:with-param name="col-count" select="$col-count"/>
							<xsl:with-param name="col-vector" select="$col-vector"/>
							<xsl:with-param name="table-matrix" select="$table-matrix"/>
							<xsl:with-param name="tgroup" select="$tgroup"/>
							<xsl:with-param name="include-spanned-columns" select="$include-spanned-columns"/>
						</xsl:call-template>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="$previous-cell-width-twips + number($cell-width-twips)"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$previous-cell-width-twips + number($cell-width-twips)"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-calc-effective-row-height-twips">
		<xsl:param name="rownum"/>
		<xsl:param name="col-count"/>
		<xsl:param name="row-count"/>
		<xsl:param name="row"/>
		<xsl:param name="row-styles"/>
		<xsl:param name="col-vector"/>
		<xsl:param name="table-matrix"/>
		<xsl:variable name="reversed-styles">
			<xsl:call-template name="altova:vector-reverse">
				<xsl:with-param name="vector" select="$row-styles"/>
				<xsl:with-param name="separator" select="';'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="height">
			<xsl:call-template name="altova:css-styles-get-property">
				<xsl:with-param name="property" select="'height'"/>
				<xsl:with-param name="css-styles" select="string($reversed-styles)"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="row-height-twips">
			<xsl:call-template name="altova:css-styles-convert-length-to-twips">
				<xsl:with-param name="css-length" select="$height"/>
				<xsl:with-param name="dpi" select="$altova:nPxPerIn"/>
				<xsl:with-param name="em-height-pt" select="12"/>
				<xsl:with-param name="parent-length-twips" select="0"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:call-template name="altova:cals-table-DATE-calc-effective-row-height-twips-helper">
			<xsl:with-param name="max-row-height-twips" select="$row-height-twips"/>
			<xsl:with-param name="colnum" select="1"/>
			<xsl:with-param name="rownum" select="$rownum"/>
			<xsl:with-param name="col-count" select="$col-count"/>
			<xsl:with-param name="row-count" select="$row-count"/>
			<xsl:with-param name="row" select="$row"/>
			<xsl:with-param name="col-vector" select="$col-vector"/>
			<xsl:with-param name="table-matrix" select="$table-matrix"/>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-calc-effective-row-height-twips-helper">
		<xsl:param name="max-row-height-twips"/>
		<xsl:param name="colnum"/>
		<xsl:param name="rownum"/>
		<xsl:param name="col-count"/>
		<xsl:param name="row-count"/>
		<xsl:param name="row"/>
		<xsl:param name="col-vector"/>
		<xsl:param name="table-matrix"/>
		<xsl:variable name="master-colnum">
			<xsl:call-template name="altova:xml-table-table-matrix-get-master-cell-colnum">
				<xsl:with-param name="colnum" select="$colnum"/>
				<xsl:with-param name="rownum" select="$rownum"/>
				<xsl:with-param name="col-count" select="$col-count"/>
				<xsl:with-param name="table-matrix" select="$table-matrix"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="master-rownum">
			<xsl:call-template name="altova:xml-table-table-matrix-get-master-cell-rownum">
				<xsl:with-param name="colnum" select="$master-colnum"/>
				<xsl:with-param name="rownum" select="$rownum"/>
				<xsl:with-param name="col-count" select="$col-count"/>
				<xsl:with-param name="table-matrix" select="$table-matrix"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="master-entry-type" select="substring($table-matrix,$col-count * ($master-rownum - 1) + $master-colnum,1)"/>
		<xsl:variable name="master-row" select="$row/../row[position()=number($master-rownum)]"/>
		<xsl:variable name="master-pos-in-xml">
			<xsl:choose>
				<xsl:when test="$master-entry-type='1'">
					<xsl:value-of select="string-length(translate(substring($table-matrix,$col-count * ($master-rownum - 1) + 1,$colnum),'102345','1'))"/>
				</xsl:when>
				<xsl:otherwise>0</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="master-entry" select="($master-row/entry|$master-row/altova:no-elem)[position()=number($master-pos-in-xml)]"/>
		<xsl:variable name="spanned-rows">
			<xsl:call-template name="altova:xml-table-table-matrix-calc-spanned-rows">
				<xsl:with-param name="colnum" select="$master-colnum"/>
				<xsl:with-param name="rownum" select="$master-rownum"/>
				<xsl:with-param name="col-count" select="$col-count"/>
				<xsl:with-param name="row-count" select="$row-count"/>
				<xsl:with-param name="table-matrix" select="$table-matrix"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="effective-styles">
			<xsl:call-template name="altova:cals-table-DATE-calc-table-cell-effective-styles">
				<xsl:with-param name="colnum" select="$master-colnum"/>
				<xsl:with-param name="rownum" select="$master-rownum"/>
				<xsl:with-param name="is-last-table-row" select="false()"/>
				<xsl:with-param name="row" select="$master-row"/>
				<xsl:with-param name="col-count" select="$col-count"/>
				<xsl:with-param name="row-count" select="$row-count"/>
				<xsl:with-param name="col-vector" select="$col-vector"/>
				<xsl:with-param name="table-matrix" select="$table-matrix"/>
				<xsl:with-param name="table-user-styles" select="''"/>
				<xsl:with-param name="row-user-styles" select="''"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="reversed-styles">
			<xsl:call-template name="altova:vector-reverse">
				<xsl:with-param name="vector" select="$effective-styles"/>
				<xsl:with-param name="separator" select="';'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="height">
			<xsl:call-template name="altova:css-styles-get-property">
				<xsl:with-param name="property" select="'height'"/>
				<xsl:with-param name="css-styles" select="string($reversed-styles)"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="cell-height-twips">
			<xsl:call-template name="altova:css-styles-convert-length-to-twips">
				<xsl:with-param name="css-length" select="$height"/>
				<xsl:with-param name="dpi" select="$altova:nPxPerIn"/>
				<xsl:with-param name="em-height-pt" select="12"/>
				<xsl:with-param name="parent-length-twips" select="0"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="row-height-twips" select="number($cell-height-twips) div (number($spanned-rows) + 1)"/>
		<xsl:variable name="new-max-row-height-twips">
			<xsl:choose>
				<xsl:when test="number($row-height-twips) > number($max-row-height-twips)">
					<xsl:value-of select="$row-height-twips"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="$max-row-height-twips"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:choose>
			<xsl:when test="$colnum &lt; $col-count">
				<xsl:call-template name="altova:cals-table-DATE-calc-effective-row-height-twips-helper">
					<xsl:with-param name="max-row-height-twips" select="number($new-max-row-height-twips)"/>
					<xsl:with-param name="colnum" select="$colnum + 1"/>
					<xsl:with-param name="rownum" select="$rownum"/>
					<xsl:with-param name="col-count" select="$col-count"/>
					<xsl:with-param name="row-count" select="$row-count"/>
					<xsl:with-param name="row" select="$row"/>
					<xsl:with-param name="col-vector" select="$col-vector"/>
					<xsl:with-param name="table-matrix" select="$table-matrix"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="round($new-max-row-height-twips)"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-output-table">
		<xsl:param name="table"/>
		<xsl:variable name="user-styles">
			<xsl:for-each select="$table">
				<xsl:call-template name="altova:cals-table-DATE-get-table-user-styles"/>
			</xsl:for-each>
		</xsl:variable>
		<xsl:variable name="effective-frame">
			<xsl:call-template name="altova:cals-table-calc-table-effective-frame">
				<xsl:with-param name="table" select="$table"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="effective-pgwide">
			<xsl:call-template name="altova:cals-table-calc-table-effective-pgwide">
				<xsl:with-param name="table" select="$table"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:for-each select="$table/tgroup">
			<xsl:call-template name="altova:cals-table-DATE-output-tgroup">
				<xsl:with-param name="tgroup" select="."/>
				<xsl:with-param name="table-user-styles" select="$user-styles"/>
				<xsl:with-param name="effective-frame" select="$effective-frame"/>
				<xsl:with-param name="effective-pgwide" select="$effective-pgwide"/>
			</xsl:call-template>
		</xsl:for-each>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-output-tgroup">
		<xsl:param name="tgroup"/>
		<xsl:param name="table-user-styles"/>
		<xsl:param name="effective-frame"/>
		<xsl:param name="effective-pgwide"/>
		<table>
			<xsl:variable name="col-vector">
				<xsl:call-template name="altova:cals-table-DATE-generate-col-vector">
					<xsl:with-param name="tgroup" select="$tgroup"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:variable name="col-count" select="string-length($col-vector)"/>
			<xsl:variable name="user-styles">
				<xsl:value-of select="$table-user-styles"/>
				<xsl:call-template name="altova:cals-table-DATE-get-tgroup-user-styles"/>
			</xsl:variable>
			<xsl:variable name="splitted-user-styles">
				<xsl:call-template name="altova:css-styles-split-shorthand-styles">
					<xsl:with-param name="css-styles" select="string($user-styles)"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:variable name="border-style">
				<xsl:call-template name="altova:cals-table-DATE-map-table-frame-to-border-style">
					<xsl:with-param name="frame" select="$effective-frame"/>
					<xsl:with-param name="tgroup" select="$tgroup"/>
					<xsl:with-param name="table-styles" select="$splitted-user-styles"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:variable name="styles">
				<xsl:value-of select="'table-layout:fixed;'"/>
				<xsl:value-of select="'border-collapse:collapse;'"/>
				<xsl:value-of select="'width:100%;'"/>
				<xsl:value-of select="$user-styles"/>
				<xsl:value-of select="$border-style"/>
			</xsl:variable>
			<xsl:attribute name="style">
				<xsl:value-of select="$styles"/>
			</xsl:attribute>
			<xsl:if test="not($tgroup/preceding-sibling::tgroup)">
				<xsl:call-template name="altova:cals-table-DATE-output-caption">
					<xsl:with-param name="table" select="$tgroup/.."/>
				</xsl:call-template>
			</xsl:if>
			<colgroup>
				<xsl:variable name="colwidth-proportional-total">
					<xsl:call-template name="altova:cals-table-DATE-calc-colspec-colwidth-proportional-total">
						<xsl:with-param name="tgroup" select="$tgroup"/>
						<xsl:with-param name="col-vector" select="$col-vector"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:call-template name="altova:cals-table-DATE-output-cols">
					<xsl:with-param name="colnum" select="1"/>
					<xsl:with-param name="tgroup" select="$tgroup"/>
					<xsl:with-param name="col-vector" select="$col-vector"/>
					<xsl:with-param name="col-count" select="$col-count"/>
					<xsl:with-param name="colwidth-proportional-total" select="number($colwidth-proportional-total)"/>
				</xsl:call-template>
			</colgroup>
			<xsl:call-template name="altova:cals-table-DATE-output-thead">
				<xsl:with-param name="tgroup" select="$tgroup"/>
				<xsl:with-param name="col-vector" select="$col-vector"/>
				<xsl:with-param name="col-count" select="$col-count"/>
			</xsl:call-template>
			<xsl:call-template name="altova:cals-table-DATE-output-tfoot">
				<xsl:with-param name="tgroup" select="$tgroup"/>
				<xsl:with-param name="col-vector" select="$col-vector"/>
				<xsl:with-param name="col-count" select="$col-count"/>
			</xsl:call-template>
			<xsl:call-template name="altova:cals-table-DATE-output-tbody">
				<xsl:with-param name="tgroup" select="$tgroup"/>
				<xsl:with-param name="col-vector" select="$col-vector"/>
				<xsl:with-param name="col-count" select="$col-count"/>
			</xsl:call-template>
		</table>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-output-caption">
		<xsl:param name="table"/>
		<xsl:for-each select="$table/altova:no-elem">
			<caption>
				<xsl:variable name="user-styles">
					<xsl:call-template name="altova:cals-table-DATE-get-title-user-styles"/>
				</xsl:variable>
				<xsl:if test="string($user-styles)">
					<xsl:attribute name="style">
						<xsl:value-of select="$user-styles"/>
					</xsl:attribute>
				</xsl:if>
				<xsl:apply-templates select="."/>
			</caption>
		</xsl:for-each>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-output-cols">
		<xsl:param name="colnum"/>
		<xsl:param name="tgroup"/>
		<xsl:param name="col-vector"/>
		<xsl:param name="col-count"/>
		<xsl:param name="colwidth-proportional-total"/>
		<xsl:variable name="colspec-type" select="substring($col-vector,$colnum,1)"/>
		<xsl:variable name="pos-in-xml">
			<xsl:choose>
				<xsl:when test="$colspec-type='1'">
					<xsl:value-of select="string-length(translate(substring($col-vector,1,$colnum),'10','1'))"/>
				</xsl:when>
				<xsl:otherwise>0</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="colspec" select="$tgroup/colspec[$pos-in-xml]"/>
		<col>
			<xsl:variable name="effective-colwidth">
				<xsl:call-template name="altova:cals-table-DATE-calc-colspec-effective-colwidth">
					<xsl:with-param name="colnum" select="$colnum"/>
					<xsl:with-param name="tgroup" select="$tgroup"/>
					<xsl:with-param name="col-vector" select="$col-vector"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:variable name="width-style">
				<xsl:call-template name="altova:cals-table-map-colspec-colwidth-to-width-style">
					<xsl:with-param name="colwidth" select="$effective-colwidth"/>
					<xsl:with-param name="colwidth-proportional-total" select="$colwidth-proportional-total"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:variable name="user-styles">
				<xsl:choose>
					<xsl:when test="$colspec">
						<xsl:for-each select="$colspec">
							<xsl:call-template name="altova:cals-table-DATE-get-colspec-user-styles">
								<xsl:with-param name="colnum" select="$colnum"/>
							</xsl:call-template>
						</xsl:for-each>
					</xsl:when>
					<xsl:otherwise>
						<xsl:call-template name="altova:cals-table-DATE-get-colspec-user-styles">
							<xsl:with-param name="colnum" select="$colnum"/>
						</xsl:call-template>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:variable>
			<xsl:variable name="styles">
				<xsl:value-of select="$user-styles"/>
				<xsl:value-of select="$width-style"/>
			</xsl:variable>
			<xsl:if test="string($styles)">
				<xsl:attribute name="style">
					<xsl:value-of select="$styles"/>
				</xsl:attribute>
			</xsl:if>
		</col>
		<xsl:if test="$colnum &lt; $col-count">
			<xsl:call-template name="altova:cals-table-DATE-output-cols">
				<xsl:with-param name="colnum" select="$colnum + 1"/>
				<xsl:with-param name="tgroup" select="$tgroup"/>
				<xsl:with-param name="col-vector" select="$col-vector"/>
				<xsl:with-param name="col-count" select="$col-count"/>
				<xsl:with-param name="colwidth-proportional-total" select="$colwidth-proportional-total"/>
			</xsl:call-template>
		</xsl:if>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-output-thead">
		<xsl:param name="tgroup"/>
		<xsl:param name="col-vector"/>
		<xsl:param name="col-count"/>
		<xsl:for-each select="$tgroup/altova:no-elem">
			<xsl:variable name="table-matrix">
				<xsl:call-template name="altova:cals-table-DATE-generate-table-matrix">
					<xsl:with-param name="tbody" select="."/>
					<xsl:with-param name="col-vector" select="$col-vector"/>
				</xsl:call-template>
			</xsl:variable>
			<thead>
				<xsl:variable name="user-styles">
					<xsl:call-template name="altova:cals-table-DATE-get-thead-user-styles"/>
				</xsl:variable>
				<xsl:if test="string($user-styles)">
					<xsl:attribute name="style">
						<xsl:value-of select="$user-styles"/>
					</xsl:attribute>
				</xsl:if>
				<xsl:call-template name="altova:cals-table-DATE-output-rows">
					<xsl:with-param name="tbody" select="."/>
					<xsl:with-param name="col-count" select="$col-count"/>
					<xsl:with-param name="row-count" select="string-length($table-matrix) div $col-count"/>
					<xsl:with-param name="col-vector" select="$col-vector"/>
					<xsl:with-param name="table-matrix" select="$table-matrix"/>
				</xsl:call-template>
			</thead>
		</xsl:for-each>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-output-tfoot">
		<xsl:param name="tgroup"/>
		<xsl:param name="col-vector"/>
		<xsl:param name="col-count"/>
		<xsl:for-each select="$tgroup/altova:no-elem">
			<xsl:variable name="table-matrix">
				<xsl:call-template name="altova:cals-table-DATE-generate-table-matrix">
					<xsl:with-param name="tbody" select="."/>
					<xsl:with-param name="col-vector" select="$col-vector"/>
				</xsl:call-template>
			</xsl:variable>
			<tfoot>
				<xsl:variable name="user-styles">
					<xsl:call-template name="altova:cals-table-DATE-get-tfoot-user-styles"/>
				</xsl:variable>
				<xsl:if test="string($user-styles)">
					<xsl:attribute name="style">
						<xsl:value-of select="$user-styles"/>
					</xsl:attribute>
				</xsl:if>
				<xsl:call-template name="altova:cals-table-DATE-output-rows">
					<xsl:with-param name="tbody" select="."/>
					<xsl:with-param name="col-count" select="$col-count"/>
					<xsl:with-param name="row-count" select="string-length($table-matrix) div $col-count"/>
					<xsl:with-param name="col-vector" select="$col-vector"/>
					<xsl:with-param name="table-matrix" select="$table-matrix"/>
				</xsl:call-template>
			</tfoot>
		</xsl:for-each>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-output-tbody">
		<xsl:param name="tgroup"/>
		<xsl:param name="col-vector"/>
		<xsl:param name="col-count"/>
		<xsl:for-each select="$tgroup/tbody">
			<xsl:variable name="table-matrix">
				<xsl:call-template name="altova:cals-table-DATE-generate-table-matrix">
					<xsl:with-param name="tbody" select="."/>
					<xsl:with-param name="col-vector" select="$col-vector"/>
				</xsl:call-template>
			</xsl:variable>
			<tbody>
				<xsl:variable name="user-styles">
					<xsl:call-template name="altova:cals-table-DATE-get-tbody-user-styles"/>
				</xsl:variable>
				<xsl:if test="string($user-styles)">
					<xsl:attribute name="style">
						<xsl:value-of select="$user-styles"/>
					</xsl:attribute>
				</xsl:if>
				<xsl:call-template name="altova:cals-table-DATE-output-rows">
					<xsl:with-param name="tbody" select="."/>
					<xsl:with-param name="col-count" select="$col-count"/>
					<xsl:with-param name="row-count" select="string-length($table-matrix) div $col-count"/>
					<xsl:with-param name="col-vector" select="$col-vector"/>
					<xsl:with-param name="table-matrix" select="$table-matrix"/>
				</xsl:call-template>
			</tbody>
		</xsl:for-each>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-output-rows">
		<xsl:param name="tbody"/>
		<xsl:param name="col-count"/>
		<xsl:param name="row-count"/>
		<xsl:param name="col-vector"/>
		<xsl:param name="table-matrix"/>
		<xsl:for-each select="$tbody/row">
			<tr>
				<xsl:variable name="user-styles">
					<xsl:call-template name="altova:cals-table-DATE-get-row-user-styles">
						<xsl:with-param name="rownum" select="position()"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:if test="string($user-styles)">
					<xsl:attribute name="style">
						<xsl:value-of select="$user-styles"/>
					</xsl:attribute>
				</xsl:if>
				<xsl:variable name="is-last-table-row">
					<xsl:call-template name="altova:cals-table-DATE-is-last-table-row">
						<xsl:with-param name="row" select="."/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:call-template name="altova:cals-table-DATE-output-cells">
					<xsl:with-param name="colnum" select="1"/>
					<xsl:with-param name="rownum" select="position()"/>
					<xsl:with-param name="row" select="."/>
					<xsl:with-param name="is-last-table-row" select="$is-last-table-row='1'"/>
					<xsl:with-param name="col-count" select="$col-count"/>
					<xsl:with-param name="row-count" select="$row-count"/>
					<xsl:with-param name="col-vector" select="$col-vector"/>
					<xsl:with-param name="table-matrix" select="$table-matrix"/>
				</xsl:call-template>
			</tr>
		</xsl:for-each>
	</xsl:template>
	<xsl:template name="altova:cals-table-DATE-output-cells">
		<xsl:param name="colnum"/>
		<xsl:param name="rownum"/>
		<xsl:param name="row"/>
		<xsl:param name="is-last-table-row"/>
		<xsl:param name="col-count"/>
		<xsl:param name="row-count"/>
		<xsl:param name="col-vector"/>
		<xsl:param name="table-matrix"/>
		<xsl:variable name="is-not-last-col" select="$colnum &lt; $col-count"/>
		<xsl:variable name="is-not-last-row" select="not($is-last-table-row)"/>
		<xsl:variable name="rowstart" select="$col-count * ($rownum - 1)"/>
		<xsl:variable name="entry-type" select="substring($table-matrix,$rowstart + $colnum,1)"/>
		<xsl:variable name="pos-in-xml">
			<xsl:choose>
				<xsl:when test="$entry-type='1'">
					<xsl:value-of select="string-length(translate(substring($table-matrix,$rowstart+1,$colnum),'102345','1'))"/>
				</xsl:when>
				<xsl:otherwise>0</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="entry" select="($row/entry|$row/altova:no-elem)[position()=number($pos-in-xml)]"/>
		<xsl:if test="$entry-type='1' or $entry-type='2'">
			<xsl:variable name="tag">
				<xsl:choose>
					<xsl:when test="$row/parent::altova:no-elem">th</xsl:when>
					<xsl:otherwise>td</xsl:otherwise>
				</xsl:choose>
			</xsl:variable>
			<xsl:element name="{$tag}">
				<xsl:variable name="spanned-cols">
					<xsl:call-template name="altova:xml-table-table-matrix-calc-spanned-cols">
						<xsl:with-param name="colnum" select="$colnum"/>
						<xsl:with-param name="rownum" select="$rownum"/>
						<xsl:with-param name="col-count" select="$col-count"/>
						<xsl:with-param name="table-matrix" select="$table-matrix"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="spanned-rows">
					<xsl:call-template name="altova:xml-table-table-matrix-calc-spanned-rows">
						<xsl:with-param name="colnum" select="$colnum"/>
						<xsl:with-param name="rownum" select="$rownum"/>
						<xsl:with-param name="col-count" select="$col-count"/>
						<xsl:with-param name="row-count" select="$row-count"/>
						<xsl:with-param name="table-matrix" select="$table-matrix"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:if test="number($spanned-cols) > 0">
					<xsl:attribute name="colspan">
						<xsl:value-of select="number($spanned-cols) + 1"/>
					</xsl:attribute>
				</xsl:if>
				<xsl:if test="number($spanned-rows) > 0">
					<xsl:attribute name="rowspan">
						<xsl:value-of select="number($spanned-rows) + 1"/>
					</xsl:attribute>
				</xsl:if>
				<xsl:variable name="effective-styles">
					<xsl:call-template name="altova:cals-table-DATE-calc-table-cell-effective-styles">
						<xsl:with-param name="colnum" select="$colnum"/>
						<xsl:with-param name="rownum" select="$rownum"/>
						<xsl:with-param name="is-last-table-row" select="$is-last-table-row"/>
						<xsl:with-param name="row" select="$row"/>
						<xsl:with-param name="col-count" select="$col-count"/>
						<xsl:with-param name="row-count" select="$row-count"/>
						<xsl:with-param name="col-vector" select="$col-vector"/>
						<xsl:with-param name="table-matrix" select="$table-matrix"/>
						<xsl:with-param name="table-user-styles" select="''"/>
						<xsl:with-param name="row-user-styles" select="''"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:attribute name="style">
					<xsl:value-of select="$effective-styles"/>
				</xsl:attribute>
				<xsl:choose>
					<xsl:when test="$entry/self::altova:no-elem">
						<xsl:variable name="entrytbl-user-styles">
							<xsl:variable name="calc-styles">
								<xsl:for-each select="$entry">
									<xsl:call-template name="altova:cals-table-DATE-get-entrytbl-user-styles">
										<xsl:with-param name="colnum" select="$colnum"/>
										<xsl:with-param name="rownum" select="$rownum"/>
									</xsl:call-template>
								</xsl:for-each>
							</xsl:variable>
							<xsl:call-template name="altova:css-styles-split-shorthand-styles">
								<xsl:with-param name="css-styles" select="string($calc-styles)"/>
							</xsl:call-template>
						</xsl:variable>
						<xsl:call-template name="altova:cals-table-DATE-output-tgroup">
							<xsl:with-param name="tgroup" select="$entry"/>
							<xsl:with-param name="table-user-styles" select="$entrytbl-user-styles"/>
							<xsl:with-param name="effective-frame" select="'none'"/>
							<xsl:with-param name="effective-pgwide" select="'0'"/>
						</xsl:call-template>
					</xsl:when>
					<xsl:otherwise>
						<xsl:for-each select="$entry">
							<xsl:apply-templates select="."/>
						</xsl:for-each>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:element>
		</xsl:if>
		<xsl:if test="$is-not-last-col">
			<xsl:call-template name="altova:cals-table-DATE-output-cells">
				<xsl:with-param name="colnum" select="$colnum + 1"/>
				<xsl:with-param name="rownum" select="$rownum"/>
				<xsl:with-param name="row" select="$row"/>
				<xsl:with-param name="is-last-table-row" select="$is-last-table-row"/>
				<xsl:with-param name="col-count" select="$col-count"/>
				<xsl:with-param name="row-count" select="$row-count"/>
				<xsl:with-param name="col-vector" select="$col-vector"/>
				<xsl:with-param name="table-matrix" select="$table-matrix"/>
			</xsl:call-template>
		</xsl:if>
	</xsl:template>
	<xsl:template match="DATE">
		<xsl:call-template name="altova:cals-table-DATE-output-table">
			<xsl:with-param name="table" select="."/>
		</xsl:call-template>
	</xsl:template>
</xsl:stylesheet>
