cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manpreet" <manpreetnag...@yahoo.com>
Subject some problem !!
Date Mon, 21 Aug 2000 11:17:25 GMT
Hi Everybody,

Im applying a simple xsl to an xml document, but couln't make it work through cocoon.The same
example works fine when xml file is opened in  IE 5.0
Here are the two files:
 
allelement.xml
 
<?xml version="1.0"?>
<?xml-stylesheet version="1.0" href="allelements.xsl" type="text/xsl"?>
<?cocoon-process type="xslt" ?>
<PERIODIC_TABLE>
      <ATOM>
        <NAME>Actinium</NAME>
        <ATOMIC_WEIGHT>227</ATOMIC_WEIGHT>
    </ATOM>
    <ATOM>
        <NAME>Aluminum</NAME>
        <ATOMIC_WEIGHT>26.98154</ATOMIC_WEIGHT>
    </ATOM>
</PERIODIC_TABLE>

allelements.xsl

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<head>
<title>
 First XML application
</title>
</head>
<body>
 <xsl:for-each select="PERIODIC_TABLE">
   <xsl:for-each select="ATOM">
 <p>
  <xsl:for-each select="NAME">
    <xsl:value-of select="." />
  </xsl:for-each>
  :
  <xsl:for-each select="ATOMIC_WEIGHT">
    <xsl:value-of select="." />
  </xsl:for-each>
  </p>
 </xsl:for-each> 
 </xsl:for-each> 
 </body>
</html>
</xsl:template>
</xsl:stylesheet>

Any help is appreciated.

Thanks for your time,

Manpreet Singh

Mime
View raw message