[Zope3-dev] pattern exploration: view chains (xslt, pdf, etc.)
Gary Poster
garyposter@earthlink.net
Fri, 5 Apr 2002 10:42:29 -0500
Working on
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/ManageStaticTextContent
made me ponder about how to handle a use case like this:
I have some static xml (non-xhtml) documents in a file in Zope. Let's say,
hypothetically, I uploaded an Excel spreadsheet and used xls2xml to convert
it to XML.
What if I want to see this in html?
What if I want to see this in a pdf?
What I came up with is the idea of view chains. Imagine this, for instance:
mysite.com/sales.xml/xhtml.xslt;view/htmltopdf;view
or what if I had a zpt I wanted to convert to pdf
mysite.com/myZPT/default;view/htmltopdf;view
I can think of some ways of making this work (views would need marker
interfaces, for one; and I have some other thoughts), but I first wanted to
see if this seemed like a useful idea, or if folks had a better idea on how
to accomplish this sort of thing. Thoughts?
Gary