开发者

How to use XML and XSL transform with CakePHP?

开发者 https://www.devze.com 2023-03-27 09:43 出处:网络
I\'m new to PHP and CakePHP but has to build a small application. The requirement is I have a set of \"terms and conditions\", containing paragraphs and headings. That content needs to be shown to use

I'm new to PHP and CakePHP but has to build a small application. The requirement is I have a set of "terms and conditions", containing paragraphs and headings. That content needs to be shown to users as HTML and also 开发者_StackOverflow中文版used to generate a PDF at some other time. I'm thinking of putting the content in an XML and then use 2 XSL templates to transform into HTML and to PDF, which needs to happen in the controller actions as I understood.

How do I go about? which locations should I arrange the files in the /app folder? CakePHP don't seems to have direct transform support and probably have to use PHP stuff. Has anyone done similar?


Here is a good example of using PHP for transforming XML using XSL on PHP(not CakePHP though) -> http://devzone.zend.com/article/1302

0

精彩评论

暂无评论...
验证码 换一张
取 消