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/26 19:12:13 UTC

svn commit: r884658 - in /incubator/pivot/site/trunk: ./ src/ www/ www/lib/ xsl/

Author: tvolkert
Date: Thu Nov 26 18:12:12 2009
New Revision: 884658

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

Added:
    incubator/pivot/site/trunk/www/
      - copied from r883589, incubator/pivot/site/trunk/src/
    incubator/pivot/site/trunk/www/lib/
    incubator/pivot/site/trunk/www/lib/pivot-charts-1.4.jar   (with props)
    incubator/pivot/site/trunk/www/lib/pivot-charts-1.4.signed.jar   (with props)
    incubator/pivot/site/trunk/www/lib/pivot-core-1.4.jar   (with props)
    incubator/pivot/site/trunk/www/lib/pivot-core-1.4.signed.jar   (with props)
    incubator/pivot/site/trunk/www/lib/pivot-demos-1.4.jar   (with props)
    incubator/pivot/site/trunk/www/lib/pivot-demos-1.4.signed.jar   (with props)
    incubator/pivot/site/trunk/www/lib/pivot-tools-1.4.jar   (with props)
    incubator/pivot/site/trunk/www/lib/pivot-tools-1.4.signed.jar   (with props)
    incubator/pivot/site/trunk/www/lib/pivot-tutorials-1.4.jar   (with props)
    incubator/pivot/site/trunk/www/lib/pivot-tutorials-1.4.signed.jar   (with props)
    incubator/pivot/site/trunk/www/lib/pivot-web-1.4.jar   (with props)
    incubator/pivot/site/trunk/www/lib/pivot-web-1.4.signed.jar   (with props)
    incubator/pivot/site/trunk/www/lib/pivot-wtk-1.4.jar   (with props)
    incubator/pivot/site/trunk/www/lib/pivot-wtk-1.4.signed.jar   (with props)
    incubator/pivot/site/trunk/www/lib/pivot-wtk-1.4.terra.jar   (with props)
    incubator/pivot/site/trunk/www/lib/pivot-wtk-1.4.terra.signed.jar   (with props)
    incubator/pivot/site/trunk/xsl/auxilliary.xsl
      - copied unchanged from r883590, incubator/pivot/site/trunk/xsl/template.xsl
Removed:
    incubator/pivot/site/trunk/demos
    incubator/pivot/site/trunk/src/
    incubator/pivot/site/trunk/tutorials
    incubator/pivot/site/trunk/xsl/template.xsl
Modified:
    incubator/pivot/site/trunk/README
    incubator/pivot/site/trunk/build.xml
    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=884658&r1=884657&r2=884658&view=diff
==============================================================================
--- incubator/pivot/site/trunk/README (original)
+++ incubator/pivot/site/trunk/README Thu Nov 26 18:12:12 2009
@@ -4,26 +4,15 @@
 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 requires symbolic links to be set up that point to the demos and
-tutorials 'www' folders. If you are on a platform that supports symbollic links, these links will be
-created for you when you check out the Pivot site from SVN; by default, they will be:
+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
+specified.
 
-  demos -> ../../trunk/demos/www
-  tutorials -> ../../trunk/tutorials/www
+An example command to build the site, which will build the site into the ant-bin/ folder, is as
+follows:
 
-If these default links do not match your local folder structure, then you should update the links
-to point to the correct folders:
-
-  // Current folder is [site-trunk]
-  $ ln -s [pivot-trunk]/demos/www demos
-  $ ln -s [pivot-trunk]/tutorials/www tutorials
-
-Once you have the site checked out locally and the symbolic links set up, cd into your site trunk
-directory and execute:
-
-> ant clean build
-
-This will build the site into the ant-bin/ directory.
+  $ ant -Dfolder.trunk=/path/to/pivot/trunk clean build
 
 Note that the generated pages do not get checked into SVN. To deploy updated pages to the Pivot web
 site, you should scp the pages to people.apache.org:/www/pivot.apache.org/.

Modified: incubator/pivot/site/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/build.xml?rev=884658&r1=884657&r2=884658&view=diff
==============================================================================
--- incubator/pivot/site/trunk/build.xml (original)
+++ incubator/pivot/site/trunk/build.xml Thu Nov 26 18:12:12 2009
@@ -17,49 +17,60 @@
 -->
 
 <project name="pivot-site" default="build" basedir=".">
