I just finished this exact thing for my articles...take a look here:
http://www.aspalliance.com/nothingmn/
(i know i know my PHP items are a bit thin, but that should be changing in
the near future)
All the data is in one XML document, and then i Use one XSL document to
transform the main index page..and then another for the actual listing of
each item. This does use ASP with MS XML, but im sure it could easily be
done with PHP and your friendly neighborhood parser.
Its actually pretty cool, I have this mirrored on a couple of different
sites, and what I did was have the ASP pass in a few parameters to the XSL
in order to grab the appropriate style and other items like sitename,
etc...) from the XML document. Both the XML and XSL are static files.
Ive been thinking about a centralized data store, so that I can avoid
uploading the XML to the various sites, but I cant justify the HTTP reqeust
for the XML data source for each attempt to load each item. Was also
thinking about a SOAP based system..but didnt bother, just because I wanted
to play with XML / XSL / CSS in this fashion.
/rob
At 11:32 AM 8/28/2001 -0700, you wrote:
> > Do you like XSL better than CSS?
>
>You can use both. I think this is the most flexible way to work.
>
>You store all of your data as XML. Just descriptive data. You use XSL
>stylesheets to transform that data into HTML, be it for regular browsers or
>wireless phones, simple text, whatever you want.
>
>Then you can create several different .css files that handle the way those
>look, sort of like playing with Desktop Themes in Windows.
>
>That way you can actually have each user of your system choose which "theme"
>they like your pages to look, and store that information with the other user
>preferences/info in a database. That way, the XML/XSLT always generates the
>same HTML each time, with the exception that the user's preferred CSS
>stylesheet is used to format the simple HTML tags the way they prefer.
>
>This seems extreme, but it's really not -- the more you separate the actual
>LOOK of the pages from the DATA of the pages, the easier your life will be
>when your company says, "Hey, we want our website to look like THIS now."
>
>With PHP code (or any code) that merges a lot of the logic with the
>presentation, you're totally screwed. That's why I'm always preaching
>against having a lot of code that isn't modular in PHP. I don't like seeing
>lots of HTML embedded in PHP code, because it's not maintanable.
>
>*shrug*
>
>
Robert Chartier
Author and Developer
xxx-xxx-xxxx
rob@a...
http://www.aspfree.com/devlinks
http://www.aspfree.com/authors/robert
http://www.aspalliance.com/nothingmn