More mixed XML & HTML

Subject: More mixed XML & HTML
From: "Stephen Tredrea" <stephen.tredrea@xxxxxxxxxxxxx>
Date: Tue, 15 Jun 2004 16:42:38 +0200
While XSL provided in the context of a prior question works, I do not
understand why it works and am having trouble modifying it to a slightly
different situation. What I'm trying to do is create 'placeholders' in the
XSL that will write all the appropriate HTML within the related node. What
is does currently is write the HTML AND the XML tag so I see the HTML in the
browset window.

XML:

<?xml version="1.0" encoding="utf-8"?>
<root>
	<head_sec>
		<h1>Hello universe</h1>
	</head_sec>
	<body_sec>
		<p>Welcome to my world</p>
	</body_sec>
</root>

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 /></head>
	<body>
	<table>
	<tr>
		<td><xsl:apply-templates select="//head_sec" /></td>
	</tr>
	<tr>
		<td><xsl:apply-templates select="//body_sec" /></td>
	</tr>
	<table>
	</body>
	</html>

</xsl:template>

<xsl:template match="*">
  <xsl:copy>
		<xsl:copy-of select="@*"/>
		<xsl:apply-templates />
  </xsl:copy>
</xsl:template>

</xsl:stylesheet>


Current Thread