s2009
04-26-2009, 01:26 PM
Hi all,
I am beginner learning XML.
I have created the following XSL file :
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org" version = "1.0">
<xsl:template match = "/">
<xsl:for-each select = "MARKS/CORE">
<xsl:text>MARK IN SUBJECT 1</xsl:text>
<xsl:value-of select = "M1"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
and the XML file is as follows:
<?xml version ="1.0"?>
<?xml:stylesheet type="text/xsl"? href = "Trial.xsl"?>
<MARKS>
<CORE>
<M1>100</M1>
<M2>90</M2>
</CORE>
<ALLIED>
<M3>100</M3>
<M4>100</M4>
</ALLIED>
</MARKS>
When I run the above program in the browser it is just displaying the Text : "Mark in Subject 1" but the value of it is not displayed.
Can any one let me know the changes i should make in the XSL or the XML file?
Please I am awaiting all ur replies...
Thanks in advance!!
I am beginner learning XML.
I have created the following XSL file :
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org" version = "1.0">
<xsl:template match = "/">
<xsl:for-each select = "MARKS/CORE">
<xsl:text>MARK IN SUBJECT 1</xsl:text>
<xsl:value-of select = "M1"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
and the XML file is as follows:
<?xml version ="1.0"?>
<?xml:stylesheet type="text/xsl"? href = "Trial.xsl"?>
<MARKS>
<CORE>
<M1>100</M1>
<M2>90</M2>
</CORE>
<ALLIED>
<M3>100</M3>
<M4>100</M4>
</ALLIED>
</MARKS>
When I run the above program in the browser it is just displaying the Text : "Mark in Subject 1" but the value of it is not displayed.
Can any one let me know the changes i should make in the XSL or the XML file?
Please I am awaiting all ur replies...
Thanks in advance!!