[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

More mixed XML & HTML

Subject: More mixed XML & HTML
From: "Stephen Tredrea" <stephen.tredrea@xxxxxxxxxxxxx>
Date: Tue, 15 Jun 2004 16:42:38 +0200
mix xml and html
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.