This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Mozilla XML > May 2007 > XSL error





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author XSL error
Stavros Kounis

2007-05-10, 6:39 pm

i try to view a XML page using a simpe XSL in Netscape 6.01
when i add <head> section in XSL
netscape doesnot display nothing


Any idea?

thanks kounis stavros
gounis@clubmobil.com


the XSL code i use:

<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/cssl" href="main.css"?>
- <!-- edited with XML Spy v3.5 NT (http://www.xmlspy.com) by ()
-->
- <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="4.0" encoding="ISO-8859-7"
indent="no" />
- <xsl:template match="/">
- <head>
- <title>
<xsl:value-of select="thePage/@title" />
</title>
<link REL="STYLESHEET" TYPE="text/css" href="main.css" />
</head>
<script language="javascript">function changeUp(o) {
o.className=o.hclass; } function changeOut(o) { o.className=o.oclass;
}</script>
- <body>
- <div id="titleBar">
- <div align="right">
- <table class="tblTopNav">
- <tr>
<td>: :</td>
- <xsl:for-each select="thePage/titleBar/topNav/button">
- <td onmouseover="changeUp(this)" onmouseout="changeOut(this)">
- <xsl:attribute name="class">
<xsl:value-of select="./@class" />
</xsl:attribute>
- <xsl:attribute name="oclass">
<xsl:value-of select="./@class" />
</xsl:attribute>
- <xsl:attribute name="hclass">
<xsl:value-of select="./@hclass" />
</xsl:attribute>
<xsl:value-of select="@caption" />
</td>
<td>: :</td>
</xsl:for-each>
</tr>
</table>
</div>
<div class="seperator" />
- <table class="tblBottomNav">
- <tr>
<td>: :</td>
- <xsl:for-each select="thePage/titleBar/bottomNav/button">
- <td onmouseover="changeUp(this)" onmouseout="changeOut(this)">
- <xsl:attribute name="class">
<xsl:value-of select="./@class" />
</xsl:attribute>
- <xsl:attribute name="oclass">
<xsl:value-of select="./@class" />
</xsl:attribute>
- <xsl:attribute name="hclass">
<xsl:value-of select="./@hclass" />
</xsl:attribute>
<xsl:value-of select="@caption" />
</td>
<td>: :</td>
</xsl:for-each>
</tr>
</table>
</div>
<xsl:value-of select="thePage/titleBar" />
<br />
<br />
- <div id="bottomBar">
<xsl:value-of select="thePage/bottomBar" />
</div>
</body>
</xsl:template>
</xsl:stylesheet>
Axel Hecht

2007-05-10, 6:39 pm

Don't use xmlspy. Sorry to say that, but that software has some very
strong assumption on what happens to it output.

For one, if you output html, output valid html.
<head>
</head>
<script>
</script>
<body>
</body>

is quite something, but for sure not valid html.

Axel
Sponsored Links


Copyright 2003 - 2009 forum4designers.com  Software forum  Computer Hardware reviews