[Yanel-commits] rev 37937 - in
public/yanel/trunk/src/realms/from-scratch-realm-template/data-repo/data:
. app app/xslt
michi at wyona.com
michi at wyona.com
Wed Aug 13 14:16:49 CEST 2008
Author: michi
Date: 2008-08-13 14:16:48 +0200 (Wed, 13 Aug 2008)
New Revision: 37937
Added:
public/yanel/trunk/src/realms/from-scratch-realm-template/data-repo/data/app/
public/yanel/trunk/src/realms/from-scratch-realm-template/data-repo/data/app/xslt/
public/yanel/trunk/src/realms/from-scratch-realm-template/data-repo/data/app/xslt/global.xsl
Log:
global XSLT started
Added: public/yanel/trunk/src/realms/from-scratch-realm-template/data-repo/data/app/xslt/global.xsl
===================================================================
--- public/yanel/trunk/src/realms/from-scratch-realm-template/data-repo/data/app/xslt/global.xsl (rev 0)
+++ public/yanel/trunk/src/realms/from-scratch-realm-template/data-repo/data/app/xslt/global.xsl 2008-08-13 12:16:48 UTC (rev 37937)
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:xhtml="http://www.w3.org/1999/xhtml"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:dc="http://purl.org/dc/elements/1.1/" exclude-result-prefixes="xhtml dc">
+
+ <xsl:param name="yanel.path.name" select="'NAME_IS_NULL'"/>
+ <xsl:param name="yanel.path" select="'PATH_IS_NULL'"/>
+ <xsl:param name="yanel.back2context" select="'BACK2CONTEXT_IS_NULL'"/>
+ <xsl:param name="yarep.back2realm" select="'BACK2REALM_IS_NULL'"/>
+ <xsl:variable name="name-without-suffix" select="substring-before($yanel.path.name, '.')"/>
+ <xsl:param name="language" select="'LANGUAGE_IS_NULL'"/>
+ <xsl:param name="content-language" select="'CONTENT_LANGUAGE_IS_NULL'"/>
+ <xsl:param name="languages" select="'LANGUAGES_IS_NULL'"/>
+
+ <xsl:template match="/">
+ <html>
+ <head>
+ <META http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <link type="text/css" href="{$yarep.back2realm}app/css/page.css" media="screen" rel="stylesheet"/>
+ <link type="text/css" href="{$yarep.back2realm}app/css/print.css" media="print" rel="stylesheet"/>
+
+ <xsl:copy-of select="/xhtml:html/xhtml:head/*[name(.) != 'title']"/>
+ <xsl:choose>
+ <xsl:when test="/xhtml:html/xhtml:head/xhtml:link/@rel='neutron-introspection'">
+ <!-- NOTE: Use the one from the copy above in case one exists! -->
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- TODO: Maybe one should better not cut-off the suffix! -->
+ <link rel="neutron-introspection" type="application/neutron+xml" href="introspection-{$name-without-suffix}.xml"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <title>
+ <xsl:value-of select="/xhtml:html/xhtml:head/xhtml:title"/>
+ </title>
+ </head>
+ <body>
+ <div id="page">
+ <div id="header">
+<!--
+ <xi:include href="yanelresource:/navigation/breadcrumb-{$content-language}.xml?path={$yanel.path}"/>
+-->
+
+ <!--
+ <div id="breadcrumb">
+ <a href="{$yarep.back2realm}index.html">Home</a>
+ </div>
+ -->
+
+ <div id="language">
+ <xsl:choose>
+ <!-- Use content language instead localization -->
+ <xsl:when test="$content-language = 'de'">
+ <a href="{$yarep.back2realm}de/kontakt.html">Kontakt</a>
+ </xsl:when>
+ <xsl:otherwise>
+ <a href="{$yarep.back2realm}en/contact.html">Contact</a>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <!-- Use content language instead localization -->
+<!--
+ <xi:include href="yanelresource:/navigation/translations.xml?path={$yanel.path}&language={$content-language}"/>
+-->
+
+<!--
+ <a href="?yanel.toolbar=on">Toolbar</a>
+-->
+ <!--<xsl:value-of select="$language"/>-->
+ </div>
+ </div>
+ <xsl:call-template name="navi"/>
+ <div id="home">
+ <div id="body" style="width: 440px;">
+ <xsl:apply-templates select="/xhtml:html/xhtml:body/*"/>
+ </div>
+ </div>
+ </div>
+ </body>
+ </html>
+ </xsl:template>
+
+ <xsl:template name="navi">
+ <div id="left">
+ <!-- Use content language instead localization (see email from Wayne) -->
+<!--
+ <xi:include href="yanelresource:/navigation/menu-{$content-language}.xml?path={$yanel.path}"/>
+-->
+ </div>
+ </xsl:template>
+
+
+ <xsl:template match="@*|node()" priority="-1">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ </xsl:template>
+
+
+</xsl:stylesheet>
More information about the Yanel-commits
mailing list