[xsl] Implementing an Blogger-style template using XSLT

Subject: [xsl] Implementing an Blogger-style template using XSLT
From: publicreg@xxxxxxxxxxxxxxxx
Date: Mon, 20 Feb 2006 20:05:26 -0700 (MST)

I'm trying to implement a Blogger-style templating system and would like
to get some feedback on whether it's feasible or not. While it's true that
an XSLT file itself would be a template, some of my users are not keen on
learning it and I'm trying to strike some middle ground here.

The premise is this:

The template file would be an extension of XHTML and looks like this:


<?xml version="1.0" encoding="utf-8" ?>
<html xmlns:MBTemplate="http://www.mydomain.com/Template";>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Document Title</title>
<div id="menucontainer">
<div id="container">
	<div id="sidebar">
		<h2 id="welcomenote">Welcome to My Site</h2>
				<MBTemplate:submenuheader />
				<ul class="submenu">
					<li><MBTemplate:submenulink /></li>
	<div id="main">
		<MBTemplate:sitetitle />
				<div class="avatar">
					<p><MBTemplate:userlink><MBTemplate:avatar /><br
/><MBTemplate:username /><br /><MBTemplate:msisdn
				<div class="entry">
					<div class="entry2">
						<div class="entry-header"><MBTemplate:entry-title /></div>
						<div class="entry-contents">
							<MBTemplate:entry-contents />


Then, the data input would come in the form of an XML document that looks
like this:


<?xml version="1.0" encoding="utf-8" ?>
<MBData:Output xmlns:MBData="http://www.mydomain.com/MyData";>
		<MBData:Item href="http://www.google.com";>Link name</MBData:Item>
			<MBData:Title>My Title</MBData:Title>
			<MBData:Content>My article</MBData:Content>
			<MBData:PostedData>11th Jan 2005</MBData:PostedData>


Finally, I'd have an XSLT file that uses the 2 files and then translates
into XHTML code that I can output to the browser.

How, folks? Do you think it's feasible to do this? Would appreciate any
pointers in the right direction.


Current Thread