]> git.sesse.net Git - xml-template/blobdiff - php5/xml-template.php
Fix a PHP5 typo.
[xml-template] / php5 / xml-template.php
index 43b8b577c264513db1b70f5825fdc3b0f5d90338..54d1452dcc9ed2e14ce96b80d1ca66e1a4d57a60 100644 (file)
@@ -11,7 +11,7 @@ function XML_Template_process_file($filename, $obj, $clean = 1)
 function XML_Template_process($node, $obj, $clean = 1)
 {
        if (is_a($obj, 'DOMNode')) {                          # overwrite
-               while ($node->childeNodes->length > 0) {
+               while ($node->childNodes->length > 0) {
                        $child = $node->childNodes->item(0);
                        $node->removeChild($child);
                }
@@ -154,10 +154,10 @@ function XML_Template_alternate($tag, $array, $elems)
        return $array;
 }
                
-# Ideally, this would be "return $obj->clone_node(true)". But surprise, surprise,
-# PHP is buggy (at least both PHP4 and PHP5); it removes the prefix information
-# from all attributes during a clone. IOW, we'll have to clone evverything
-# ourselves.
+# Ideally, this would be "return $obj->clone_node(true)". But surprise,
+# surprise, PHP is buggy; it does not preserve the prefix information on
+# attributes properly during a clone. (PHP4 and PHP5 are broken in different
+# ways here...) IOW, we'll have to clone everything ourselves.
 function own_clone_node($node, $doc)
 {
        // we only need these two