|
From: <php...@li...> - 2010-03-25 12:32:32
|
hi all, I am new to the list. Before getting too much into pjb, I want to find out whether I am barking up the right tree. I have developed an XML/XSLT framework for php at http://xao-php.sf.netwhich I use for all my apps. I don't really promote the project, but I share the code all the same. I would, however, like to use the best XSLT processor (Saxon) from within my PHP/XML apps. Saxon is either Java or .NET. I'm not gonna use .NET. The documentation over at php.net about Java integration is somewhat depressing. Anyway, I was thinking of just creating a simple servlet to expose Saxon via a REST API. This is hardly an "integration", but it would get the job done in a way which could be relatively reliable. Since XAO is designed to run on miscellaneous hosted PHP5 environments, it would be nice if I could have a more portable solution. Should I be checking out PJB instead of the servlet/REST option? or am I on the right track. Opinions would be appreciated. ps. The idea is for users of XAO to be able to do something like $obj = new XAO_AppDoc("MyRootElName"); /* begin boring stuff */ $obj->SetXsltProcessor("Saxon"); $obj->objTransformer->SetServletUrl("http://localhost:8080/Saxon"); $obj->ndBuildXslPi("MyXslt2Template.xsl"); /* end boring stuff */ $obj->BuildSomeXmlContent(); $obj->Transform(); // with XSLT processor and stylesheet $obj->Send(); // transformed output to the requesting user-agent. of course, this is not how you would code it in real-life. Normally you would extend AppDoc and do all the boring setup stuff in the new sub-class's constructor. |