You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by ri...@apache.org on 2005/04/09 21:46:08 UTC
svn commit: r160715 -
forrest/trunk/main/webapp/resources/stylesheets/project2text.xsl
Author: rick
Date: Sat Apr 9 12:46:07 2005
New Revision: 160715
URL: http://svn.apache.org/viewcvs?view=rev&rev=160715
Log:
Allow for the extraction of child elements as well. ie.
<for:group-svg>
<for:font/>
</for:group-svg>
would be replaced by the value of the for:font element defined in the
skinconfig.xml.
Modified:
forrest/trunk/main/webapp/resources/stylesheets/project2text.xsl
Modified: forrest/trunk/main/webapp/resources/stylesheets/project2text.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/stylesheets/project2text.xsl?view=diff&r1=160714&r2=160715
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/project2text.xsl (original)
+++ forrest/trunk/main/webapp/resources/stylesheets/project2text.xsl Sat Apr 9 12:46:07 2005
@@ -28,8 +28,22 @@
<xsl:variable name="config" select="//skinconfig"/>
<xsl:template match="for:*">
- <xsl:variable name="tmp" select="local-name()"/>
- <xsl:value-of select="$config/*[local-name() = $tmp]"/>
+ <xsl:param name="ancestorpath" select="''"/>
+ <xsl:choose>
+ <xsl:when test="*">
+ <xsl:apply-templates>
+ <xsl:with-param name="ancestorpath"
+ select="concat($ancestorpath,'/',local-name())"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="tmp"
+ select="concat($ancestorpath, '/', local-name())"/>
+ <xsl:value-of
+ select="$config//*[concat($ancestorpath, '/', local-name()) = $tmp]"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
</xsl:template>
</xsl:stylesheet>