Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


MSXSL transform too slow on IIS process (w3wp.exe)

From: hongtd2k@-----.---
To: NULL
Date: 9/11/2006 9:30:00 PM

I have 56K xml file size, when i use XSL transform, w3wp will raise to
100% CPU time and take a long time (about 1 minute ). What happend w/
my XSL file IIS and MSXSL config ?

How do i solve this problem ?

Thanks for help.

nm.

Here is my if.xslt file
<?xml version=3D"1.0" encoding=3D"utf-8"?>
<!DOCTYPE xsl:stylesheet [
	<!ENTITY nbsp "&#160;">
	<!ENTITY crlf "&#13;">
	<!ENTITY crlf1 "&#10;">
]>
<xsl:stylesheet version=3D"2.0"
xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform">
	<xsl:output method=3D"xml" encoding=3D"windows-1252"
omit-xml-declaration=3D"yes"/>


	<xsl:template match=3D"ReportIFDataSet">
		<html>
			<head>
				<meta http-equiv=3D"Content-Type" content=3D"text/html;
charset=3Dutf-8"/>
				<title>
					<xsl:value-of select=3D"if_title"/>
				</title>
			</head>
			<style type=3D"text/css"><![CDATA[
	<!-- .style1 { font-size: large; font-weight: bold; }
	=2Estyle3 { font-size: medium; font-weight: bold; }
	--> ]]></style>
			<body>
				<xsl:apply-templates select=3D"report_ims_if"/>
			</body>
		</html>
	</xsl:template>
	<xsl:template match=3D"report_ims_if">
		<p align=3D"center" class=3D"style1">PHI=E1=BA=BEU CH=E1=BB=88 TH=E1=BB=
=8A M=C3"I
TR=C6=AF=E1=BB=9CNG</p>
		<!--
<p align=3D"center" class=3D"style3"> (S=E1=BB' 1) </p>
-->
		<p>
			<strong> &nbsp;</strong>
		</p>
		<p>
			<strong> T=C3=AAn ch=E1=BB=89 th=E1=BB=8B : <xsl:value-of
select=3D"if_title"/>
			</strong>
		</p>
		<p>
			<strong>T=C3=A1c gi=E1=BA=A3 : <xsl:value-of select=3D"author_name"/>
			</strong>
		</p>
		<table cellspacing=3D"0" cellpadding=3D"0" border=3D"1">
			<tr>
				<td width=3D"288" valign=3D"top">
					<p> M=C3=A3 ch=E1=BB=89 th=E1=BB=8B / ID :
				</p>
					<p>&nbsp; </p>
				</td>
				<td width=3D"324" valign=3D"top">
					<p>
						<xsl:value-of select=3D"code"/>
					</p>
				</td>
			</tr>
			<tr>
				<td width=3D"288" valign=3D"top">
					<p>&nbsp; </p>
					<p> Ng=C3 y ti=E1=BA=BFn h=C3 nh ph=C3=A2n t=C3=ADch (=C4'=C3=A1nh
gi=C3=A1)</p>
					<p>&nbsp; </p>
				</td>
				<td width=3D"324" valign=3D"top">
					<p>&nbsp; </p>
					<p>
						<!--yyyyMMddHHmmss 20060226180755-->
						<xsl:value-of
select=3D"concat(substring(creating_date,7,2),'/',substring(creating_date,5=
,2),'/',substring(creating_date,1,4))"/>
					</p>
				</td>
			</tr>
			<tr>
				<td width=3D"288" height=3D"116" valign=3D"top">
					<p>Ng=C6=B0=E1=BB=9Di li=C3=AAn l=E1=BA=A1c/ch=E1=BB=8Bu tr=C3=A1ch nh=
i=E1=BB=87m
				qu=E1=BA=A3n l=C3=BD phi=E1=BA=BFu ch=E1=BB=89 th=E1=BB=8B m=C3=B4i
tr=C6=B0=E1=BB=9Dng t=E1=BA=A1i c=E1=BB=A5c BVMT</p>
					<xsl:apply-templates select=3D"report_ims_if_responsible"/>
				</td>
				<td width=3D"324" valign=3D"top">
					<p> =C4=90=E1=BB=8Ba ch=E1=BB=89 li=C3=AAn h=E1=BB=87 ng=C6=B0=E1=BB=
=9Di
ch=E1=BB=8Bu tr=C3=A1ch nhi=E1=BB=87m x=C3=A2y
				d=E1=BB=B1ng phi=E1=BA=BFu ch=E1=BB=89 th=E1=BB=8B m=C3=B4i tr=C6=B0=E1=
=BB=9Dng</p>
					<xsl:apply-templates select=3D"report_ims_if_development"/>
				</td>
			</tr>
		</table>
		<br/>
		<table cellspacing=3D"0" cellpadding=3D"0" border=3D"1">
			<tr>
				<td width=3D"612" colspan=3D"2" valign=3D"top">
					<p>
						<strong> N=E1=BB=99i dung th=C3=B4ng tin c=C6=A1
				b=E1=BA=A3n : </strong>
					</p>
					<xsl:apply-templates select=3D"report_ims_if_key_message"/>
				</td>
			</tr>
		</table>
		<br/>
		<table cellspacing=3D"0" cellpadding=3D"0" border=3D"1">
			<tr>
				<td width=3D"612" colspan=3D"2" valign=3D"top">
					<p>
						<strong> Bi=E1=BB=83u =C4'=E1=BB", =C4'=E1=BB" th=E1=BB=8B :
