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/28 22:24:39 UTC

svn commit: r885149 - in /incubator/pivot/site/trunk: ./ www/ xsl/

Author: tvolkert
Date: Sat Nov 28 21:24:38 2009
New Revision: 885149

URL: http://svn.apache.org/viewvc?rev=885149&view=rev
Log:
Site updates

Removed:
    incubator/pivot/site/trunk/build.properties
Modified:
    incubator/pivot/site/trunk/README
    incubator/pivot/site/trunk/build.xml
    incubator/pivot/site/trunk/www/about.xml
    incubator/pivot/site/trunk/www/contact.xml
    incubator/pivot/site/trunk/www/documentation.xml
    incubator/pivot/site/trunk/www/get-involved.xml
    incubator/pivot/site/trunk/www/getting-started.xml
    incubator/pivot/site/trunk/www/index.xml
    incubator/pivot/site/trunk/www/legal.xml
    incubator/pivot/site/trunk/www/lists.xml
    incubator/pivot/site/trunk/www/svn.xml
    incubator/pivot/site/trunk/www/who-we-are.xml
    incubator/pivot/site/trunk/xsl/auxilliary.xsl
    incubator/pivot/site/trunk/xsl/demo.xsl
    incubator/pivot/site/trunk/xsl/project.xml
    incubator/pivot/site/trunk/xsl/project.xsl

Modified: incubator/pivot/site/trunk/README
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/README?rev=885149&r1=885148&r2=885149&view=diff
==============================================================================
--- incubator/pivot/site/trunk/README (original)
+++ incubator/pivot/site/trunk/README Sat Nov 28 21:24:38 2009
@@ -1,12 +1,11 @@
 The Apache Pivot Website Instructions
 ---------------------------------------
 
-The Pivot web site is based on .xml files which are transformed
-into .html files using XSLT and Ant.
+The Pivot web site is based on XML files which are transformed into HTML files using XSLT and Ant.
 
-NOTE: In order to build the site, Ant needs to know the location of the folder on your local file
-system that represents http://svn.apache.org/repos/asf/pivot/trunk/. This location is passed to the
-Ant build using the 'folder.trunk' parameter. The build will not run without this parameter being
+In order to build the site, Ant needs to know the location of the folder on your local file system
+that represents http://svn.apache.org/repos/asf/pivot/trunk/. This location is passed to the Ant
+build using the 'folder.trunk' parameter. The build will not run without this parameter being
 specified.
 
 An example command to build the site, which will build the site into the ant-bin/ folder, is as

Modified: incubator/pivot/site/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/build.xml?rev=885149&r1=885148&r2=885149&view=diff
==============================================================================
--- incubator/pivot/site/trunk/build.xml (original)
+++ incubator/pivot/site/trunk/build.xml Sat Nov 28 21:24:38 2009
@@ -22,12 +22,7 @@
     </fail>
 
     <property name="folder.bin" value="ant-bin"/>
-
-    <!--
-    Import the main build file. This lets us know the current Pivot version and build the JAR files
-    needed to run the demos and tutorials.
-    -->
-    <import file="${folder.trunk}/build.xml"/>
+    <property file="${folder.trunk}/build.properties"/>
 
     <target name="build" description="Builds the site">
         <!-- Transform the index page -->
@@ -69,8 +64,7 @@
         </copy>
     </target>
 
-    <target name="clean">
+    <target name="clean" description="Removes build artifacts">
         <delete dir="${folder.bin}"/>
-        <delete dir="${folder.lib}"/>
     </target>
 </project>

Modified: incubator/pivot/site/trunk/www/about.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/about.xml?rev=885149&r1=885148&r2=885149&view=diff
==============================================================================
--- incubator/pivot/site/trunk/www/about.xml (original)
+++ incubator/pivot/site/trunk/www/about.xml Sat Nov 28 21:24:38 2009
@@ -16,7 +16,7 @@
 limitations under the License.
 -->
 
