Re: [Repoze-dev] chameleon.genshi with expressions inside non-XHTML attributes

2009-07-17 Thread Malthe Borch
Alberto Valverde wrote:
 Attached is a patch with a doctest showing the error.

Applied and fixed in r5971. Thanks!

\malthe

___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] chameleon.genshi with expressions inside non-XHTML attributes

2009-07-11 Thread Wichert Akkerman
On 7/11/09 8:32 PM, Alberto Valverde wrote:
 Hello,

 I'm trying to use chameleon.genshi (trunk) to generate a WMS
 GetCapabilities document but expressions inside non-xhtml attributes are
 not evaluated, eg:

 OnlineResource xlink:href=${service_url} /

 renders ${service_url} instead of the value of 'service_url'

 The same template renders correctly with genshi 0.5 so I'm using it as a
 workaround for XML templates but I'd like to drop this dependency if
 feasible. If this is really a bug (I suspect it isn't since language.py
 appears to ignore dynamic non-xhtml attributes by design) I could send
 some tests showing the error.

This looks like a bug. Genshi syntax is pretty explicit about this 
having to work; it is an integral part of dynamic XIncludes for example.

Wichert.


-- 
Wichert Akkerman wich...@wiggy.net   It is simple to make things.
http://www.wiggy.net/  It is hard to make things simple.
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] chameleon.genshi with expressions inside non-XHTML attributes

2009-07-11 Thread Malthe Borch
2009/7/11 Wichert Akkerman wich...@wiggy.net:
 This looks like a bug. Genshi syntax is pretty explicit about this
 having to work; it is an integral part of dynamic XIncludes for example.

Definitely.

\malthe
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] chameleon.genshi with expressions inside non-XHTML attributes

2009-07-11 Thread Alberto Valverde

Malthe Borch wrote:

2009/7/11 Wichert Akkerman wich...@wiggy.net:
  

This looks like a bug. Genshi syntax is pretty explicit about this
having to work; it is an integral part of dynamic XIncludes for example.



Definitely.
  

Attached is a patch with a doctest showing the error.

Thanks,
Alberto


Index: src/chameleon/genshi/template.txt
===
--- src/chameleon/genshi/template.txt	(revision 5914)
+++ src/chameleon/genshi/template.txt	(working copy)
@@ -82,4 +82,18 @@
   /div
   
 
+XML template
+
 
+XML can be generated too and non-XHTML attributes can contain expressions
+
+
+   print GenshiTemplate(\
+  ... WMS_MS_Capabilities xmlns:py=http://genshi.edgewall.org/;
+  ...  xmlns:xlink=http://www.w3.org/1999/xlink;
+  ...   OnlineResource xlink:href=${service_url} /
+  ... /WMS_MS_Capabilities
+  ... )(service_url='http://example.com/wms?')
+  WMS_MS_Capabilities xmlns:xlink=http://www.w3.org/1999/xlink;
+OnlineResource xlink:href=http://example.com/wms?; /
+  /WMS_MS_Capabilities
Index: setup.py
===
--- setup.py	(revision 5914)
+++ setup.py	(working copy)
@@ -1,6 +1,6 @@
 from setuptools import setup, find_packages
 
-version = '1.0b4'
+version = '1.0b5-dev'
 
 install_requires = [
 'setuptools',
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev