Hi Joshua,

Why did you choose to go the XML route and in what way? I went down a similar path with earlier versions of systems I'd built, however, I didn't use XSLT which I'm guessing is how you're doing it.

To keep this on topic I'm asking because clean XHTML used with CSS allows data that is already marked up with a fairly basic XML flavour. Isn't it simply faster to go straight from PHP to XHTML or XML (e.g. RDF, RSS), etc., templates as needed. A site I'm currently building a content management system for has some templates that are RDF for a newsfeed and others that are XHTML.

I suppose what I'm curious about is why go from PHP to XML then on to e.g XHTML (a form of XML), RDF (a form of XML), etc. If you're storing data as XML it isn't intrinsically better than storing it in a database it's just one way of doing it. In somewhat the same way semantically marked up XHTML pages are in a sense XML stored data. CSS itself can then be used to repurpose those pages to some degree.

I'm not by the way disputing your suggestion as each situation has different needs and we all make our own judgement. With regards to Michael's original question I would be cautious with being as specific as saying XML at this stage. I'd err on the simpler suggestion to keep the data-source, functionality/logic and presentation separate.


Couldn't agree more. One other suggestion, though, is to extend that
separation a little further by generating XML with PHP, and then parsing
that XML into whatever templating engine you end up using. This just
provides another degree of separation, and reduces the temptation to
hard-code ANY HTML into your back-end... something which I wish I'd been
aware of 6 months ago!

Having your content available in XML will also simplify the presentation
of content in other formats in the future, if you choose to do so --
thinking of syndication (RSS) amongst other things.

From a standards perspective, this separation just reduces the chance of
making some early mistakes which will take ages to correct six months
down the track.

Joshua Street

****************************************************** The discussion list for http://webstandardsgroup.org/

Proud presenters of Web Essentials 04 http://we04.com/
Web standards, accessibility, inspiration, knowledge
To be held in Sydney, September 30 and October 1, 2004

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help

Reply via email to