-<document group="about">
+<document item-group="about">
 
   <properties>
     <title>About</title>

Modified: incubator/pivot/site/trunk/www/contact.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/contact.xml?rev=885149&r1=885148&r2=885149&view=diff
==============================================================================
--- incubator/pivot/site/trunk/www/contact.xml (original)
+++ incubator/pivot/site/trunk/www/contact.xml Sat Nov 28 21:24:38 2009
@@ -16,7 +16,7 @@
 limitations under the License.
 -->
 
-<document group="about">
+<document item-group="about">
 
   <properties>
     <title>Contact Information</title>

Modified: incubator/pivot/site/trunk/www/documentation.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/documentation.xml?rev=885149&r1=885148&r2=885149&view=diff
==============================================================================
--- incubator/pivot/site/trunk/www/documentation.xml (original)
+++ incubator/pivot/site/trunk/www/documentation.xml Sat Nov 28 21:24:38 2009
@@ -16,7 +16,7 @@
 limitations under the License.
 -->
 
-<document group="documentation">
+<document item-group="documentation">
 
   <properties>
     <title>Documentation</title>

Modified: incubator/pivot/site/trunk/www/get-involved.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/get-involved.xml?rev=885149&r1=885148&r2=885149&view=diff
==============================================================================
--- incubator/pivot/site/trunk/www/get-involved.xml (original)
+++ incubator/pivot/site/trunk/www/get-involved.xml Sat Nov 28 21:24:38 2009
@@ -16,7 +16,7 @@
 limitations under the License.
 -->
 
-<document group="get-involved">
+<document item-group="get-involved">
 
   <properties>
     <title>Get Involved</title>

Modified: incubator/pivot/site/trunk/www/getting-started.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/getting-started.xml?rev=885149&r1=885148&r2=885149&view=diff
==============================================================================
--- incubator/pivot/site/trunk/www/getting-started.xml (original)
+++ incubator/pivot/site/trunk/www/getting-started.xml Sat Nov 28 21:24:38 2009
@@ -16,7 +16,7 @@
 limitations under the License.
 -->
 
-<document group="documentation">
+<document item-group="documentation">
 
   <properties>
     <title>Getting Started</title>

Modified: incubator/pivot/site/trunk/www/index.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/index.xml?rev=885149&r1=885148&r2=885149&view=diff
==============================================================================
--- incubator/pivot/site/trunk/www/index.xml (original)
+++ incubator/pivot/site/trunk/www/index.xml Sat Nov 28 21:24:38 2009
@@ -16,7 +16,11 @@
 limitations under the License.
 -->
 
-<document main="true">
+<document>
+    <properties>
+        <home>true</home>
+    </properties>
+
   <body>
     <div id="stage">
       <p>

Modified: incubator/pivot/site/trunk/www/legal.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/legal.xml?rev=885149&r1=885148&r2=885149&view=diff
==============================================================================
--- incubator/pivot/site/trunk/www/legal.xml (original)
+++ incubator/pivot/site/trunk/www/legal.xml Sat Nov 28 21:24:38 2009
@@ -16,7 +16,7 @@
 limitations under the License.
 -->
 
-<document group="about">
+<document item-group="about">
 
   <properties>
     <title>Legal Stuff They Make Us Say</title>

Modified: incubator/pivot/site/trunk/www/lists.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/lists.xml?rev=885149&r1=885148&r2=885149&view=diff
==============================================================================
--- incubator/pivot/site/trunk/www/lists.xml (original)
+++ incubator/pivot/site/trunk/www/lists.xml Sat Nov 28 21:24:38 2009
@@ -16,7 +16,7 @@
 limitations under the License.
 -->
 
-<document group="get-involved">
+<document item-group="get-involved">
 
   <properties>
     <title>Mailing Lists</title>

