Opened 14 years ago

Last modified 13 years ago

#3334 closed defect

XML Mapfile loading support — at Version 2

Reported by: aboudreault Owned by: aboudreault
Priority: normal Milestone: 6.0 release
Component: Documentation - MapServer Version: svn-trunk (development)
Severity: normal Keywords: xml, mapfile, load
Cc: dmorissette, msmitherdc, havatv

Description (last modified by dmorissette)

This ticket is to add the ability to MapServer to load automatically xml mapfiles without user xslt tranformations. Basicly, MapServer will simply do a xslt transformation when the mapfile passed to is a xml one, convert it to a text mapfile in a temporary file on disk, then process the mapfile normally.

New Dependencies

  • libxslt
  • libexslt

Enabling the support
You can enable the xml mapfile support by adding the following option: --with-xml-mapfile. This configure option will enable the libxslt and libexslt check up. If your libxslt/libexslt are not installed in /usr, you'll have to add the following options:

--with-xslt=/path/to/xslt/installation
--with-exslt=/path/to/exslt/installation

Usage:
In order to enable this feature, set the MS_XMLMAPFILE_XSLT environment variable to point to the location of the XSLT to use for the XML->text mapfile conversion. e.g. in Apache:

SetEnv MS_XMLMAPFILE_XSLT /path/to/mapfile.xsl
PassEnv MS_XMLMAPFILE_XSLT

With this enabled, passing a .xml filename to the map CGI parameter will automatically trigger the conversion.

Note: This is a first step to xml mapfile loading support. Obviously, there is a cost to parse and translate the xml mapfile.. but this allows to use xml mapfile more easily.

Change History (2)

comment:1 by dmorissette, 14 years ago

Cc: msmitherdc added
Milestone: 5.6 release6.0 release

comment:2 by dmorissette, 14 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.