I am trying out the
examples/xsl/data.xml demo. However, the browser think the returned stream is
xml instead of html. How can I set the return stream type to html for xml
file? So the browser will display the result in html instead of
xml.
Basically, I want to
do the following:
Thanks
TK
----- car.xml
-----
<?xml
version="1.0?>
<?xml-stylesheet
href="car.xsl" type="text/xsl"?>
<% // Query
database to get car information
String sCarName="Toyota";
%>
<car>
<name><%=sCarName%></name>
</car>
---- car.xsl
--------
<?xml
version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template
match="car">
<html>
<head>
<title>Car
</title>
</head>
<html>
<head>
<title>Car
</title>
</head>
<body>
<h1><xsl:value-of select="name"/></h1>
</body>
</html>
</xsl:template>
<h1><xsl:value-of select="name"/></h1>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
