Friday, August 15, 2008

Re: [HACKERS] XML / XSL rendering in PostgreSQL server?

Tino, thanks for your reply

I would like to use one of the XML rendering functions like table_to_xml_and_xmlschema OR table_to_xml and render the output via XSL, preferably in one query.

"What do you think would be the benefit of doing that?"

My main reason would be to embed all of the application logic in the postgres server. This way, we can build out the app more efficiently by not relying on middleware. It seems like there would be fewer cycles committed to the whole application if it was all done in the DB, but I could be wrong.

Yes, I am using pl/pgSQL for all of the internals. I could formulate and output the data this way, but if Postgres has methods for using XSL to do this, why not use it instead of re-inventing it (and we can keep the public-view logic separate from the business logic in the server)?

Thanks.

Peter


On Fri, Aug 15, 2008 at 1:46 AM, Tino Wildenhain <tino@wildenhain.de> wrote:
Hi,


Peter Sampson wrote:
Hi,

I would like to use one of the XML rendering functions like table_to_xml_and_xmlschema OR table_to_xml and render the output via XSL, preferably in one query.

What do you think would be the benefit of doing that?


I've searched the mailing lists,site, docs and Google -- to no avail. Also, I see that xslt_process (from xml2) will be deprecated going forward. We're building an app that will be used for a long time into the future, and I'd like to keep it future-compatible.

I've also searched online for sql / xml docs or tutorials, but haven't found any that directly addresses using xsl in queries itself.

You could try with one of the pl/*u languages.

Regards
Tino

No comments: