[xsl] A doubt on call-template rule

Subject: [xsl] A doubt on call-template rule
From: Satish_Komma <Satish_Komma@xxxxxxxxxx>
Date: Wed, 27 Jun 2001 15:30:05 +0530
Please find if there is any mistake in the call-template syntax or in it's
usage in the follwing xsl code:

XSL CODE(file name: ptable.xsl):
****************************************************************************
*****************
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl";>	

	<xsl:template match="/">
		<html>
			<P>			
			<xsl:apply-templates/>			
			</P>
		</html>
	</xsl:template>

	<xsl:template match="PERIODIC_TABLE">		
		<xsl:apply-templates/>			
	</xsl:template>
	
	<xsl:template match="ATOM">
		<xsl:call-template name="atom_cell"/>
	</xsl:template>

	<xsl:template name="atom_cell">
		<xsl:value-of select="."/>
	</xsl:template>

</xsl:stylesheet>

****************************************************************************
*************************************

Corresponding XML CODE:

***********************************************
<?xml version='1.0'?>
<?xml-stylesheet type="text/xsl" href="ptable.xsl"?>

<PERIODIC_TABLE>
	<ATOM state="GAS">
		<name> Hydrogen</name>
		<symbol> H </symbol>
	</ATOM>

	<ATOM state="GAS">
		<name> Helieum</name>
		<symbol> He</symbol>
	</ATOM>
</PERIODIC_TABLE>

**********************************************************************

  When 'am trying to run this code in browser 'am getting the following
error message:
	Keyword xsl:call-template may not be used here. 
     I would be delighted if anyone can kindly explain me where the actual
problem is present.



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread