[development] XML transformations using XSL

James Walker walkah at walkah.net
Thu May 25 01:20:01 UTC 2006


On 5/24/06 11:42 AM, Farsheed wrote:
> Currently each XML feed is generated with a callback
> function written in PHP.  I was thinking the other
> day, perhaps a better approach would be to provide all
> the data in one XML file and then convert this file to
> other XML schemas using XSL.  Does such an approach
> make sense?  Anyone done something similar? The reason
> I thought this  might be useful is because then it
> becomes easy to support multiple XML schema's by
> simply writing another XSL template and plugging it in
> to some generalized transformation function.

This may or may not buy you much time - php xslt processing has some 
caveats - first, the API is completely different php4 vs. php5 ... plus 
there is processing overhead (beyond what straight php generation of the 
formats is). Also, it requires format implementation to be done in a 3rd 
syntax - that not everyone is aware (simple things in XSL are simple - 
but it's easy to get complicated in a hurry).

My experience with XSL is ... it's a nice idea, *but*... is your 
playlist data already in an XML format? or is it not coming from a 
database result set? If already in XML, then it might make sense to 
transform rather than parse & regenerate... otherwise probably not worth it.

my $0.02 CAD

-- 
James Walker :: http://walkah.net/ :: xmpp:walkah at walkah.net


More information about the development mailing list