forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r356240 - in /forrest/trunk/main/webapp: locationmap-transforms.xml resources/stylesheets/pathutils.xsl resources/stylesheets/variable.helper.xsl
Date Mon, 12 Dec 2005 10:18:16 GMT
Author: thorsten
Date: Mon Dec 12 02:18:08 2005
New Revision: 356240

URL: http://svn.apache.org/viewcvs?rev=356240&view=rev
Log:
Added variable.helper.xsl to the core, should be enhanced by matching the default.forrest.properties.xml.
This xsl will produce all variables we used in skins to the new property system. Added pathutils.xsl
to the core from the skins (moving away from skins).

Added:
    forrest/trunk/main/webapp/resources/stylesheets/pathutils.xsl
      - copied unchanged from r355689, forrest/trunk/main/webapp/skins/common/xslt/html/pathutils.xsl
    forrest/trunk/main/webapp/resources/stylesheets/variable.helper.xsl   (with props)
Modified:
    forrest/trunk/main/webapp/locationmap-transforms.xml

Modified: forrest/trunk/main/webapp/locationmap-transforms.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/locationmap-transforms.xml?rev=356240&r1=356239&r2=356240&view=diff
==============================================================================
--- forrest/trunk/main/webapp/locationmap-transforms.xml (original)
+++ forrest/trunk/main/webapp/locationmap-transforms.xml Mon Dec 12 02:18:08 2005
@@ -73,6 +73,14 @@
       <location src="{forrest:stylesheets}/dotdots.xsl" />
     </match>
     
+    <match pattern="transform.xml.pathutils">
+      <location src="{forrest:stylesheets}/pathutils.xsl" />
+    </match>
+    
+    <match pattern="transform.xml.variable.helper">
+      <location src="{forrest:stylesheets}/variable.helper.xsl" />
+    </match>
+    
     <match pattern="transform.xml.extracted-svg">
       <location src="{forrest:stylesheets}/extract-svg.xsl" />
     </match>

Added: forrest/trunk/main/webapp/resources/stylesheets/variable.helper.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/stylesheets/variable.helper.xsl?rev=356240&view=auto
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/variable.helper.xsl (added)
+++ forrest/trunk/main/webapp/resources/stylesheets/variable.helper.xsl Mon Dec 12 02:18:08
2005
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<xsl:stylesheet version="1.0" 
+  xmlns:forrest="http://apache.org/forrest/templates/1.0" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:import href="lm://transform.xml.dotdots"/>
+  <xsl:import href="lm://transform.xml.pathutils"/>
+  <xsl:param name="path" select="'test.html'"/>
+  <!-- Path (..'s) to the root directory -->
+  <xsl:variable name="root">
+    <xsl:call-template name="dotdots">
+      <xsl:with-param name="path" select="$path"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:variable name="filename-noext">
+    <xsl:call-template name="filename-noext">
+      <xsl:with-param name="path" select="$path"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <!-- Source filename (eg 'foo.xml') of current page -->
+  <xsl:variable name="filename">
+    <xsl:call-template name="filename">
+      <xsl:with-param name="path" select="$path"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:variable name="skin-img-dir" 
+    select="concat(string($root), 'themes/images')"/>
+  <xsl:variable name="spacer" 
+    select="concat($root, 'themer/images/spacer.gif')"/>
+    <xsl:template match="/">
+      <properties>
+        <property name="skin-img-dir" value="{$skin-img-dir}"/>
+        <property name="filename" value="{$filename}"/>
+        <property name="filename-noext" value="{$filename-noext}"/>
+        <property name="root" value="{$root}"/>
+        <property name="path" value="{$path}"/>
+      </properties>
+    </xsl:template>
+</xsl:stylesheet>

Propchange: forrest/trunk/main/webapp/resources/stylesheets/variable.helper.xsl
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message