chregu Fri Aug 16 05:10:15 2002 EDT Modified files: /phpdoc/en/reference/domxml/functions DomNode-append-child.xml DomNode-insert-before.xml DomNode-next-sibling.xml DomNode-previous-sibling.xml Log: updated to the last source commits Index: phpdoc/en/reference/domxml/functions/DomNode-append-child.xml diff -u phpdoc/en/reference/domxml/functions/DomNode-append-child.xml:1.2 phpdoc/en/reference/domxml/functions/DomNode-append-child.xml:1.3 --- phpdoc/en/reference/domxml/functions/DomNode-append-child.xml:1.2 Wed Apr 17 02:37:38 2002 +++ phpdoc/en/reference/domxml/functions/DomNode-append-child.xml Fri Aug 16 +05:10:15 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.40 --> <refentry id='function.DomNode-append-child'> <refnamediv> @@ -22,7 +22,7 @@ other node. </para> <para> - Before a new child is appended it is first duplicated. Therefore the new + (PHP < 4.3) Before a new child is appended it is first duplicated. Therefore +the new child is a completely new copy which can be modified without changing the node which was passed to this function. If the node passed has children itself, they will be duplicated as well, which makes it quite easy to @@ -31,6 +31,13 @@ child you must use the returned node. </para> <para> + (PHP >= 4.3) The new child <parameter>newnode</parameter> is first + unlinked from its existing context, if it already existed in a document. + Therefore the node is moved and not copies anymore. This is the behaviour + according to the W3C specifications. If you want to duplicate large parts + of a xml document, use DomNode->clone_node() before appending. + </para> + <para> The following example will add a new element node to a fresh document and sets the attribute "align" to "left". <example> @@ -98,7 +105,8 @@ <function>DomNode_append_child</function>. </para> <para> - See also <function>DomNode_insert_before</function>. + See also <function>DomNode_insert_before</function>, + <function>DomNode_clone_node</function>. </para> </refsect1> </refentry> Index: phpdoc/en/reference/domxml/functions/DomNode-insert-before.xml diff -u phpdoc/en/reference/domxml/functions/DomNode-insert-before.xml:1.2 phpdoc/en/reference/domxml/functions/DomNode-insert-before.xml:1.3 --- phpdoc/en/reference/domxml/functions/DomNode-insert-before.xml:1.2 Wed Apr 17 02:37:39 2002 +++ phpdoc/en/reference/domxml/functions/DomNode-insert-before.xml Fri Aug 16 +05:10:15 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.DomNode-insert-before'> <refnamediv> @@ -17,9 +17,15 @@ </methodsynopsis> <para> This function inserts the new node <parameter>newnode</parameter> right - before the node <parameter>refnode</parameter>. The return value is the - inserted node. If you plan to do further modifications on the appended + before the node <parameter>refnode</parameter>. The return value is the + inserted node. If you plan to do further modifications on the appended child you must use the returned node. + </para> + <para> + (PHP >= 4.3 only) If <parameter>newnode</parameter> already is part of a + document, it will be first unlinked from its existing context. If + <parameter>refnode</parameter> is NULL, then <parameter>newnode</parameter> + will be inserted at the end of the list of children. </para> <para> <function>DomNode_insert_before</function> is very similar to Index: phpdoc/en/reference/domxml/functions/DomNode-next-sibling.xml diff -u phpdoc/en/reference/domxml/functions/DomNode-next-sibling.xml:1.2 phpdoc/en/reference/domxml/functions/DomNode-next-sibling.xml:1.3 --- phpdoc/en/reference/domxml/functions/DomNode-next-sibling.xml:1.2 Wed Apr 17 02:37:39 2002 +++ phpdoc/en/reference/domxml/functions/DomNode-next-sibling.xml Fri Aug 16 +05:10:15 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.DomNode-next-sibling'> <refnamediv> @@ -16,8 +16,9 @@ </methodsynopsis> <para> This function returns the next sibling of the current node. If there is - no next sibling it returns false. You can use this function to iterate - over all children of a node as shown in the example. + no next sibling it returns false (< 4.3) or null (>= 4.3). You can + use this function to iterate over all children of a node as shown in the + example. </para> <para> <example> Index: phpdoc/en/reference/domxml/functions/DomNode-previous-sibling.xml diff -u phpdoc/en/reference/domxml/functions/DomNode-previous-sibling.xml:1.2 phpdoc/en/reference/domxml/functions/DomNode-previous-sibling.xml:1.3 --- phpdoc/en/reference/domxml/functions/DomNode-previous-sibling.xml:1.2 Wed Apr 17 02:37:40 2002 +++ phpdoc/en/reference/domxml/functions/DomNode-previous-sibling.xml Fri Aug 16 +05:10:15 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.DomNode-previous-sibling'> <refnamediv> @@ -15,7 +15,10 @@ <void/> </methodsynopsis> <para> - This function returns the previous sibling of the current node. + This function returns the previous sibling of the current node. If there + is no previous sibling it returns false (< 4.3) or null (>= 4.3). You + can use this function to iterate over all children of a node as shown in + the example. </para> <para> See also <function>DomNode_next_sibling</function>.
-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php