Hi , I love ducking bullets :-) Christopher Mahan wrote: >--- Raditha Dissanayake <jabber at raditha.com> wrote: > > >>Hi, >> >>I am in the middle of two battles on XML/XSLT in the PHP list. So i >>am >>going to start another one here. >>If your biz logic produces it's output in XML and your presentation >> >> > >There's a problem right there. The raw data is not in XML, but in a >database. XML is an intermediate product. If you want to recontruct a >set of XML documents (like customer account summaries) with different >criteria (show last 90 days instead of last 120) from the XML, you're >going to have fun. The reason I say that is that it would be much >easier to pump the data out of the database again instead of trying >to parse out the XML and recalculate running balance, sutotals, >totals, percentages etc. So effectively, XML is OK as a storage tool >if the output is already completely determined beyond the foreseeable >future. > > The beauty of XSLT is that you don't have to parse it!! You just transform it using an XSL. (of course the underlying infrastructure does parse the XML but you don't have to do it yourself.) If you generate HTML directly from your DB there's no way you are going to change it easily without changing a hellova lot of code. Not so with XSLT. Any well equipped web designer can edit an XSL sheet. You don't need a programmer. > > >>For example if today you build your site with HTML and later on you >>need >>to adapt to WML, CHTML or other kind of markup all you need to do >>is >>create a new XSL without changing any of the other components. >> >> > >See above. XML may or may not fit your needs. Do you need to disply >the same data in WML as in the original HTML? Is there data missing? >How do you get it in? Do you combine different XML documents, one >with the detail and one with the summary? Or do you create a complete >XML document with all the information possible about a particular >account and let the xslt sort it out? I still thik you'd be better >off running that off a database. > I brought up WML as an example only. > > > > >>shoot me guys. >> >> > >Ran out of bullets, sorry. > :-) > >The way I look at it is that you use XHTML 1.1 (1.0 strict + a couple >of things) and since it is in fact XML, you refactor it with xsl. >Most of the time, though, you won't have to. > Well if you produce XHTML why not produce another form of XML that is more easily tranformed? -- Raditha Dissanayake. ------------------------------------------------------------------------ http://www.radinks.com/sftp/ | http://www.raditha/megaupload/ Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 150 KB | with progress bar.