Is there a simply way to run some XML through a XSL template then pass the results from that into another XSL template?
I've got multiple external data feeds which I want to normalise into one format which another template can then render out. Been pointed in the direction of Yahoo pipes which does the job but wondered if there was anything already in Umbraco which might do it?
Current solutions I have in mind are:
* The requested page calls another umbraco template using GetXMLFromExternalUrl() which reformats the feed, then the calling page renders it out (bit clunky)
* Create a custom XSL function which will take a NodeList and a template path, push them together and return a NodeList. This is better but would need to ensure all the Umbraco library goodies where pushed in too so would need to be kept up to date with any additions or duplicate code from Umbraco (unless there was a way to keep it DRY). Would also mean you could chain transforms together:
Multiple XSL transforms before output
Is there a simply way to run some XML through a XSL template then pass the results from that into another XSL template?
I've got multiple external data feeds which I want to normalise into one format which another template can then render out. Been pointed in the direction of Yahoo pipes which does the job but wondered if there was anything already in Umbraco which might do it?
Current solutions I have in mind are:
* The requested page calls another umbraco template using GetXMLFromExternalUrl() which reformats the feed, then the calling page renders it out (bit clunky)
* Create a custom XSL function which will take a NodeList and a template path, push them together and return a NodeList. This is better but would need to ensure all the Umbraco library goodies where pushed in too so would need to be kept up to date with any additions or duplicate code from Umbraco (unless there was a way to keep it DRY). Would also mean you could chain transforms together:
Transform( Transform( myNodes, "myXSL1.xsl" ), "myXSL2.xsl" )
Ideas?
This would seem to fit your needs quite well -> http://our.umbraco.org/wiki/how-tos/xslt-useful-tips-and-snippets/reading-rss-feeds,-aggregating-and-sorting
Dan
Apologies, the correct link includes the comma
Perfect Dan! Nice find. I did search but never stumbled on that one.
Cheers
Pete
is working on a reply...