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

Separating layout and content

Subject: Separating layout and content
From: "Lensch, Thomas" <Lensch@xxxxxxxx>
Date: Fri, 24 Feb 2006 07:45:19 +0100
separating text from layout
Hi,

i have several types of documents that i want to display in HTML having
the same overall layout. Doctype specific differences are kept in a
doctype specific stylesheet.

At the moment the following solution works:

1. The doctype specific stylesheet doctypeA.xsl calls
	<xsl:call-template name="doLayout"/>

2. doLayout is imported from layout.xsl and looks as follows:

<xsl:template name="doLayout">
	<!-- e.g. a rather simple snipet of site layout -->
	<table width="100%" cellpadding="3" class="TableRahmenkpl">
		<tr valign="top">
			<td class="TD">
				<xsl:call-template name="navigation" />
				<xsl:call-template name="head" />
				<xsl:call-template name="title" />
				<xsl:call-template name="text" />
			</td>
		</tr>
	</table>
</xsl:template>

3. Each of the doctype specifiy stylesheets holds the above templates
implementing each part of the doctype specific output:
<xsl:template name="navigation">
	<!-- output the doctype specific navigation -->
	...
</xsl:template>
<xsl:template name="head">
	<!-- output the doctype specific head -->
	...
</xsl:template>
<xsl:template name="title">
	<!-- output the doctype specific title -->
	...
</xsl:template>
<xsl:template name="text">
	<!-- output the doctype specific text -->
	...
</xsl:template>

I wonder whether there is a better way to do this. Any Ideas?

Best regards,
Thomas.

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.