-    <!-- Properties that affect the directories that are created as part of the build -->
+    <fail unless="folder.trunk">
+        <![CDATA[Usage: ant -Dfolder.trunk=<path-to-pivot-trunk> [target]]]>
+    </fail>
+
     <property name="folder.bin" value="ant-bin"/>
 
-    <property file="build.properties"/>
+    <!--
+    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"/>
 
     <target name="build" description="Builds the site">
-        <!-- Transform the index page using index.xsl -->
-        <xslt basedir="src"
+        <!-- Transform the index page -->
+        <xslt basedir="www"
+            includes="index.xml"
             destdir="${folder.bin}"
             extension=".html"
-            style="xsl/index.xsl"
-            includes="index.xml">
+            style="xsl/index.xsl">
             <param name="release" expression="${version}"/>
+            <param name="demos" expression="${folder.trunk}/demos/www"/>
         </xslt>
 
-        <!-- Transform standard pages using template.xsl -->
-        <xslt basedir="src"
+        <!-- Transform the auxilliary pages -->
+        <xslt basedir="www"
+            includes="**/*.xml"
+            excludes="index.xml"
             destdir="${folder.bin}"
             extension=".html"
-            style="xsl/template.xsl"
-            includes="**/*.xml"
-            excludes="index.xml">
+            style="xsl/auxilliary.xsl">
             <param name="release" expression="${version}"/>
+            <param name="demos" expression="${folder.trunk}/demos/www"/>
         </xslt>
 
-        <!-- Transform demos pages using demo.xsl -->
-        <xslt basedir="demos"
-            destdir="${folder.bin}/${version}/demos"
-            extension=".html"
-            style="xsl/demo.xsl"
+        <!-- Transform the demos pages -->
+        <xslt basedir="${folder.trunk}/demos/www"
             includes="**/*.xml"
-            excludes="index.xml">
+            excludes="index.xml"
+            destdir="${folder.bin}/demos"
+            extension=".html"
+            style="xsl/demo.xsl">
             <param name="release" expression="${version}"/>
-            <param name="base" expression="../../"/>
+            <param name="demos" expression="${folder.trunk}/demos/www"/>
+            <param name="base" expression="../"/>
         </xslt>
 
         <!-- Copy static resource files -->
         <copy todir="${folder.bin}">
-            <fileset dir="src" excludes="**/*.xml"/>
+            <fileset dir="www" excludes="**/*.xml"/>
         </copy>
     </target>
 
     <target name="clean">
         <delete dir="${folder.bin}"/>
+        <delete dir="${folder.lib}"/>
     </target>
 </project>

