Nested tables in XSL template are not nested in output HTML
So, i have this long XSL
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns="http://www.w3.org/1999/xhtml">
<xsl:output method="html"/>
<xsl:template match="*">
<html>
<head>
<title>Dodatkowe zapotrzebowanie</title>
<link rel="stylesheet" type="text/css"
href="cabo-style.css"/>
</head>
<body class="OraBody">
<table class="OraMessageBox width_100" style="padding: 5px
0; text-align: center;">
<tr>
<td style="width:643px;">
<div class="OraGlobalPageTitle" style="margin:
1px 0 0 0; white-space: nowrap;">
<h2>Za chwilê z³o¿ysz podpis pod
dodatkowymi zapotrzebowaniami na œrodki na
wydatki</h2>
</div>
</td>
</tr>
</table>
<p/>
<table class="OraBGAccentLight width_100 ">
<tr class="OraHeaderBar">
<td class="table_padding_full"
style="background-image:url(/OA_HTML/cabo/images/swan/headingBarBg.gif);">
<div class="OraHeaderBarText">Dane</div>
</td>
</tr>
<tr>
<td>
<table style="max-width: 1050px;min-width:
350px; width:90%; margin:6px 20px 15px
20px;border-collapse:collapse;">
<tbody>
<tr>
<td class="OraPromptText
OraTableBorder0110"
style="border-color:
#c9cbd3;">Symbol</td>
<td class="OraPromptText
OraTableBorder0111"
style="border-color:
#c9cbd3;">Dysponent</td>
<td class="OraPromptText
OraTableBorder0111"
style="border-color:
#c9cbd3;">Rok</td>
<td class="OraPromptText
OraTableBorder0111"
style="border-color:
#c9cbd3;">Miesi¹c</td>
<td class="OraPromptText
OraTableBorder0111"
style="border-color:
#c9cbd3;">Identyfikator</td>
<td class="OraPromptText
OraTableBorder0011"
style="border-color:
#c9cbd3;">Data utw.</td>
</tr>
<tr>
<td class="OraTableCellNumber
OraTableBorder1100 ">
<xsl:value-of
select="ApplicationVO/ApplicationVORow/Symbol"/>
</td>
<td class="OraTableCellNumber
OraTableBorder1101 ">
<xsl:value-of
select="ApplicationVO/ApplicationVORow/TrusteeName"/>
</td>
<td class="OraTableCellNumber
OraTableBorder1101 ">
<xsl:value-of
select="AdditionalDemandPVO/AdditionalDemandPVORow/Year"/>
</td>
<td class="OraTableCellNumber
OraTableBorder1101 ">
<xsl:value-of
select="AdditionalDemandPVO/AdditionalDemandPVORow/Month"/>
</td>
<td class="OraTableCellNumber
OraTableBorder1101 ">
<xsl:value-of
select="ApplicationVO/ApplicationVORow/ApplicantTrusteeId"/>
</td>
<td class="OraTableCellNumber
OraTableBorder1001 ">
<xsl:value-of
select="ApplicationVO/ApplicationVORow/AppliedDate"/>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
<p/>
<table class="width_100" style="min-width: 800px;">
<table class="OraBGAccentLight width_50 "
style="float:left">
<tr class="OraHeaderBar">
<td class="table_padding_full"
style="background-image:url(/OA_HTML/cabo/images/swan/headingBarBg.gif);">
<div
class="OraHeaderBarText">Zmniejszenie</div>
</td>
</tr>
<tr style="height: 6px;"/>
<xsl:choose>
<xsl:when test="true()">
<tr>
<table align="center" class="
width_100 OraBGAccentLight"
style="padding:10px 20px 10px 20px;">
<tr>
<td>
<div>
<table align="left"
class="OraTableContent"
style="width:100%">
<tr>
<th
class="OraTableColumnHeaderNumber
OraTableBorder0001"
style="white-space:
nowrap;
text-align:
left;">Dzieñ</th>
<th
class="OraTableColumnHeaderNumber
OraTableBorder0001"
style="">Kwota</th>
</tr>
<xsl:variable
name="elems"
select="DecreaseVO/DecreaseVORow"/>
<xsl:for-each
select="$elems">
<tr>
<td
align="right"
class="OraTableCellText
OraTableBorder1101"
style="white-space:
nowrap;
text-align:
left;">
<xsl:value-of
select="Formatedday"/>
</td>
<xsl:call-template
name="drukuj_liczbe">
<xsl:with-param
name="wartosc"
select="SourceAmount"/>
</xsl:call-template>
</tr>
</xsl:for-each>
<xsl:if
test="not($elems)">
<tr>
<td
align="center"
class="OraTableCellText
OraTableBorder1101"
style="width:100px">
Nie
znaleziono
wyników.
</td>
<td
align="left"
class="OraTableCellText
OraTableBorder1101"/>
</tr>
</xsl:if>
</table>
</div>
</td>
</tr>
<tr>
<table class="width_100"
style="border-collapse:collapse;
margin: 8px 0 0 0;">
<tbody>
<tr>
<td
class="OraPromptText
" style="width:
130px;
text-align:left;">Nierozdysponowane
</td>
<td class=""
style="width:
50px">
<xsl:call-template
name="drukuj_liczbe_txt">
<xsl:with-param
name="wartosc"
select="AdditionalDemandPVO/AdditionalDemandPVORow/unalocatedDecrease"/>
</xsl:call-template>
</td>
<td class=""/>
</tr>
<tr>
<td
class="OraPromptText
"
style="text-align:left">Razem
</td>
<td class=""
style="width:
50px">
<xsl:call-template
name="drukuj_liczbe_txt">
<xsl:with-param
name="wartosc"
select="AdditionalDemandPVO/AdditionalDemandPVORow/Kwotazmniejszenia"/>
</xsl:call-template>
</td>
<td/>
</tr>
</tbody>
</table>
</tr>
</table>
</tr>
</xsl:when>
<xsl:otherwise/>
</xsl:choose>
</table>
<table class="OraBGAccentLight width_50 "
style="float:right; margin: 0 0 0 0;">
<tr class="OraHeaderBar">
<td class="table_padding_full"
style="background-image:url(/OA_HTML/cabo/images/swan/headingBarBg.gif);">
<div
class="OraHeaderBarText">Zwiêkszenie</div>
</td>
</tr>
<tr style="height: 6px;"/>
<xsl:choose>
<xsl:when test="true()">
<tr>
<table align="center" class="
width_100 OraBGAccentLight"
style="padding:10px 20px 10px 20px;">
<tr>
<td id="tlGrwD2Main"
style="text-align:center;">
<div
style="overflow-y:auto;padding:0
0 0px 0;">
<table
class="OraTableContent
width_100"
style="margin-left:auto;margin-right:auto;float:left;">
<tr>
<th
class="OraTableColumnHeaderNumber
OraTableBorder0001"
style="text-align:
left;">Dzieñ</th>
<th
class="OraTableColumnHeaderNumber
OraTableBorder0001">Kwota</th>
</tr>
<xsl:variable
name="elems"
select="IncreaseVO/IncreaseVORow"/>
<xsl:for-each
select="$elems">
<tr>
<td
align="left"
class="OraTableCellText
OraTableBorder1101">
<xsl:value-of
select="Formatedday"/>
</td>
<xsl:call-template
name="drukuj_liczbe">
<xsl:with-param
name="wartosc"
select="DestinationAmount"/>
</xsl:call-template>
</tr>
</xsl:for-each>
<xsl:if
test="not($elems)">
<tr>
<td
align="center"
class="OraTableCellText
OraTableBorder1101"
style="width:100px">
Nie
znaleziono
wyników.
</td>
<td
align="left"
class="OraTableCellText
OraTableBorder1101"/>
</tr>
</xsl:if>
</table>
</div>
</td>
<td/>
</tr>
<tr>
<table class="width_100"
style="border-collapse:collapse;
margin: 8px 0 0 0;">
<tbody>
<tr>
<td
class="OraPromptText
" style="width:
130px;
text-align:left;">Nierozdysponowane
</td>
<td class=""
style="width:
50px">
<xsl:call-template
name="drukuj_liczbe_txt">
<xsl:with-param
name="wartosc"
select="AdditionalDemandPVO/AdditionalDemandPVORow/unalocatedIncrease"/>
</xsl:call-template>
</td>
<td class=""/>
</tr>
<tr>
<td
class="OraPromptText
"
style="text-align:left">Razem
</td>
<td class=""
style="width:
50px">
<xsl:call-template
name="drukuj_liczbe_txt">
<xsl:with-param
name="wartosc"
select="AdditionalDemandPVO/AdditionalDemandPVORow/Kwotazwiekszenia"/>
</xsl:call-template>
</td>
<td/>
</tr>
</tbody>
</table>
</tr>
</table>
</tr>
</xsl:when>
<xsl:otherwise/>
</xsl:choose>
</table>
</table>
<table style="margin-left: auto; margin-right:auto;">
<tr>
<td class="OraPromptText"
style="text-align:center;width:70px">
Ró¿nica
</td>
<td>
<xsl:call-template name="drukuj_liczbe_txt">
<xsl:with-param name="wartosc"
select="AdditionalDemandPVO/AdditionalDemandPVORow/Roznica"/>
</xsl:call-template>
</td>
</tr>
</table>
</body>
</html>
</xsl:template>
<xsl:decimal-format name="european" decimal-separator="."
grouping-separator=" "/>
<xsl:template name="drukuj_liczbe">
<xsl:param name="wartosc"/>
<td class="OraTableCellNumber OraTableBorder1101"
style="white-space: nowrap; width:80px; text-align:right; ">
<xsl:if test="string-length($wartosc) != 0">
<xsl:value-of select="format-number($wartosc,
'### ### ### ### ##0.00','european')"/>
</xsl:if>
<xsl:if test="string-length($wartosc) = 0">
0,00
</xsl:if>
</td>
</xsl:template>
<xsl:template name="drukuj_liczbe_txt">
<xsl:param name="wartosc"/>
<xsl:if test="string-length($wartosc) != 0">
<xsl:value-of select="format-number($wartosc,
'### ### ### ### ##0.00','european')"/>
</xsl:if>
<xsl:if test="string-length($wartosc) = 0">
0.00
</xsl:if>
</xsl:template>
</xsl:stylesheet>
And this XML
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="dodatkowe_zapotrzebowania.xsl"?>
<Root><ApplicationVO>
<ApplicationVORow>
<ApplicationId>3782</ApplicationId>
<Symbol>WZZ/2013/3782</Symbol>
<ApplicantTrusteeId>1986</ApplicantTrusteeId>
<TrusteeName>Krajowe Centrum Hodowli ZwierzÄ…t</TrusteeName>
<AppliedDate>2013-09-01</AppliedDate>
</ApplicationVORow>
</ApplicationVO>
<DecreaseVO>
<DecreaseVORow>
<ApplicationItemId>17823</ApplicationItemId>
<Formatedday>3 Wtorek </Formatedday>
<SourceAmount>5</SourceAmount>
<ApplicationId>3782</ApplicationId>
</DecreaseVORow>
</DecreaseVO>
<IncreaseVO>
<IncreaseVORow>
<ApplicationItemId>17824</ApplicationItemId>
<Formatedday>2 poniedziałek</Formatedday>
<DestinationAmount>5</DestinationAmount>
<ApplicationId>3782</ApplicationId>
</IncreaseVORow>
</IncreaseVO>
<AdditionalDemandPVO>
<AdditionalDemandPVORow>
<unalocatedDecrease>0</unalocatedDecrease>
<unalocatedIncrease>0</unalocatedIncrease>
<Kwotazmniejszenia>5</Kwotazmniejszenia>
<Kwotazwiekszenia>5</Kwotazwiekszenia>
<Roznica>0</Roznica>
<Year>2013</Year>
<Month>wrzesień</Month>
</AdditionalDemandPVORow>
</AdditionalDemandPVO>
<AuditTable>XX_EXEC_APPLICATION_ITEMS</AuditTable></Root>
It looks all fine and nested tables are displayed fine in preview in xml
spy or firefox. BUT. When it is installed to dev server all nested tables
are no longer nested. Ie, they all show up, but not one inside another,
but all over the place... Is it any other possibility to nest tables?
No comments:
Post a Comment