[z3-checkins] r54965 - z3/deliverance/sandboxes/paul/dvng/step03
paul at codespeak.net
paul at codespeak.net
Mon May 19 23:47:46 CEST 2008
Author: paul
Date: Mon May 19 23:47:45 2008
New Revision: 54965
Added:
z3/deliverance/sandboxes/paul/dvng/step03/content2.xml (contents, props changed)
z3/deliverance/sandboxes/paul/dvng/step03/dvfinalstage.xsl (contents, props changed)
Log:
More properties
Added: z3/deliverance/sandboxes/paul/dvng/step03/content2.xml
==============================================================================
--- (empty file)
+++ z3/deliverance/sandboxes/paul/dvng/step03/content2.xml Mon May 19 23:47:45 2008
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="dvfinalstage.xsl"?>
+<html>
+ <head>
+ <title>A Deeper Look At DVNG</title>
+ <meta name="dv.section" content="DVNG Articles"/>
+ </head>
+ <body>
+ <p>I have some content <em>in here</em> to merge.</p>
+ <p>Perhaps an image will be in here later.</p>
+ </body>
+</html>
Added: z3/deliverance/sandboxes/paul/dvng/step03/dvfinalstage.xsl
==============================================================================
--- (empty file)
+++ z3/deliverance/sandboxes/paul/dvng/step03/dvfinalstage.xsl Mon May 19 23:47:45 2008
@@ -0,0 +1,43 @@
+<xsl:stylesheet xmlns:exsl="http://exslt.org/common" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dv="http://openplans.org/deliverance" version="1.0">
+ <xsl:param name="req.domain_url">look-at-me.com</xsl:param>
+ <xsl:variable name="compiledtheme">
+ <xsl:choose>
+ <xsl:when test="/html/head/meta[@name='dv.section'] or $req.domain_url='look-at-me.com'">
+ <html>
+ <head>
+ <title>Second Theme Page Title</title>
+ </head>
+ <body>
+ <table border="0"><tr><td>
+ <h2>Navigation</h2>
+ </td>
+ <td>
+ <h1><xsl:value-of select="/html/head/title"/></h1>
+ <div id="pagecontent">Theme content to replace.</div>
+ </td>
+ </tr></table></body>
+ </html>
+ </xsl:when>
+ <xsl:otherwise>
+ <html>
+ <head>
+ <title>Theme Page Title</title>
+ </head>
+ <body>
+ <h1><xsl:value-of select="/div[@id='page-content']/h1"/></h1>
+ <p>Some theme text here.</p>
+ </body>
+ </html>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="ct" select="exsl:node-set($compiledtheme)"/>
+ <xsl:template match="/">
+ <xsl:apply-templates select="$ct/*"/>
+ </xsl:template>
+ <xsl:template match="node()|@*">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:template>
+</xsl:stylesheet>
More information about the z3-checkins
mailing list