BrowserUk has asked for the wisdom of the Perl Monks concerning the following question:
I hesitated for a long time before asking this question as it may be considered to far "off topic" or be voted down for any number of other reasons, but after much research and trial by error, I've decided to risk it here where I have a high degree of respect for the accumulated wealth of experience rather than in 'some other forum'!
So here goes: (disables the flushing sound in XPFixation)
The scenario is this. I have a collection of XML files describing various "things". These are stored in a heirarchy of subdirs, loosely grouped by type or subject. The application is to allow users to navigate around the structure and to select the thing of interest and have the details presented on screen using a browser.
With the help of many good monks (and a few bad ones:), I now have the navigation part written in Perl/CGI and am quite pleased with it despite how long it took me to get it to run. I wanted to evaluate Perl for myself anyway.
My problem now is the best way to present the contents of the XML on screen. There seem to be various ways of doing this:
Using XML::Simple and CGI or HTML::Templates or even Jeurd's PLP package which I found very easy and intuative to work with. The problem with this is that the contents of the XML files are not wholey consistant. Some have pictures, some do not. Some have details in attributes that need to be displayed, others have the same details as the contents of nested tags. I do not control these files unfortunately. This approach means re-coding for each new format that comes along.
Basically, I just need to display this stuff on screen. I had thought that I could simply attach a suitable .css file to each xml file and lo, it would take care of itself but that proves to be problematic in several areas.
I could use the more advanced features of css2.
The latest possibility is the use of XSLT & XPATH. I brought the book. And it certainly could be used to acheive my goal. The downsides of this are:
What I'm hoping from this post is that one or two peope here have already been down this road and will share their experience, choices and reasoning with me so as I can short-cut a little of the redundant learning that will result from me investigating each of them myself.
Thanks for your time in reading this.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Request for advice. Presenting XML.
by rjray (Chaplain) on Jul 06, 2002 at 06:52 UTC | |
|
Re: Request for advice. Presenting XML.
by mirod (Canon) on Jul 06, 2002 at 14:11 UTC | |
by BrowserUk (Patriarch) on Jul 06, 2002 at 16:12 UTC | |
by mirod (Canon) on Jul 06, 2002 at 17:11 UTC | |
by BrowserUk (Patriarch) on Jul 06, 2002 at 17:39 UTC | |
|
Re: Request for advice. Presenting XML.
by Matts (Deacon) on Jul 08, 2002 at 13:20 UTC |