[sclug] PHP Question

Will Dickson wrd at glaurung.demon.co.uk
Thu Aug 12 10:56:23 UTC 2004


tim wrote:
> 
> Hi all
> I have a quick question about so architecture.
> I am writing some software for a hotel. It will be in PHP because I want 
> to learn it. What I would liketo do is have PHP access a MYsql db and 
> create XML that will be sent via HTTP to the browser where I will use 
> XSLT to format it. 
> I have done something similar previously using Perlscript and M$ XMLHTTP 
> and Microsoft.XMLDOM. Obviously I want to be as browser independant as 
> possible and the XMLHTTP solution has a prerequisite of IE6.

Assuming that you don't want to contribute to M$'s attempts 
to monopolise the web, you would be much better off doing 
the transform server-side and sending ordinary (X)HTML to 
the browser. (FWIW this is exactly what our software does.) 
Trying to do anything clever will give you so many 
compatibility problems it really won't be worth it.

You should also be aware that MS's implementations of XSLT 
are variants which are incompatible with the W3C standard, 
and vary with IE version. That which works in IE6 may not 
work in IE5 and vice-versa, and probably won't work with a 
standards-compliant implementation either.

Alternatively, IIRC PHP is more-or-less designed to allow 
you to populate HTML directly from the DB. Apart from the 
amusement value, what do you gain from going via XML?


Regards


Will.


More information about the Sclug mailing list