[Zope] XML and XSl rendering problem

zope zope@stylusinc.net
Fri, 2 Aug 2002 09:04:37 +0530


Hi All,

I have been selecting the plain text format but OUTLOOK EXPRESS sends the
mail as HTML.Please bear with me.
I have created an XML File and I am trying to include my header and footer
files which are "hd" and "ft".
I am not being able to get the tags as I have written it in the file.
My
XML  Page:(Page ID=index_xml)
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/test/index.xsl"?>
<omspage xmlns:tal="http://xml.zope.org/namespaces/tal">
  <div tal:replace="here/hd">Title</div>
 <div tal:replace="here/ft">Title</div>
</omspage>

This is my file Header:(here/hd)
<head>
  <title>The title</title>
</head>

The problem is that once I execute the file index_xml the file gets rendered
by the XSL file("index.xsl") and I get an output like this:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/test/index.xsl"?>
<omspage>
  &lt;head&gt;       -----------THE header file has been rendered
  &lt;title&gt;The title&lt;/title&gt;
&lt;/head&gt;
 &lt;foot&gt;     ---------------The footer file is also being rendered
    &lt;row&gt;Footer 1&lt;/row&gt;
&lt;/foot&gt;
</omspage>

  XSL Page:(Page ID=index.xsl)
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
  <html>
  <head>
    <title><xsl:value-of select="omspage/head/title"/></title>
  </head>
  <body>
    <h2>My OMS Page</h2>
    <table border="1">
    <xsl:for-each select="omspage/main">
      <tr><td><xsl:value-of select="row"/></td></tr>
    </xsl:for-each>
    <xsl:for-each select="omspage/foot">
      <tr><td><xsl:value-of select="row"/></td></tr>
    </xsl:for-each>
    </table>
  </body>
  </html>
</xsl:template>
</xsl:stylesheet>

Could someone working in the same area please help me out and tell me why
the HEADER and FOOTER which i am including  are getting rendered.

Best Regards
John Kunchandy