</strong>
					</p>
					<xsl:apply-templates select=3D"report_ims_if_chart"/>
				</td>
			</tr>
		</table>
		<br/>
		<table cellspacing=3D"0" cellpadding=3D"0" border=3D"1">
			<tr>
				<td width=3D"612" colspan=3D"2" valign=3D"top">
					<p>
						<strong> M=C3=B4 t=E1=BA=A3</strong>
					</p>
					<p>
						<strong>
							<em> S=E1=BB=B1 ph=C3=B9 h=E1=BB=A3p v=E1=BB=81 b=E1=BB'i c=E1=BA=A3=
nh
ch=C3=ADnh s=C3=A1ch:</em>
						</strong>
					</p>
					<xsl:call-template name=3D"replace-cr-lf">
						<xsl:with-param name=3D"string" select=3D"policy_context"/>
					</xsl:call-template>
					<p>
						<em>
							<strong>C=C3=A1c th=E1=BB=A7 t=E1=BB=A5c li=C3=AAn quan c=E1=BB=A7a =
ch=C3=ADnh
ph=E1=BB=A7:</strong>
						</em>
					</p>
					<xsl:call-template name=3D"replace-cr-lf">
						<xsl:with-param name=3D"string" select=3D"political_process"/>
					</xsl:call-template>
					<p>
						<em>
							<strong>C=C3=A1c =C4'i=E1=BB=81u ki=E1=BB=87n m=C3=B4i
tr=C6=B0=E1=BB=9Dng</strong>
						</em>
					</p>
					<xsl:call-template name=3D"replace-cr-lf">
						<xsl:with-param name=3D"string" select=3D"environment_context"/>
					</xsl:call-template>
					<p>
						<em>
							<strong>=C4=90=C3=A1nh gi=C3=A1</strong>
						</em>
					</p>
					<xsl:apply-templates select=3D"report_ims_if_assessment"/>
					<p>
						<em> </em>
					</p>
				</td>
			</tr>
		</table>
		<br/>
		<!-- Ch=E1=BB=89 th=E1=BB=8B th=E1=BB=A9 c=E1=BA=A5p -->
		<xsl:for-each select=3D"report_ims_if_subif">
			<p>
				<strong> T=C3=AAn ch=E1=BB=89 th=E1=BB=8B th=E1=BB=A9 c=E1=BA=A5p (ph=
=E1=BB=A5):
</strong>
				<xsl:value-of select=3D"subif_title"/>
			</p>
			<table cellspacing=3D"0" cellpadding=3D"0" border=3D"1">
				<tr>
					<td width=3D"613" valign=3D"top">
						<p>
							<strong> N=E1=BB=99i dung th=C3=B4ng tin c=C6=A1 b=E1=BA=A3n: </stro=
ng>
						</p>
						<xsl:for-each select=3D"report_ims_if_subif_key_message">
							<p>
								<xsl:value-of select=3D"content"/>
							</p>
						</xsl:for-each>
					</td>
				</tr>
			</table>
			<br/>
			<table cellspacing=3D"0" cellpadding=3D"0" border=3D"1">
				<tr>
					<td width=3D"613" valign=3D"top">
						<p>
							<strong> =C4=90=E1=BB" th=E1=BB=8B bi=E1=BB=83u =C4'=E1=BB": </stron=
g>
						</p>
						<xsl:for-each select=3D"report_ims_if_subif_chart">
							<p>
								<strong>Bi=E1=BB=83u =C4'=E1=BB" <xsl:value-of
select=3D"position()"/> :
							<xsl:call-template name=3D"replace-cr-lf">
										<xsl:with-param name=3D"string" select=3D"title"/>
									</xsl:call-template>
								</strong>
							</p>
							<img align=3D"middle">
								<xsl:attribute name=3D"src"><xsl:value-of
select=3D"web_chart_path"/></xsl:attribute>
							</img>
							<p align=3D"center">
								<strong>
									<em>Ngu=E1=BB"n: </em>
								</strong>
								<xsl:value-of select=3D"description"/>
							</p>
						</xsl:for-each>
					</td>
				</tr>
			</table>
			<br/>
			<table cellspacing=3D"0" cellpadding=3D"0" border=3D"1">
				<tr>
					<td width=3D"613" valign=3D"top">
						<p>
							<strong> =C4=90=C3=A1nh gi=C3=A1: </strong>
						</p>
						<xsl:call-template name=3D"replace-cr-lf">
							<xsl:with-param name=3D"string" select=3D"assessment"/>
						</xsl:call-template>
					</td>
				</tr>
			</table>
			<br/>
			<table cellspacing=3D"0" cellpadding=3D"0" border=3D"1">
			<tr>
				<td width=3D"612" valign=3D"top">
					<p>
						<strong> D=E1=BB=AF li=E1=BB=87u</strong>
					</p>
					<p>
						<strong>C=C3=A1c t=E1=BB=87p b=E1=BA=A3ng bi=E1=BB=83u</strong>
					</p>


					<xsl:for-each select=3D"ims_subif_table">
						<p>
							<strong> B=E1=BA=A3ng <xsl:value-of select=3D"position()"/> :