Modified: incubator/pivot/site/trunk/www/svn.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/svn.xml?rev=885149&r1=885148&r2=885149&view=diff
==============================================================================
--- incubator/pivot/site/trunk/www/svn.xml (original)
+++ incubator/pivot/site/trunk/www/svn.xml Sat Nov 28 21:24:38 2009
@@ -16,7 +16,7 @@
 limitations under the License.
 -->
 
-<document group="get-involved">
+<document item-group="get-involved">
     <properties>
         <title>Subversion Repository Access</title>
     </properties>

Modified: incubator/pivot/site/trunk/www/who-we-are.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/who-we-are.xml?rev=885149&r1=885148&r2=885149&view=diff
==============================================================================
--- incubator/pivot/site/trunk/www/who-we-are.xml (original)
+++ incubator/pivot/site/trunk/www/who-we-are.xml Sat Nov 28 21:24:38 2009
@@ -16,11 +16,10 @@
 limitations under the License.
 -->
 
-<document group="about">
-
-  <properties>
-    <title>Who We Are</title>
-  </properties>
+<document item-group="about">
+    <properties>
+        <title>Who We Are</title>
+    </properties>
 
   <body>
 

Modified: incubator/pivot/site/trunk/xsl/auxilliary.xsl
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/xsl/auxilliary.xsl?rev=885149&r1=885148&r2=885149&view=diff
==============================================================================
--- incubator/pivot/site/trunk/xsl/auxilliary.xsl (original)
+++ incubator/pivot/site/trunk/xsl/auxilliary.xsl Sat Nov 28 21:24:38 2009
@@ -17,31 +17,30 @@
 -->
 
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-  <xsl:include href="project.xsl"/>
+    <xsl:import href="project.xsl"/>
 
-  <xsl:template match="body">
-    <div id="contentBase" class="group">
-      <h1><xsl:value-of select="//document/properties/title"/></h1>
+    <!-- Override <body> to translate to the auxilliary body HTML -->
+    <xsl:template match="body">
+        <div id="contentBase" class="group">
+            <h1><xsl:value-of select="//document/properties/title"/></h1>
+            <ul class="naviLeft">
+                <xsl:call-template name="group-navigation"/>
+            </ul>
+            <div class="content">
+                <xsl:apply-templates/>
+            </div>
+        </div>
+    </xsl:template>
 
-      <xsl:comment>GROUP NAVIGATION</xsl:comment>
-      <ul class="naviLeft">
+    <!-- Left side-bar group navigation -->
+    <xsl:template name="group-navigation">
         <xsl:apply-templates select="$project/item-groups/item-group[@id=$item-group]/item"/>
-      </ul>
+    </xsl:template>
 
-      <xsl:comment>CONTENT</xsl:comment>
-      <div class="content">
-        <!-- TODO Revisit once Thien updates content styles -->
-        <xsl:apply-templates select="section"/>
-      </div>
-    </div>
-  </xsl:template>
-
-  <xsl:template match="section">
-    <xsl:variable name="name">
-      <xsl:value-of select="@name"/>
-    </xsl:variable>
-    <a name="{$name}"><h2><xsl:value-of select="@name"/></h2></a>
-
-    <xsl:apply-templates/>
-  </xsl:template>
+    <!-- <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>
+        <xsl:apply-templates/>
+    </xsl:template>
 </xsl:stylesheet>

Modified: incubator/pivot/site/trunk/xsl/demo.xsl
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/xsl/demo.xsl?rev=885149&r1=885148&r2=885149&view=diff
==============================================================================
--- incubator/pivot/site/trunk/xsl/demo.xsl (original)
+++ incubator/pivot/site/trunk/xsl/demo.xsl Sat Nov 28 21:24:38 2009
@@ -17,62 +17,53 @@
 -->
 
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-  <xsl:include href="project.xsl"/>
+    <xsl:import href="auxilliary.xsl"/>
 
