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> <head> -----------THE header file has been rendered <title>The title</title> </head> <foot> ---------------The footer file is also being rendered <row>Footer 1</row> </foot> </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
zope writes:
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> You must use "structure" when your interpolated text contains XML elements, e.g. '<div tal:replace="structure here/hd" />'
Dieter
participants (2)
-
Dieter Maurer -
zope