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/06/25 03:05:26 UTC

svn commit: r550329 [4/13] - in /incubator/xap/site: docs/ docs/xmodify/ docs/xmodify/content/ docs/xmodify/css/ docs/xmodify/doc/ docs/xmodify/doc/complexTypes/ docs/xmodify/doc/complexTypes/html/ docs/xmodify/doc/complexTypes/xml/ docs/xmodify/doc/ov...

Added: incubator/xap/site/docs/xmodify/doc/complexTypes/xml/clone-element-type.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/doc/complexTypes/xml/clone-element-type.xml?view=auto&rev=550329
==============================================================================
--- incubator/xap/site/docs/xmodify/doc/complexTypes/xml/clone-element-type.xml (added)
+++ incubator/xap/site/docs/xmodify/doc/complexTypes/xml/clone-element-type.xml Sun Jun 24 20:05:18 2007
@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<complexType targetNamespace="http://openxal.org/core/xmodify"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:event="http://www.w3.org/2001/XMLSchema"
+    xmlns:meta="http://www.w3.org/2001/XMLSchema" name="clone-element-type">
+    <xsd:annotation>
+        <xsd:documentation xml:lang="en"><![CDATA[
+<br>The clone command clones each of the results returned by the XPath query and
+returns the set of cloned elements.  Here is a sample clone command: <br><br>
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" document="mydocument"&gt;
+        &lt;xm:clone select="/ui/rootPane/freePane[1]/button[1]"/&gt;
+    &lt;/xm:modifications&gt;
+</pre>
+The above command will clone the first child button of the first child freePane of the
+rootPane element in the document "mydocument". 
+The clone command is not useful as a top level command since the result will just
+be discarded.  It should be used as an argument to other commands that take arguments.
+<h4>Here is a XAL example:</h4><br>
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" document="mydocument"&gt;
+        &lt;xm:append select="/ui/rootPane"&gt;
+            &lt;xm:clone select="/ui/rootPane/freePane[1]"/&gt;
+        &lt;/xm:append&gt;
+    &lt;/xm:modifications&gt;
+</pre>
+The above command will clone the first child freePane of the rootPane element
+in document "mydocument" and then append it to the same rootPane element.<br><br>
+
+<b>Important:</b> if the XPath of the enclosing command (in the above example it's the append)
+returns more than 1 result, you have to make sure that the cloned element
+(freePane[1]) does not have any developer specified id attributes (since they are always copied
+into the clone).  Otherwise there will be id conflicts and the command will fail
+when trying to append to the second result returned by the XPath query.<br><br>
+
+The XPath query must return the following set: ( Element )*. 
+If any of the results of the XPath query is not an Element, an UpdateException is thrown
+and the execution of the &lt;xm:modifications/&gt; block is halted.<br><br>
+
+<h4>HTML Example:</h4>
+<br><br>
+<script language="JavaScript" type="text/javascript" src="../../../../../javascript/jquery/jquery-latest.js"></script>
+<script language="JavaScript" type="text/javascript" src="../../../../../javascript/xmodify/xmodify-jquery.js"></script>
+
+Change the value of the input field and click the clone button. 
+<br><br>
+
+<div style="border:1px solid #aaa;margin:10px;padding:10px;" id="replace-contents">
+    <div><b>Please login!</b></div><br>
+    <div><input id="username" type="text" value="janesmith"></div><br>
+    <div id="inputContainer">
+    </div>
+    <input style="width:150px" type="button" value="Clone the Input" onclick="$.xmodify({url:'../../../operations/clone.xml'});"/>
+</div>
+<br>
+<p><b>clone.xml</b></p>
+<p>This file uses the clone xModify instruction create a copy of the input field. 
+</p>
+<pre>
+&lt;xal xmlns:xm="http://openxal.org/core/xmodify"&gt;
+    &lt;xm:modifications document="html"&gt;
+        &lt;xm:append select="#inputContainer"&gt;
+            &lt;xm:clone select="#username"/&gt;
+        &lt;/xm:append&gt;
+    &lt;/xm:modifications&gt;
+&lt;/xal&gt;
+</pre>
+
+]]></xsd:documentation>
+    </xsd:annotation>
+    <xsd:extension base="base-directive-element-type" ref="base-directive-element-type.xml">
+        <attributes>
+            <attribute name="deep" type="boolean">
+                <xsd:document lang="en">
+Specifies whether to perform a deep or shallow clone.  If deep=true, the element
+and all of its children are cloned. If deep=false, only the top element is cloned
+but none of its children.		         
+</xsd:document>
+                <xsd:briefDocument lang="en">
+Specifies whether to perform a deep or shallow clone.</xsd:briefDocument>
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en"><![CDATA[
+Specifies whether to perform a deep or shallow clone.  If deep=true, the element
+and all of its children are cloned. If deep=false, only the top element is cloned
+but none of its children.		         
+]]></xsd:documentation>
+                    <xsd:appinfo>
+                        <meta:property category="Basic" display-name="Deep"/>
+                    </xsd:appinfo>
+                </xsd:annotation>
+            </attribute>
+            <attribute name="select" type="select-attribute-type" ref="select-attribute-type.xml">
+                <xsd:document lang="en">
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on. &lt;p&gt;
+Shown below is a valid xModify command set containing just 1 command: remove-element.&lt;br&gt;&lt;br&gt;
+           
+&lt;pre&gt;
+    &amp;lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="mydocument"&amp;gt;
+        &amp;lt;xm:remove-element select="/ui/rootPane/freePane[1]/button"/&amp;gt;
+    &amp;lt;/xm:modifications&amp;gt;
+&lt;/pre&gt;             
+&lt;br&gt;
+The 'select' attribute of this command contains the following XPath query:
+"/ui/rootPane/freePane[1]/button". This query selects all buttons in the document "mydocument" 
+that are children of the first child freePane of the rootPane element.  All of these buttons
+are then removed from the document by the remove-element command.
+
+&lt;br&gt;&lt;br&gt;
+When selecting elements in the HTML document be sure to capitalize the element names.  This is
+a result of the way the are store in the browser.  The following example will append a row to the table
+with an id of &amp;quot;myTable&amp;quot;.  Notice on the XPath statement also contains the TBODY which is 
+standard on all tables.
+&lt;br&gt;
+&lt;pre&gt;
+    &amp;lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="html"&amp;gt;
+        &amp;lt;xm:append select="TABLE[@id='myTable']/TBODY"&amp;gt;
+            &amp;lt;![CDATA[ &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;New Person&amp;lt/td&amp;gt;&amp;lt;/tr&amp;gt;
+            ]]&amp;gt;
+        &amp;lt;/xm:append&amp;gt;&lt;br&gt;
+    &amp;lt;/xm:modifications&amp;gt;&lt;br&gt;
+&lt;/pre&gt;  
+ 
+</xsd:document>
+                <xsd:briefDocument lang="en">
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on.</xsd:briefDocument>
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en"><![CDATA[
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on. <p>
+Shown below is a valid xModify command set containing just 1 command: remove-element.<br><br>
+           
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="mydocument"&gt;
+        &lt;xm:remove-element select="/ui/rootPane/freePane[1]/button"/&gt;
+    &lt;/xm:modifications&gt;
+</pre>             
+<br>
+The 'select' attribute of this command contains the following XPath query:
+"/ui/rootPane/freePane[1]/button". This query selects all buttons in the document "mydocument" 
+that are children of the first child freePane of the rootPane element.  All of these buttons
+are then removed from the document by the remove-element command.
+
+<br><br>
+When selecting elements in the HTML document be sure to capitalize the element names.  This is
+a result of the way the are store in the browser.  The following example will append a row to the table
+with an id of &quot;myTable&quot;.  Notice on the XPath statement also contains the TBODY which is 
+standard on all tables.
+<br>
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="html"&gt;
+        &lt;xm:append select="TABLE[@id='myTable']/TBODY"&gt;
+            &lt;![CDATA[ &lt;tr&gt;&lt;td&gt;New Person&lt/td&gt;&lt;/tr&gt;
+            ]]&gt;
+        &lt;/xm:append&gt;<br>
+    &lt;/xm:modifications&gt;<br>
+</pre>  
+ 
+]]></xsd:documentation>
+                    <xsd:appinfo>
+                        <meta:property category="Basic" display-name="Select"/>
+                    </xsd:appinfo>
+                </xsd:annotation>
+            </attribute>
+        </attributes>
+    </xsd:extension>
+</complexType>

Added: incubator/xap/site/docs/xmodify/doc/complexTypes/xml/create-document-element-type.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/doc/complexTypes/xml/create-document-element-type.xml?view=auto&rev=550329
==============================================================================
--- incubator/xap/site/docs/xmodify/doc/complexTypes/xml/create-document-element-type.xml (added)
+++ incubator/xap/site/docs/xmodify/doc/complexTypes/xml/create-document-element-type.xml Sun Jun 24 20:05:18 2007
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<complexType targetNamespace="http://openxal.org/core/xmodify"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:event="http://www.w3.org/2001/XMLSchema"
+    xmlns:meta="http://www.w3.org/2001/XMLSchema" name="create-document-element-type">
+    <xsd:annotation>
+        <xsd:documentation xml:lang="en"><![CDATA[
+The create-document command allows you to create documents and have them registered
+with the DocumentRegistry on the client side.  This element supports no attributes and
+must be the first element under the &lt;xm:modifications&gt; element.  
+
+<br><br>
+
+The create-document command supports a single child, however this child may have as many
+descendants as you like.
+
+<br><br>
+
+A sample create-document command element (using a deferred data retrieval) looks like: <br><br>
+
+&lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" document="myNewDocument"&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&lt;xm:create-document&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;xi:include xmlns:xi="http://openxal.org/core/xinclude" href="/myFile.xml"/&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&lt;/xm:create-document&gt;<br>
+&lt;/xm:modifications&gt;<br><br>
+
+Another sample create-document command element with inline content looks like: <br><br>
+
+&lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" document="EmotionalStatesDocument"&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&lt;xm:create-document&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;emotional-states&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;happy/&gt;<br>
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;sad/&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/emotional-states&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&lt;/xm:create-document&gt;<br>
+&lt;/xm:modifications&gt;<br><br>
+
+If the above samples were executed, the documents would be registered with the client
+side DocumentRegistry as locally available documents.
+
+]]></xsd:documentation>
+    </xsd:annotation>
+    <xsd:extension base="one-element-child-directive-element-type" ref="one-element-child-directive-element-type.xml">
+        <xsd:sequence maxOccurs="1" minOccurs="1">
+            <xsd:any minOccurs="1" maxOccurs="1"/>
+        </xsd:sequence>
+    </xsd:extension>
+</complexType>

