]> git.sesse.net Git - xml-template/blobdiff - php/xml-template.php
Change the syntax for attributes from tag.attribute to tag/attribute; we
[xml-template] / php / xml-template.php
index dc84bf6e5f8ba023977b997397d3036a9129968f..b5f70965ac18afb9264d63faa4dc4e923cee5232 100644 (file)
@@ -48,8 +48,8 @@ function XML_Template_process($node, $obj, $clean = 1)
                                # appropriate
                                foreach (array_keys($obj) as $key) {
                                        # FIXME: we would want something like \Q and \E here...
-                                       if (preg_match('/^' . $tag . '\.(.*)$/', $key, $matches) ||
-                                           ($id != null && preg_match('/^#' . $id . '\.(.*)$/', $key, $matches))) {
+                                       if (preg_match('/^' . $tag . '\/(.*)$/', $key, $matches) ||
+                                           ($id != null && preg_match('/^#' . $id . '\/(.*)$/', $key, $matches))) {
                                                $child->set_attribute($matches[1], $obj[$key]);
                                        }