-  <xsl:template match="body">
-    <div id="contentBase" class="group">
-      <h1><xsl:value-of select="//document/properties/title"/></h1>
-
-      <xsl:comment>GROUP NAVIGATION</xsl:comment>
-      <ul class="naviLeft">
-        <li><a href="getting-started.html">Getting Started</a></li>
-      </ul>
-
-      <xsl:comment>CONTENT</xsl:comment>
-      <div class="content">
-        <xsl:apply-templates/>
-      </div>
-    </div>
-  </xsl:template>
-
-  <xsl:template match="demo">
-    <script type="text/javascript" src="http://java.com/js/deployJava.js"></script>
-    <script type="text/javascript">
-      var attributes = {
-          code:"org.apache.pivot.wtk.BrowserApplicationContext$HostApplet",
-          width:"<xsl:value-of select="@width"/>",
-          height:"<xsl:value-of select="@height"/>",
-          style:"border:solid 1px #999999"
-      };
-
-      <xsl:for-each select="attributes/*">
-          attributes.<xsl:value-of select="name(.)"/> = '<xsl:value-of select="."/>';
-      </xsl:for-each>
-
-      var libraries = [];
-      <xsl:apply-templates select="libraries/library">
-          <xsl:with-param name="signed" select="@signed"/>
-      </xsl:apply-templates>
-      attributes.archive = libraries.join(",");
-
-      var parameters = {
-          codebase_lookup:false,
-          java_arguments:"-Dsun.awt.noerasebackground=true -Dsun.awt.erasebackgroundonresize=true",
-          application_class_name:"<xsl:value-of select="@class"/>"
-      };
-
-      <xsl:if test="startup-properties">
-          var startupProperties = [];
-          <xsl:for-each select="startup-properties/*">
-              startupProperties.push("<xsl:value-of select="name(.)"/>=<xsl:value-of select="."/>");
-          </xsl:for-each>
-          parameters.startup_properties = startupProperties.join("&amp;");
-      </xsl:if>
-
-      deployJava.runApplet(attributes, parameters, "1.6");
-    </script>
-  </xsl:template>
+    <!-- Override group navigation to pull from the demos index -->
+    <xsl:template name="group-navigation">
+        <xsl:apply-templates select="$demos-index/body//application-item"/>
+    </xsl:template>
+
+    <!-- <application> translates to Javascript that creates an applet -->
+    <xsl:template match="application">
+        <script type="text/javascript" src="http://java.com/js/deployJava.js"></script>
+        <script type="text/javascript">
+            var attributes = {
+                code:"org.apache.pivot.wtk.BrowserApplicationContext$HostApplet",
+                width:"<xsl:value-of select="@width"/>",
+                height:"<xsl:value-of select="@height"/>",
+                style:"border:solid 1px #999999"
+            };
+
+            <xsl:for-each select="attributes/*">
+                attributes.<xsl:value-of select="name(.)"/> = '<xsl:value-of select="."/>';
+            </xsl:for-each>
+
+            var libraries = [];
+            <xsl:apply-templates select="libraries/library">
+                <xsl:with-param name="signed" select="@signed"/>
+            </xsl:apply-templates>
+            attributes.archive = libraries.join(",");
+
+            var parameters = {
+                codebase_lookup:false,
+                java_arguments:"-Dsun.awt.noerasebackground=true -Dsun.awt.erasebackgroundonresize=true",
+                application_class_name:"<xsl:value-of select="@class"/>"
+            };
+
+            <xsl:if test="startup-properties">
+                var startupProperties = [];
+                <xsl:for-each select="startup-properties/*">
+                    startupProperties.push("<xsl:value-of select="name(.)"/>=<xsl:value-of select="."/>");
+                </xsl:for-each>
+                parameters.startup_properties = startupProperties.join("&amp;");
+            </xsl:if>
+
+            deployJava.runApplet(attributes, parameters, "1.6");
+        </script>
+    </xsl:template>
 
+    <!-- <library> translates to Javascript that adds necessary jars to a Javascript array -->
     <xsl:template match="library">
         <xsl:param name="signed"/>
 