Added: incubator/xap/site/docs/xmodify/doc/complexTypes/xml/embed-xal-element-type.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/doc/complexTypes/xml/embed-xal-element-type.xml?view=auto&rev=550329
==============================================================================
--- incubator/xap/site/docs/xmodify/doc/complexTypes/xml/embed-xal-element-type.xml (added)
+++ incubator/xap/site/docs/xmodify/doc/complexTypes/xml/embed-xal-element-type.xml Sun Jun 24 20:05:18 2007
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<complexType targetNamespace="http://openxal.org/core/xmodify"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:event="http://www.w3.org/2001/XMLSchema"
+    xmlns:meta="http://www.w3.org/2001/XMLSchema" name="embed-xal-element-type">
+    <xsd:annotation>
+        <xsd:documentation xml:lang="en"><![CDATA[
+Use the embed-xal operation to change the elements selected via the
+"select" attribute into a XAL host.  This operations is typically used
+When developers are using HTML as the layout mechanism for their application 
+and want to place the XAL widgets with in a specific locations.  The other reason
+to use embed XAL is that you are trying to enhance the an existing site with XAL widgets.
+<br><br>
+For Example:
+<br><br>
+You want to layout an application as follows:<br><br>
+
+<p align="center">
+<img src="../../../images/embed-xal.gif">
+</p>
+<br>   
+
+<b>HTML File</b><br>
+<pre>
+&lt;html&gt;&lt;body&gt;
+    &lt;table&gt;
+           &lt;tr&gt;
+               &lt;td rowspan="2"&gt;
+                   &lt;div id="treeView"&gt;&lt;/div&gt;
+               &lt;/td&gt;
+               &lt;td&gt;
+                   &lt;div id="detailsView"&gt;&lt;/div&gt;
+               &lt;/td&gt;
+           &lt;/tr&gt;
+           &lt;tr&gt;
+               &lt;td&gt;
+                   &lt;div id="tableView"&gt;&lt;/div&gt;
+               &lt;/td&gt;
+           &lt;/tr&gt;
+    &lt;/table&gt;
+&lt;/body&gt;&lt;/html&gt;    
+</pre>
+
+<b>xModify File</b><br>
+<pre>
+   &lt;xal xmlns:xm="http://openxal.org/core/xmodify"&gt;
+    &lt;xm:modifications document="html"&gt;
+        &lt;xm:embed-xal select="id('treeView')"&gt;
+            &lt;tree&gt;
+                &lt;row&gt;
+                    &lt;cell text="US"/&gt;
+                    &lt;row&gt;
+                        &lt;cell text="Marketing"/&gt;
+                    &lt;/row&gt;
+                &lt;/row&gt;
+                &lt;row&gt;
+                    &lt;cell text="UK"/&gt;
+                    &lt;row&gt;
+                        &lt;cell text="Marketing"/&gt;
+                    &lt;/row&gt;
+                &lt;/row&gt;
+                &lt;row&gt;
+                    &lt;cell text="FR"/&gt;
+                    &lt;row&gt;
+                        &lt;cell text="Marketing"/&gt;
+                    &lt;/row&gt;
+                &lt;/row&gt;
+                &lt;row&gt;
+                    &lt;cell text="JP"/&gt;
+                    &lt;row&gt;
+                        &lt;cell text="Marketing"/&gt;
+                    &lt;/row&gt;
+                &lt;/row&gt;
+            &lt;/tree&gt;        
+        &lt;/xm:embed-xal&gt;
+        &lt;xm:embed-xal select="id('detailsView')"&gt;
+            &lt;verticalBoxPane&gt;
+                &lt;textField text="bob"/&gt;
+                &lt;button text="Change" onCommand="mco:myClientCode.onCommand()"/&gt;
+            &lt;/verticalBoxPane&gt;
+        &lt;/xm:embed-xal&gt;
+        &lt;xm:embed-xal select="id('tableView')"&gt;
+            &lt;table&gt;
+                &lt;column&gt;
+                    &lt;header text="Event ID"/&gt;
+                &lt;/column&gt;
+                &lt;column&gt;
+                    &lt;header text="Event Details"&gt;
+                &lt;/column&gt;
+                &lt;row&gt;
+                    &lt;cell text="1"/&gt;
+                    &lt;cell text="Denial of Service attack detected on 192.168.0.1"/&gt;
+                &lt;/row&gt;
+            &lt;/table&gt;
+        &lt;/xm:embed-xal&gt;
+    &lt;/xm:modifications&gt;
+&lt;/xal&gt;
+</pre>
+
+
+]]></xsd:documentation>
+    </xsd:annotation>
+    <xsd:extension base="base-directive-element-type" ref="base-directive-element-type.xml">
+        <attributes>
+            <attribute name="select" type="select-attribute-type" ref="select-attribute-type.xml">
+                <xsd:document lang="en">
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on. &lt;p&gt;
+Shown below is a valid xModify command set containing just 1 command: remove-element.&lt;br&gt;&lt;br&gt;
+           
+&lt;pre&gt;
+    &amp;lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="mydocument"&amp;gt;
+        &amp;lt;xm:remove-element select="/ui/rootPane/freePane[1]/button"/&amp;gt;
+    &amp;lt;/xm:modifications&amp;gt;
+&lt;/pre&gt;             
+&lt;br&gt;
+The 'select' attribute of this command contains the following XPath query:
+"/ui/rootPane/freePane[1]/button". This query selects all buttons in the document "mydocument" 
+that are children of the first child freePane of the rootPane element.  All of these buttons
+are then removed from the document by the remove-element command.
+
+&lt;br&gt;&lt;br&gt;
+When selecting elements in the HTML document be sure to capitalize the element names.  This is
+a result of the way the are store in the browser.  The following example will append a row to the table
+with an id of &amp;quot;myTable&amp;quot;.  Notice on the XPath statement also contains the TBODY which is 
+standard on all tables.
+&lt;br&gt;
+&lt;pre&gt;
+    &amp;lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="html"&amp;gt;
+        &amp;lt;xm:append select="TABLE[@id='myTable']/TBODY"&amp;gt;
+            &amp;lt;![CDATA[ &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;New Person&amp;lt/td&amp;gt;&amp;lt;/tr&amp;gt;
+            ]]&amp;gt;
+        &amp;lt;/xm:append&amp;gt;&lt;br&gt;
+    &amp;lt;/xm:modifications&amp;gt;&lt;br&gt;
+&lt;/pre&gt;  
+ 
+</xsd:document>
+                <xsd:briefDocument lang="en">
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on.</xsd:briefDocument>
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en"><![CDATA[
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on. <p>
+Shown below is a valid xModify command set containing just 1 command: remove-element.<br><br>
+           
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="mydocument"&gt;
+        &lt;xm:remove-element select="/ui/rootPane/freePane[1]/button"/&gt;
+    &lt;/xm:modifications&gt;
+</pre>             
+<br>
+The 'select' attribute of this command contains the following XPath query:
+"/ui/rootPane/freePane[1]/button". This query selects all buttons in the document "mydocument" 
+that are children of the first child freePane of the rootPane element.  All of these buttons
+are then removed from the document by the remove-element command.
+
+<br><br>
+When selecting elements in the HTML document be sure to capitalize the element names.  This is
+a result of the way the are store in the browser.  The following example will append a row to the table
+with an id of &quot;myTable&quot;.  Notice on the XPath statement also contains the TBODY which is 
+standard on all tables.
+<br>
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="html"&gt;
+        &lt;xm:append select="TABLE[@id='myTable']/TBODY"&gt;
+            &lt;![CDATA[ &lt;tr&gt;&lt;td&gt;New Person&lt/td&gt;&lt;/tr&gt;
+            ]]&gt;
+        &lt;/xm:append&gt;<br>
+    &lt;/xm:modifications&gt;<br>
+</pre>  
+ 
+]]></xsd:documentation>
+                    <xsd:appinfo>
+                        <meta:property category="Basic" display-name="Select"/>
+                    </xsd:appinfo>
+                </xsd:annotation>
+            </attribute>
+        </attributes>
+    </xsd:extension>
+</complexType>