<xsl:value-of select=3D"name"/>
							</strong>
						</p>

						<xsl:call-template name=3D"draw_table_subif"/>

						<p>
							<strong>M=C3=B4 t=E1=BA=A3 : <xsl:value-of select=3D"title"/></stron=
g>
						</p>
					</xsl:for-each>


				</td>
			</tr>
		</table>
		<br/>
		</xsl:for-each>
		<p>
			<strong> Th=C3=B4ng tin tham kh=E1=BA=A3o v=C3  t=C6=B0 li=E1=BB=87u</st=
rong>
		</p>
		<table cellspacing=3D"0" cellpadding=3D"0" border=3D"1">
			<tr>
				<td width=3D"613" valign=3D"top">
					<p>
						<strong> T=C3 i li=E1=BB=87u tham kh=E1=BA=A3o:</strong>
					</p>
					<xsl:call-template name=3D"replace-cr-lf">
						<xsl:with-param name=3D"string" select=3D"reference"/>
					</xsl:call-template>
				</td>
			</tr>
		</table>
		<br/>
		<table cellspacing=3D"0" cellpadding=3D"0" border=3D"1">
			<tr>
				<td width=3D"612" valign=3D"top">
					<p>
						<strong> D=E1=BB=AF li=E1=BB=87u</strong>
					</p>
					<p>
						<strong>C=C3=A1c t=E1=BB=87p b=E1=BA=A3ng bi=E1=BB=83u</strong>
					</p>




					<xsl:for-each select=3D"ims_if_table">
						<p>
							<strong> B=E1=BA=A3ng <xsl:value-of select=3D"position()"/> :
<xsl:value-of select=3D"name"/>
							</strong>
						</p>

						<xsl:call-template name=3D"draw_table_if"/>

						<p>
							<strong>M=C3=B4 t=E1=BA=A3 : <xsl:value-of select=3D"title"/></stron=
g>
						</p>
					</xsl:for-each>

					<!--
					<xsl:for-each select=3D"ims_if_table">
						<p>
							<strong>B=E1=BA=A3ng <xsl:value-of select=3D"positive()"/> :
<xsl:value-of select=3D"title"/></strong>
						</p>
						<p>
							<em>
								<xsl:call-template name=3D"ims_if_table">
								<xsl:param name=3D""/>
								</xsl:call-template>
							</em>
						</p>
						<p>
							<em>
								<strong>Tieu de nguon </strong>
							</em>
						</p>
						<p>
							<em>
								<strong>Mo ta nguon</strong>
							</em>
						</p>
					</xsl:for-each>
-->
				</td>
			</tr>
		</table>
		<br/>
		<table cellspacing=3D"0" cellpadding=3D"0" border=3D"1">
			<tr>
				<td width=3D"614" valign=3D"top">
					<p>
						<strong> C=C6=A1 s=E1=BB=9F d=E1=BB=AF li=E1=BB=87u v=E1=BB=81 ngu=E1=
=BB"n
cung c=E1=BA=A5p
				th=C3=B4ng tin</strong>
					</p>
					<p>
						<strong>Th=C3=B4ng tin gi=E1=BB=9Bi thi=E1=BB=87u tr=C3=AAn trang Web
</strong>
					</p>
					<P>1. T=C3=B3m t=E1=BA=AFt/ M=C3=B4 t=E1=BA=A3/ V=E1=BA=A5n =C4'=E1=BB=
=81 nan
gi=E1=BA=A3i:
					<xsl:call-template name=3D"replace-cr-lf">
							<xsl:with-param name=3D"string" select=3D"summarization"/>
						</xsl:call-template>
					</P>
					<P>2. V=E1=BA=A5n =C4'=E1=BB=81 ch=C3=ADnh s=C3=A1ch/ c=C3=A2u h=E1=BB=
=8Fi
=C4'=E1=BA=B7t ra v=E1=BB=81 m=E1=BA=B7t ch=C3=ADnh s=C3=A1ch:
					<xsl:call-template name=3D"replace-cr-lf">
							<xsl:with-param name=3D"string" select=3D"policies_questions"/>
						</xsl:call-template>
					</P>
					<P>3. Ch=E1=BB=A7 =C4'=E1=BB=81 ph=E1=BB=B7 bi=E1=BA=BFn th=C3=B4ng tin
c=E1=BB=A7a C=E1=BB=A5c BVMT: <xsl:value-of select=3D"theme_name"/>
					</P>
					<P>4. M=C3=B4 h=C3=ACnh DPSIR:
					<xsl:value-of select=3D"dpsir"/>
					</P>
					<p>
						<strong>Th=C3=B4ng tin k=E1=BB=B9 thu=E1=BA=ADt</strong>
					</p>
					<P>5. Ngu=E1=BB"n d=E1=BB=AF li=E1=BB=87u:
					<xsl:call-template name=3D"replace-cr-lf">
							<xsl:with-param name=3D"string" select=3D"meta_tech_data_source"/>
						</xsl:call-template>
					</P>
					<P>6. M=C3=B4 t=E1=BA=A3 d=E1=BB=AF li=E1=BB=87u:
					<xsl:call-template name=3D"replace-cr-lf">
							<xsl:with-param name=3D"string" select=3D"meta_tech_desc_data"/>
						</xsl:call-template>
					</P>
					<P>7. Ph=E1=BA=A1m vi =C4'=E1=BB=8Ba l=C3=BD:
					<xsl:call-template name=3D"replace-cr-lf">
							<xsl:with-param name=3D"string" select=3D"meta_tech_geo_coverage"/>
						</xsl:call-template>
					</P>
					<P>8. Quy m=C3=B4 v=E1=BB=81 th=E1=BB=9Di gian:
					<xsl:call-template name=3D"replace-cr-lf">
							<xsl:with-param name=3D"string" select=3D"meta_tech_temp_coverage"/>
						</xsl:call-template>
					</P>
					<P>9. Ph=C6=B0=C6=A1ng ph=C3=A1p v=C3  t=E1=BA=A7n su=E1=BA=A5t thu th=
=E1=BA=ADp
d=E1=BB=AF li=E1=BB=87u:
					<xsl:call-template name=3D"replace-cr-lf">
							<xsl:with-param name=3D"string"
select=3D"meta_tech_method_collection"/>
						</xsl:call-template>
					</P>
					<P>10. Ph=C6=B0=C6=A1ng ph=C3=A1p x=E1=BB=AD l=C3=BD s=E1=BB' li=E1=BB=
=87u:
					<xsl:call-template name=3D"replace-cr-lf">
							<xsl:with-param name=3D"string"
select=3D"meta_tech_method_manipulation"/>
						</xsl:call-template>
					</P>
					<p>
						<strong>Th=C3=B4ng tin =C4'=E1=BB=8Bnh t=C3=ADnh</strong>
					</p>
					<P>11. =C4=90i=E1=BB=83m m=E1=BA=A1nh, =C4'i=E1=BB=83m y=E1=BA=BFu (t=
=E1=BA=A1i
m=E1=BB=A9c d=E1=BB=AF li=E1=BB=87u):
					<xsl:call-template name=3D"replace-cr-lf">
							<xsl:with-param name=3D"string" select=3D"meta_qual_raru"/>
						</xsl:call-template>
					</P>
					<P>12. =C4=90=E1=BB=99 tin c=E1=BA=ADy, t=C3=ADnh ch=C3=ADnh x=C3=A1c,
=C4'=E1=BB=99 th=C3=B4, t=C3=ADnh kh=C3=B4ng ch=E1=BA=AFc ch=E1=BA=AFn (t=
=E1=BA=A1i
m=E1=BB=A9c d=E1=BB=AF li=E1=BB=87u):
					<xsl:call-template name=3D"replace-cr-lf">
							<xsl:with-param name=3D"string"
select=3D"meta_qual_streng_weakness"/>
						</xsl:call-template>
					</P>
					<P>13. =C4=90=C3=A1nh gi=C3=A1 t=E1=BB=B7ng th=E1=BB=83 theo thang
=C4'i=E1=BB=83m (thang t=E1=BB=AB 1-3 =C4'i=E1=BB=83m: 1=3D kh=C3=B4ng c=C3=
=B3
v=E1=BA=A5n =C4'=E1=BB=81 g=C3=AC l=E1=BB=9Bn, 3=3D c=C3=A1c v=E1=BA=A5n =
=C4'=E1=BB=81
nghi=C3=AAm tr=E1=BB=8Dng)</P>
					<P>M=E1=BB=A9c =C4'=E1=BB=99 ph=C3=B9 h=E1=BB=A3p:
					<xsl:value-of select=3D"meta_qual_overall_relevancy"/>
					</P>
					<P>T=C3=ADnh ch=C3=ADnh x=C3=A1c:
					<xsl:value-of select=3D"meta_qual_overall_accuracy"/>
					</P>
					<P>Kh=E1=BA=A3 n=C4=83ng so s=C3=A1nh theo th=E1=BB=9Di gian:
					<xsl:value-of select=3D"meta_qual_overall_compare_time"/>
					</P>
					<P>Kh=E1=BA=A3 n=C4=83ng so s=C3=A1nh theo kh=C3=B4ng gian:
					<xsl:value-of select=3D"meta_qual_overall_compare_space"/>
					</P>
				</td>
			</tr>
		</table>
		<p>&nbsp;</p>
		<table cellspacing=3D"0" cellpadding=3D"0" border=3D"1">
			<tr>
				<td width=3D"615" valign=3D"top">
					<p>
						<strong> Nh=E1=BB=AFng c=C3=B4ng vi=E1=BB=87c kh=C3=A1c</strong>
					</p>
					<xsl:call-template name=3D"replace-cr-lf">
						<xsl:with-param name=3D"string" select=3D"futher_work"/>
					</xsl:call-template>
				</td>
			</tr>
		</table>
	</xsl:template>
	<xsl:template match=3D"report_ims_if_responsible">
		<p>T=C3=AAn : <xsl:value-of select=3D"if_responsible_name"/>
		</p>
		<p>Email : <xsl:value-of select=3D"if_responsible_email"/>
		</p>
	</xsl:template>
	<xsl:template match=3D"report_ims_if_development">
		<p>T=C3=AAn : <xsl:value-of select=3D"if_development_name"/>
		</p>
		<p>Email : <xsl:value-of select=3D"if_development_email"/>
		</p>
	</xsl:template>
	<xsl:template match=3D"report_ims_if_key_message">
		<p>
			<xsl:call-template name=3D"replace-cr-lf">
				<xsl:with-param name=3D"string" select=3D"content"/>
			</xsl:call-template>
		</p>
	</xsl:template>
	<xsl:template match=3D"report_ims_if_chart">
		<!--X.
	-->
		<p>
			<strong>Bi=E1=BB=83u =C4'=E1=BB" <xsl:value-of select=3D"chart_index"/>
