Re: New XSLT class for PEAR
| From: | Dan Kuykendall | Date: | Mon, 24 Feb 2003 16:42:43 +0000 |
| Subject: | Re: New XSLT class for PEAR | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-13766@lists.php.net to get a copy of this message | ||
Christian Stocker wrote:
Hi I just looked quickly through your code... 1) I like the "browser supports xslt"-idea, but why aren't you building the idea into the existing XSLT wrapper? 2 different XSLT-Wrappers won't get my +1...I didnt spend a ton of time to understand the existing XSLT_Wrapper because it seemed to make it even more comlicated to use XSLT than just using PHP's built in XSLT. I may have missed something and do plan on a more detailed look. I do like the other XSLT class for the purpose of choosing an XSLT engine to use, but I dont really see why its all that important since PHP's xslt support is working pretty well.
2) Mozilla > 0.9.4 supports xslt as wellI have had problems getting mozilla to accept that the results are XML if the file extension is .php If we have somefile.xml and it has the exact same contents, it will process the XML, but with the script being .php it wont. I plan on finding a solution to this, but havent got one yet. One possibility maybe that I need to set the content type with the HTTP headers.
3) reading the xml/xsl into php memory and then sending to Sablotron is (IMHO) quite stupid, Sablotron can read from the file system. Somehow this should be supported, too..Good point. I can correct that pretty easily.
4) Building a template system around XSLT??? mmmh, doesn't make much sense to me ;)Well, I can agree, but I keep running into people who dont want to construct the XML. Even using XML_Tree seems to throw off some people (which is the reason for my importVar() addition to XML_Tree). There are also some other things that can be more easily supported, such as themes.
5) There are other XSLT-Processors in PHP (mainly libxslt, but see 1) for that matter)Yes, I hadnt ever seen them used before so didnt think I needed to use the XSLT_Wrapper that is in PEAR.
That's about it. Therefore, my proposal for you: Integrate the "send-xslt-to-supporting-browsers" into the existing XSLT-Wrapper (and make it optional..) and build your templating-system around this and XML_Tree.I will take a look at doing this later today. Dan