Added: incubator/xap/site/docs/xmodify/doc/complexTypes/xml/insert-after-element-type.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/doc/complexTypes/xml/insert-after-element-type.xml?view=auto&rev=550329
==============================================================================
--- incubator/xap/site/docs/xmodify/doc/complexTypes/xml/insert-after-element-type.xml (added)
+++ incubator/xap/site/docs/xmodify/doc/complexTypes/xml/insert-after-element-type.xml Sun Jun 24 20:05:18 2007
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<complexType targetNamespace="http://openxal.org/core/xmodify"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:event="http://www.w3.org/2001/XMLSchema"
+    xmlns:meta="http://www.w3.org/2001/XMLSchema" name="insert-after-element-type">
+    <xsd:annotation>
+        <xsd:documentation xml:lang="en"><![CDATA[
+The insert-after command inserts its arguments (specified as children of 
+the command element) after each of the results returned by the XPath 
+query of the command. <br><br>
+
+The XPath query must select the following set: ( Element | Text )*. 
+If some result of the XPath query is not one of the two types, an UpdateException is thrown
+and the execution of the &lt;xm:modifications/&gt; block is halted.  An UpdateException
+will also be thrown if the XPath query selects the root Element of the document.<br><br>
+
+The following logic applies to the arguments of the insert-after command based 
+on the type of each argument:
+
+<ul>
+<li>value-of directive element: the value of the bound variable will get
+inserted (not the directive element itself)
+<li>clone directive element is executed and the cloned elements (which is the result of
+ executing the command) will get inserted.
+<li>any other xModify directive element will get inserted as is.
+<li>element in any other namespace will be inserted as is. If the XPath query
+    returns more than 1 result, the element is cloned before the insertion to prevent
+    id conflicts (the clone is deep).
+<li>string argument is inserted as is.
+</ul>
+<br>
+<h4>Here is a XAL example:</h4><br>
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" document="mydocument"&gt;
+        &lt;xm:insert-after select="id('somepanel')"&gt;
+            &lt;freePane id="mypanel"/&gt;
+        &lt;/xm:insert-after&gt;
+    &lt;/xm:modifications&gt;
+</pre>
+The above command will insert the new freePane (id="mypanel") after the 
+freePane whose id="somepanel". ("after" means the new freePane will appear after 
+the selected freePane in the list of children of the selected freePane's parent element).
+
+<h4>HTML Example:</h4><br>
+
+In the sample below pressing the "Add row to table" will create a new row in the table before the 
+the Jane Smith row.
+
+<script language="JavaScript" type="text/javascript" src="../../../../../javascript/jquery/jquery-latest.js"></script>
+<script language="JavaScript" type="text/javascript" src="../../../../../javascript/xmodify/xmodify-jquery.js"></script>
+
+<p>
+<table style="width:310px" id="mytable">
+    <tr style="background-color:#aaa"><th width="150px" align="left">Employee ID</th><th width="150px" align="left">Full Name</th></tr>
+    <tr id="insertAfterMe"><td>3456g</td><td>Jane Smith</td></tr>
+    <tr><td>9833o</td><td>Larry Doyle</td></tr>
+<table>
+<input style="width:150px" type="button" value="Add row to table" onclick="$.xmodify({url:'../../../operations/insert-after.xml'});"/>
+<input style="width:150px" type="button" value="Reset table" onclick="$.xmodify({url:'../../../operations/resettable2.xml'});"/>
+</p>
+<br>
+
+<p><b>insert-after.xml</b></p>
+<p>This file uses the insert-after xModify instruction to add a new row to the html table.
+The select attribute of the append tag denotes the location of the element that the contents
+be inserted before.  Typically you will use a &lt![CDATA[ ]]&gt; block to cut down on parse
+and traversal time.</p>
+<pre>&lt;xal xmlns:xm="http://openxal.org/core/xmodify"&gt;
+    &lt;xm:modifications document="html"&gt;
+        &lt;xm:insert-after select="#insertAfterMe"&gt;
+            &lt;![CDATA[
+            &lt;tr&gt;
+                &lt;td&gt;12390i&lt;/td&gt;
+                &lt;td&gt;Larry Franklin&lt;/td&gt;
+            &lt;/tr&gt;
+            ]]&gt;
+        &lt;/xm:insert-after&gt;
+
+    &lt;/xm:modifications&gt;
+&lt;/xal&gt;
+</pre>
+
+]]></xsd:documentation>
+    </xsd:annotation>
+    <xsd:extension base="any-child-directive-element-type" ref="any-child-directive-element-type.xml">
+        <xsd:sequence maxOccurs="1" minOccurs="1">
+            <xsd:any minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+        <attributes>
+            <attribute name="select" type="select-attribute-type" ref="select-attribute-type.xml">
+                <xsd:document lang="en">
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on. &lt;p&gt;
+Shown below is a valid xModify command set containing just 1 command: remove-element.&lt;br&gt;&lt;br&gt;
+           
+&lt;pre&gt;
+    &amp;lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="mydocument"&amp;gt;
+        &amp;lt;xm:remove-element select="/ui/rootPane/freePane[1]/button"/&amp;gt;
+    &amp;lt;/xm:modifications&amp;gt;
+&lt;/pre&gt;             
+&lt;br&gt;
+The 'select' attribute of this command contains the following XPath query:
+"/ui/rootPane/freePane[1]/button". This query selects all buttons in the document "mydocument" 
+that are children of the first child freePane of the rootPane element.  All of these buttons
+are then removed from the document by the remove-element command.
+
+&lt;br&gt;&lt;br&gt;
+When selecting elements in the HTML document be sure to capitalize the element names.  This is
+a result of the way the are store in the browser.  The following example will append a row to the table
+with an id of &amp;quot;myTable&amp;quot;.  Notice on the XPath statement also contains the TBODY which is 
+standard on all tables.
+&lt;br&gt;
+&lt;pre&gt;
+    &amp;lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="html"&amp;gt;
+        &amp;lt;xm:append select="TABLE[@id='myTable']/TBODY"&amp;gt;
+            &amp;lt;![CDATA[ &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;New Person&amp;lt/td&amp;gt;&amp;lt;/tr&amp;gt;
+            ]]&amp;gt;
+        &amp;lt;/xm:append&amp;gt;&lt;br&gt;
+    &amp;lt;/xm:modifications&amp;gt;&lt;br&gt;
+&lt;/pre&gt;  
+ 
+</xsd:document>
+                <xsd:briefDocument lang="en">
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on.</xsd:briefDocument>
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en"><![CDATA[
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on. <p>
+Shown below is a valid xModify command set containing just 1 command: remove-element.<br><br>
+           
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="mydocument"&gt;
+        &lt;xm:remove-element select="/ui/rootPane/freePane[1]/button"/&gt;
+    &lt;/xm:modifications&gt;
+</pre>             
+<br>
+The 'select' attribute of this command contains the following XPath query:
+"/ui/rootPane/freePane[1]/button". This query selects all buttons in the document "mydocument" 
+that are children of the first child freePane of the rootPane element.  All of these buttons
+are then removed from the document by the remove-element command.
+
+<br><br>
+When selecting elements in the HTML document be sure to capitalize the element names.  This is
+a result of the way the are store in the browser.  The following example will append a row to the table
+with an id of &quot;myTable&quot;.  Notice on the XPath statement also contains the TBODY which is 
+standard on all tables.
+<br>
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="html"&gt;
+        &lt;xm:append select="TABLE[@id='myTable']/TBODY"&gt;
+            &lt;![CDATA[ &lt;tr&gt;&lt;td&gt;New Person&lt/td&gt;&lt;/tr&gt;
+            ]]&gt;
+        &lt;/xm:append&gt;<br>
+    &lt;/xm:modifications&gt;<br>
+</pre>  
+ 
+]]></xsd:documentation>
+                    <xsd:appinfo>
+                        <meta:property category="Basic" display-name="Select"/>
+                    </xsd:appinfo>
+                </xsd:annotation>
+            </attribute>
+        </attributes>
+    </xsd:extension>
+</complexType>

