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

Implementing an Blogger-style template using XSLT

  • To: xml-dev@l...
  • Subject: Implementing an Blogger-style template using XSLT
  • From: publicreg@n...
  • Date: Mon, 20 Feb 2006 23:46:43 -0700 (MST)
  • Importance: Normal
  • User-agent: SquirrelMail/1.4.4

blogger style
Hi,

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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Document Title</title>
</head>
<body>
<div id="menucontainer">
</div>
<div id="container">
        <div id="sidebar">
                <h2 id="welcomenote">Welcome to My Site</h2>
                <MBTemplate:submenus>
                        <MBTemplate:submenu>
                                <MBTemplate:submenuheader />
                                <ul class="submenu">
                                        <li><MBTemplate:submenulink /></li>
                                </ul>
                        </MBTemplate:submenu>
                </MBTemplate:submenus>
        </div>
        <div id="main">
                <MBTemplate:sitetitle />
                <MBTemplate:entries>
                        <MBTemplate:entry>
                                <div class="avatar">
                                        <p><MBTemplate:userlink><MBTemplate:avatar
/><br
/><MBTemplate:username /><br /><MBTemplate:msisdn
/></MBTemplate:userlink></p>
                                </div>
                                <div class="entry">
                                        <div class="entry2">
                                                <div
class="entry-header"><MBTemplate:entry-title
/></div>
                                                <div class="entry-contents">
                                                        <MBTemplate:entry-contents
/>
                                                </div>
                                                <div
class="entry-footer"><p><MBTemplate:entry-meta><MBTemplate:entry-date
/></MBTemplate:entry-meta></p></div>
                                        </div>
                                </div>
                        </MBTemplate:entry>
                </MBTemplate:entries>
        </div>
</div>
</body>
</html>


-------------------------

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:Submenu>
                <MBData:Item href="http://www.google.com">Link
name</MBData:Item>
        </MBData:Submenu>
        <MBData:Entries>
                <MBData:Entry>
                        <MBData:Title>My Title</MBData:Title>
                        <MBData:Content>My article</MBData:Content>
                        <MBData:PostedData>11th Jan 2005</MBData:PostedData>
                </MBData:Entry>
        </MBData:Entries>
</MBData:Output>

--------------------------

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.

Thanks!
Wong




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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.