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 21:43:18 UTC

svn commit: r885580 [3/3] - in /incubator/pivot: site/trunk/ site/trunk/www/assets/ site/trunk/xsl/ trunk/ trunk/demos/www/ trunk/demos/xsl/

Modified: incubator/pivot/site/trunk/xsl/demo.xsl
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/xsl/demo.xsl?rev=885580&r1=885579&r2=885580&view=diff
==============================================================================
--- incubator/pivot/site/trunk/xsl/demo.xsl (original)
+++ incubator/pivot/site/trunk/xsl/demo.xsl Mon Nov 30 20:43:18 2009
@@ -19,6 +19,8 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
     <xsl:import href="auxilliary.xsl"/>
 
+    <xsl:param name="root"/>
+
     <!-- Override document template to check for full-screen demos -->
     <xsl:template match="document">
         <xsl:choose>
@@ -58,6 +60,11 @@
         <xsl:apply-templates select="$demos-index/body//application-item"/>
     </xsl:template>
 
+    <!-- <root> gets resolved to the 'root' XSL parameter -->
+    <xsl:template match="root">
+        <xsl:value-of select="$root"/>
+    </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>
@@ -87,7 +94,7 @@
             <xsl:if test="startup-properties">
                 var startupProperties = [];
                 <xsl:for-each select="startup-properties/*">
-                    startupProperties.push("<xsl:value-of select="name(.)"/>=<xsl:value-of select="."/>");
+                    startupProperties.push("<xsl:value-of select="name(.)"/>=<xsl:apply-templates/>");
                 </xsl:for-each>
                 parameters.startup_properties = startupProperties.join("&amp;");
             </xsl:if>

Modified: incubator/pivot/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/build.xml?rev=885580&r1=885579&r2=885580&view=diff
==============================================================================
--- incubator/pivot/trunk/build.xml (original)
+++ incubator/pivot/trunk/build.xml Mon Nov 30 20:43:18 2009
@@ -630,6 +630,7 @@
             includes="*.xml"
             excludes="index.xml">
             <param name="release" expression="${version}"/>
+            <param name="root" expression="${ant.project.name}-demos"/>
         </xslt>
 
         <!-- Transform demos jnlp -->

Modified: incubator/pivot/trunk/demos/www/large-data.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/www/large-data.xml?rev=885580&r1=885579&r2=885580&view=diff
==============================================================================
--- incubator/pivot/trunk/demos/www/large-data.xml (original)
+++ incubator/pivot/trunk/demos/www/large-data.xml Mon Nov 30 20:43:18 2009
@@ -46,7 +46,7 @@
                 <library>demos</library>
             </libraries>
             <startup-properties>
-                <basePath>pivot-demos/assets</basePath>
+                <basePath><root/>/assets</basePath>
             </startup-properties>
         </application>
     </body>

Modified: incubator/pivot/trunk/demos/xsl/demo.html.xsl
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/xsl/demo.html.xsl?rev=885580&r1=885579&r2=885580&view=diff
==============================================================================
--- incubator/pivot/trunk/demos/xsl/demo.html.xsl (original)
+++ incubator/pivot/trunk/demos/xsl/demo.html.xsl Mon Nov 30 20:43:18 2009
@@ -19,6 +19,7 @@
 <!-- Translates a demo XML document into an HTML demo page -->
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
     <xsl:param name="release"/>
+    <xsl:param name="root"/>
 
     <xsl:output method="html" encoding="UTF-8" indent="no"
         doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
@@ -66,6 +67,11 @@
         <xsl:apply-templates/>
     </xsl:template>
 
+    <!-- <root> gets resolved to the 'root' XSL parameter -->
+    <xsl:template match="root">
+        <xsl:value-of select="$root"/>
+    </xsl:template>
+
     <!-- <application> gets translated to a JavaScript block that launches the applet -->
     <xsl:template match="application">
         <script type="text/javascript">
@@ -95,7 +101,7 @@
                 var startupProperties = [];
 
                 <xsl:for-each select="startup-properties/*">
-                    startupProperties.push("<xsl:value-of select="name(.)"/>=<xsl:value-of select="."/>");
+                    startupProperties.push("<xsl:value-of select="name(.)"/>=<xsl:apply-templates/>");
                 </xsl:for-each>
 
                 parameters.startup_properties = startupProperties.join("&amp;");

Modified: incubator/pivot/trunk/demos/xsl/demo.jnlp.xsl
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/xsl/demo.jnlp.xsl?rev=885580&r1=885579&r2=885580&view=diff
==============================================================================
--- incubator/pivot/trunk/demos/xsl/demo.jnlp.xsl (original)
+++ incubator/pivot/trunk/demos/xsl/demo.jnlp.xsl Mon Nov 30 20:43:18 2009
@@ -19,6 +19,7 @@
 <!-- Translates a demo XML document into a JNLP demo file -->
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
     <xsl:param name="release"/>
+    <xsl:param name="root"/>
 
     <!--
     Output method. NOTE This must be "text" because JSP tags are not valid XML, so setting the
@@ -29,6 +30,11 @@
 
     <xsl:variable name="project" select="document('project.xml')/project"/>
 
+    <!-- <root> gets resolved to the 'root' XSL parameter -->
+    <xsl:template match="root">
+        <xsl:value-of select="$root"/>
+    </xsl:template>
+
     <xsl:template match="application">
         &lt;?xml version="1.0" encoding="UTF-8" ?&gt;
 
@@ -92,7 +98,7 @@
                 &lt;argument&gt;--height=<xsl:value-of select="@height"/>&lt;/argument&gt;
                 &lt;argument&gt;--center=true&lt;/argument&gt;
                 <xsl:for-each select="startup-properties/*">
-                &lt;argument&gt;--<xsl:value-of select="name(.)"/>=<xsl:value-of select="."/>&lt;/argument&gt;
+                &lt;argument&gt;--<xsl:value-of select="name(.)"/>=<xsl:apply-templates/>&lt;/argument&gt;
                 </xsl:for-each>
             &lt;/application-desc&gt;