You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by gb...@apache.org on 2010/10/28 21:23:37 UTC
svn commit: r1028441 - /pivot/site/trunk/xsl/html.xsl
Author: gbrown
Date: Thu Oct 28 19:23:37 2010
New Revision: 1028441
URL: http://svn.apache.org/viewvc?rev=1028441&view=rev
Log:
Add support for system_properties and custom java_arguments to tutorial XSLT.
Modified:
pivot/site/trunk/xsl/html.xsl
Modified: pivot/site/trunk/xsl/html.xsl
URL: http://svn.apache.org/viewvc/pivot/site/trunk/xsl/html.xsl?rev=1028441&r1=1028440&r2=1028441&view=diff
==============================================================================
--- pivot/site/trunk/xsl/html.xsl (original)
+++ pivot/site/trunk/xsl/html.xsl Thu Oct 28 19:23:37 2010
@@ -240,10 +240,21 @@ limitations under the License.
<!-- Base parameters -->
var parameters = {
codebase_lookup:false,
- java_arguments:"-Dsun.awt.noerasebackground=true -Dsun.awt.erasebackgroundonresize=true",
- application_class_name:"<xsl:value-of select="@class"/>"
+ application_class_name:'<xsl:value-of select="@class"/>'
};
+ <!-- Java arguments -->
+ var javaArguments = ["-Dsun.awt.noerasebackground=true",
+ "-Dsun.awt.erasebackgroundonresize=true"];
+
+ <xsl:if test="java-arguments">
+ <xsl:for-each select="java-arguments/*">
+ javaArguments.push("-D<xsl:value-of select="name(.)"/>=<xsl:apply-templates/>");
+ </xsl:for-each>
+ </xsl:if>
+
+ parameters.java_arguments = javaArguments.join(" ");
+
<!-- Startup properties -->
<xsl:if test="startup-properties">
var startupProperties = [];
@@ -253,6 +264,15 @@ limitations under the License.
parameters.startup_properties = startupProperties.join("&");
</xsl:if>
+ <!-- System properties -->
+ <xsl:if test="system-properties">
+ var systemProperties = [];
+ <xsl:for-each select="system-properties/*">
+ systemProperties.push("<xsl:value-of select="name(.)"/>=<xsl:apply-templates/>");
+ </xsl:for-each>
+ parameters.system_properties = systemProperties.join("&");
+ </xsl:if>
+
deployJava.runApplet(attributes, parameters, "1.6");
</script>
</xsl:template>