sterling                Fri Jan 16 17:26:10 2004 EDT

  Modified files:              
    /php-src/ext/simplexml/tests        profile04.phpt profile05.phpt 
                                        profile06.phpt profile07.phpt 
                                        profile10.phpt profile11.phpt 
  Log:
  update the profile of how namespaces should work after discussions with 
  shane and rob richards.  there were a lot of race conditions with regards 
  to the way namespaces have been handled in XML documents so far, this new 
  method removes the race conditions, and gives me a real reason to add the
  children() and attributes() methods.
  
  
Index: php-src/ext/simplexml/tests/profile04.phpt
diff -u php-src/ext/simplexml/tests/profile04.phpt:1.1 
php-src/ext/simplexml/tests/profile04.phpt:1.2
--- php-src/ext/simplexml/tests/profile04.phpt:1.1      Fri Jan 16 15:50:29 2004
+++ php-src/ext/simplexml/tests/profile04.phpt  Fri Jan 16 17:26:09 2004
@@ -10,7 +10,7 @@
 </root>
 ');
 
-echo $root->reserved->child;
+echo $root->children('reserved')->child;
 echo "\n---Done---\n";
 ?>
 --EXPECT--
Index: php-src/ext/simplexml/tests/profile05.phpt
diff -u php-src/ext/simplexml/tests/profile05.phpt:1.1 
php-src/ext/simplexml/tests/profile05.phpt:1.2
--- php-src/ext/simplexml/tests/profile05.phpt:1.1      Fri Jan 16 15:50:29 2004
+++ php-src/ext/simplexml/tests/profile05.phpt  Fri Jan 16 17:26:09 2004
@@ -13,8 +13,8 @@
 
 $root->register_ns('myns', 'reserved-ns');
 
-echo $root->myns->child;
-echo $root->reserved->child;
+echo $root->children('myns')->child;
+echo $root->children('reserved')->child;
 echo "\n---Done---\n";
 ?>
 --EXPECT--
Index: php-src/ext/simplexml/tests/profile06.phpt
diff -u php-src/ext/simplexml/tests/profile06.phpt:1.1 
php-src/ext/simplexml/tests/profile06.phpt:1.2
--- php-src/ext/simplexml/tests/profile06.phpt:1.1      Fri Jan 16 15:50:29 2004
+++ php-src/ext/simplexml/tests/profile06.phpt  Fri Jan 16 17:26:09 2004
@@ -11,7 +11,7 @@
 </root>
 ');
 
-echo $root->child['reserved:attribute'];
+echo $root->child->attributes('reserved')['attribute'];
 echo "\n---Done---\n";
 ?>
 --EXPECT--
Index: php-src/ext/simplexml/tests/profile07.phpt
diff -u php-src/ext/simplexml/tests/profile07.phpt:1.1 
php-src/ext/simplexml/tests/profile07.phpt:1.2
--- php-src/ext/simplexml/tests/profile07.phpt:1.1      Fri Jan 16 15:50:29 2004
+++ php-src/ext/simplexml/tests/profile07.phpt  Fri Jan 16 17:26:09 2004
@@ -13,8 +13,8 @@
 
 $root->register_ns('myns', 'reserved-ns');
 
-echo $root->child['reserved:attribute'];
-echo $root->child['myns:attribute'];
+echo $root->child->attributes('reserved')['attribute'];
+echo $root->child->attributes('myns')['attribute'];
 echo "\n---Done---\n";
 ?>
 --EXPECT--
Index: php-src/ext/simplexml/tests/profile10.phpt
diff -u php-src/ext/simplexml/tests/profile10.phpt:1.1 
php-src/ext/simplexml/tests/profile10.phpt:1.2
--- php-src/ext/simplexml/tests/profile10.phpt:1.1      Fri Jan 16 15:50:29 2004
+++ php-src/ext/simplexml/tests/profile10.phpt  Fri Jan 16 17:26:09 2004
@@ -11,9 +11,9 @@
 </root>
 ');
 
-echo $root->child['reserved:attribute'];
+echo $root->child->attributes('reserved')['attribute'];
 echo "\n";
-echo $root->child['special:attribute'];
+echo $root->child->attributes('special')['attribute'];
 foreach ($root->child['attribute'] as $attr) {
        echo "$attr\n";
 }
Index: php-src/ext/simplexml/tests/profile11.phpt
diff -u php-src/ext/simplexml/tests/profile11.phpt:1.1 
php-src/ext/simplexml/tests/profile11.phpt:1.2
--- php-src/ext/simplexml/tests/profile11.phpt:1.1      Fri Jan 16 15:50:29 2004
+++ php-src/ext/simplexml/tests/profile11.phpt  Fri Jan 16 17:26:09 2004
@@ -12,9 +12,9 @@
 </root>
 ');
 
-echo $root->reserved->child;
+echo $root->children('reserved')->child;
 echo "\n";
-echo $root->special->child;
+echo $root->children('special')->child;
 foreach ($root->child as $child) {
        echo "$child\n";
 }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to