biffta@hotmail.com (David) wrote in message news:<3eb239cb.0307150225.549c15da@posting.google. com>...[color=blue]
> I think Id have to say I like the idea of server-side processing, so I
> would be creating the XML to hold the content of the page then using
> PHP to parse the data and change it into something that could be
> viewed in a browser.
>
> But hang on, what if the majority of the content of a page is
> dynamically generated out of a dbase, then what would I actually need
> to store in the XML?[/color]
Your thinking is all wrong. You do not use PHP to transform an XML
file into HTML as that is what XSL is for. You use PHP to extract data
from the database, convert this data into an XML file, then perform
the XSL transformation using a separate XSL file. The output of the
transformation (an HTML file) is then sent to the browser.
Even if your DBMS is capable of generating an XML file directly you
would still need a PHP process to generate the query, receive the
pre-built XML file, then perform the XSL transformation.
The beauty of using XML/XSL files in this way is that you could change
the language in which your business layer is written, say from PHP to
Java or whatever, and you could still carry on using the same XSL
files. Now THAT is what I call separation of the presentation and
business layers.
Tony Marston
http://www.tonymarston.net
[color=blue]
> Consider the situation, two pages the first being a login page and the
> second being the member services after a sucessful login.
> The first page would have the general layout buttons etc, plus a form
> where they would enter their details and press login. Not much scope
> for XML there as there wont really be that much content on the actual
> page.
> Second page, showing the member services e.g. update profile, send
> friend message... Possibly a bit of scope for XML there holding a few
> tables of buttons and info. But the majority of the content of the
> page would be coming out of a database and so I still see little use
> for XML.
>
> Dont get me wrong Im not trying to have a go at XML I just dont
> beleive Im thinking about it in the right way and I used the previous
> example to try and show this.
> What would be a more suitable way to intergrate XML into the previous
> example, because if someone could guide me there it might give me a
> better idea!
> thanks[/color]