Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Closing tags not opened in an xsl:if statement

From: CodePigeon <sky35094@------.-->
To: NULL
Date: 7/2/2004 9:12:00 PM
Here's a link that will get you going

(thanks to Oleg who helped me out on this one on another thread)

CodePigeon

Grouping is the solution. See 
http://www.biglist.com/lists/xsl-list/archives/200101/msg00202.html

-- 
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com


On 2 Jul 2004 08:18:44 -0700, dhepworth@b... (david hepworth)
wrote:

>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">&#160;</td>
>				</xsl:when>
>				<xsl:otherwise>
>					<td><xsl:value-of select="dar_pjtc"/>&#160;</td>
>					<td><xsl:value-of select="dar_durt"/>&#160;</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>&#160;</td>
>		<td>Student Code</td>
>		<td>Name</td>
>		<td>Course</td>
>		<xsl:for-each select="ievlist/iev">    	
>			<td>M</td>
>			<td>Time&#160;</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



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