:
		<xsl:call-template name=3D"replace-cr-lf">
					<xsl:with-param name=3D"string" select=3D"title"/>
				</xsl:call-template>
			</strong>
		</p>
		<img align=3D"middle">
			<xsl:attribute name=3D"src"><xsl:value-of
select=3D"web_chart_path"/></xsl:attribute>
		</img>
		<p align=3D"center">
			<strong>
				<em>Ngu=E1=BB"n: </em>
			</strong>
			<xsl:value-of select=3D"description"/>
		</p>
	</xsl:template>
	<xsl:template match=3D"report_ims_if_assessment">
		<p>
			<xsl:call-template name=3D"replace-cr-lf">
				<xsl:with-param name=3D"string" select=3D"content"/>
			</xsl:call-template>
		</p>
	</xsl:template>

	<xsl:template name=3D"replace-cr-lf">
		<xsl:param name=3D"string"/>
		<xsl:variable name=3D"CR" select=3D"'&#xD;'"/>
		<xsl:variable name=3D"LF" select=3D"'&#xA;'"/>
		<xsl:variable name=3D"CRLF" select=3D"concat($CR, $LF)"/>
		<xsl:choose>
			<xsl:when test=3D"contains($string,$CRLF)">
				<xsl:call-template name=3D"replace-cr-lf">
					<xsl:with-param name=3D"string"
select=3D"substring-before($string,$CRLF)"/>
				</xsl:call-template>
				<br/>
				<xsl:call-template name=3D"replace-cr-lf">
					<xsl:with-param name=3D"string"
select=3D"substring-after($string,$CRLF)"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:when test=3D"contains($string,$CR)">
				<xsl:call-template name=3D"replace-cr-lf">
					<xsl:with-param name=3D"string"
select=3D"substring-before($string,$CR)"/>
				</xsl:call-template>
				<br/>
				<xsl:call-template name=3D"replace-cr-lf">
					<xsl:with-param name=3D"string"
select=3D"substring-after($string,$CR)"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:when test=3D"contains($string,$LF)">
				<xsl:call-template name=3D"replace-cr-lf">
					<xsl:with-param name=3D"string"
select=3D"substring-before($string,$LF)"/>
				</xsl:call-template>
				<br/>
				<xsl:call-template name=3D"replace-cr-lf">
					<xsl:with-param name=3D"string"
select=3D"substring-after($string,$LF)"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select=3D"$string"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<!-- inlcude table transform -->
	<xsl:include href=3D"if_table.xslt"/>
</xsl:stylesheet>

and iftable.xslt

<?xml version=3D"1.0" encoding=3D"utf-8"?>
<!DOCTYPE xsl:stylesheet [
	<!ENTITY nbsp "&#160;">
	<!ENTITY crlf "&#13;">
	<!ENTITY crlf1 "&#10;">
]>
<xsl:stylesheet version=3D"2.0"
xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform"

>
<!--xmlns:msxsl=3D"urn:schemas-microsoft-com:xslt"
xmlns:user=3D"urn:my-scripts"
-->


<xsl:output method=3D"html" encoding=3D"windows-1252"
omit-xml-declaration=3D"yes" indent=3D"yes"/>

<!--
<msxsl:script language=3D"JScript" implements-prefix=3D"user">
<![CDATA[
function uppercase(r)
{
r=2EtoUpperCase();
}
]]>
</msxsl:script>
-->
<!--
	<xsl:template match=3D"report_ims_if">
		<html>
			<head>
				<meta http-equiv=3D"Content-Type" content=3D"text/html;
