[SNIPPET] xslt 0.1
Transforms a remote XML feed using a local XSL file
Submitted: Jan 2nd 2007 | License: GPL - GNU Public | Downloads: 349
This resource has been deprecated.
Description
This snippet can be used to transform XML news feeds, for example RSS or Atom feeds, into XHTML, using a XSL file. However, this snippet will transform any remote XML document using any local XSL file.
Parameters:
&xmlURL: URL of remote XML file to be transformed
&xslFile: Location of XSL file on the webserver
Example call: [!xslt? &xmlURL=`http://www.domain.com/feed.rss` &xslFile=`/assets/templates/mytemplate/testStyle.xsl` !]
It currently uses the PHP CURL library to retrieve a remote XML feed. It then uses the PHP DOM XML Functions to apply a XSL transformation specified in a local file to transform it into another XML document.
If you create a XSL file for a public feed, feel free to add it to the extras so everyone can use/adapt it!
Instructions
1. Download xslt.txt, and copy the contents into a snippet called "xslt".
2. Write or download a XSL file for the feed you wish to transform, and save it on the server.
3. In your document/chunk/template where you want the transformed XML, place a call to the snippet with the appropriate URL and file location parameters.