Modified: incubator/pivot/site/trunk/xsl/project.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/xsl/project.xml?rev=885149&r1=885148&r2=885149&view=diff
==============================================================================
--- incubator/pivot/site/trunk/xsl/project.xml (original)
+++ incubator/pivot/site/trunk/xsl/project.xml Sat Nov 28 21:24:38 2009
@@ -18,30 +18,29 @@
 
 <project href="http://pivot.apache.org/">
     <title>Apache Pivot</title>
+    <tagline>Rich Internet Applications (RIA) in Java (tm)</tagline>
+    <copyright>
+        <message>Copyright (c) 1999-2010</message>
+        <message>The Apache Software Foundation.</message>
+    </copyright>
 
-    <!-- The global items appear in the main navigation. -->
     <global-items>
-        <item name="Demos" href="~release/demos/"/>
+        <item name="Demos" href="demos/"/>
         <item name="Download" href="~download"/>
         <item name="Documentation" href="documentation.html"/>
         <item name="Get Involved" href="get-involved.html"/>
         <item name="About" href="about.html"/>
     </global-items>
 
-    <!--
-    The item groups show up in the footer navigation. The items belonging to the same group as the
-    current page will also show up in the left navigation (with the exception of demos, which
-    reference demos/index.xml.
-    -->
     <item-groups>
         <item-group id="demos" name="Demos">
-            <!-- <demo-item> elements from demos/index.xml will automatically be processed here-->
-            <item name="More Demos" href="~release/demos/"/>
+            <!-- <application-item> elements from demos/index.xml will be processed here-->
+            <item name="More Demos" href="demos/"/>
         </item-group>
 
         <item-group id="documentation" name="Documentation">
             <item name="Getting Started" href="getting-started.html"/>
-            <item name="Tutorial" href="~release/tutorials/"/>
+            <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-group>

Modified: incubator/pivot/site/trunk/xsl/project.xsl
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/xsl/project.xsl?rev=885149&r1=885148&r2=885149&view=diff
==============================================================================
--- incubator/pivot/site/trunk/xsl/project.xsl (original)
+++ incubator/pivot/site/trunk/xsl/project.xsl Sat Nov 28 21:24:38 2009
@@ -17,221 +17,234 @@
 -->
 
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-  <!-- Output method -->
-  <xsl:output method="html" encoding="UTF-8" indent="no"
-    doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
-    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
-
-  <!-- Defined parameters (overrideable) -->
-  <xsl:param name="release"/>
-  <xsl:param name="base"/>
-  <xsl:param name="demos"/>
-  <xsl:param name="wiki" select="'http://cwiki.apache.org/PIVOT'"/>
-  <xsl:param name="asf" select="'http://www.apache.org'"/>
-  <xsl:param name="jira" select="'http://issues.apache.org/jira/browse/PIVOT'"/>
-
-  <!-- Defined variables (not overrideable) -->
-  <xsl:variable name="project" select="document('project.xml')/project"/>
-  <xsl:variable name="item-group">
-    <xsl:value-of select="//document/@item-group"/>
-  </xsl:variable>
-
-  <!-- Process an entire document into an HTML page -->
-  <xsl:template match="document">
-    <xsl:variable name="logoClass">
-      <xsl:choose>
-        <xsl:when test="@main='true'">
-          <xsl:value-of select="'logoHome'"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="'logo'"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-
-    <html xmlns="http://www.w3.org/1999/xhtml">
-      <head>
-        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-        <title>
-          <xsl:choose>
-            <xsl:when test="properties/title">
-              <xsl:value-of select="properties/title"/>
-              <xsl:value-of select="' | '"/>
+    <!-- Output method -->
+    <xsl:output method="html" encoding="UTF-8" indent="no"
+        doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+        doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
+
+    <!-- Parameters (overrideable) -->
+    <xsl:param name="release"/>
+    <xsl:param name="base"/>
+    <xsl:param name="demos"/>
+
+    <!-- Variables (not overrideable) -->
+    <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>
+    <xsl:variable name="project" select="document('project.xml')/project"/>
+    <xsl:variable name="demos-index" select="document(concat($demos, '/index.xml'))/document"/>
+    <xsl:variable name="item-group" select="//document/@item-group"/>
+
+    <!-- <document> translates to an HTML page -->
+    <xsl:template match="document">
+        <html xmlns="http://www.w3.org/1999/xhtml">
+            <head>
+                <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+                <title>
+                    <xsl:choose>
+                        <xsl:when test="properties/title">
+                            <xsl:value-of select="properties/title"/>
+                            <xsl:value-of select="' | '"/>
+                        </xsl:when>
+                    </xsl:choose>
+                    <xsl:value-of select="$project/title"/>
+                </title>
+                <link href="{$base}styles/pivot.css" rel="stylesheet" type="text/css"/>
+
+                <xsl:apply-templates select="head"/>
+
+                <!-- Google Analytics Code -->
+                <script type="text/javascript">
+                    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+                    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+                </script>
+                <script type="text/javascript">
+                    try {
+                        var pageTracker = _gat._getTracker("UA-7977275-1");
+                        pageTracker._trackPageview();
+                    } catch(err) {}
+                </script>
+            </head>
+
+            <body>
+                <div id="wrapper">
+                    <div id="main">
+                        <div id="header">
+                            <xsl:variable name="logoClass">
+                                <xsl:choose>
+                                    <xsl:when test="boolean(properties/home)">logoHome</xsl:when>
+                                    <xsl:otherwise>logo</xsl:otherwise>
+                                </xsl:choose>
+                            </xsl:variable>
+                            <div class="{$logoClass}">
+                                <a href="{$base}index.html">
+                                    <xsl:variable name="title" select="$project/title"/>
+                                    <img src="{$base}images/logo.png" alt="{$title}" title="{$title} Homepage"/>
+                                </a>
+                            </div>
+                            <div class="tagline">
+                                <xsl:variable name="tagline" select="$project/tagline"/>
+                                <img src="{$base}images/tagline.png" alt="{$tagline}"/>
+                            </div>
+                            <ul class="navi">
+                                <xsl:call-template name="global-navigation"/>
+                            </ul>
+                        </div>
+
+                        <xsl:apply-templates select="body"/>
+                    </div>
+
+                    <div id="footer" class="group">
+                        <div class="footerLogo">
+                            <xsl:for-each select="$project/copyright/message">
+                                <xsl:if test="position()&gt;1"><br/></xsl:if>
+                                <xsl:value-of select="."/>
+                            </xsl:for-each>
+                        </div>
+
+                        <div class="footerLinks">
+                            <ul class="footerMenuGr">
+                                <xsl:call-template name="footer-navigation"/>
+                            </ul>
+                        </div>
+                    </div>
+                </div>
+            </body>
+        </html>
+    </xsl:template>
+
+    <!-- The main site navigation -->
+    <xsl:template name="global-navigation">
+        <xsl:apply-templates select="$project/global-items/item"/>
+    </xsl:template>
+
+    <!-- The footer site navigation -->
+    <xsl:template name="footer-navigation">
+        <xsl:for-each select="$project/item-groups/item-group">
+            <li>
+                <strong><xsl:value-of select="@name"/></strong>
+                <ul>
+                    <xsl:choose>
+                        <xsl:when test="@id='demos'">
+                            <xsl:apply-templates select="$demos-index/body//application-item[boolean(@footer)]"/>
+                        </xsl:when>
+                    </xsl:choose>
+                    <xsl:apply-templates select="item[not(@footer='false')]"/>
+                </ul>
+            </li>
+        </xsl:for-each>
+    </xsl:template>
+
+    <!-- <head> content gets passed through -->
+    <xsl:template match="head">
+        <xsl:apply-templates/>
+    </xsl:template>
+
+    <!-- <body> content gets passed through -->
+    <xsl:template match="body">
+        <xsl:apply-templates/>
+    </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:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+
+        <xsl:choose>
+            <xsl:when test="@caption">
+                <xsl:variable name="class" select="@class"/>
+                <li class="{$class}">
+                    <a href="{$href}">
+                        <strong><xsl:value-of select="@name"/></strong>
+                        <em><xsl:value-of select="@caption"/></em>
+                        <xsl:choose>
+                            <xsl:when test=".">
+                                <p><xsl:apply-templates/></p>
+                            </xsl:when>
+                        </xsl:choose>
+                    </a>
+                </li>
             </xsl:when>
-          </xsl:choose>
-          <xsl:value-of select="$project/title"/>
-        </title>
-        <link href="{$base}styles/pivot.css" rel="stylesheet" type="text/css"/>
-
-        <xsl:apply-templates select="head"/>
-
-        <!-- Google Analytics Code -->
-        <script type="text/javascript">
-          var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-          document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-        </script>
-        <script type="text/javascript">
-          try {
-            var pageTracker = _gat._getTracker("UA-7977275-1");
-            pageTracker._trackPageview();
-          } catch(err) {}
-        </script>
-      </head>
-
-      <body>
-        <div id="wrapper">
-          <div id="main">
-            <div id="header">
-              <div class="{$logoClass}">
-                <a href="{$base}index.html">
-                  <img src="{$base}images/logo.png" alt="Apache Pivot" title="Apache Pivot Homepage"/>
-                </a>
-              </div>
-              <div class="tagline">
-                <img src="{$base}images/tagline.png" alt="Rich Internet Applications (RIA) in Java (tm)"/>
-              </div>
-
-              <xsl:comment>MAIN NAVIGATION</xsl:comment>
-              <ul class="navi">
-                <xsl:apply-templates select="$project/global-items/item"/>
-              </ul>
-            </div>
-
-            <xsl:apply-templates select="body"/>
-          </div>
-
-          <div id="footer" class="group">
-            <div class="footerLogo">
-              Copyright (c) 1999-2010,<br/>The Apache Software Foundation.
-            </div>
-
-            <div class="footerLinks">
-              <ul class="footerMenuGr">
-                <xsl:apply-templates select="$project/item-groups/item-group"/>
-              </ul>
-            </div>
-          </div>
-        </div>
-      </body>
-    </html>
-  </xsl:template>
-
-  <xsl:template match="head">
-      <xsl:apply-templates/>
-  </xsl:template>
-
-  <!-- Process an item group -->
-  <xsl:template match="item-group">
-      <li>
-          <strong><xsl:value-of select="@name"/></strong>
-          <ul>
-              <xsl:if test="@id='demos'">
-                  <xsl:call-template name="demos-item-group"/>
-              </xsl:if>
-              <xsl:apply-templates select="item[not(@footer='false')]"/>
-          </ul>
-      </li>
-  </xsl:template>
-
-  <xsl:template name="demos-item-group">
-      <xsl:variable name="index" select="document(concat($demos, '/index.xml'))/document"/>
-      <xsl:apply-templates select="$index/body//demo-item"/>
-  </xsl:template>
-
-  <xsl:template match="demo-item[remote]">
-      <xsl:if test="properties/footer">
-          <xsl:variable name="target">
-              <xsl:choose>
-                  <xsl:when test="properties/new-window">
-                      <xsl:value-of select="'demo'"/>
-                  </xsl:when>
-                  <xsl:otherwise>
-                      <xsl:value-of select="'_self'"/>
-                  </xsl:otherwise>
-              </xsl:choose>
-          </xsl:variable>
-          <xsl:variable name="href" select="remote/@href"/>
-          <li><a href="{$href}" target="{$target}"><xsl:value-of select="properties/title"/></a></li>
-      </xsl:if>
-  </xsl:template>
-
-  <xsl:template match="demo-item[not(remote)]">
-      <xsl:variable name="id" select="@id"/>
-      <xsl:variable name="demo" select="document(concat($demos, '/', $id, '.xml'))/document"/>
-      <xsl:if test="$demo/properties/footer">
-          <xsl:variable name="href">
-              <xsl:value-of select="concat($base, 'demos/', $id, '.html')"/>
-          </xsl:variable>
-          <xsl:variable name="target">
-              <xsl:choose>
-                  <xsl:when test="$demo/properties/new-window">
-                      <xsl:value-of select="'demo'"/>
-                  </xsl:when>
-                  <xsl:otherwise>
-                      <xsl:value-of select="'_self'"/>
-                  </xsl:otherwise>
-              </xsl:choose>
-          </xsl:variable>
-          <li><a href="{$href}" target="{$target}"><xsl:value-of select="$demo/properties/title"/></a></li>
-      </xsl:if>
-  </xsl:template>
-
-  <!-- Process a navigation item -->
-  <xsl:template match="item">
-      <xsl:variable name="class" select="@class"/>
-
-      <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:otherwise>
-                  <xsl:value-of select="$base"/>
-                  <xsl:value-of select="@href"/>
-              </xsl:otherwise>
-          </xsl:choose>
-      </xsl:variable>
-
-      <xsl:choose>
-          <xsl:when test="@caption">
-              <li class="{$class}">
-                  <a href="{$href}">
-                      <strong><xsl:value-of select="@name"/></strong>
-                      <em><xsl:value-of select="@caption"/></em>
-                      <xsl:choose>
-                          <xsl:when test=".">
-                              <p><xsl:apply-templates/></p>
-                          </xsl:when>
-                      </xsl:choose>
-                  </a>
-              </li>
-          </xsl:when>
-          <xsl:otherwise>
-              <li><a href="{$href}"><xsl:value-of select="@name"/></a></li>
-          </xsl:otherwise>
-      </xsl:choose>
-  </xsl:template>
-
-  <!-- Process everything else by just passing it through -->
-  <xsl:template match="*|@*">
-      <xsl:copy>
-          <xsl:apply-templates select="@*|*|text()"/>
-      </xsl:copy>
-  </xsl:template>
+            <xsl:otherwise>
+                <li><a href="{$href}"><xsl:value-of select="@name"/></a></li>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+
+    <!--
+    <application-item> is similar to an <item>, but its metadata comes from the application
+    document's properties rather than from the element itself
+    -->
+    <xsl:template match="application-item">
+        <xsl:variable name="demo" select="document(concat($demos, '/', @id, '.xml'))/document"/>
+        <xsl:variable name="href">
+            <xsl:value-of select="concat($base, 'demos/', @id, '.html')"/>
+        </xsl:variable>
+        <xsl:variable name="target">
+            <xsl:choose>
+                <xsl:when test="boolean(@new-window)">
+                    <xsl:value-of select="'_new'"/>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:value-of select="'_self'"/>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+        <li><a href="{$href}" target="{$target}"><xsl:value-of select="$demo/properties/title"/></a></li>
+    </xsl:template>
+
+    <!--
+    <application-item>[<remote/>] gets special handling to look for the application properties as
+    a nested element rather than in a separate document (remote applications don't have an XML
+    descriptor)
+    -->
+    <xsl:template match="application-item[remote]">
+        <xsl:variable name="target">
+            <xsl:choose>
+                <xsl:when test="boolean(@new-window)">
+                    <xsl:value-of select="'_new'"/>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:value-of select="'_self'"/>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+        <xsl:variable name="href" select="remote/@href"/>
+        <li><a href="{$href}" target="{$target}"><xsl:value-of select="properties/title"/></a></li>
+    </xsl:template>
+
+    <!-- Process everything else by just passing it through -->
+    <xsl:template match="*|@*">
+        <xsl:copy>
+            <xsl:apply-templates select="@*|*|text()"/>
+        </xsl:copy>
+    </xsl:template>
 </xsl:stylesheet>