And that was exactly what I needed.

Thank you very much.

Darrell Hamilton,
Software Developer,
4over, Inc
darre...@4over.com
818-246-1170 ext. 285




2011/5/11 Kornel Lesiński <kor...@geekhood.net>:
> 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
>> {$token}","UTF-8");
>
> 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
> PHPTAL@lists.motion-twin.com
> http://lists.motion-twin.com/mailman/listinfo/phptal
>

_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to