This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
A doubt on call-template rule
- To: XSL-List at lists dot mulberrytech dot com
- Subject: [xsl] A doubt on call-template rule
- From: Satish_Komma <Satish_Komma at satyam dot com>
- Date: Wed, 27 Jun 2001 15:30:05 +0530
- Reply-To: xsl-list at lists dot mulberrytech dot com
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