Web Designer/Developer - Drupal experience a must!
Aquent
US-CA-San Francisco

Justtechjobs.com Post A Job | Post A Resume

Using PHP and XML with Apache Cocoon
First off, for those of you who don't know what Cocoon is, check out http://xml.apache.org where you can download the source and read up on it. In short Cocoon is a suite of Java Servlets that sit on your server waiting for .xml pages and then - if applicable - it applies the relevant XSL transformations. With one XML page and different XSL pages you can deliver rendered output suitable for your Browser, for example HTML for your Desktop or WML for your WAP device.
I've been playing with Cocoon as a "learning" project for some time now but my main problem has been that of generating the XML dynamicly by using PHP and then using Cocoon to do the transformations. You can’t embed PHP into a .xml page because Cocoon doesn't recognise it and to write XSP's I needed to learn Java, which at the current time is not an option for me.
Prompted by a few postings to the PHP4Beta list I realised that it would be possible to employ a workaround and still use PHP, so I set off to see if I could get it to work. Needless to say I did, so here is a very simple example of using PHP to generate XML dynamically and then using Cocoon to give me browser friendly mark-up.
[ Next Page ]


Comments:
FileGeneratorsaraadmin04/07/05 13:20
Easier way to do thisJim Parslow02/14/05 12:49
error in html?Blithe06/16/03 15:37
RE: Error by Apache:can not load php4apache.dllJim04/07/03 12:22
RE: Error by Apache:can not load php4apache.dllAggie12/04/02 12:42
RE: MYSQL problemsjan_hut11/30/02 13:05
RE: Apache not loading php4apache.dll in W95John10/17/02 18:00
apache2filter.dll fileDirtgod09/29/02 00:42
RE: There must be a better wayNicolas Marchildon09/09/02 19:31
RE: Apache not loading php4apache.dll in W95OpenSource08/30/02 01:31
RE: MYSQL PROBLEMSarreddo Nyang08/16/02 09:01
RE: Error by Apache:can not load php4apache.dEric Dortmans08/14/02 04:34
RE: Error by Apache:can not load php4apache.dRalph08/10/02 15:22
Thanks for your articleJose Manuel Gomez08/06/02 19:00
RE: Error by Apache:can not load php4apache.dllpaul s. k.08/02/02 15:07
RE: Error by Apache:can not load php4apache.dllTim07/22/02 17:17
RE: Error by Apache:can not load php4apache.dllpawelw07/19/02 06:48
RE: Error by Apache:can not load php4apache.dllAndrea07/09/02 09:55
Appending data to XML file by using PHPdongbt06/12/02 00:48
RE: how can i run php-scripts on my apache?dawuss05/15/02 08:55
RE: Output XML from PHPPablo Yamamoto05/13/02 09:57
RE: Error by Apache:can not load php4apache.dllMauricio04/20/02 15:47
PHP NewbieBrett Johanson04/09/02 05:46
RE: Error by Apache:can not load php4apache.dllchristian gibson04/02/02 16:15
RE: There must be a better wayScott C.02/16/02 06:35
Krysalis : Native PHP Cocoon alternativeAlexandru COSTIN01/11/02 07:00
Error by Apache:can not load php4apache.dllharshul11/24/01 06:37
how can i run php-scripts on my apache?jack(absolute beginner)09/27/01 21:51
how to use php page without having Apache?sam09/21/01 06:45
RE: PHP in XSPPablo Liska09/14/01 16:42
The best way to generate xml from phpWojtek Pragacz08/19/01 06:03
Need help in retrieving attribute values Taj07/30/01 22:54
RE: Writing to a file is ugly! Why not xinclude?BKoo07/08/01 12:01
The World is Crazy, Crazy Crazy!!!Carlos G. Varela06/28/01 02:10
PHP Sablotron Extension V Cocoon ?tim05/17/01 14:26
RE: Writing to a file is ugly! Why not xinclude?Matt05/04/01 12:19
RE: Writing to a file is ugly! Why not xinclude?Charlie Waters04/30/01 17:10
Output XML from PHPMickey04/25/01 13:28
Multiple requests to the PHP codeDavid Durham04/08/01 15:07
another php/cocoon kludgeAki Sasaki03/15/01 21:55
How to save client side Xml file on the serveD.P.Batagoda02/18/01 22:29
RE: Writing to a file is ugly! Why not xinclude?Ralph Wiggam01/30/01 11:59
XML Can't Parse an ENTITYMarc Steel01/16/01 22:47
Writing to a file is ugly! Why not xinclude?Sergio Carvalho01/02/01 18:52
PHP in XSPRapheal Kaplan11/06/00 23:13
efficiency?Terence10/27/00 11:54
XML MessagingEverton de Brito Dias09/11/00 12:54
Messaging applicationEverton de Brito Dias09/10/00 17:35
XML paradigmEverton de Brito Dias09/10/00 17:32
Maybe a better way...David Dossot08/29/00 11:18
RE: There must be a better wayljpit07/14/00 17:56
RE: There must be a better wayBealers07/10/00 18:48
There must be a better waymatt mcConnell07/08/00 01:51
PDF formattingRob Wills07/04/00 00:00
 

If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly.

Add A Comment:

Name:

Email:

Subject:

Message:

To reduce spam posts, messages are now manually approved

You are not [logged in]. That means your account will not get credit for this post.