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

Newbie - XML and XSLT samples to produce XHTML Files

Subject: Newbie - XML and XSLT samples to produce XHTML Files please
From: Julian Voelcker <asp@xxxxxxx>
Date: Tue, 25 Jan 2005 17:55:44 GMT
xslt samples
Hi,

I am just dipping my toe into the XML/XSLT water and since I find it 
easier to learn from examples was wondering if any of you kind souls 
could send me some sample files so I can get an idea of what can be 
done.

I already have links to a number of sites and a couple of books on the 
subject but would ideally like to get my hands on a real world example 
to pick apart.

I am messing around with some code in ASP.Net to handle the 
transformation and am slowly building up my first XSLT template based 
on a site I am working on.

Ultimately I want to convert my ASP.Net based CMS app to use XML/XSLT 
for templating.

Here is a snippet of some code that I am working on.

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="1.0" doctype-public="-//W3C//DTD 
XHTML 1.0 Transitional//EN" doctype-
system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" 
indent="yes"/>
<xsl:template match="/">
<html lang="eng" xml:lang="eng" xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>New Company Website Design</title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="/STYLES/basic.css">
 </head>
 <body>
 <div id="mainmenu">
 <ul>
 <li id="menu1"><a href="#">About Company</a></li>
 <li id="menu2"><a href="#">Housing opportunities</a></li>
 <li id="menu3"><a href="#">Regeneration</a></li>
 </ul>
 </div>
 </body>
</html>
</xsl:template>
</xsl:stylesheet>

[One of the key things is that I want to be able to XHTML so just for 
tidyness, I would like to find some way of preventing it automatically 
adding the <META http-equiv="Content-Type" content="text/html; 
charset=utf-8"> tag above the title in the page header]

I now want to try to build it up so that the menus (bulleted lists) and 
main page content are extracted from an XML file.

Do any of you have a set of XML/XSLT files that you could email me to 
show examples of a reasonably complex site designs that I could look 
at?

Don't worry, if you do help out, I won't bug you by asking why you did 
x, y, or z - I should be able to work it out.

Thanks in advance.
-- 
Cheers,

Julian Voelcker
United Kingdom

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.