charset=3Dwindows-1252"/>
				<title>
					<xsl:value-of select=3D"if_title"/>
				</title>
			</head>
			<body>
				<xsl:for-each select=3D"ims_if_table">
					<xsl:call-template name=3D"draw_table_if"/>
					<br/>
				</xsl:for-each>
			</body>
		</html>
	</xsl:template>
	-->
	<!--
	<xsl:template match=3D"report_ims_if_subif">
		<html>

			<body>
				<xsl:for-each select=3D"ims_subif_table">
					<xsl:call-template name=3D"draw_table_subif"/>
					<br/>
				</xsl:for-each>
			</body>
		</html>
	</xsl:template>
	-->
	<!-- draw TABLE .. -->
	<xsl:template name=3D"draw_table_if">
		<table border=3D"1">
			<tbody>
				<!-- Calculate  deepest level-->
				<xsl:variable name=3D"max_leaf_count">

					<xsl:value-of select=3D"count(descendant::*[name()=3D'isleaf'][text()
=3D'True' or text() =3D'true'])"/>
				</xsl:variable>

				<xsl:variable name=3D"max_leaf_level">
					<xsl:call-template name=3D"get_max_leaf_level_if">
						<xsl:with-param name=3D"level" select=3D"1"/>
						<xsl:with-param name=3D"node_path"
select=3D"ims_if_table_column_root"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name=3D"tableid" select=3D"id"/>

				<!-- Column header-->

				<xsl:call-template name=3D"draw_column_header_if">
					<xsl:with-param name=3D"node_path"
select=3D"ims_if_table_column_root"/>
					<xsl:with-param name=3D"max_leaf_level" select=3D"$max_leaf_level"/>
					<!--<xsl:with-param name=3D"tableid" select=3D"id"/>-->
				</xsl:call-template>


				<!-- table detail -->

				<xsl:call-template name=3D"draw_table_data">

					<xsl:with-param name=3D"max_leaf_count" select=3D"$max_leaf_count"/>
					<xsl:with-param name=3D"table_data" select=3D"ims_if_table_data"/>
					<xsl:with-param name=3D"current_column" select=3D"1"/>
					<xsl:with-param name=3D"current_row" select=3D"1"/>
					<xsl:with-param name=3D"current_data_pos" select=3D"1"/>
					<xsl:with-param name=3D"all_column_leaf"
select=3D"descendant::isleaf[text() =3D'True' or text() =3D'true']/../id"/>
				</xsl:call-template>

			</tbody>
		</table>
	</xsl:template>

	<!-- draw column header .. recursiving.. -->
	<xsl:template name=3D"draw_column_header_if">
		<xsl:param name=3D"node_path"/>
		<xsl:param name=3D"max_leaf_level"/>

		<tr>

		<xsl:for-each select=3D"$node_path">

			<!-- calculate node's level-->
			<xsl:variable name=3D"cur_column_id" select=3D"id"/>

			<!-- -1 =3D=3D skip current element -->
			<xsl:variable name=3D"leaf_count"
select=3D"count(descendant::isleaf[text() =3D'True' or text() =3D'true']/..)
-1"/>


		<xsl:variable name=3D"cur_node_level" select=3D"count(ancestor::*) -2 "/>

			<!-- calculate rowspan and colspan -->
			<xsl:variable name=3D"rowspan">
				<xsl:choose>
					<xsl:when test=3D" isleaf =3D 'true' or isleaf =3D'True' ">
						<xsl:value-of select=3D"$max_leaf_level - $cur_node_level + 1"/>
					</xsl:when>
					<xsl:when test=3D"isleaf !=3D 'true' and isleaf !=3D 'True' ">
						<xsl:value-of select=3D"1"/>
					</xsl:when>
				</xsl:choose>
			</xsl:variable>
			<xsl:variable name=3D"colspan" select=3D"$leaf_count + 1"/>

			<!-- write column header	 -->
			<td rowspan=3D"{$rowspan}" colspan=3D"{$colspan}">
			<b>
				<!--<xsl:value-of
select=3D"concat(column_name,'-',$cur_column_id)"/>-->
				<xsl:value-of select=3D"column_name"/>
			</b>

			</td>

		</xsl:for-each>

		<!-- write </tr> -->

		</tr>

		<!-- rescursiving call -->
		<xsl:if test=3D"count($node_path/ims_if_table_column) > 0">
			<xsl:call-template name=3D"draw_column_header_if">
				<xsl:with-param name=3D"node_path"
select=3D"$node_path/ims_if_table_column"/>
				<xsl:with-param name=3D"max_leaf_level" select=3D"$max_leaf_level"/>

			</xsl:call-template>
		</xsl:if>
	</xsl:template>

	<!-- draw table data .. recursiving..-->
	<xsl:template name=3D"draw_table_data">
		<xsl:param name=3D"max_leaf_count"/>
		<xsl:param name=3D"table_data"/>
		<xsl:param name=3D"current_column"/>
		<xsl:param name=3D"current_row"/>
		<xsl:param name=3D"current_data_pos"/>
		<xsl:param name=3D"all_column_leaf"/>


		<!-- check  if first column, write <tr> -->
		<xsl:if test=3D"$current_data_pos =3D 1">
			<xsl:text disable-output-escaping=3D"yes">&lt;tr&gt;</xsl:text>
		</xsl:if>

		<!-- Determine have row data ? -->
		<xsl:variable name=3D"is_row_avaiable"
