About
XML Formatter plugin for ScrewTurn Wiki engine allows you to embed xml data into your pages using custom style sheets.
Examples of usage:
- Display RSS/Atom feeds on your pages
- Display news from external sites
- Display SVN change logs
- And many more
Download
Current version is 1.0.1.
Download now.
Changelog
1.0.1 (28 August 2007)
- Fixed issue with cache (build-in page cache was still enabled when "cache=.." parameter was used).
- Released the source code.
1.0 - Initial release
XmlFormatter Help
To use XmlFormatter use these tags in your pages
{xmlf:parameters}.
The
paramenters are in form
key=value, separated by comma (
,).
Some examples:
{xmlf:xml=http://domain.com/feed.xml,code=yes} - displays raw XML content.{xmlf:xml=http://domain.com/feed.xml,xslt=http://domain.com/feed2html.xls} - loads both XML and XSLT files from a remote server{xmlf:xml=http://domain.com/feed.xml,xslt=myfeed2html.xls,params=maxlines=5} - loads XML from a remote server, loads XSLT file from wiki's upload folder, then formats using XSLT paraments maxlines=5. To avoid parameter conflicts use url-encoded parameters for params.
Available parameters are:
xml - url (http://...) or path relative to wiki upload folder. Note that for security reasons parent folders (e.g. ..\) are not allowed.xslt - same as for xml.params - paramenters that you want to pass to the XSLT stylesheet. It's url-encoded query string style parameters (e.g. key=value&ke2=value2).timeout - XML load timeout (not yet implemented)cache - cache expiration in minutescode - yes|no. If 'yes' it's HTML-encode the result.phase - 1|2. Default 2. Normally you want to leave it default, but if your XML data contains Wiki codes you can have them formatted by the Wiki engine by adding phase=1 parameter.
Templates
rss2ul
Converts RSS feed to unordered list of feed entries.
DownloadParameters:
maxlines - maximum number of entries to display. Default 10.
{xmlf:http://www.screwturn.eu/RSS.aspx?Page=Wiki,xslt=rss2ul.xsl,params=maxlines=3}atom2ul
Converts ATOM feed to unordered list of feed entries.
DownloadParameters:
maxentries - maximum number of entries to display. Default 10.maxdescription - maximum length of description (to shorten to). Default 0 (don't shorten).
{xmlf:xml=http://blog.webgear.co.nz/Atom.aspx,xslt=atom2ul.xsl,params=maxentries=3&maxdescription=200}Plugin in Action
My Blog
{xmlf:xml=http://blog.webgear.co.nz/Rss.aspx,xslt=rss2ul.xsl,params=maxlines=3}