Hello there.

I am trying to experiment with genshi xml templates in z3c.pt (HEAD).
It turns out that is uses Xinclude and I am afraid it's not working.
The test is based on something I got from here:
http://wiki.pylonshq.com/display/pylonscookbook/Genshi+templates

So, in terms of testing code here it is:

>>> from zope.component import provideAdapter, provideUtility
>>> from z3c.pt import expressions, PageTemplateFile
>>> provideUtility(expressions.python_translation, name=u'python')
>>> provideUtility(expressions.path_translation, name=u'path')
>>> provideAdapter(expressions.StringTranslation, name=u'string')
>>>
>>> template = PageTemplateFile('page.html')
>>> print template.body
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";
      xmlns:py="http://genshi.edgewall.org/";
      xmlns:xi="http://www.w3.org/2001/XInclude";
      lang="en">
<xi:include href="site.html" />
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>MySite: Using This Site</title>
    <link rel="stylesheet" type="text/css" href="default.css"
        py:attrs="{'href': '/default.css'}" />
</head><body>

<h1 class="page_title">Using This Site</h1>

<p>Under construction.</p>

</body></html>

>>> print template.render()
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd";>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml";>
<Element {http://www.w3.org/2001/XInclude}include at 18b62a0>
<head>
    <meta content="text/html; charset=utf-8" http-equiv="content-type" />
    <title>MySite: Using This Site</title>
    <link href="default.css" rel="stylesheet" type="text/css" />
</head><body>

<h1 class="page_title">Using This Site</h1>

<p>Under construction.</p>

</body></html>

As you can see, there is a <Element ... which is the xinclude of the
site.html which didn't get interpreted/translated by z3c.pt.
Did anyone successfully get something like this working?

Best Regards,
Fernando

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"z3c.pt" group.
To post to this group, send email to z3c_pt@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/z3c_pt?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to