On Wed, 11 May 2011 07:42:50 +0100, Darrell Noice <darre...@4over.com> wrote:

foreach(...) {
$new_attrs = array();
$new_attrs[] = new PHPTAL_Dom_Attr("variables","",implode(",",$vars),"UTF-8");
$new_attrs[] = new PHPTAL_Dom_Attr("tal:attributes","","token

PHPTAL's DOM uses XML namespaces. In this case you're creating attribute named "tal:attributes" in default namespace, but you need attribute named "attributes" in "http://xml.zope.org/namespaces/tal"; namespace.

That should work and setAttributeNS will be a little prettier than new DOM_Attr:

$wrapper = new PHPTAL_Dom_Element("translation","",array(), $child->getXmlnsState()); $wrapper->setAttributeNS('http://xml.zope.org/namespaces/tal', 'attributes', "token $token");

regards, Kornel Lesiński

PHPTAL mailing list

Reply via email to