Re: populating template from a dom object

"R. Tyler Ballance" <[email protected]> Tue, 12 Jan 2010 10:59:18 -0800
Newsgroups gmane.comp.python.cheetah
Message-ID <[email protected]>
On Tue, 12 Jan 2010, Tim Arnold wrote:

> Hi,
> I'm new to Cheetah. I was wondering if it's possible to populate a set of Cheetah templates from a document object model.
> For example, I have a DocBook XML file that I can read and parse into a tree using lxml; is there a way I can apply a set of Cheetah templates to render that object into HTML?
> 
> I know about the DocBook XSLT stylesheets, I was just wondering if the Cheetah template method is feasible.

There's no built-in "magic" for handling this kind of scenario; that said if
you're using lxml and you've already got a handful of Element objects you can
likely write some template logic (that phrase sounds wrong ;)) to do your
translation.



Cheers,
-R. Tyler Ballance
--------------------------------------
 Jabber: [email protected]
 GitHub: http://github.com/rtyler
Twitter: http://twitter.com/agentdero
   Blog: http://unethicalblogger.com

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev

_______________________________________________
Cheetahtemplate-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)

iEYEARECAAYFAktMxoUACgkQFCbH3D9R4W82bwCguBI/ZUXahB/udClyacGEAmeJ
qR8An0uI4JPbEJHgCZ4WlupnZk3DvXL1
=U0MF
-----END PGP SIGNATURE-----