Forum Moderators: phranque

Message Too Old, No Replies

XSLT vs PHP for formatting an XML file

which one to use

         

lorax

8:11 pm on Dec 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thinking outloud here...
It seems to me that for presenting an XML file to screen, using XSLT or PHP really doesn't matter. Or does it? They can both take the XML data and transform it into XHTML. Since I have to use a scripting language to apply the XSL file, what are the advantages of using it over just writing a PHP file to format the data differently?

Also as I understand it (while my ignorance is showing), while some of the browsers support XLink, not all of them do. If I use XSLT, could I create a rewrite rule that would take an XLink element and create a standard HTML link?

korkus2000

8:27 pm on Dec 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If it is for the open internet I would suggest PHP. Since you are using PHP anyway I think that is the better way to go. Internal sites and software benifit from XSLT IMHO.

lorax

3:30 pm on Dec 17, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks korkus2000.

That makes sense.

lorax

4:11 pm on Dec 24, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Alright. Been doing more reading and now I'm wondering about XQuery as option. Has anyone worked with this and have some insight to share?