I'm using xslt to apply some templates on a xml file and output a html page. So I defined the method of 'xsl:output' as 'html'. However, I need to display some xml nodes from the xml file in their original format and unfortunately they didn't appear on the html page as I expected.
This is the sample xml file:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<employees>
<employee>
<name>Hello World</name>
<title>UI Designer</title>
</employee>
</employees>
My xslt is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<head>
<title>Example of Employee Data</title>
</head>
<body>
<h2>The following shows the structure of employee data file: </h2>
<div style="background-color: grey">
<xsl:copy-of select="employees/employee"/>
</div>
......
</body>
</html>
</xsl:template>
</xsl:stylesheet>
When I viewed the page source, the node 'employee' and its children were there, they were just not displayed in the html page. I think it's because I specified the output method as 'html'. But I have to generate a html page and embed some xml-format nodes into my page...
I've been trying but failing...Could anyone give me some help? Thanks!!
I expect the output page to be:


<employee>,<name>and<title>tags? You must convert them to HTML.