Added: incubator/xap/site/docs/xmodify/doc/complexTypes/xml/insert-at-element-type.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/doc/complexTypes/xml/insert-at-element-type.xml?view=auto&rev=550329
==============================================================================
--- incubator/xap/site/docs/xmodify/doc/complexTypes/xml/insert-at-element-type.xml (added)
+++ incubator/xap/site/docs/xmodify/doc/complexTypes/xml/insert-at-element-type.xml Sun Jun 24 20:05:18 2007
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<complexType targetNamespace="http://openxal.org/core/xmodify"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:event="http://www.w3.org/2001/XMLSchema"
+    xmlns:meta="http://www.w3.org/2001/XMLSchema" name="insert-at-element-type">
+    <xsd:annotation>
+        <xsd:documentation xml:lang="en"><![CDATA[
+<br>The insert-at command inserts its arguments (specified as children of 
+the command element) at the specified index in the children list of each of 
+the results returned by the XPath query. To specify the index, the command element
+has an attribute 'index' whose value is an integer. The valid range for 
+the index attribute is:( 0 - children count of the Element returned by the XPath
+query) inclusive on both ends. If the index is outside of this range an 
+ArrayIndexOutOfBounds exception is thrown. If the value of the 'index' attribute 
+is not an integer an UpdateException is thrown (whose cause is a 
+NumberFormatException).<br><br>
+
+The XPath query must return the following set: ( Element | Document )*. 
+If any of the results of the XPath query is not an Element or a Document, 
+an UpdateException is thrown and the execution of the &lt;xm:modifications/&gt;
+block is halted.  Note that if the XPath query selects the Document object, 
+additional restrictions apply: the index has to be 0 and the directive element 
+must have only 1 child Element (which will be set as the root Element of the 
+selected Document). If these restrictions are violated, an UpdateException is
+thrown.
+<br><br>
+
+The following logic applies to the arguments of the insert-at command based 
+on the type of each argument:
+
+<ul>
+<li>value-of directive element is executed and the value of the bound variable will get
+inserted (not the directive element itself)
+<li>clone directive element is executed and the cloned elements (which is the result of
+ executing the command) will get inserted.
+<li>any other xModify directive element will get inserted as is.
+<li>element in any other namespace will be inserted as is. If the XPath query
+    returns more than 1 result, the element is cloned before the insertion to prevent
+    id conflicts (the clone is deep).
+<li>string argument is inserted as is.
+</ul>
+<br>
+
+<h4>Here is a XAL example:</h4><br>
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" document="mydocument"&gt;
+        &lt;xm:insert-at select="id('mywindow')" index="2"&gt;
+            &lt;freePane id="mypanel"/&gt;
+        &lt;/xm:insert-at&gt;
+    &lt;/xm:modifications&gt;
+</pre>
+The above command will insert the new freePane (id="mypanel") at index 2 in the list
+of children of the selected window element.
+
+
+<h4>HTML Example:</h4><br>
+
+In the sample below pressing the "Add row to table" will create a new row in the table before the 
+the Jane Smith row.
+
+<script language="JavaScript" type="text/javascript" src="../../../../../javascript/jquery/jquery-latest.js"></script>
+<script language="JavaScript" type="text/javascript" src="../../../../../javascript/xmodify/xmodify-jquery.js"></script>
+
+<p>
+<table style="width:310px" id="mytable">
+    <tr style="background-color:#aaa"><th width="150px" align="left">Employee ID</th><th width="150px" align="left">Full Name</th></tr>
+    <tr id="insertAfterMe"><td>3456g</td><td>Jane Smith</td></tr>
+    <tr><td>9833o</td><td>Larry Doyle</td></tr>
+<table>
+<input style="width:150px" type="button" value="Add row to table" onclick="$.xmodify({url:'../../../operations/insert-at.xml'});"/>
+<input style="width:150px" type="button" value="Reset table" onclick="$.xmodify({url:'../../../operations/resettable2.xml'});"/>
+</p>
+<br>
+
+<p><b>insert-at.xml</b></p>
+<p>This file uses the insert-at xModify instruction to add a new row to the html table.
+The select attribute of the insert-at tag denotes the location of the element that the contents
+and the index attribute tells it which place to insert it.  
+
+Typically you will use a &lt![CDATA[ ]]&gt; block to cut down on parse
+and traversal time.</p>
+<pre>&lt;xal xmlns:xm="http://openxal.org/core/xmodify"&gt;
+    &lt;xm:modifications document="html"&gt;
+        &lt;xm:insert-at select="#myTable" index="1"&gt;
+            &lt;![CDATA[
+            &lt;tr&gt;
+                &lt;td&gt;12390i&lt;/td&gt;
+                &lt;td&gt;Larry Franklin&lt;/td&gt;
+            &lt;/tr&gt;
+            ]]&gt;
+        &lt;/xm:insert-at&gt;
+    &lt;/xm:modifications&gt;
+&lt;/xal&gt;
+</pre>
+
+
+]]></xsd:documentation>
+    </xsd:annotation>
+    <xsd:extension base="any-child-directive-element-type" ref="any-child-directive-element-type.xml">
+        <xsd:sequence maxOccurs="1" minOccurs="1">
+            <xsd:any minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+        <attributes>
+            <attribute name="select" type="select-attribute-type" ref="select-attribute-type.xml">
+                <xsd:document lang="en">
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on. &lt;p&gt;
+Shown below is a valid xModify command set containing just 1 command: remove-element.&lt;br&gt;&lt;br&gt;
+           
+&lt;pre&gt;
+    &amp;lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="mydocument"&amp;gt;
+        &amp;lt;xm:remove-element select="/ui/rootPane/freePane[1]/button"/&amp;gt;
+    &amp;lt;/xm:modifications&amp;gt;
+&lt;/pre&gt;             
+&lt;br&gt;
+The 'select' attribute of this command contains the following XPath query:
+"/ui/rootPane/freePane[1]/button". This query selects all buttons in the document "mydocument" 
+that are children of the first child freePane of the rootPane element.  All of these buttons
+are then removed from the document by the remove-element command.
+
+&lt;br&gt;&lt;br&gt;
+When selecting elements in the HTML document be sure to capitalize the element names.  This is
+a result of the way the are store in the browser.  The following example will append a row to the table
+with an id of &amp;quot;myTable&amp;quot;.  Notice on the XPath statement also contains the TBODY which is 
+standard on all tables.
+&lt;br&gt;
+&lt;pre&gt;
+    &amp;lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="html"&amp;gt;
+        &amp;lt;xm:append select="TABLE[@id='myTable']/TBODY"&amp;gt;
+            &amp;lt;![CDATA[ &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;New Person&amp;lt/td&amp;gt;&amp;lt;/tr&amp;gt;
+            ]]&amp;gt;
+        &amp;lt;/xm:append&amp;gt;&lt;br&gt;
+    &amp;lt;/xm:modifications&amp;gt;&lt;br&gt;
+&lt;/pre&gt;  
+ 
+</xsd:document>
+                <xsd:briefDocument lang="en">
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on.</xsd:briefDocument>
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en"><![CDATA[
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on. <p>
+Shown below is a valid xModify command set containing just 1 command: remove-element.<br><br>
+           
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="mydocument"&gt;
+        &lt;xm:remove-element select="/ui/rootPane/freePane[1]/button"/&gt;
+    &lt;/xm:modifications&gt;
+</pre>             
+<br>
+The 'select' attribute of this command contains the following XPath query:
+"/ui/rootPane/freePane[1]/button". This query selects all buttons in the document "mydocument" 
+that are children of the first child freePane of the rootPane element.  All of these buttons
+are then removed from the document by the remove-element command.
+
+<br><br>
+When selecting elements in the HTML document be sure to capitalize the element names.  This is
+a result of the way the are store in the browser.  The following example will append a row to the table
+with an id of &quot;myTable&quot;.  Notice on the XPath statement also contains the TBODY which is 
+standard on all tables.
+<br>
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="html"&gt;
+        &lt;xm:append select="TABLE[@id='myTable']/TBODY"&gt;
+            &lt;![CDATA[ &lt;tr&gt;&lt;td&gt;New Person&lt/td&gt;&lt;/tr&gt;
+            ]]&gt;
+        &lt;/xm:append&gt;<br>
+    &lt;/xm:modifications&gt;<br>
+</pre>  
+ 
+]]></xsd:documentation>
+                    <xsd:appinfo>
+                        <meta:property category="Basic" display-name="Select"/>
+                    </xsd:appinfo>
+                </xsd:annotation>
+            </attribute>
+            <attribute name="index" type="integer">
+                <xsd:document lang="en"/>
+                <xsd:briefDocument lang="en"/>
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en"><![CDATA[
+		                
+		                
+		                ]]></xsd:documentation>
+                    <xsd:appinfo>
+                        <meta:property category="Basic" display-name="Index"/>
+                    </xsd:appinfo>
+                </xsd:annotation>
+            </attribute>
+        </attributes>
+    </xsd:extension>
+</complexType>

