You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by di...@apache.org on 2005/10/10 07:27:32 UTC
svn commit: r312565 -
/forrest/trunk/main/webapp/resources/stylesheets/project2text.xsl
Author: diwaker
Date: Sun Oct 9 22:27:29 2005
New Revision: 312565
URL: http://svn.apache.org/viewcvs?rev=312565&view=rev
Log:
Hack to make sure trunk works while I iron things out
Added:
forrest/trunk/main/webapp/resources/stylesheets/project2text.xsl (with props)
Added: forrest/trunk/main/webapp/resources/stylesheets/project2text.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/stylesheets/project2text.xsl?rev=312565&view=auto
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/project2text.xsl (added)
+++ forrest/trunk/main/webapp/resources/stylesheets/project2text.xsl Sun Oct 9 22:27:29 2005
@@ -0,0 +1,56 @@
+<?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.
+-->
+
+<!--+
+ | Replace element for the value on the project descriptor
+ | xmlns:for has to be replaced for the final version
+ +-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:for="http://apache.org/forrest" version="1.0">
+
+ <xsl:import href="copyover.xsl"/>
+
+ <xsl:template match="for:*">
+ <xsl:param name="config" select="//skinconfig"/>
+ <xsl:choose>
+
+ <!-- If we have nested for:* elements in the XML we're
+ transforming, recursively call ourselves
+ with a narrowed scope for the skinconfig. -->
+
+ <xsl:when test="*">
+ <xsl:variable name="ln" select="local-name()"/>
+ <xsl:apply-templates>
+ <xsl:with-param name="config" select="$config/*[local-name() = $ln]"/>
+ </xsl:apply-templates>
+ </xsl:when>
+
+ <!-- Ah ha! No more for:* children in the XML document being
+ transformed so we just select the value of this node from skinconfig
+ (ie. $config). Note that the node we select from skinconfig may
+ have nested elements and we'll get the values of all of them. -->
+
+ <xsl:otherwise>
+ <xsl:variable name="ln" select="local-name()"/>
+ <xsl:value-of select="$config/*[local-name() = $ln]"/>
+ </xsl:otherwise>
+
+ </xsl:choose>
+ </xsl:template>
+
+</xsl:stylesheet>
Propchange: forrest/trunk/main/webapp/resources/stylesheets/project2text.xsl
------------------------------------------------------------------------------
svn:eol-style = native