Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Peter Duncanson 430 posts 1360 karma points c-trib
    Mar 29, 2010 @ 16:18
    Peter Duncanson
    0

    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?

  • dandrayne 1138 posts 2262 karma points
    Mar 29, 2010 @ 16:37
  • dandrayne 1138 posts 2262 karma points
    Mar 29, 2010 @ 16:38
  • Peter Duncanson 430 posts 1360 karma points c-trib
    Mar 29, 2010 @ 16:44
    Peter Duncanson
    0

    Perfect Dan! Nice find. I did search but never stumbled on that one.

    Cheers

    Pete

Please Sign in or register to post replies

Write your reply to:

Draft