Added: incubator/xap/site/docs/xmodify/doc/complexTypes/xml/insert-before-element-type.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/doc/complexTypes/xml/insert-before-element-type.xml?view=auto&rev=550329
==============================================================================
--- incubator/xap/site/docs/xmodify/doc/complexTypes/xml/insert-before-element-type.xml (added)
+++ incubator/xap/site/docs/xmodify/doc/complexTypes/xml/insert-before-element-type.xml Sun Jun 24 20:05:18 2007
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<complexType targetNamespace="http://openxal.org/core/xmodify"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:event="http://www.w3.org/2001/XMLSchema"
+    xmlns:meta="http://www.w3.org/2001/XMLSchema" name="insert-before-element-type">
+    <xsd:annotation>
+        <xsd:documentation xml:lang="en"><![CDATA[
+<br>The insert-before command inserts its arguments (specified as children of 
+the command element) before each of the results returned by the XPath 
+query of the command. <br><br>
+
+The XPath query must select the following set: ( Element | Text )*. 
+If some result of the XPath query is not one of the two types, an UpdateException is thrown
+and the execution of the &lt;xm:modifications/&gt; block is halted. An UpdateException
+will also be thrown if the XPath query selects the root Element of the document.
+<br><br>
+
+The following logic applies to the arguments of the insert-before command based 
+on the type of each argument:
+
+<ul>
+<li>value-of directive element: the value of the bound variable will get
+inserted (not the directive element itself)
+<li>clone directive element: the cloned elements (which is the result of
+ executing the command) will get inserted.
+<li>any other xModify directive element will get inserted as is.
+<li>elements in any other namespace will be inserted as is. If the XPath query
+    returns more than 1 result, the element is cloned before the insertion to prevent
+    id conflicts (the clone is deep).
+<li>string argument is inserted as is.
+</ul>
+<br>
+<h4>Here is a XAL example:</h4><br>
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" document="mydocument"&gt;
+        &lt;xm:insert-before select="id('somepanel')"&gt;
+            &lt;freePane id="mypanel"/&gt;
+        &lt;/xm:insert-before&gt;
+    &lt;/xm:modifications&gt;
+</pre>
+The above command will insert the new freePane (id="mypanel") before the 
+freePane whose id="somepanel". ("before" means the new freePane will appear before 
+the selected freePane in the list of children of the selected freePane's parent element).
+
+<br><br>
+
+<h4>HTML Example:</h4><br>
+
+In the sample below pressing the "Add row to table" will create a new row in the table before the 
+the Jane Smith row.
+
+<script language="JavaScript" type="text/javascript" src="../../../../../javascript/jquery/jquery-latest.js"></script>
+<script language="JavaScript" type="text/javascript" src="../../../../../javascript/xmodify/xmodify-jquery.js"></script>
+
+<p>
+<table style="width:310px" id="mytable">
+    <tr style="background-color:#aaa"><th width="150px" align="left">Employee ID</th><th width="150px" align="left">Full Name</th></tr>
+    <tr id="insertBeforeMe"><td>3456g</td><td>Jane Smith</td></tr>
+<table>
+<input style="width:150px" type="button" value="Add row to table" onclick="$.xmodify({url:'../../../operations/insert-before.xml'});"/>
+<input style="width:150px" type="button" value="Reset table" onclick="$.xmodify({url:'../../../operations/resettable.xml'});"/>
+</p>
+<br>
+
+<p><b>insert-before.xml</b></p>
+<p>This file uses the insert-before xModify instruction to add a new row to the html table.
+The select attribute of the append tag denotes the location of the element that the contents
+be inserted before.  Typically you will use a &lt![CDATA[ ]]&gt; block to cut down on parse
+and traversal time.</p>
+<pre>&lt;xal xmlns:xm="http://openxal.org/core/xmodify"&gt;
+    &lt;xm:modifications document="html"&gt;
+        &lt;xm:insert-before select="#insertBeforeMe"&gt;
+            &lt;![CDATA[
+            &lt;tr&gt;
+                &lt;td&gt;12390i&lt;/td&gt;
+                &lt;td&gt;Larry Franklin&lt;/td&gt;
+            &lt;/tr&gt;
+            ]]&gt;
+        &lt;/xm:insert-before&gt;
+    &lt;/xm:modifications&gt;
+&lt;/xal&gt;
+</pre>
+
+]]></xsd:documentation>
+    </xsd:annotation>
+    <xsd:extension base="any-child-directive-element-type" ref="any-child-directive-element-type.xml">
+        <xsd:sequence maxOccurs="1" minOccurs="1">
+            <xsd:any minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+        <attributes>
+            <attribute name="select" type="select-attribute-type" ref="select-attribute-type.xml">
+                <xsd:document lang="en">
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on. &lt;p&gt;
+Shown below is a valid xModify command set containing just 1 command: remove-element.&lt;br&gt;&lt;br&gt;
+           
+&lt;pre&gt;
+    &amp;lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="mydocument"&amp;gt;
+        &amp;lt;xm:remove-element select="/ui/rootPane/freePane[1]/button"/&amp;gt;
+    &amp;lt;/xm:modifications&amp;gt;
+&lt;/pre&gt;             
+&lt;br&gt;
+The 'select' attribute of this command contains the following XPath query:
+"/ui/rootPane/freePane[1]/button". This query selects all buttons in the document "mydocument" 
+that are children of the first child freePane of the rootPane element.  All of these buttons
+are then removed from the document by the remove-element command.
+
+&lt;br&gt;&lt;br&gt;
+When selecting elements in the HTML document be sure to capitalize the element names.  This is
+a result of the way the are store in the browser.  The following example will append a row to the table
+with an id of &amp;quot;myTable&amp;quot;.  Notice on the XPath statement also contains the TBODY which is 
+standard on all tables.
+&lt;br&gt;
+&lt;pre&gt;
+    &amp;lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="html"&amp;gt;
+        &amp;lt;xm:append select="TABLE[@id='myTable']/TBODY"&amp;gt;
+            &amp;lt;![CDATA[ &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;New Person&amp;lt/td&amp;gt;&amp;lt;/tr&amp;gt;
+            ]]&amp;gt;
+        &amp;lt;/xm:append&amp;gt;&lt;br&gt;
+    &amp;lt;/xm:modifications&amp;gt;&lt;br&gt;
+&lt;/pre&gt;  
+ 
+</xsd:document>
+                <xsd:briefDocument lang="en">
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on.</xsd:briefDocument>
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en"><![CDATA[
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on. <p>
+Shown below is a valid xModify command set containing just 1 command: remove-element.<br><br>
+           
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="mydocument"&gt;
+        &lt;xm:remove-element select="/ui/rootPane/freePane[1]/button"/&gt;
+    &lt;/xm:modifications&gt;
+</pre>             
+<br>
+The 'select' attribute of this command contains the following XPath query:
+"/ui/rootPane/freePane[1]/button". This query selects all buttons in the document "mydocument" 
+that are children of the first child freePane of the rootPane element.  All of these buttons
+are then removed from the document by the remove-element command.
+
+<br><br>
+When selecting elements in the HTML document be sure to capitalize the element names.  This is
+a result of the way the are store in the browser.  The following example will append a row to the table
+with an id of &quot;myTable&quot;.  Notice on the XPath statement also contains the TBODY which is 
+standard on all tables.
+<br>
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="html"&gt;
+        &lt;xm:append select="TABLE[@id='myTable']/TBODY"&gt;
+            &lt;![CDATA[ &lt;tr&gt;&lt;td&gt;New Person&lt/td&gt;&lt;/tr&gt;
+            ]]&gt;
+        &lt;/xm:append&gt;<br>
+    &lt;/xm:modifications&gt;<br>
+</pre>  
+ 
+]]></xsd:documentation>
+                    <xsd:appinfo>
+                        <meta:property category="Basic" display-name="Select"/>
+                    </xsd:appinfo>
+                </xsd:annotation>
+            </attribute>
+        </attributes>
+    </xsd:extension>
+</complexType>

Added: incubator/xap/site/docs/xmodify/doc/complexTypes/xml/modifications-element-type.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/doc/complexTypes/xml/modifications-element-type.xml?view=auto&rev=550329
==============================================================================
--- incubator/xap/site/docs/xmodify/doc/complexTypes/xml/modifications-element-type.xml (added)
+++ incubator/xap/site/docs/xmodify/doc/complexTypes/xml/modifications-element-type.xml Sun Jun 24 20:05:18 2007
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<complexType targetNamespace="http://openxal.org/core/xmodify"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:event="http://www.w3.org/2001/XMLSchema"
+    xmlns:meta="http://www.w3.org/2001/XMLSchema" name="modifications-element-type">
+    <xsd:annotation>
+        <xsd:documentation xml:lang="en"><![CDATA[
+Every set of xModify commands has to be enclosed in a single &lt;xm:modifications/&gt; element. 
+A single file can contain multiple sets of &lt;xm:modifications/&gt; elements. 
+The element has only 1 attribute: the name of the document on which to perform the specified updates.
+Use "xal" to affect the UI DOM. If you are using create-document directive it has to be the first
+one in the list of directives.
+
+ 
+]]></xsd:documentation>
+    </xsd:annotation>
+    <xsd:sequence maxOccurs="1" minOccurs="0">
+        <xsd:element maxOccurs="1" minOccurs="0" name="create-document"
+            type="create-document-element-type" ref="create-document-element-type.xml">
+            <xsd:document lang="en" from="create-document-element-type">
+The create-document command allows you to create documents and have them registered
+with the DocumentRegistry on the client side.  This element supports no attributes and
+must be the first element under the &amp;lt;xm:modifications&amp;gt; element.  
+
+&lt;br&gt;&lt;br&gt;
+
+The create-document command supports a single child, however this child may have as many
+descendants as you like.
+
+&lt;br&gt;&lt;br&gt;
+
+A sample create-document command element (using a deferred data retrieval) looks like: &lt;br&gt;&lt;br&gt;
+
+&amp;lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" document="myNewDocument"&amp;gt;&lt;br&gt;
+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;xm:create-document&amp;gt;&lt;br&gt;
+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;xi:include xmlns:xi="http://openxal.org/core/xinclude" href="/myFile.xml"/&amp;gt;&lt;br&gt;
+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/xm:create-document&amp;gt;&lt;br&gt;
+&amp;lt;/xm:modifications&amp;gt;&lt;br&gt;&lt;br&gt;
+
+Another sample create-document command element with inline content looks like: &lt;br&gt;&lt;br&gt;
+
+&amp;lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" document="EmotionalStatesDocument"&amp;gt;&lt;br&gt;
+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;xm:create-document&amp;gt;&lt;br&gt;
+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;emotional-states&amp;gt;&lt;br&gt;
+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;happy/&amp;gt;&lt;br&gt;
+
+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;sad/&amp;gt;&lt;br&gt;
+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/emotional-states&amp;gt;&lt;br&gt;
+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/xm:create-document&amp;gt;&lt;br&gt;
+&amp;lt;/xm:modifications&amp;gt;&lt;br&gt;&lt;br&gt;
+
+If the above samples were executed, the documents would be registered with the client
+side DocumentRegistry as locally available documents.
+
+</xsd:document>
+            <xsd:briefDocument lang="en" from="create-document-element-type">
+The create-document command allows you to create documents and have them registered
+with the DocumentRegistry on the client side.</xsd:briefDocument>
+        </xsd:element>
+        <xsd:group ref="xmodify-command-group" maxOccurs="unbounded" minOccurs="0">
+            <xsd:element name="insert-before"
+                type="insert-before-element-type" ref="insert-before-element-type.xml"/>
+            <xsd:element name="insert-after"
+                type="insert-after-element-type" ref="insert-after-element-type.xml"/>
+            <xsd:element name="insert-at" type="insert-at-element-type" ref="insert-at-element-type.xml"/>
+            <xsd:element name="append" type="append-element-type" ref="append-element-type.xml"/>
+            <xsd:element name="set-attribute"
+                type="set-attribute-element-type" ref="set-attribute-element-type.xml"/>
+            <xsd:element name="replace" type="replace-element-type" ref="replace-element-type.xml"/>
+            <xsd:element name="replace-children"
+                type="replace-children-element-type" ref="replace-children-element-type.xml"/>
+            <xsd:element name="remove-element"
+                type="remove-element-element-type" ref="remove-element-element-type.xml"/>
+            <xsd:element name="remove-attribute"
+                type="remove-attribute-element-type" ref="remove-attribute-element-type.xml"/>
+            <xsd:element name="variable" type="variable-element-type" ref="variable-element-type.xml"/>
+            <xsd:element name="value-of" type="value-of-element-type" ref="value-of-element-type.xml"/>
+            <xsd:element name="clone" type="clone-element-type" ref="clone-element-type.xml"/>
+            <xsd:element name="set-innerhtml"
+                type="set-innerhtml-element-type" ref="set-innerhtml-element-type.xml"/>
+            <xsd:element name="set-style" type="set-style-element-type" ref="set-style-element-type.xml"/>
+            <xsd:element name="embed-xal" type="embed-xal-element-type" ref="embed-xal-element-type.xml"/>
+        </xsd:group>
+    </xsd:sequence>
+    <attributes>
+        <attribute name="document" type="document-attribute-type" ref="document-attribute-type.xml">
+            <xsd:document lang="en">
+The name of the document the set of xModify commands enclosed in this &amp;lt;xm:modifications element
+will be executed against.           
+</xsd:document>
+            <xsd:briefDocument lang="en">
+The name of the document the set of xModify commands enclosed in this &amp;lt;xm:modifications element
+will be executed against.</xsd:briefDocument>
+            <xsd:annotation>
+                <xsd:documentation xml:lang="en"><![CDATA[
+The name of the document the set of xModify commands enclosed in this &lt;xm:modifications element
+will be executed against.           
+]]></xsd:documentation>
+                <xsd:appinfo>
+                    <meta:property category="Basic" display-name="Select"/>
+                </xsd:appinfo>
+            </xsd:annotation>
+        </attribute>
+    </attributes>
+</complexType>

Added: incubator/xap/site/docs/xmodify/doc/complexTypes/xml/one-element-child-directive-element-type.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/doc/complexTypes/xml/one-element-child-directive-element-type.xml?view=auto&rev=550329
==============================================================================
--- incubator/xap/site/docs/xmodify/doc/complexTypes/xml/one-element-child-directive-element-type.xml (added)
+++ incubator/xap/site/docs/xmodify/doc/complexTypes/xml/one-element-child-directive-element-type.xml Sun Jun 24 20:05:18 2007
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<complexType targetNamespace="http://openxal.org/core/xmodify"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:event="http://www.w3.org/2001/XMLSchema"
+    xmlns:meta="http://www.w3.org/2001/XMLSchema"
+    name="one-element-child-directive-element-type" abstract="true">
+    <xsd:annotation>
+        <xsd:documentation xml:lang="en"><![CDATA[
+Elements of this type can take exactly 1 child which has to be an XML element.
+An example of a command that extends this type is create-document.
+]]></xsd:documentation>
+    </xsd:annotation>
+    <xsd:sequence maxOccurs="1" minOccurs="1">
+        <xsd:any minOccurs="1" maxOccurs="1"/>
+    </xsd:sequence>
+</complexType>

Added: incubator/xap/site/docs/xmodify/doc/complexTypes/xml/remove-attribute-element-type.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/doc/complexTypes/xml/remove-attribute-element-type.xml?view=auto&rev=550329
==============================================================================
--- incubator/xap/site/docs/xmodify/doc/complexTypes/xml/remove-attribute-element-type.xml (added)
+++ incubator/xap/site/docs/xmodify/doc/complexTypes/xml/remove-attribute-element-type.xml Sun Jun 24 20:05:18 2007
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<complexType targetNamespace="http://openxal.org/core/xmodify"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:event="http://www.w3.org/2001/XMLSchema"
+    xmlns:meta="http://www.w3.org/2001/XMLSchema" name="remove-attribute-element-type">
+    <xsd:annotation>
+        <xsd:documentation xml:lang="en"><![CDATA[
+<br>The remove-attribute command removes the attributes returned by the XPath query of 
+the command.<br><br>
+
+A sample remove-attribute command element looks like the following: <br><br>
+
+&lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" document="mydocument"&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&lt;xm:remove-attribute select="/window/button[1]/@text"/&gt;<br>
+&lt;/xm:modifications&gt;<br><br>
+
+The above command removes the 'text' attribute from the first child button of the
+root window element in the document "mydocument".<br><br>
+
+The XPath query of the remove-attribute command must return the following set: ( Attribute )*. 
+If any of the results of the XPath query is not an Attribute, an UpdateException is thrown
+and the execution of the &lt;xm:modifications/&gt; block is halted.<br><br>
+]]></xsd:documentation>
+    </xsd:annotation>
+    <xsd:extension base="base-directive-element-type" ref="base-directive-element-type.xml">
+        <attributes>
+            <attribute name="select" type="select-attribute-type" ref="select-attribute-type.xml">
+                <xsd:document lang="en">
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on. &lt;p&gt;
+Shown below is a valid xModify command set containing just 1 command: remove-element.&lt;br&gt;&lt;br&gt;
+           
+&lt;pre&gt;
+    &amp;lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="mydocument"&amp;gt;
+        &amp;lt;xm:remove-element select="/ui/rootPane/freePane[1]/button"/&amp;gt;
+    &amp;lt;/xm:modifications&amp;gt;
+&lt;/pre&gt;             
+&lt;br&gt;
+The 'select' attribute of this command contains the following XPath query:
+"/ui/rootPane/freePane[1]/button". This query selects all buttons in the document "mydocument" 
+that are children of the first child freePane of the rootPane element.  All of these buttons
+are then removed from the document by the remove-element command.
+
+&lt;br&gt;&lt;br&gt;
+When selecting elements in the HTML document be sure to capitalize the element names.  This is
+a result of the way the are store in the browser.  The following example will append a row to the table
+with an id of &amp;quot;myTable&amp;quot;.  Notice on the XPath statement also contains the TBODY which is 
+standard on all tables.
+&lt;br&gt;
+&lt;pre&gt;
+    &amp;lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="html"&amp;gt;
+        &amp;lt;xm:append select="TABLE[@id='myTable']/TBODY"&amp;gt;
+            &amp;lt;![CDATA[ &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;New Person&amp;lt/td&amp;gt;&amp;lt;/tr&amp;gt;
+            ]]&amp;gt;
+        &amp;lt;/xm:append&amp;gt;&lt;br&gt;
+    &amp;lt;/xm:modifications&amp;gt;&lt;br&gt;
+&lt;/pre&gt;  
+ 
+</xsd:document>
+                <xsd:briefDocument lang="en">
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on.</xsd:briefDocument>
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en"><![CDATA[
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on. <p>
+Shown below is a valid xModify command set containing just 1 command: remove-element.<br><br>
+           
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="mydocument"&gt;
+        &lt;xm:remove-element select="/ui/rootPane/freePane[1]/button"/&gt;
+    &lt;/xm:modifications&gt;
+</pre>             
+<br>
+The 'select' attribute of this command contains the following XPath query:
+"/ui/rootPane/freePane[1]/button". This query selects all buttons in the document "mydocument" 
+that are children of the first child freePane of the rootPane element.  All of these buttons
+are then removed from the document by the remove-element command.
+
+<br><br>
+When selecting elements in the HTML document be sure to capitalize the element names.  This is
+a result of the way the are store in the browser.  The following example will append a row to the table
+with an id of &quot;myTable&quot;.  Notice on the XPath statement also contains the TBODY which is 
+standard on all tables.
+<br>
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="html"&gt;
+        &lt;xm:append select="TABLE[@id='myTable']/TBODY"&gt;
+            &lt;![CDATA[ &lt;tr&gt;&lt;td&gt;New Person&lt/td&gt;&lt;/tr&gt;
+            ]]&gt;
+        &lt;/xm:append&gt;<br>
+    &lt;/xm:modifications&gt;<br>
+</pre>  
+ 
+]]></xsd:documentation>
+                    <xsd:appinfo>
+                        <meta:property category="Basic" display-name="Select"/>
+                    </xsd:appinfo>
+                </xsd:annotation>
+            </attribute>
+        </attributes>
+    </xsd:extension>
+</complexType>

Added: incubator/xap/site/docs/xmodify/doc/complexTypes/xml/remove-element-element-type.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/doc/complexTypes/xml/remove-element-element-type.xml?view=auto&rev=550329
==============================================================================
--- incubator/xap/site/docs/xmodify/doc/complexTypes/xml/remove-element-element-type.xml (added)
+++ incubator/xap/site/docs/xmodify/doc/complexTypes/xml/remove-element-element-type.xml Sun Jun 24 20:05:18 2007
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<complexType targetNamespace="http://openxal.org/core/xmodify"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:event="http://www.w3.org/2001/XMLSchema"
+    xmlns:meta="http://www.w3.org/2001/XMLSchema" name="remove-element-element-type">
+    <xsd:annotation>
+        <xsd:documentation xml:lang="en"><![CDATA[
+<br>The remove-element command removes the elements returned by the XPath query of 
+the command.<br><br>
+
+A sample remove-element command element looks like the following: <br><br>
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" document="mydocument"&gt;<br>
+        &lt;xm:remove-element select="/ui/rootPane/freePane[1]/button[1]"/&gt;<br>
+    &lt;/xm:modifications&gt;<br><br>
+</pre>
+After the above command is executed, the first child button of the first child freePane
+of the rootPane element in the document "mydocument" will be removed.<br><br>
+
+The XPath query of the remove-element command must return the following set: ( Element )*. 
+If any of the results of the XPath query is not an Element, an UpdateException is thrown
+and the execution of the &lt;xm:modifications/&gt; block is halted. If the XPath
+query selects the root Element of the Document, the root will be set to null. <br><br>
+
+<br><br>
+
+<h4>HTML Example:</h4>
+<br><br>
+<script language="JavaScript" type="text/javascript" src="../../../../../javascript/jquery/jquery-latest.js"></script>
+<script language="JavaScript" type="text/javascript" src="../../../../../javascript/xmodify/xmodify-jquery.js"></script>
+
+The buttons below can be used to clear and reset the values of the form inputs. 
+<br><br>
+
+<p>
+<table style="width:310px" id="mytable">
+    <tr style="background-color:#aaa"><th width="150px" align="left">Employee ID</th><th width="150px" align="left">Full Name</th></tr>
+    <tr type="data"><td>3456g</td><td>Jane Smith</td></tr>
+    <tr type="data"><td>9876j</td><td>Larry Doyle</td></tr>
+<table>
+<input style="width:150px" type="button" value="Add row to table" onclick="$.xmodify({url:'../../../operations/adddatarow.xml'});"/>
+<input style="width:150px" type="button" value="Clear table" onclick="$.xmodify({url:'../../../operations/clear-table.xml'});"/>
+</p>
+
+<br>
+<p><b>clear-table.xml</b></p>
+<p>This file uses the remove-element xModify instruction to change the text of the input.
+The select attribute of the remove-element tag denotes the location of the elements to remove.  
+</p>
+<pre>
+&lt;xal xmlns:xm="http://openxal.org/core/xmodify"&gt;
+    &lt;xm:modifications document="html"&gt;
+        &lt;xm:remove-element select="TR[@type='data']"/&gt;
+    &lt;/xm:modifications&gt;
+&lt;/xal&gt;
+</pre>
+
+]]></xsd:documentation>
+    </xsd:annotation>
+    <xsd:extension base="base-directive-element-type" ref="base-directive-element-type.xml">
+        <attributes>
+            <attribute name="select" type="select-attribute-type" ref="select-attribute-type.xml">
+                <xsd:document lang="en">
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on. &lt;p&gt;
+Shown below is a valid xModify command set containing just 1 command: remove-element.&lt;br&gt;&lt;br&gt;
+           
+&lt;pre&gt;
+    &amp;lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="mydocument"&amp;gt;
+        &amp;lt;xm:remove-element select="/ui/rootPane/freePane[1]/button"/&amp;gt;
+    &amp;lt;/xm:modifications&amp;gt;
+&lt;/pre&gt;             
+&lt;br&gt;
+The 'select' attribute of this command contains the following XPath query:
+"/ui/rootPane/freePane[1]/button". This query selects all buttons in the document "mydocument" 
+that are children of the first child freePane of the rootPane element.  All of these buttons
+are then removed from the document by the remove-element command.
+
+&lt;br&gt;&lt;br&gt;
+When selecting elements in the HTML document be sure to capitalize the element names.  This is
+a result of the way the are store in the browser.  The following example will append a row to the table
+with an id of &amp;quot;myTable&amp;quot;.  Notice on the XPath statement also contains the TBODY which is 
+standard on all tables.
+&lt;br&gt;
+&lt;pre&gt;
+    &amp;lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="html"&amp;gt;
+        &amp;lt;xm:append select="TABLE[@id='myTable']/TBODY"&amp;gt;
+            &amp;lt;![CDATA[ &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;New Person&amp;lt/td&amp;gt;&amp;lt;/tr&amp;gt;
+            ]]&amp;gt;
+        &amp;lt;/xm:append&amp;gt;&lt;br&gt;
+    &amp;lt;/xm:modifications&amp;gt;&lt;br&gt;
+&lt;/pre&gt;  
+ 
+</xsd:document>
+                <xsd:briefDocument lang="en">
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on.</xsd:briefDocument>
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en"><![CDATA[
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on. <p>
+Shown below is a valid xModify command set containing just 1 command: remove-element.<br><br>
+           
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="mydocument"&gt;
+        &lt;xm:remove-element select="/ui/rootPane/freePane[1]/button"/&gt;
+    &lt;/xm:modifications&gt;
+</pre>             
+<br>
+The 'select' attribute of this command contains the following XPath query:
+"/ui/rootPane/freePane[1]/button". This query selects all buttons in the document "mydocument" 
+that are children of the first child freePane of the rootPane element.  All of these buttons
+are then removed from the document by the remove-element command.
+
+<br><br>
+When selecting elements in the HTML document be sure to capitalize the element names.  This is
+a result of the way the are store in the browser.  The following example will append a row to the table
+with an id of &quot;myTable&quot;.  Notice on the XPath statement also contains the TBODY which is 
+standard on all tables.
+<br>
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="html"&gt;
+        &lt;xm:append select="TABLE[@id='myTable']/TBODY"&gt;
+            &lt;![CDATA[ &lt;tr&gt;&lt;td&gt;New Person&lt/td&gt;&lt;/tr&gt;
+            ]]&gt;
+        &lt;/xm:append&gt;<br>
+    &lt;/xm:modifications&gt;<br>
+</pre>  
+ 
+]]></xsd:documentation>
+                    <xsd:appinfo>
+                        <meta:property category="Basic" display-name="Select"/>
+                    </xsd:appinfo>
+                </xsd:annotation>
+            </attribute>
+        </attributes>
+    </xsd:extension>
+</complexType>

