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/03 04:54:34 UTC

svn commit: r159868 - forrest/trunk/main/webapp/resources/stylesheets/project2text.xsl

Author: rick
Date: Sat Apr  2 18:54:34 2005
New Revision: 159868

URL: http://svn.apache.org/viewcvs?view=rev&rev=159868
Log:
Made this XSL more generic.  No hard-coded names from the skinconf
are required.  An XML doc can reference <for:whatever> and that element
will be replaced with the <whatever> element from the skinconf.

Of course, this requires that said XML document be transformed in
some sitemap with this project2text.xsl.  The XML document would also
require a

  xmlns:for="http://apache.org/forrest"

declaration.

Currently, only SVGs being transformed to PNG are first run through
this XSL.


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=159867&r2=159868
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/project2text.xsl (original)
+++ forrest/trunk/main/webapp/resources/stylesheets/project2text.xsl Sat Apr  2 18:54:34 2005
@@ -23,15 +23,13 @@
 
 <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:import href="copyover.xsl"/>
 
-<xsl:variable name="config" select="//skinconfig"/>
+  <xsl:variable name="config" select="//skinconfig"/>
 
-<xsl:template match="for:project-name">
-    <xsl:value-of select="$config/project-name"/>
+  <xsl:template match="for:*">
+    <xsl:variable name="tmp" select="local-name()"/>
+    <xsl:value-of select="$config/*[local-name() = $tmp]"/>
   </xsl:template>
 
-<xsl:template match="for:group-name">
-    <xsl:value-of select="$config/group-name"/>
-  </xsl:template>
 </xsl:stylesheet>