Creating custom formats with XSLT
RESTfm supports XSLT 1.1 to add custom formats to those already provided.
The .fmpxml format uses this mechanism. The .xslt files provided in RESTfm/lib/xslt/
may be used as the basis for other formats.
To add a custom format, say formatX:
- Craft an XSLT to export from RESTfm XML to formatX. This must be called formatX_export.xslt
- Craft an XSLT to import from formatX to RESTfm XML. This must be called formatX_import.xslt
- Install the .xslt pair into
RESTfm/lib/xslt
- Add an entry to the 'formats' array in
RESTfm.ini.php
for formatX. - Use the new format by appending .formatX to any RESTfm URI.