Added: incubator/xap/site/docs/xmodify/doc/complexTypes/xml/replace-children-element-type.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/doc/complexTypes/xml/replace-children-element-type.xml?view=auto&rev=550329
==============================================================================
--- incubator/xap/site/docs/xmodify/doc/complexTypes/xml/replace-children-element-type.xml (added)
+++ incubator/xap/site/docs/xmodify/doc/complexTypes/xml/replace-children-element-type.xml Sun Jun 24 20:05:18 2007
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<complexType targetNamespace="http://openxal.org/core/xmodify"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:event="http://www.w3.org/2001/XMLSchema"
+    xmlns:meta="http://www.w3.org/2001/XMLSchema" name="replace-children-element-type">
+    <xsd:annotation>
+        <xsd:documentation xml:lang="en"><![CDATA[
+<br>The replace-children command does the following: for each element returned
+by the XPath query, the element's children are removed; the command arguments
+are inserted in their place.
+<br><br>
+
+The XPath query must return the following set: ( Element | Document )*. 
+If any of the results of the XPath query is not an Element or a Document, an 
+UpdateException is thrown and the execution of the &lt;xm:modifications/&gt; 
+block is halted.  If the XPath query selects the Document object, the root 
+Element will be replaced with the child of the directive Element.  Note that 
+only one child is expected in this case. If the directive element has more than
+one child when the XPath query selects the Document object, an xModifyException 
+will be thrown.<br><br>
+
+The following logic applies to the arguments of the replace-children command based 
+on the type of each argument:
+
+<ul>
+<li>value-of directive element is executed and the value of the bound variable will get
+inserted (not the directive element itself)
+<li>clone directive element is executed and the cloned elements (which is the result of
+ executing the command) will get inserted.
+<li>any other xModify directive element will get inserted as is.
+<li>element in any other namespace will be inserted as is. If the XPath query
+    returns more than 1 result, the element is cloned before the insertion to prevent
+    id conflicts (the clone is deep).
+<li>string argument is inserted as is.
+</ul>
+<br>
+
+<h4>Here is a XAL example:</h4><br>
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" document="mydocument"&gt;
+        &lt;xm:replace-children select="id('mywindow')"&gt;
+            &lt;freePane id="somePanel"/&gt;
+        &lt;/xm:replace-children&gt;
+    &lt;/xm:modifications&gt;
+</pre>
+The above command will remove ALL of the children of the selected window (id="mywindow")
+and in their place will append the specified freePane (id="somePanel") so the window will
+have just 1 new child element after the command is executed.
+
+
+<br><br>
+
+<h4>HTML Example:</h4>
+<br><br>
+<script language="JavaScript" type="text/javascript" src="../../../../../javascript/jquery/jquery-latest.js"></script>
+<script language="JavaScript" type="text/javascript" src="../../../../../javascript/xmodify/xmodify-jquery.js"></script>
+
+Choose the anwser to the question and click "Submit", the results of the poll
+will be displayed. 
+<br><br>
+<div style="border:1px solid #aaa;margin:10px;padding:10px;" id="replace-contents">
+    <div><b>Will the Redsox win the World Series?</b></div>
+    <div>
+         <input type="radio" name="yes">Yes<br>
+         <input type="radio" name="no">No<br>
+         <input style="width:150px" type="button" value="Submit" onclick="$.xmodify({url:'../../../operations/replace-children.xml'});"/>
+    </div>
+</div>
+<br>
+<p><b>replace-children.xml</b></p>
+<p>This file uses the replace-children xModify instruction to replace the children of the div that contains the poll.
+The select attribute of the replace tag denotes the location of the element to replace.  
+Typically you will use a &lt![CDATA[ ]]&gt; block to cut down on parse
+and traversal time.</p>
+<pre>
+&lt;xal xmlns:xm="http://openxal.org/core/xmodify"&gt;
+    &lt;xm:modifications document="html"&gt;
+        &lt;xm:replace-children select="#replace-contents"&gt;
+            &lt;![CDATA[
+                &lt;div&gt;&lt;b&gt;Results of Poll.&lt;/b&gt;&lt;/div&gt;&lt;br&gt;
+                    &lt;div&gt;
+                        100% Yes&lt;br&gt;
+                        0% No
+                    &lt;/div&gt;
+                &lt;/div&gt;
+            ]]&gt;
+        &lt;/xm:replace-children&gt;
+    &lt;/xm:modifications&gt;
+&lt;/xal&gt;
+</pre>
+
+
+]]></xsd:documentation>
+    </xsd:annotation>
+    <xsd:extension base="any-child-directive-element-type" ref="any-child-directive-element-type.xml">
+        <xsd:sequence maxOccurs="1" minOccurs="1">
+            <xsd:any minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+        <attributes>
+            <attribute name="select" type="select-attribute-type" ref="select-attribute-type.xml">
+                <xsd:document lang="en">
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on. &lt;p&gt;
+Shown below is a valid xModify command set containing just 1 command: remove-element.&lt;br&gt;&lt;br&gt;
+           
+&lt;pre&gt;
+    &amp;lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="mydocument"&amp;gt;
+        &amp;lt;xm:remove-element select="/ui/rootPane/freePane[1]/button"/&amp;gt;
+    &amp;lt;/xm:modifications&amp;gt;
+&lt;/pre&gt;             
+&lt;br&gt;
+The 'select' attribute of this command contains the following XPath query:
+"/ui/rootPane/freePane[1]/button". This query selects all buttons in the document "mydocument" 
+that are children of the first child freePane of the rootPane element.  All of these buttons
+are then removed from the document by the remove-element command.
+
+&lt;br&gt;&lt;br&gt;
+When selecting elements in the HTML document be sure to capitalize the element names.  This is
+a result of the way the are store in the browser.  The following example will append a row to the table
+with an id of &amp;quot;myTable&amp;quot;.  Notice on the XPath statement also contains the TBODY which is 
+standard on all tables.
+&lt;br&gt;
+&lt;pre&gt;
+    &amp;lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="html"&amp;gt;
+        &amp;lt;xm:append select="TABLE[@id='myTable']/TBODY"&amp;gt;
+            &amp;lt;![CDATA[ &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;New Person&amp;lt/td&amp;gt;&amp;lt;/tr&amp;gt;
+            ]]&amp;gt;
+        &amp;lt;/xm:append&amp;gt;&lt;br&gt;
+    &amp;lt;/xm:modifications&amp;gt;&lt;br&gt;
+&lt;/pre&gt;  
+ 
+</xsd:document>
+                <xsd:briefDocument lang="en">
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on.</xsd:briefDocument>
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en"><![CDATA[
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on. <p>
+Shown below is a valid xModify command set containing just 1 command: remove-element.<br><br>
+           
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="mydocument"&gt;
+        &lt;xm:remove-element select="/ui/rootPane/freePane[1]/button"/&gt;
+    &lt;/xm:modifications&gt;
+</pre>             
+<br>
+The 'select' attribute of this command contains the following XPath query:
+"/ui/rootPane/freePane[1]/button". This query selects all buttons in the document "mydocument" 
+that are children of the first child freePane of the rootPane element.  All of these buttons
+are then removed from the document by the remove-element command.
+
+<br><br>
+When selecting elements in the HTML document be sure to capitalize the element names.  This is
+a result of the way the are store in the browser.  The following example will append a row to the table
+with an id of &quot;myTable&quot;.  Notice on the XPath statement also contains the TBODY which is 
+standard on all tables.
+<br>
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="html"&gt;
+        &lt;xm:append select="TABLE[@id='myTable']/TBODY"&gt;
+            &lt;![CDATA[ &lt;tr&gt;&lt;td&gt;New Person&lt/td&gt;&lt;/tr&gt;
+            ]]&gt;
+        &lt;/xm:append&gt;<br>
+    &lt;/xm:modifications&gt;<br>
+</pre>  
+ 
+]]></xsd:documentation>
+                    <xsd:appinfo>
+                        <meta:property category="Basic" display-name="Select"/>
+                    </xsd:appinfo>
+                </xsd:annotation>
+            </attribute>
+        </attributes>
+    </xsd:extension>
+</complexType>

