You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by tv...@apache.org on 2009/11/30 16:36:19 UTC
svn commit: r885459 - in /incubator/pivot/site/trunk: www/index.xml
xsl/auxilliary.xsl xsl/project.xml xsl/project.xsl
Author: tvolkert
Date: Mon Nov 30 15:36:19 2009
New Revision: 885459
URL: http://svn.apache.org/viewvc?rev=885459&view=rev
Log:
Site updates
Modified:
incubator/pivot/site/trunk/www/index.xml
incubator/pivot/site/trunk/xsl/auxilliary.xsl
incubator/pivot/site/trunk/xsl/project.xml
incubator/pivot/site/trunk/xsl/project.xsl
Modified: incubator/pivot/site/trunk/www/index.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/index.xml?rev=885459&r1=885458&r2=885459&view=diff
==============================================================================
--- incubator/pivot/site/trunk/www/index.xml (original)
+++ incubator/pivot/site/trunk/www/index.xml Mon Nov 30 15:36:19 2009
@@ -31,8 +31,8 @@
<ul class="stageBtn">
<item class="stageDemos" name="Demos" href="demos/"
caption="What you can do with Pivot"/>
- <item class="stageDl" name="Download" href="~download"
- caption="Get the current release (1.4)"/>
+ <item class="stageDl" name="Download" href="download.cgi#{$release}"
+ caption="Get the current release ({$release})"/>
</ul>
</div>
@@ -54,9 +54,9 @@
<h2>Pivot Resources</h2>
<ul>
<item name="Getting Started" href="getting-started.html"/>
- <item name="Platform Overview" href="~release/tutorials/platform_overview.html"/>
- <item name="WTKX Primer" href="~release/tutorials/wtkx_primer.html"/>
- <item name="Component & Container" href="~release/tutorials/component_and_container.html"/>
+ <item name="Platform Overview" href="tutorials/platform_overview.html"/>
+ <item name="WTKX Primer" href="tutorials/wtkx_primer.html"/>
+ <item name="Component & Container" href="tutorials/component_and_container.html"/>
<item name="Sample Application Walkthrough" href="http://www.ibm.com/developerworks/xml/tutorials/x-pivottut/index.html"/>
<item name="Drag and Drop" href="#"/>
<item name="Web Queries" href="#"/>
@@ -68,7 +68,7 @@
<div class="homeCol3">
<h2>Latest Updates</h2>
<ul class="newsItems">
- <item href="~download" name="Pivot 1.4 Released" caption="January 12th, 2010">
+ <item href="download.cgi#{$release}" name="Pivot 1.4 Released" caption="January 12th, 2010">
The latest version of Pivot is now available for download and testing.
</item>
<item href="#" name="Pivot Has Graduated!" caption="December 16th, 2009">
Modified: incubator/pivot/site/trunk/xsl/auxilliary.xsl
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/xsl/auxilliary.xsl?rev=885459&r1=885458&r2=885459&view=diff
==============================================================================
--- incubator/pivot/site/trunk/xsl/auxilliary.xsl (original)
+++ incubator/pivot/site/trunk/xsl/auxilliary.xsl Mon Nov 30 15:36:19 2009
@@ -44,8 +44,7 @@
<!-- <section> translates to an anchor, a title, and nested content -->
<xsl:template match="section">
- <xsl:variable name="name" select="@name"/>
- <a name="{$name}"><h2><xsl:value-of select="@name"/></h2></a>
+ <a name="{@name}"><h2><xsl:value-of select="@name"/></h2></a>
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>
Modified: incubator/pivot/site/trunk/xsl/project.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/xsl/project.xml?rev=885459&r1=885458&r2=885459&view=diff
==============================================================================
--- incubator/pivot/site/trunk/xsl/project.xml (original)
+++ incubator/pivot/site/trunk/xsl/project.xml Mon Nov 30 15:36:19 2009
@@ -26,7 +26,7 @@
<global-items>
<item name="Demos" href="demos/"/>
- <item name="Download" href="~download"/>
+ <item name="Download" href="download.cgi#{$release}"/>
<item name="Documentation" href="documentation.html"/>
<item name="Get Involved" href="get-involved.html"/>
<item name="About" href="about.html"/>
@@ -41,15 +41,15 @@
<item-group id="documentation" name="Documentation">
<item name="Getting Started" href="getting-started.html"/>
<item name="Tutorial" href="tutorials/"/>
- <item name="FAQ" href="~wiki/frequently-asked-questions-faq.html"/>
- <item name="Javadoc (1.4)" href="~release/docs/api/"/>
+ <item name="FAQ" href="{$wiki}/frequently-asked-questions-faq.html"/>
+ <item name="Javadoc ({$release})" href="{$release}/docs/api/"/>
</item-group>
<item-group id="get-involved" name="Get Involved">
<item name="SVN Repositories" href="svn.html"/>
<item name="Mailing Lists" href="lists.html"/>
- <item name="Bug Database" href="~jira/"/>
- <item name="Wiki" href="~wiki/"/>
+ <item name="Bug Database" href="{$jira}/"/>
+ <item name="Wiki" href="{$wiki}/"/>
</item-group>
<item-group id="related" name="Related">
@@ -61,8 +61,8 @@
<item name="Contact" href="contact.html"/>
<item name="News" href="news.html"/>
<item name="Legal/License" href="legal.html"/>
- <item name="Sponshorship" href="~asf/foundation/sponsorship.html" footer="false"/>
- <item name="Thanks" href="~asf/foundation/thanks.html" footer="false"/>
+ <item name="Sponshorship" href="{$asf}/foundation/sponsorship.html" footer="false"/>
+ <item name="Thanks" href="{$asf}/foundation/thanks.html" footer="false"/>
</item-group>
</item-groups>
Modified: incubator/pivot/site/trunk/xsl/project.xsl
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/xsl/project.xsl?rev=885459&r1=885458&r2=885459&view=diff
==============================================================================
--- incubator/pivot/site/trunk/xsl/project.xsl (original)
+++ incubator/pivot/site/trunk/xsl/project.xsl Mon Nov 30 15:36:19 2009
@@ -28,6 +28,10 @@
<xsl:param name="demos"/>
<!-- Variables (not overrideable) -->
+ <xsl:variable name="release-token">{$release}</xsl:variable>
+ <xsl:variable name="wiki-token">{$wiki}</xsl:variable>
+ <xsl:variable name="asf-token">{$asf}</xsl:variable>
+ <xsl:variable name="jira-token">{$jira}</xsl:variable>
<xsl:variable name="wiki">http://cwiki.apache.org/PIVOT</xsl:variable>
<xsl:variable name="asf">http://www.apache.org</xsl:variable>
<xsl:variable name="jira">http://issues.apache.org/jira/browse/PIVOT</xsl:variable>
@@ -131,7 +135,11 @@
<xsl:template name="footer-navigation">
<xsl:for-each select="$project/item-groups/item-group">
<li>
- <strong><xsl:value-of select="@name"/></strong>
+ <strong>
+ <xsl:apply-templates select="@name">
+ <xsl:with-param name="value-only">true</xsl:with-param>
+ </xsl:apply-templates>
+ </strong>
<ul>
<xsl:choose>
<xsl:when test="@id='demos'">
@@ -154,35 +162,23 @@
<xsl:apply-templates/>
</xsl:template>
+ <!-- <release> gets translated to the current release (text) -->
+ <xsl:template match="release">
+ <xsl:value-of select="$release"/>
+ </xsl:template>
+
<!-- <item> gets translated to a decorated hyperlink -->
<xsl:template match="item">
<xsl:variable name="href">
<xsl:choose>
- <xsl:when test="starts-with(@href, '~wiki')">
- <xsl:value-of select="$wiki"/><xsl:value-of select="substring(@href,6)"/>
- </xsl:when>
- <xsl:when test="starts-with(@href, '~asf')">
- <xsl:value-of select="$asf"/><xsl:value-of select="substring(@href,5)"/>
- </xsl:when>
- <xsl:when test="starts-with(@href, '~jira')">
- <xsl:value-of select="$jira"/><xsl:value-of select="substring(@href,6)"/>
- </xsl:when>
- <xsl:when test="starts-with(@href, '~release')">
- <xsl:value-of select="$base"/>
- <xsl:value-of select="$release"/>
- <xsl:value-of select="substring(@href,9)"/>
- </xsl:when>
- <xsl:when test="@href='~download'">
- <xsl:value-of select="$base"/>
- <xsl:value-of select="'download.cgi#'"/>
- <xsl:value-of select="$release"/>
- </xsl:when>
<xsl:when test="starts-with(@href, 'http://')">
<xsl:value-of select="@href"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$base"/>
- <xsl:value-of select="@href"/>
+ <xsl:apply-templates select="@href">
+ <xsl:with-param name="value-only">true</xsl:with-param>
+ </xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
@@ -191,8 +187,16 @@
<xsl:when test="@caption">
<li class="{@class}">
<a href="{$href}">
- <strong><xsl:value-of select="@name"/></strong>
- <em><xsl:value-of select="@caption"/></em>
+ <strong>
+ <xsl:apply-templates select="@name">
+ <xsl:with-param name="value-only">true</xsl:with-param>
+ </xsl:apply-templates>
+ </strong>
+ <em>
+ <xsl:apply-templates select="@caption">
+ <xsl:with-param name="value-only">true</xsl:with-param>
+ </xsl:apply-templates>
+ </em>
<xsl:choose>
<xsl:when test=".">
<p><xsl:apply-templates/></p>
@@ -202,7 +206,11 @@
</li>
</xsl:when>
<xsl:otherwise>
- <li><a href="{$href}"><xsl:value-of select="@name"/></a></li>
+ <li><a href="{$href}">
+ <xsl:apply-templates select="@name">
+ <xsl:with-param name="value-only">true</xsl:with-param>
+ </xsl:apply-templates>
+ </a></li>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
@@ -247,10 +255,46 @@
<!-- Perform variable resolution on all attributes -->
<xsl:template match="@*">
- <xsl:attribute name="{name(.)}">
- <!-- TODO Resolve variables -->
- <xsl:value-of select="."/>
- </xsl:attribute>
+ <xsl:param name="value-only" select="false()"/>
+
+ <xsl:variable name="value">
+ <xsl:choose>
+ <xsl:when test="contains(., $release-token)">
+ <xsl:value-of select="substring-before(., $release-token)"/>
+ <xsl:value-of select="$release"/>
+ <xsl:value-of select="substring-after(., $release-token)"/>
+ </xsl:when>
+ <xsl:when test="contains(., $wiki-token)">
+ <xsl:value-of select="substring-before(., $wiki-token)"/>
+ <xsl:value-of select="$wiki"/>
+ <xsl:value-of select="substring-after(., $wiki-token)"/>
+ </xsl:when>
+ <xsl:when test="contains(., $asf-token)">
+ <xsl:value-of select="substring-before(., $asf-token)"/>
+ <xsl:value-of select="$asf"/>
+ <xsl:value-of select="substring-after(., $asf-token)"/>
+ </xsl:when>
+ <xsl:when test="contains(., $jira-token)">
+ <xsl:value-of select="substring-before(., $jira-token)"/>
+ <xsl:value-of select="$jira"/>
+ <xsl:value-of select="substring-after(., $jira-token)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="boolean($value-only)">
+ <xsl:value-of select="$value"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="{name(.)}">
+ <xsl:value-of select="$value"/>
+ </xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<!-- Process everything else by just passing it through (including comments) -->