I am trying to do some XML development using Netscape 6.01 A for
Solaris 7 as the browser. Basically, its not working. The XML page
is simple, so I am not using a DTD, just a style sheet to display the page.
I have tried several different xml pages and get the same result.
Below is an example I used that is straight from the devshed
example list:
<h2>Web site URL:</h2> <xsl:value-of select="me/url" />
</body>
</html>
</xsl:template>
</xsl:stylesheet>
When I load the example.xml page in netscape, I get the following
output:
John Doe 94, Main Street, Nowheresville 16463, XY 738 2838 johndoe@black.hole.com http://www.unknown_and_unsung.com/
All on one line. Basically what it did is extract all of the data and print it.
It doesnt matter if I put the reference to the stylesheet or not, I get the same
output.
From reading the Netscape 6 description, its supposed to be able to
handle XML. Is there some sort of special configuration option, or is
Netscape 6 just as bad the older versions??
Brady
After playing around a bit, using an example from mozzilla.org that worked correctly, I found that when adding HTML you need the following tag:
<xsl:output method="html" />
A working stylesheet (Netscape 6.2 & Internet Explorer 6) follows:
The corresponding xml is: <?xml version="1.0"?>
<?xml-stylesheet href="select.xsl" type="text/xsl"?>
<doc>
<foo att1="c">
<bar att1="b">
<foo att1="a">
<baz att1="right"/>
</foo>
</bar>
<foo att1="a">
<baz att1="wrong"/>
</foo>
</foo>
</doc>
by the way the Smilie is not supposed to be there it is supposed to be : (colon) immediatly followed by "o" but I didn't turn smilies off ;)
Well I there is another problem ... the transformation works fine if it the files are loaded from the filesystem. When I load them from the Apache webserver only the xml text displays (as described above).