[thelist] Web Development -- Presentation vs. Content

Christopher Mahan chris_mahan at yahoo.com
Thu Oct 9 00:54:30 CDT 2003

--- 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

> layer uses XSLT that gives you tremoundous flexibility to play
> around 
> with your presentation or your lower tiers without effective the
> others.


> 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.

> 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.

Christopher Mahan
chris_mahan at yahoo.com
818.943.1850 cell

Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

More information about the thelist mailing list