chaitu chaitu
asked on
Invalid instantiation of 'xsl:include' in 'xsl:template' context
this is my xsl;
i am want to put the code from starting block to ending block into different xsl like footer.xsl;
can i write like this <xsl:include href="footer.xsl"/>
i am including like this <xsl:include href="footer.xsl"/> in place of the block of code
but i am getting error
XSL-1047: (Error) Invalid instantiation of 'xsl:include' in 'xsl:template' context.
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" />
<xsl:param name="recordsPerPage" select="5" />
<xsl:param name="pageNumber" select="page/request/param
<xsl:param name="recordCount" select="count(//ROW)" />
<xsl:param name="Operation" select="page/request/param
<xsl:template match="page">
<center><h3><font face='verdana'>Consol Details</font></h3></cente
<table cellSpacing='0' cellpadding='0' width='95%'>
<center>
<THEAD>
<tr CLASS="formheader">
<td></td>
<td onclick="callSorting(this.
<td onclick="callSorting(this.
<td onclick="callSorting(this.
<td onclick="callSorting(this.
<td onclick="callSorting(this.
<td onclick="callSorting(this.
<td onclick="callSorting(this.
<td onclick="callSorting(this.
<td onclick="callSorting(this.
</tr>
</THEAD>
<xsl:for-each select="ROWSET/ROW">
<tr id='tr{position()-1}' class="formdata">
<td id='refTD{position()-1}' console='{CONSOLEID}'>
<input name='console' type='radio' value='refTD{position()-1}
<xsl:attribute name ="onClick">highLight('tr<x
<xsl:attribute name ="onDblClick">setId('refTD
</input>
</td>
<td id='refTD{position()-1}'>
<xsl:value-of select="CONSOLEID" />
</td>
<td id='refTD{position()-1}'>
<xsl:value-of select="MASTERDOCID" />
</td>
<td id='refTD{position()-1}'>
<xsl:value-of select="ORIGIN" />
</td>
<td id='refTD{position()-1}'>
<xsl:value-of select="DESTINATION" />
</td>
<td id='refTD{position()-1}'>
<xsl:value-of select="CARRIERID" />
</td>
<td id='refTD{position()-1}'>
<xsl:value-of select="FLIGHT_NO" />
</td>
<td id='refTD{position()-1}'>
<xsl:value-of select="ETD" />
</td>
<td id='refTD{position()-1}'>
<xsl:value-of select="ETA" />
</td>
<td id='refTD{position()-1}'>
<xsl:value-of select="CUTOFF_DATE" />
</td>
</tr>
</xsl:for-each>
</center>
</table>
<!-------------------- starting --------------------->
<table cellSpacing="0" cellpadding="0" border="1" width="95%">
<tr class="formdata">
<td width="15%" style="font-size:8pt;">
<xsl:if test="$pageNumber > 0">
<xsl:element name="a">
<xsl:attribute name="href">ETCLOVConsoleI
</xsl:attribute>
HAWBNO
</xsl:element>
</xsl:if>
</td>
</tr>
</table>
<!-------------------- ending --------------------->
<br/>
<br/>
<center>
<input type="button" value="Ok" name="Ok" id="Ok" onClick="setId()" class="input"/>
<input type="button" value="Cancel" name="Cancel" id="Cancel" onClick="resetValues();" class="input"/>
</center>
</xsl:template>
</xsl:stylesheet>
The xsl:include element is only allowed as a top-level element.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.