Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Release: ServiceM8 Webform Integration 1.2.1 — Minor update available for module servicem8_webform (1.2.1). Release: PostfixAdmin 1.0.0 — Initial release available for module postfix_admin (1.0.0)! Release: ip_analyser 1.0.3 — Minor update available for module ip_analyser (1.0.3). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

A field formatter that runs given XML content (pasted data, linked URL or uploaded file) through a defined XSL stylesheet before rendering.

When enabled, this provides an additional field formatter available through 'manage display' for use entity displays or views. The result is then shown in the page and managed like any other field display.

The data source can be:

  • a textarea field which contains the raw XML.
  • a link field defining a remote or filesystem data source.
  • A file field where you can upload an XML file directly.

Configuration options on the display widget will allow you to choose or upload the XSL that should be run over it, on a per-field basis.

(If you want different options per entity, try adding formatter_field)

Upload your own XSL files using the upload field on the formatter settings or re-use the ones already available. It comes with three 'XML Pretty-printers' as samples to begin with, but you should source your own ones for your own data.

Process the contents of a remote URL

This process can ALSO run identically over a link field.

Add a 'link' field to your page, and choose 'Transformed by XSL' as the renderer.
On each request, that file will be fetched, parsed, transformed and rendered.

The data source (textarea or link target) should contain valid XML, and the XSL should produce an HTML snippet, as the result will be displayed inline in the page.

This remote fetcher could be used to provide an inefficient type of RSS-like update, this could also display realtime data from remote feeds of many types, such as weather data, movie screenings, bus timetables etc, as long as it comes in XML and you can write an XSLT for it.
For a really robust solution like that, please use Feeds module instead. However, as a stand-alone only-one-configuration-setting-needed version, this could be handy too.

Other projects

See also:

  • http://drupal.org/project/cck_xslt D6 unreleased
    - which made its own field and data storage instead of re-using a text field.
    - Has the XSL selection a per-node choice, not a field formatter.
    - did demonstrate how easy it was to extend to reading an URL instead of text.
  • http://drupal.org/project/feeds_xsltparser D7 dev
    - Not incredibly similar, but nice to see!
  • http://drupal.org/node/1476774 "XML Transform" Never released
    - Uses the Drupal text filter system to process a textarea with XSL.
    - Actually the first way I started thinking about it, as I've done multiple XML-based text filters already.

Drupal6 Backport exists

... However the additional options : XSL parameter input and direct file upload are unavailable as there is no D6 UI for this under CCK. Instead,
- place your own files in {site}/files/xsl and flush the cache.
- Each available xsl file found will be an available transform process, select it from the cck field display management page.

@author Dan Morrison (dman) [email protected]
@version 2012-11-27 (1:00AM -3:30AM)

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Oct 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core Release date
2.0.0-alpha1 Pre-release Oct 24, 2023