select=3D"count($table_data/row_id[text() =3D
$current_row]/../column_id[text() =3D 'label'])"/>
		<xsl:choose>
			<xsl:when test=3D"$is_row_avaiable =3D 0  ">
				<xsl:if test=3D" $current_row =3D 1 and $current_data_pos =3D 1">
					<td colspan=3D"{$max_leaf_count +1}"  align=3D"center">Kh=C3=B4ng c=C3=
=B3
d=E1=BB=AF li=E1=BB=87u.</td>
				</xsl:if>
				<xsl:text disable-output-escaping=3D"yes">&lt;/tr&gt;</xsl:text>
			</xsl:when>

			<xsl:when test=3D"$is_row_avaiable > 0">
				<!-- find current column_id-->
				<xsl:variable name=3D"current_column_id">
					<xsl:value-of select=3D"$all_column_leaf[$current_column]"/>
				</xsl:variable>

				<!-- calculate cell value base on row_id and column_id on
ims_if_table_data-->
				<xsl:variable name=3D"cell_value">
					<xsl:choose>
						<!-- First column -->
						<xsl:when test=3D"$current_column_id  =3D '-1'">
							<xsl:value-of select=3D"$table_data/row_id[text() =3D
$current_row]/../column_id[text() =3D 'label']/../value"/>
						</xsl:when>
						<xsl:when test=3D"$current_column_id !=3D '-1'">
							<xsl:value-of select=3D"$table_data/row_id[text() =3D
$current_row]/../column_id[text() =3D $current_column_id]/../value"/>
						</xsl:when>
					</xsl:choose>
				</xsl:variable>

				<!-- recursiving ...-->
				<xsl:choose>

					<!-- if current_column  is the last  -->

					<xsl:when test=3D"$current_column =3D $max_leaf_count">


						<!-- write cell value (- for null value)-->
						<td>
							<xsl:choose>
								<xsl:when test=3D"$cell_value =3D ''">
									<xsl:value-of select=3D"'-'"/>
								</xsl:when>
								<xsl:when test=3D"$cell_value !=3D ''">
									<xsl:value-of select=3D"$cell_value"/>
								</xsl:when>
							</xsl:choose>
						</td>

						<!-- new row -->
						<xsl:text disable-output-escaping=3D"yes">&lt;/tr&gt; </xsl:text>


						<!-- recursive call template w/ current_column =3D 1 and make sure
have data for row: current_row + 1 availables  -->
						<!-- and ($is_next_row_avaiable  !=3D 0-->
						<xsl:if test=3D"count($table_data) >=3D $current_data_pos ">
							<xsl:call-template name=3D"draw_table_data">
								<xsl:with-param name=3D"max_leaf_count"
select=3D"$max_leaf_count"/>
								<xsl:with-param name=3D"table_data" select=3D"$table_data"/>
								<xsl:with-param name=3D"all_column_leaf"
select=3D"$all_column_leaf"/>
								<xsl:with-param name=3D"current_column" select=3D"1"/>
								<xsl:with-param name=3D"current_row" select=3D"$current_row + 1"/>
								<xsl:with-param name=3D"current_data_pos"
select=3D"$current_data_pos + 1"/>
							</xsl:call-template>
						</xsl:if>
					</xsl:when>

					<!-- have next column -->
					<xsl:when test=3D"$current_column &lt; $max_leaf_count">

						<!-- write cell value (- for null value)-->
						<td>
						<xsl:choose>
							<xsl:when test=3D"$cell_value =3D ''">
								<xsl:value-of select=3D"'-'"/>
							</xsl:when>
							<xsl:when test=3D"$cell_value !=3D ''">
								<xsl:value-of select=3D"$cell_value"/>
							</xsl:when>
						</xsl:choose>
						</td>

						<!-- recursive call template w/ current_column++ -->
						<xsl:if test=3D"count($table_data) > $current_data_pos">
							<xsl:call-template name=3D"draw_table_data">
								<xsl:with-param name=3D"max_leaf_count"
select=3D"$max_leaf_count"/>
								<xsl:with-param name=3D"table_data" select=3D"$table_data"/>
								<xsl:with-param name=3D"all_column_leaf"
select=3D"$all_column_leaf"/>
								<xsl:with-param name=3D"current_row" select=3D"$current_row"/>
								<xsl:with-param name=3D"current_column" select=3D"$current_column +
1"/>
								<xsl:with-param name=3D"current_data_pos"
select=3D"$current_data_pos + 1"/>
							</xsl:call-template>
						</xsl:if>
					</xsl:when>
				</xsl:choose>

			</xsl:when>

		</xsl:choose>

	</xsl:template>

	<!-- Get max leaf level -->
	<xsl:template name=3D"get_max_leaf_level_if">
		<xsl:param name=3D"level"/>
		<xsl:param name=3D"node_path"/>

		<xsl:if test=3D"count($node_path/ims_if_table_column) > 0">
			<xsl:call-template name=3D"get_max_leaf_level_if">
				<xsl:with-param name=3D"node_path"
select=3D"$node_path/ims_if_table_column"/>
				<xsl:with-param name=3D"level" select=3D"$level + 1"/>
			</xsl:call-template>
		</xsl:if>
		<xsl:if test=3D"count($node_path/ims_if_table_column) =3D 0">
			<xsl:value-of select=3D"$level"/>
		</xsl:if>
	</xsl:template>


	<xsl:template name=3D"get_max_leaf_level_subif">
		<xsl:param name=3D"level"/>
		<xsl:param name=3D"node_path"/>

		<xsl:if test=3D"count($node_path/ims_subif_table_column) > 0">
			<xsl:call-template name=3D"get_max_leaf_level_subif">
				<xsl:with-param name=3D"node_path"
select=3D"$node_path/ims_subif_table_column"/>
				<xsl:with-param name=3D"level" select=3D"$level + 1"/>
			</xsl:call-template>
		</xsl:if>
		<xsl:if test=3D"count($node_path/ims_subif_table_column) =3D 0">
			<xsl:value-of select=3D"$level"/>
		</xsl:if>
	</xsl:template>

	<xsl:template name=3D"draw_table_subif">
		<table border=3D"1">
			<tbody>
				<!-- Calculate  deepest level-->
				<xsl:variable name=3D"max_leaf_count">
					<xsl:value-of select=3D"count(descendant::*[name()=3D'isleaf'][text()
=3D'True' or text() =3D'true'])"/>
				</xsl:variable>

				<xsl:variable name=3D"max_leaf_level">
					<xsl:call-template name=3D"get_max_leaf_level_subif">
						<xsl:with-param name=3D"level" select=3D"1"/>
						<xsl:with-param name=3D"node_path"
