You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by th...@apache.org on 2006/02/28 22:18:10 UTC
svn commit: r381785 -
/forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/helper-prototype-ajax.ft
Author: thorsten
Date: Tue Feb 28 13:18:08 2006
New Revision: 381785
URL: http://svn.apache.org/viewcvs?rev=381785&view=rev
Log:
Refactoring contract to the new dispatcher grammar FOR-797
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/helper-prototype-ajax.ft
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/helper-prototype-ajax.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/helper-prototype-ajax.ft?rev=381785&r1=381784&r2=381785&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/helper-prototype-ajax.ft (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/helper-prototype-ajax.ft Tue Feb 28 13:18:08 2006
@@ -18,7 +18,7 @@
<forrest:contract
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
xmlns:forrest="http://apache.org/forrest/templates/1.0"
- name="helper-prototype-ajax" type="nugget">
+ name="helper-prototype-ajax">
<description>
<p>
@@ -30,11 +30,19 @@
</description>
<usage><![CDATA[<forrest:contract name="helper-prototype-ajax"/>]]></usage>
<forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
- format="html" name="helper-prototype-ajax" inputFormat="xsl" body="false" head="true">
+ name="helper-prototype-ajax" inputFormat="xsl">
<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template name="helper-prototype-ajax-head">
- <script type="text/javascript" src="{$root}themes/prototype.js"> </script>
+ <xsl:template match="/">
+ <xsl:param name="defaultVariables" select="'test.html'"/>
+ <xsl:variable name="root"
+ select="$defaultVariables/*/*[@name='root']/@value"/>
+ <forrest:content>
+ <forrest:part>
+ <script type="text/javascript" src="{$root}themes/prototype.js">
+  </script>
+ </forrest:part>
+ </forrest:content>
</xsl:template>
</xsl:stylesheet>
</forrest:template>