Added: incubator/pivot/site/trunk/www/lib/pivot-charts-1.4.jar
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/lib/pivot-charts-1.4.jar?rev=884658&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/pivot/site/trunk/www/lib/pivot-charts-1.4.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/pivot/site/trunk/www/lib/pivot-charts-1.4.signed.jar
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/lib/pivot-charts-1.4.signed.jar?rev=884658&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/pivot/site/trunk/www/lib/pivot-charts-1.4.signed.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/pivot/site/trunk/www/lib/pivot-core-1.4.jar
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/lib/pivot-core-1.4.jar?rev=884658&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/pivot/site/trunk/www/lib/pivot-core-1.4.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/pivot/site/trunk/www/lib/pivot-core-1.4.signed.jar
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/lib/pivot-core-1.4.signed.jar?rev=884658&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/pivot/site/trunk/www/lib/pivot-core-1.4.signed.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/pivot/site/trunk/www/lib/pivot-demos-1.4.jar
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/lib/pivot-demos-1.4.jar?rev=884658&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/pivot/site/trunk/www/lib/pivot-demos-1.4.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/pivot/site/trunk/www/lib/pivot-demos-1.4.signed.jar
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/lib/pivot-demos-1.4.signed.jar?rev=884658&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/pivot/site/trunk/www/lib/pivot-demos-1.4.signed.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/pivot/site/trunk/www/lib/pivot-tools-1.4.jar
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/lib/pivot-tools-1.4.jar?rev=884658&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/pivot/site/trunk/www/lib/pivot-tools-1.4.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/pivot/site/trunk/www/lib/pivot-tools-1.4.signed.jar
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/lib/pivot-tools-1.4.signed.jar?rev=884658&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/pivot/site/trunk/www/lib/pivot-tools-1.4.signed.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/pivot/site/trunk/www/lib/pivot-tutorials-1.4.jar
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/lib/pivot-tutorials-1.4.jar?rev=884658&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/pivot/site/trunk/www/lib/pivot-tutorials-1.4.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/pivot/site/trunk/www/lib/pivot-tutorials-1.4.signed.jar
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/lib/pivot-tutorials-1.4.signed.jar?rev=884658&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/pivot/site/trunk/www/lib/pivot-tutorials-1.4.signed.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/pivot/site/trunk/www/lib/pivot-web-1.4.jar
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/lib/pivot-web-1.4.jar?rev=884658&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/pivot/site/trunk/www/lib/pivot-web-1.4.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/pivot/site/trunk/www/lib/pivot-web-1.4.signed.jar
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/lib/pivot-web-1.4.signed.jar?rev=884658&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/pivot/site/trunk/www/lib/pivot-web-1.4.signed.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/pivot/site/trunk/www/lib/pivot-wtk-1.4.jar
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/lib/pivot-wtk-1.4.jar?rev=884658&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/pivot/site/trunk/www/lib/pivot-wtk-1.4.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/pivot/site/trunk/www/lib/pivot-wtk-1.4.signed.jar
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/lib/pivot-wtk-1.4.signed.jar?rev=884658&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/pivot/site/trunk/www/lib/pivot-wtk-1.4.signed.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/pivot/site/trunk/www/lib/pivot-wtk-1.4.terra.jar
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/lib/pivot-wtk-1.4.terra.jar?rev=884658&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/pivot/site/trunk/www/lib/pivot-wtk-1.4.terra.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/pivot/site/trunk/www/lib/pivot-wtk-1.4.terra.signed.jar
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/www/lib/pivot-wtk-1.4.terra.signed.jar?rev=884658&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/pivot/site/trunk/www/lib/pivot-wtk-1.4.terra.signed.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: incubator/pivot/site/trunk/xsl/project.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/xsl/project.xml?rev=884658&r1=884657&r2=884658&view=diff
==============================================================================
--- incubator/pivot/site/trunk/xsl/project.xml (original)
+++ incubator/pivot/site/trunk/xsl/project.xml Thu Nov 26 18:12:12 2009
@@ -35,9 +35,7 @@
     -->
     <item-groups>
         <item-group id="demos" name="Demos">
-            <item name="Kitchen Sink" href="~release/demos/kitchen-sink.html"/>
-            <item name="Charting" href="http://ixnay.biz/charts.html"/>
-            <item name="Component Explorer" href="~release/tutorials/component-explorer.html"/>
+            <!-- <demo-item> elements from demos/index.xml will automatically be processed here-->
             <item name="More Demos" href="~release/demos/"/>
         </item-group>
 

Modified: incubator/pivot/site/trunk/xsl/project.xsl
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/xsl/project.xsl?rev=884658&r1=884657&r2=884658&view=diff
==============================================================================
--- incubator/pivot/site/trunk/xsl/project.xsl (original)
+++ incubator/pivot/site/trunk/xsl/project.xsl Thu Nov 26 18:12:12 2009
@@ -25,6 +25,7 @@
   <!-- 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'"/>
@@ -121,72 +122,116 @@
 
   <!-- Process an item group -->
   <xsl:template match="item-group">
-    <li>
-      <strong><xsl:value-of select="@name"/></strong>
-      <ul>
-        <xsl:apply-templates select="item[not(@footer='false')]"/>
-      </ul>
-    </li>
+      <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">
-      <xsl:value-of select="@class"/>
-    </xsl:variable>
+      <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: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: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: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:copy>
+          <xsl:apply-templates select="@*|*|text()"/>
+      </xsl:copy>
   </xsl:template>
 </xsl:stylesheet>