From: sgunderson@bigfoot.com <> Date: Sat, 12 Aug 2006 21:02:19 +0000 (+0200) Subject: Horrible workaround for PHP's namespace bugs. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=4c40fbc8ed71522dea60363f21ff0ed946bb6dbe;p=xml-template Horrible workaround for PHP's namespace bugs. --- diff --git a/php/xml-template.php b/php/xml-template.php index 91dfa8d..d7e8aef 100644 --- a/php/xml-template.php +++ b/php/xml-template.php @@ -37,7 +37,10 @@ function XML_Template_process($node, $obj, $clean = 1) $attrs = $child->attributes(); if (isset($attrs)) { foreach ($child->attributes() as $attr) { - if ($attr->namespace_uri() == 'http://template.sesse.net/' && $attr->name() == 'id') { + // PHP's DOMXML module forgets the prefix information when + // cloning nodes, so we'll have to avoid the namespace check + // here, unfortunately + if (/* $attr->namespace_uri() == 'http://template.sesse.net/' && */ $attr->name() == 'id') { $id = $attr->value(); if ($clean) { // FIXME: this won't work since we're not in the right namespace