Forum Moderators: open
Here's what XSLT is good for: You can generate a single set of data from something like a PHP file, and then, depending upon runtime variables, repurpose the data for different destinations.
If you are going to be displaying it on a standard Web page, you might add positioning/styling information to the data.
If you are going to be sending it to a cellphone, you may strip out almost all of the parts that do not directly meet the needs of data display on the cellphone.
If you are printing (by creating a printer-friendly page), you may want to rearrange the structure.
If you are exporting to another system, then you can strip out all of extra stuff, and send out a simple CSV.
XSLT is a fair bit of work. A stylesheet with any real-world significance can be every bit as large and hard to design/debug as a PHP file or a big DHTML file.
It is well worth it for multiple arbitrary destinations. I use XML in an "API" for one of the sites I design, and XSLT on the sites that use that API.
It may well not be worth it for a simple data export. For example, if you will have a pretty fixed Website design, and a basic CSV data interchange with your backoffice system, then why go to all the extra agita of doing it the XML way?
I can tell you that designing a "pure" XML system is not for the faint of heart. It is very powerful, and very kewl, but not easy or intuitive.
And never forget about learning curves. The chances are good that your first project may be a throwaway. If this is the case, you may not want it to be your crucial business site. Even if you will need to rewrite it in the future, you may be better off using tech that you know right now for your crucial system.
So can I assume that would parse the csv file in php then using xslt output the file to xml with all of the info. formatted properly?
I've never used xml before but it seems fairly straightforward
No it's not.
Generating basic XML isn't a big deal, but applying XML is a very big deal. The XML community is chaotic and filled with a great deal of useless information. It's a real job to sift through it in order to find the gems you need. It seems that there are a great many people who know enough to be dangerous, and gleefully post wrong or incomplete information, and the people who do know what they are doing don't help us n00bs to make it over the very earliest stumbling blocks.
Every technology is "straightforward" when it is presented by academics in 100 lines or less.
It is a whole different story when you have to use it in real world situations.
Read the various threads I've posted here as I have been learning up on it.
Remember that I am a C++ expert, with more than twenty years of software development experience, and experience in learning many different programming languages:
[webmasterworld.com...]
[webmasterworld.com...]
[webmasterworld.com...]
[webmasterworld.com...]
[webmasterworld.com...]
[webmasterworld.com...]
[webmasterworld.com...]
[webmasterworld.com...]
[webmasterworld.com...]
[webmasterworld.com...]
[webmasterworld.com...]
[webmasterworld.com...]