select=3D"ims_subif_table_column_root"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name=3D"tableid" select=3D"id"/>

				<!-- Column header-->

				<xsl:call-template name=3D"draw_column_header_subif">
					<xsl:with-param name=3D"node_path"
select=3D"ims_subif_table_column_root"/>
					<xsl:with-param name=3D"max_leaf_level" select=3D"$max_leaf_level"/>

				</xsl:call-template>


				<!-- table detail -->

				<xsl:call-template name=3D"draw_table_data">

					<xsl:with-param name=3D"max_leaf_count" select=3D"$max_leaf_count"/>
					<xsl:with-param name=3D"table_data" select=3D"ims_subif_table_data"/>
					<xsl:with-param name=3D"current_column" select=3D"1"/>
					<xsl:with-param name=3D"current_row" select=3D"1"/>
					<xsl:with-param name=3D"current_data_pos" select=3D"1"/>
					<xsl:with-param name=3D"all_column_leaf"
select=3D"descendant::isleaf[text() =3D'True' or text() =3D'true']/../id"/>
				</xsl:call-template>

			</tbody>
		</table>
	</xsl:template>

	<!-- draw column header .. recursiving.. -->
	<xsl:template name=3D"draw_column_header_subif">
		<xsl:param name=3D"node_path"/>
		<xsl:param name=3D"max_leaf_level"/>
		<!--<xsl:param name=3D"tableid"/>-->

		<tr>



		<xsl:for-each select=3D"$node_path">

			<!-- calculate node's level-->
			<xsl:variable name=3D"cur_column_id" select=3D"id"/>

			<!-- -1 =3D=3D skip current element -->
			<xsl:variable name=3D"leaf_count"
select=3D"count(descendant::isleaf[text() =3D'True' or text() =3D'true']/..)
-1"/>


		<xsl:variable name=3D"cur_node_level" select=3D"count(ancestor::*) -2 "/>

			<!-- calculate rowspan and colspan -->
			<xsl:variable name=3D"rowspan">
				<xsl:choose>
					<xsl:when test=3D" isleaf =3D 'true' or isleaf =3D'True' ">
						<xsl:value-of select=3D"$max_leaf_level - $cur_node_level + 1"/>
					</xsl:when>
					<xsl:when test=3D"isleaf !=3D 'true' and isleaf !=3D 'True' ">
						<xsl:value-of select=3D"1"/>
					</xsl:when>
				</xsl:choose>
			</xsl:variable>
			<xsl:variable name=3D"colspan" select=3D"$leaf_count + 1"/>

			<!-- write column header	 -->
			<td rowspan=3D"{$rowspan}" colspan=3D"{$colspan}">
				<!--<xsl:value-of
select=3D"concat(column_name,'-',$cur_column_id)"/>-->
			<b>
				<xsl:value-of select=3D"column_name"/>
			</b>
			</td>

		</xsl:for-each>

		<!-- write </tr> -->

		</tr>

		<!-- rescursiving call -->
		<xsl:if test=3D"count($node_path/ims_subif_table_column) > 0">
			<xsl:call-template name=3D"draw_column_header_subif">
				<xsl:with-param name=3D"node_path"
select=3D"$node_path/ims_subif_table_column"/>
				<xsl:with-param name=3D"max_leaf_level" select=3D"$max_leaf_level"/>

			</xsl:call-template>
		</xsl:if>
	</xsl:template>
=09

</xsl:stylesheet>



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent