You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by bb...@apache.org on 2007/09/12 12:51:35 UTC
svn commit: r574927 -
/incubator/xap/site/docs/xmodify/content/statements/prototype/
Author: bbuffone
Date: Wed Sep 12 05:51:34 2007
New Revision: 574927
URL: http://svn.apache.org/viewvc?rev=574927&view=rev
Log:
added xModify processors for the prototype and mootools
Added:
incubator/xap/site/docs/xmodify/content/statements/prototype/
incubator/xap/site/docs/xmodify/content/statements/prototype/appendText.xml
incubator/xap/site/docs/xmodify/content/statements/prototype/changeInputStyle.xml
incubator/xap/site/docs/xmodify/content/statements/prototype/changeInputValues.xml
incubator/xap/site/docs/xmodify/content/statements/prototype/clearTable.xml
incubator/xap/site/docs/xmodify/content/statements/prototype/cloneDiv.xml
incubator/xap/site/docs/xmodify/content/statements/prototype/disableInputs.xml
incubator/xap/site/docs/xmodify/content/statements/prototype/fillTable.xml
incubator/xap/site/docs/xmodify/content/statements/prototype/insertAfter.xml
incubator/xap/site/docs/xmodify/content/statements/prototype/insertBefore.xml
incubator/xap/site/docs/xmodify/content/statements/prototype/insertDivs.xml
incubator/xap/site/docs/xmodify/content/statements/prototype/removeAllInputFields.xml
incubator/xap/site/docs/xmodify/content/statements/prototype/replaceDivs.xml
incubator/xap/site/docs/xmodify/content/statements/prototype/replaceTable.xml
Added: incubator/xap/site/docs/xmodify/content/statements/prototype/appendText.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/content/statements/prototype/appendText.xml?rev=574927&view=auto
==============================================================================
--- incubator/xap/site/docs/xmodify/content/statements/prototype/appendText.xml (added)
+++ incubator/xap/site/docs/xmodify/content/statements/prototype/appendText.xml Wed Sep 12 05:51:34 2007
@@ -0,0 +1,35 @@
+<xal xmlns:xm="http://openxal.org/core/xmodify">
+ <!--
+ Adde the data back into the table
+ -->
+ <xm:modifications document="html">
+ <xm:insert-before select="DIV[id='myDivyDiv']"><![CDATA[
+ <tr type="data">
+ <td>10</td>
+ <td>Robert</td>
+ <td>bbuffone@acme.com</td>
+ <td>555 Boston Road Boston, MA</td>
+ <td>555-555-5555</td>
+ <td>20</td>
+ </tr>
+ <tr type="data">
+ <td>19</td>
+ <td>Robert</td>
+ <td>bbuffone@acme.com</td>
+ <td>555 Boston Road Boston, MA</td>
+ <td>555-555-5555</td>
+ <td>20</td>
+ </tr>
+ <tr type="data">
+ <td>18</td>
+ <td>Robert</td>
+ <td>bbuffone@acme.com</td>
+ <td>555 Boston Road Boston, MA</td>
+ <td>555-555-5555</td>
+ <td>20</td>
+ </tr>
+ ]]>
+ </xm:insert-before>
+ </xm:modifications>
+
+</xal>
Added: incubator/xap/site/docs/xmodify/content/statements/prototype/changeInputStyle.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/content/statements/prototype/changeInputStyle.xml?rev=574927&view=auto
==============================================================================
--- incubator/xap/site/docs/xmodify/content/statements/prototype/changeInputStyle.xml (added)
+++ incubator/xap/site/docs/xmodify/content/statements/prototype/changeInputStyle.xml Wed Sep 12 05:51:34 2007
@@ -0,0 +1,12 @@
+<xal xmlns:xm="http://openxal.org/core/xmodify">
+ <!--
+ Macro will change the text of all input fields in the browser to Yeppie!
+ -->
+ <xm:modifications document="html">
+ <xm:set-style select="INPUT[type='text']">
+ <xm:style name="color" value="red"/>
+ <xm:style name="font-weight" value="bold"/>
+ <xm:style name="width" value="100px"/>
+ </xm:set-style>
+ </xm:modifications>
+</xal>
Added: incubator/xap/site/docs/xmodify/content/statements/prototype/changeInputValues.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/content/statements/prototype/changeInputValues.xml?rev=574927&view=auto
==============================================================================
--- incubator/xap/site/docs/xmodify/content/statements/prototype/changeInputValues.xml (added)
+++ incubator/xap/site/docs/xmodify/content/statements/prototype/changeInputValues.xml Wed Sep 12 05:51:34 2007
@@ -0,0 +1,10 @@
+<xal xmlns:xm="http://openxal.org/core/xmodify">
+ <!--
+ Macro will change the text of all input fields in the browser to Yeppie!
+ -->
+ <xm:modifications document="html">
+ <xm:set-attribute select="INPUT[type='text']">
+ <xm:attribute name="value" value="Yeppie!"/>
+ </xm:set-attribute>
+ </xm:modifications>
+</xal>
Added: incubator/xap/site/docs/xmodify/content/statements/prototype/clearTable.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/content/statements/prototype/clearTable.xml?rev=574927&view=auto
==============================================================================
--- incubator/xap/site/docs/xmodify/content/statements/prototype/clearTable.xml (added)
+++ incubator/xap/site/docs/xmodify/content/statements/prototype/clearTable.xml Wed Sep 12 05:51:34 2007
@@ -0,0 +1,8 @@
+<xal xmlns:xm="http://openxal.org/core/xmodify">
+ <!--
+ REMOVE all the data rows from the table
+ -->
+ <xm:modifications document="html">
+ <xm:remove-element select="TR[type='data']"/>
+ </xm:modifications>
+</xal>
Added: incubator/xap/site/docs/xmodify/content/statements/prototype/cloneDiv.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/content/statements/prototype/cloneDiv.xml?rev=574927&view=auto
==============================================================================
--- incubator/xap/site/docs/xmodify/content/statements/prototype/cloneDiv.xml (added)
+++ incubator/xap/site/docs/xmodify/content/statements/prototype/cloneDiv.xml Wed Sep 12 05:51:34 2007
@@ -0,0 +1,15 @@
+<xal xmlns:xm="http://openxal.org/core/xmodify">
+ <!--
+ Clone the div and append it to the cell
+ -->
+ <xm:modifications document="html">
+ <xm:append select="#insertDivCell">
+ <xm:clone select="DIV[id='cloneMe']" deep="true"/>
+ </xm:append>
+ <xm:append select="#insertDivCell"><![CDATA[
+ <div style="width:100%;background-color:#ff0000">
+ <span style="font-size:20px">Node created via XML Elements</span>
+ </div>]]>
+ </xm:append>
+ </xm:modifications>
+</xal>
Added: incubator/xap/site/docs/xmodify/content/statements/prototype/disableInputs.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/content/statements/prototype/disableInputs.xml?rev=574927&view=auto
==============================================================================
--- incubator/xap/site/docs/xmodify/content/statements/prototype/disableInputs.xml (added)
+++ incubator/xap/site/docs/xmodify/content/statements/prototype/disableInputs.xml Wed Sep 12 05:51:34 2007
@@ -0,0 +1,10 @@
+<xal xmlns:xm="http://openxal.org/core/xmodify">
+ <!--
+ Macro will change the text of all input fields in the browser to Yeppie!
+ -->
+ <xm:modifications document="html">
+ <xm:set-style select="INPUT[@type='text']">
+ <xm:style name="disabled" value="true"/>
+ </xm:set-style>
+ </xm:modifications>
+</xal>
Added: incubator/xap/site/docs/xmodify/content/statements/prototype/fillTable.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/content/statements/prototype/fillTable.xml?rev=574927&view=auto
==============================================================================
--- incubator/xap/site/docs/xmodify/content/statements/prototype/fillTable.xml (added)
+++ incubator/xap/site/docs/xmodify/content/statements/prototype/fillTable.xml Wed Sep 12 05:51:34 2007
@@ -0,0 +1,29 @@
+<xal xmlns:xm="http://openxal.org/core/xmodify">
+ <!--
+ Adde the data back into the table
+ -->
+ <xm:modifications document="html">
+ <xm:append select="TABLE[id='myTable']"><![CDATA[
+ <tr type="data">
+ <td>10</td>
+ <td>Robert</td>
+ <td>bbuffone@acme.com</td>
+ <td>555-555-5555</td>
+ </tr>
+ <tr type="data">
+ <td>19</td>
+ <td>Robert</td>
+ <td>bbuffone@acme.com</td>
+ <td>555-555-5555</td>
+ </tr>
+ <tr type="data">
+ <td>18</td>
+ <td>Robert</td>
+ <td>bbuffone@acme.com</td>
+ <td>555-555-5555</td>
+ </tr>
+ ]]>
+ </xm:append>
+ </xm:modifications>
+
+</xal>
Added: incubator/xap/site/docs/xmodify/content/statements/prototype/insertAfter.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/content/statements/prototype/insertAfter.xml?rev=574927&view=auto
==============================================================================
--- incubator/xap/site/docs/xmodify/content/statements/prototype/insertAfter.xml (added)
+++ incubator/xap/site/docs/xmodify/content/statements/prototype/insertAfter.xml Wed Sep 12 05:51:34 2007
@@ -0,0 +1,14 @@
+<xal xmlns:xm="http://openxal.org/core/xmodify">
+ <!--
+ Add a row after the insertRow element
+ -->
+ <xm:modifications document="html">
+ <xm:insert-after select="TR[type='insertRow']"><![CDATA[
+ <tr type="data">
+ <td colspan="6">This row was inserted using the insert after modification statement</td>
+ </tr>
+ ]]>
+ </xm:insert-after>
+ </xm:modifications>
+
+</xal>
\ No newline at end of file
Added: incubator/xap/site/docs/xmodify/content/statements/prototype/insertBefore.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/content/statements/prototype/insertBefore.xml?rev=574927&view=auto
==============================================================================
--- incubator/xap/site/docs/xmodify/content/statements/prototype/insertBefore.xml (added)
+++ incubator/xap/site/docs/xmodify/content/statements/prototype/insertBefore.xml Wed Sep 12 05:51:34 2007
@@ -0,0 +1,14 @@
+<xal xmlns:xm="http://openxal.org/core/xmodify">
+ <!--
+ Add a row before the insertRow element
+ -->
+ <xm:modifications document="html">
+ <xm:insert-before select="TR[type='insertRow']"><![CDATA[
+ <tr type="data">
+ <td colspan="6">This row was inserted using the insert before modification statement</td>
+ </tr>
+ ]]>
+ </xm:insert-before>
+ </xm:modifications>
+
+</xal>
Added: incubator/xap/site/docs/xmodify/content/statements/prototype/insertDivs.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/content/statements/prototype/insertDivs.xml?rev=574927&view=auto
==============================================================================
--- incubator/xap/site/docs/xmodify/content/statements/prototype/insertDivs.xml (added)
+++ incubator/xap/site/docs/xmodify/content/statements/prototype/insertDivs.xml Wed Sep 12 05:51:34 2007
@@ -0,0 +1,40 @@
+<xal xmlns:xm="http://openxal.org/core/xmodify">
+ <!--
+ Test replacing elements
+ -->
+ <xm:modifications document="html">
+ <xm:variable name="test" select="#mouseOverAreaFirst" deep="true"/>
+ <xm:remove-element select="#mouseOverAreaFirst"/>
+ <xm:remove-element select="#mouseOverAreaMiddle"/>
+ <xm:remove-element select="#mouseOverAreaLast"/>
+ <xm:insert-at select="#insertDivCell" index="3">
+ <![CDATA[
+ <div style="width:100%;background-color:#ff0000">
+
+ The middle field was inserted at 3
+
+ </div>
+ ]]>
+ </xm:insert-at>
+ <xm:insert-at select="#insertDivCell" index="0">
+ <![CDATA[
+ <div style="width:100%;background-color:#ff0000" id="mouseOverArea" onclick="alert('Hea someone clicked me');">
+
+ The first field was inserted at 0
+
+ </div>
+ ]]>
+ </xm:insert-at>
+ <xm:insert-at select="#insertDivCell" index="10">
+ <![CDATA[
+ <div style="width:100%;background-color:#ff0000">
+
+ The last field was inserted at 10
+
+ </div>
+ ]]>
+ <xm:value-of name="test"/>
+ </xm:insert-at>
+ </xm:modifications>
+
+</xal>
Added: incubator/xap/site/docs/xmodify/content/statements/prototype/removeAllInputFields.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/content/statements/prototype/removeAllInputFields.xml?rev=574927&view=auto
==============================================================================
--- incubator/xap/site/docs/xmodify/content/statements/prototype/removeAllInputFields.xml (added)
+++ incubator/xap/site/docs/xmodify/content/statements/prototype/removeAllInputFields.xml Wed Sep 12 05:51:34 2007
@@ -0,0 +1,9 @@
+<xal xmlns:xm="http://openxal.org/core/xmodify">
+ <!--
+ Macro will remove all the input text and password fields.
+ -->
+ <xm:modifications document="html">
+ <xm:remove-element select="INPUT[type='text']"/>
+ <xm:remove-element select="INPUT[type='password']"/>
+ </xm:modifications>
+</xal>
Added: incubator/xap/site/docs/xmodify/content/statements/prototype/replaceDivs.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/content/statements/prototype/replaceDivs.xml?rev=574927&view=auto
==============================================================================
--- incubator/xap/site/docs/xmodify/content/statements/prototype/replaceDivs.xml (added)
+++ incubator/xap/site/docs/xmodify/content/statements/prototype/replaceDivs.xml Wed Sep 12 05:51:34 2007
@@ -0,0 +1,43 @@
+<xal xmlns:xm="http://openxal.org/core/xmodify">
+ <!--
+ Test replacing elements
+ -->
+ <xm:modifications document="html">
+ <xm:replace select="#mouseOverAreaFirst">
+ <![CDATA[
+ <div style="width:100%;background-color:#ff0000" onclick="alert('Hea someone clicked me');">
+
+ The first field was replaced
+
+ </div>
+ ]]>
+ </xm:replace>
+ <xm:replace select="#mouseOverAreaMiddle">
+ <![CDATA[
+ <div style="width:100%;background-color:#ff0000">
+
+ The middle field was replaced
+
+ </div>
+ ]]>
+ </xm:replace>
+ <xm:replace select="#mouseOverAreaLast">
+ <![CDATA[
+ <div style="width:100%;background-color:#ff0000">
+
+ The last field was replaced
+
+ </div>
+ ]]>
+ </xm:replace>
+ <xm:set-innerhtml select="#cloneMe">
+ <![CDATA[
+ <div style="width:100%;background-color:#ff0000">
+
+ This item was replaced with set-innerhtml
+
+ </div>
+ ]]>
+ </xm:set-innerhtml>
+ </xm:modifications>
+</xal>
Added: incubator/xap/site/docs/xmodify/content/statements/prototype/replaceTable.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/content/statements/prototype/replaceTable.xml?rev=574927&view=auto
==============================================================================
--- incubator/xap/site/docs/xmodify/content/statements/prototype/replaceTable.xml (added)
+++ incubator/xap/site/docs/xmodify/content/statements/prototype/replaceTable.xml Wed Sep 12 05:51:34 2007
@@ -0,0 +1,32 @@
+<xal xmlns:xm="http://openxal.org/core/xmodify">
+ <!--
+ Adde the data back into the table
+ -->
+ <xm:modifications document="html">
+ <xm:replace-children select="#myTable"><![CDATA[
+ <tr type="data">
+ <td>10</td>
+ <td>Robert</td>
+ <td>bbuffone@acme.com</td>
+ <td>555-555-5555</td>
+ </tr>
+ <tr type="data">
+ <td>19</td>
+ <td>Robert</td>
+ <td>bbuffone@acme.com</td>
+ <td>555-555-5555</td>
+ </tr>
+ <tr type="data">
+ <td>18</td>
+ <td>Robert</td>
+ <td>bbuffone@acme.com</td>
+ <td>555-555-5555</td>
+ </tr>
+ ]]>
+ </xm:replace-children>
+ <xm:set-style select="TABLE[@id='myTable']">
+ <xm:style name="height" value="60px"/>
+ </xm:set-style>
+ </xm:modifications>
+
+</xal>