![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Closing tags not opened in an xsl:if statement Closing tags not opened in an xsl:if statementTo: NULL Date: 7/2/2004 8:19:00 AM Hi
I am transforming an XML file in to a web page report. After a
certain number of iterations i wish to force a page break and print a
new header before continuing. The problem i am having is that the XSL
does not allow me to close the table tag and then reopen it in the
xsl:if tag.
The following XSL (goes wrong after the xsl:if check on the position):
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<xsl:for-each select="sevlist/student">
<tr>
<td><xsl:value-of select="position()"/></td>
<td><xsl:value-of select="spr_code"/></td>
<td><xsl:value-of select="spr_surn"/></td>
<td><xsl:value-of select="crs_code"/></td>
<xsl:for-each select="absencelist/week">
<xsl:choose>
<xsl:when test="sev_slot=FALSE">
<td colspan="2" bgcolor="GRAY"> </td>
</xsl:when>
<xsl:otherwise>
<td><xsl:value-of select="dar_pjtc"/> </td>
<td><xsl:value-of select="dar_durt"/> </td>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</tr>
<xsl:if test="position() mod 20 = 1">
</table>
<br clear="all" style="page-break-before:always"/>
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
<td>Student Code</td>
<td>Name</td>
<td>Course</td>
<xsl:for-each select="ievlist/iev">
<td>M</td>
<td>Time </td>
</xsl:for-each>
</tr>
</xsl:if>
</xsl:for-each>
</table>
gives the message:
End tag 'table' does not match the start tag 'xsl:if'. Error
processing resource 'file:///C:/si/working/xsl_transforms/basic_register.xsl'.
Line 168, Position 3
</table>
--^
I would include the full XML file and the XSL but they are rather
large.
Any suggestions would be useful. Thanks in advance.
David
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
