sample.xsl (2131B) - raw
1 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
2 xmlns="http://www.w3.org/1999/xhtml"
3 xmlns:html="http://www.w3.org/1999/xhtml"
4 xmlns:constance="http://code.djc.id.au/constance/xmlns/"
5 version="1.0"
6 extension-element-prefixes="constance">
7 <xsl:output method="xml" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" />
8
9 <!-- identity -->
10 <xsl:template match="@*|node()">
11 <xsl:copy>
12 <xsl:apply-templates select="@*|node()" />
13 </xsl:copy>
14 </xsl:template>
15
16 <xsl:template match="html:head">
17 <head profile="http://gmpg.org/xfn/11">
18 <xsl:for-each select="@*">
19 <xsl:attribute name="{name(.)}">
20 <xsl:value-of select="." />
21 </xsl:attribute>
22 </xsl:for-each>
23 <xsl:choose>
24 <xsl:when test="html:title">
25 <title><xsl:value-of select="html:title" /> - SITE</title>
26 </xsl:when>
27 <xsl:otherwise>
28 <title>SITE</title>
29 </xsl:otherwise>
30 </xsl:choose>
31 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
32 <meta name="generator" content="constance" />
33 <meta name="DC.creator" content="Joe Bloggs" />
34 <link rel="stylesheet" type="text/css" href="/style/common.css" />
35 <xsl:apply-templates select="*[name() != 'title']" />
36 </head>
37 </xsl:template>
38
39 <xsl:template match="html:body">
40 <body>
41 <xsl:for-each select="@*">
42 <xsl:attribute name="{name(.)}">
43 <xsl:value-of select="." />
44 </xsl:attribute>
45 </xsl:for-each>
46 <div id="contentwrapper">
47 <div id="sidebar">
48 </div>
49 <div id="content">
50 <xsl:apply-templates select="*" />
51 </div>
52 <div id="footer">
53 Generated by <a href="http://bitbucket.org/sjkingo/constance-sam">constance</a>.
54 </div>
55 </div>
56 </body>
57 </xsl:template>
58
59 </xsl:stylesheet>