[SNIPPET] xslt
Votes: 20
Tags: Feeds, snippet, xhtml, xml, xsl
Submitted: Jan 5, 2007
Released: Jan 5, 2007
Downloads: 2202
License: GPL - GNU Public
[SNIPPET] xslt 0.2
Works with the following Version(s): 0.9.5
Transforms a remote XML feed using a local XSL file.
Download
- repo-1259.txt (2202 downloads)
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
&xslParams: Comma separated list of parameterName:parameterValue pairs that are given to the XSL processor.
Example call: !xslt? &xmlURL=`http://www.domain.com/feed.rss` &xslFile=`/assets/templates/mytemplate/testStyle.xsl` &xslParams='someExampleParameter:3,otherParemeter:yes'!
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 that you feel others may find useful, feel free to add it to the extras.
Instructions
1. Download the text file, 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, and with the parameters (if any) that are passed to the XSL sheet.Updates0.2 - Added option in snippet call to pass parameters to XSL sheet.
0.1.1 - Removed debugging info that was being output in error.
0.1 - Initial release.
Sub-Packages
Votes: 16
Tags:
Submitted: Jan 2, 2007
Released: Jan 2, 2007
Downloads: 1261
License: GPL - GNU Public
First titles/links of RSS feed in unordered list
XSL transformation that can be used with the xslt snippet to show a number of the first titles/links of a RSS feed.
Previous Releases
0.1.1
Votes: 15
Tags: Feeds, snippet, xhtml, xml, xsl
Submitted: Jan 2, 2007
Released: Jan 2, 2007
Downloads: 432
License: GPL - GNU Public
[SNIPPET] xslt 0.1.1
Works with the following Version(s): 0.9.5
This version has been marked as deprecated. Please use a newer version.
Transforms a remote XML feed using a local XSL file
Download
- repo-1251.txt (432 downloads)
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
&xslParams: Comma separated list of parameterName:parameterValue pairs that are given to the XSL processor.
Example call: !xslt? &xmlURL=`http://www.domain.com/feed.rss` &xslFile=`/assets/templates/mytemplate/testStyle.xsl` &xslParams='someExampleParameter:3,otherParemeter:yes'!
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 that you feel others may find useful, feel free to add it to the extras.
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.Updates0.1.1 - Removed debugging info that was being output in error.
0.1 - Initial release
0.1
Votes: 17
Tags: Feeds, snippet, xhtml, xml, xsl
Submitted: Jan 2, 2007
Released: Jan 2, 2007
Downloads: 439
License: GPL - GNU Public
[SNIPPET] xslt 0.1
Works with the following Version(s): 0.9.5
This version has been marked as deprecated. Please use a newer version.
Transforms a remote XML feed using a local XSL file
Download
- repo-1250.txt (439 downloads)
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
&xslParams: Comma separated list of parameterName:parameterValue pairs that are given to the XSL processor.
Example call: !xslt? &xmlURL=`http://www.domain.com/feed.rss` &xslFile=`/assets/templates/mytemplate/testStyle.xsl` &xslParams='someExampleParameter:3,otherParemeter:yes'!
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 that you feel others may find useful, feel free to add it to the extras.
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.

Please login to comment.