PDA

View Full Version : XHTML / CSS or XML/XSL/PHP for multiple output types???


bcarl314
08-18-2003, 05:46 PM
I've finished creating a template for a new website I'm working on using XHTML1.1 and CSS to seperate layout and content, then I got to thinking. Hmm, I'd really like to make this site accessible to all sorts of apps, including wireless apps and a newsfeed using RSS. So, I got to thinking, Hmm, I don't really know much about RSS and XSLT. Maybe I should just stick with what I've got.

Is there any advantage for using PHP to transform an XML docuement with XSL for the output type verses using PHP send back the appropriate style sheet for an XHTML doc?

Does anyone have any links / resources / book recommendations on how to set up an RSS feed?

<note>
Mods, not sure if this should go in PHP / XML or here, please feel free to move as you deem appropriate.
</note>

bcarl314
08-20-2003, 03:37 PM
Mods, when you get a chance, can you move this to the XML forum, I think it may be more appropriate there. I treid deleting to no avail.

jkd
08-20-2003, 05:12 PM
Sure thing.

Alex Vincent
08-22-2003, 04:28 AM
There is one significant advantage: the client doesn't have to do the transform if you do it server-side via PHP.

This is important, because not every client is the same. IE implements their own version of XSLT, for instance, that isn't in compliance with the standard.

IE doesn't support CSS totally either (no one fully does, I believe, not even Mozilla) but their compliance with CSS is fairly good.

brothercake
08-22-2003, 06:26 AM
Originally posted by Alex Vincent
IE doesn't support CSS totally either (no one fully does, I believe, not even Mozilla) but their compliance with CSS is fairly good.
It is indeed very good - moz even supports a couple of selectors you can use to do if{} else{} conditions in CSS - http://www.codingforums.com/showthread.php?s=&threadid=16367 - which is most excellent.

Another advantage of server-side XSLT is you can deliver multiple content types - XHTML, RSS, WML .. even PDF - from the same XML data source. Perhaps, in the future, intelligent transforms between XHTML and SVG could help overcome the accessibility problems faced by people with cognitive disabilities. Who knows what might be possible :)

I don't know anything about RSS, but http://www.xml.com/pub/a/2002/12/18/dive-into-xml.html looks useful.