简体   繁体   中英

PHP MVC for XML/ XSL

I have to develop a website in which the content is stored on an external database and is distributed via xml

Can anyone recommend a lightweight framework that can be use to consume this xml and display html using xsl transformation?

I want to use xsl because apart from the data being xml i want to be able to template the pages using xml/ xslt markup

XSLT is a very powerful tool on itself, so I doubt that adding a framework into the workflow will have an improving effect if you just want to read XML and transform it into HTML. That is just the kind of job XSLT was invented for.
Maybe the not exactly matching Question XML Outputting - PHP vs JS vs Anything Else? gives an idea how XSLT works.

Edit @hakre comment: PHP supports XML/XSLT, no framework needed is what I say. If you follow the link I suggested you'll see that a transformation needs only 3 lines of PHP-code (beside XML data and XSLT script, of course). PHP uses the very fast and stable xmllib2/xsltlib library in the standard installation, no lib adding is necessary.

Edit @Kendall comment: XSLT is a w3c standard templating language. Why use another one which probably will be not as wide used, documented and supported? To hit the nail on your question: For the task you describe I can't recommend any framework over XSLT which is already built in PHP to use XML and display HTML using XSL transformation. Why putting an framework above instead talking directly XSLT? It's a language, not an API. Even versatility will be better.

我会推荐CodeIgniter,它轻巧,动态加载并支持XSL。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM