Forum OpenACS Development: Re: Liferay integration

Collapse
8: Re: Liferay integration (response to 1)
Posted by Dave Bauer on
Almost :) Right now it stores RSS 1.0 (i think) XML in the syndiation table. Eventually you'd want to store the raw data and have a template or tdom script to convert to whatever XML format you prefer.

Overall what you want is to take the Tcl datasource and use it with a different output format, instead of HTML. Of course there are plenty of ways to do this :) You can just use XHTML, and use semantic markup and CSS to organize the data. You can use RSS/ATOM, etc, you could use XHTML with embedded microformats (basically the same thing as the first option, but sort of standardized). This of course depends on what the other end of your web service is expecting.

An interesting option would be to document the datasource with the -properties switch of ad_page_contract, and have a way to request XML. Then you could just output the properties frm the ad_page_contract in a defined XML format from the Tcl variable values. That seems like a pretty good way to go, but would require a change in ad_return_template. If you look at ACS 4 its pretty clear that there was an intention to make it work this way in the first place, but I guess noone knew _why_ you'd want to do that back then.

Again, I just don't think automatically exposing include templates, which are put in lib so they aren't available at a URL by themselves, is the best plan. You could even write some sort of index.vuh that took the URL, figured out which include to work with, then handle the output.