<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.23.4">
</HEAD>
<BODY>
On Tue, 2008-07-15 at 12:16 +0200, Stefan Behnel wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Mike MacCana wrote:
</PRE>
</BLOCKQUOTE>
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE>
> - I haven't been able to find any examples of setting a namespace to
> apply to an attribute - so that the stylename attribute has the text
> namespace (as OpenDocument seems to do things).
>
> - Additionally If I set the attribute to be style-name instead of
> stylename, I get
> 'SyntaxError: keyword can't be an expression'.
> OK, I understand that. But I when I quote this so the dash comes out
> literally, lxml complains about invalid syntax.
Same solution for both:
ns = "{...}"
Element(ns+"p", attrib={ns+"style-name" : "Standard"})
(and I admit that that's missing from the tutorial)
Stefan
</PRE>
</BLOCKQUOTE>
<BR>
Thanks muchly Stefan. When I get my OpenDocument test running I'll pop the code back to the list.
</BODY>
</HTML>