X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=php%2Fxml-template.php;h=d7e8aef7428d4817fd03b3121be80271bcc20498;hb=4c40fbc8ed71522dea60363f21ff0ed946bb6dbe;hp=91dfa8d45ad1017625b9c6b17dd9e473d5fbfaf1;hpb=4bccc7141cc1ad0e3006baaa25de195e1bf1da44;p=xml-template 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