Added: incubator/xap/site/docs/xmodify/doc/complexTypes/xml/replace-element-type.xml
URL: http://svn.apache.org/viewvc/incubator/xap/site/docs/xmodify/doc/complexTypes/xml/replace-element-type.xml?view=auto&rev=550329
==============================================================================
--- incubator/xap/site/docs/xmodify/doc/complexTypes/xml/replace-element-type.xml (added)
+++ incubator/xap/site/docs/xmodify/doc/complexTypes/xml/replace-element-type.xml Sun Jun 24 20:05:18 2007
@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<complexType targetNamespace="http://openxal.org/core/xmodify"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:event="http://www.w3.org/2001/XMLSchema"
+    xmlns:meta="http://www.w3.org/2001/XMLSchema" name="replace-element-type">
+    <xsd:annotation>
+        <xsd:documentation xml:lang="en"><![CDATA[
+The replace command replaces each of the results returned by the XPath
+query with the command arguments (specified as children of the command element).
+<br><br>
+
+The XPath query must return the following set: ( Element | Text )*. 
+If any of the results of the XPath query is not one of the two types, an 
+UpdateException is thrown and the execution of the &lt;xm:modifications/&gt; 
+block is halted.  If the XPath query selects the root Element, the directive
+command has to have exactly one child Element which will be set as the new
+root.  If the directive element does not have exactly one child, and the 
+XPath query selects the root Element, an UpdateException will be thrown.<br><br>
+
+The following logic applies to the arguments of the replace command based 
+on the type of each argument:
+
+<ul>
+<li>value-of directive element is executed and the value of the bound variable will get
+inserted (not the directive element itself)
+<li>clone directive element is executed and the cloned elements (which is the result of
+ executing the command) will get inserted.
+<li>any other xModify directive element will get inserted as is.
+<li>element in any other namespace will be inserted as is. If the XPath query
+    returns more than 1 result, the element is cloned before the insertion to prevent
+    id conflicts (the clone is deep).
+<li>string argument is inserted as is.
+</ul>
+<br>
+
+<h4>Here is a XAL example:</h4><br>
+
+&lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" document="mydocument"&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&lt;xm:replace select="id('oldWindow')"&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;window id="someOtherWindow"/&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&lt;/xm:replace&gt;<br>
+&lt;/xm:modifications&gt;<br><br>
+
+The above command will remove the selected window (id="oldWindow") and in its place
+the new window will be inserted (id="someOtherWindow").
+
+<br><br>
+
+<h4>HTML Example:</h4>
+<br><br>
+<script language="JavaScript" type="text/javascript" src="../../../../../javascript/jquery/jquery-latest.js"></script>
+<script language="JavaScript" type="text/javascript" src="../../../../../javascript/xmodify/xmodify-jquery.js"></script>
+
+Choose the anwser to the question and click "Submit", the results of the poll
+will be displayed. 
+<br><br>
+<div style="border:1px solid #aaa;margin:10px;padding:10px;" id="replace-contents">
+    <div><b>Will the Redsox win the World Series?</b></div>
+    <div>
+         <input type="radio" name="yes">Yes<br>
+         <input type="radio" name="no">No<br>
+         <input style="width:150px" type="button" value="Submit" onclick="$.xmodify({url:'../../../operations/replace.xml'});"/>
+    </div>
+</div>
+<br>
+<p><b>replace.xml</b></p>
+<p>This file uses the replace xModify instruction to replace the div that contains the poll.
+The select attribute of the replace tag denotes the location of the element to replace.  
+Typically you will use a &lt![CDATA[ ]]&gt; block to cut down on parse
+and traversal time.</p>
+<pre>
+&lt;xal xmlns:xm="http://openxal.org/core/xmodify"&gt;
+    &lt;xm:modifications document="html"&gt;
+        &lt;xm:replace select="#replace-contents"&gt;
+            &lt;![CDATA[
+            &lt;div style="border:1px solid #aaa;margin:10px;padding:10px;" id="replace-contents"&gt;
+                &lt;div&gt;&lt;b&gt;Results of Poll.&lt;/b&gt;&lt;/div&gt;&lt;br&gt;
+                    &lt;div&gt;
+                        100% Yes&lt;br&gt;
+                        0% No
+                    &lt;/div&gt;
+                &lt;/div&gt;
+            &lt;/div&gt;
+            ]]&gt;
+        &lt;/xm:replace&gt;
+    &lt;/xm:modifications&gt;
+&lt;/xal&gt;
+</pre>
+
+]]></xsd:documentation>
+    </xsd:annotation>
+    <xsd:extension base="any-child-directive-element-type" ref="any-child-directive-element-type.xml">
+        <xsd:sequence maxOccurs="1" minOccurs="1">
+            <xsd:any minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+        <attributes>
+            <attribute name="select" type="select-attribute-type" ref="select-attribute-type.xml">
+                <xsd:document lang="en">
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on. &lt;p&gt;
+Shown below is a valid xModify command set containing just 1 command: remove-element.&lt;br&gt;&lt;br&gt;
+           
+&lt;pre&gt;
+    &amp;lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="mydocument"&amp;gt;
+        &amp;lt;xm:remove-element select="/ui/rootPane/freePane[1]/button"/&amp;gt;
+    &amp;lt;/xm:modifications&amp;gt;
+&lt;/pre&gt;             
+&lt;br&gt;
+The 'select' attribute of this command contains the following XPath query:
+"/ui/rootPane/freePane[1]/button". This query selects all buttons in the document "mydocument" 
+that are children of the first child freePane of the rootPane element.  All of these buttons
+are then removed from the document by the remove-element command.
+
+&lt;br&gt;&lt;br&gt;
+When selecting elements in the HTML document be sure to capitalize the element names.  This is
+a result of the way the are store in the browser.  The following example will append a row to the table
+with an id of &amp;quot;myTable&amp;quot;.  Notice on the XPath statement also contains the TBODY which is 
+standard on all tables.
+&lt;br&gt;
+&lt;pre&gt;
+    &amp;lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="html"&amp;gt;
+        &amp;lt;xm:append select="TABLE[@id='myTable']/TBODY"&amp;gt;
+            &amp;lt;![CDATA[ &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;New Person&amp;lt/td&amp;gt;&amp;lt;/tr&amp;gt;
+            ]]&amp;gt;
+        &amp;lt;/xm:append&amp;gt;&lt;br&gt;
+    &amp;lt;/xm:modifications&amp;gt;&lt;br&gt;
+&lt;/pre&gt;  
+ 
+</xsd:document>
+                <xsd:briefDocument lang="en">
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on.</xsd:briefDocument>
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en"><![CDATA[
+The value of this attribute is any valid XPath query which returns a result 
+set (usually a set of elements or attributes) on which the enclosing xModify 
+command then operates on. <p>
+Shown below is a valid xModify command set containing just 1 command: remove-element.<br><br>
+           
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="mydocument"&gt;
+        &lt;xm:remove-element select="/ui/rootPane/freePane[1]/button"/&gt;
+    &lt;/xm:modifications&gt;
+</pre>             
+<br>
+The 'select' attribute of this command contains the following XPath query:
+"/ui/rootPane/freePane[1]/button". This query selects all buttons in the document "mydocument" 
+that are children of the first child freePane of the rootPane element.  All of these buttons
+are then removed from the document by the remove-element command.
+
+<br><br>
+When selecting elements in the HTML document be sure to capitalize the element names.  This is
+a result of the way the are store in the browser.  The following example will append a row to the table
+with an id of &quot;myTable&quot;.  Notice on the XPath statement also contains the TBODY which is 
+standard on all tables.
+<br>
+<pre>
+    &lt;xm:modifications version="1.0" xmlns:xm="http://openxal.org/core/xmodify" 
+            document="html"&gt;
+        &lt;xm:append select="TABLE[@id='myTable']/TBODY"&gt;
+            &lt;![CDATA[ &lt;tr&gt;&lt;td&gt;New Person&lt/td&gt;&lt;/tr&gt;
+            ]]&gt;
+        &lt;/xm:append&gt;<br>
+    &lt;/xm:modifications&gt;<br>
+</pre>  
+ 
+]]></xsd:documentation>
+                    <xsd:appinfo>
+                        <meta:property category="Basic" display-name="Select"/>
+                    </xsd:appinfo>
+                </xsd:annotation>
+            </attribute>
+        </attributes>
+    </xsd:extension>
+</complexType>