request for comment: adding xslt processing to mapserver

Paul Spencer pspencer at DMSOLUTIONS.CA
Wed Mar 28 15:44:51 EDT 2007


On 28-Mar-07, at 2:26 PM, Daniel Morissette wrote:

> Paul Spencer wrote:
>> Would it be possible to optionally accumulate the output from  
>> msIO_printf into an in-memory buffer and then use libxml2 to parse  
>> it and libxslt to transform it?  I see that msIO_printf gets  
>> stdout via msIO_getHandler which I would assume would allow  
>> directing stdout to a memory buffer of some kind?
>> If this could be done, then we could avoid using libxml2 by  
>> default and thus not affect, in any way, the normal output from  
>> WMS, WFS etc.  If an XSLT was requested in this particular case,  
>> then the calls to msIO_printf would write to a buffer rather than  
>> stdout and the buffer could be processed through libxml2 and libxslt.
>
>
> Yes, the msIO_* stuff was designed for that. Look at the  
> msIO_install* functions in mapio.c, or look at how MapScript uses  
> them to capture msIO_* output to a string buffer.
>
> Note that what you suggest here is doing in C in the MapServer core  
> what you can already do with MapScript today using "RFC-16:  
> MapScript WxS Services":
> http://mapserver.gis.umn.edu/development/rfc/ms-rfc-16/

Correct, it could be accomplished using WxS.  One of the objectives  
of this work would be to reduce the IT infrastructure requirements  
for deploying new OGC services.   Using WxS is equivalent to using an  
external service in this case, and would require the following  
additional steps beyond using a mapserv cgi:

* building and installing mapserv with a mapscript extension
* configuring web server for the particular flavour of mapscript you  
want to use
* ensuring the scripting language has packages for xml and xslt
* writing/maintaining code in the mapscript language to implement the  
parsing and transformation
* maintaining the scripting language installation over time as  
security patches come out (etc)

There are similar problems with external services.

Cheers

Paul

+-----------------------------------------------------------------+
|Paul Spencer                          pspencer at dmsolutions.ca    |
+-----------------------------------------------------------------+
|Chief Technology Officer                                         |
|DM Solutions Group Inc                http://www.dmsolutions.ca/ |
+-----------------------------------------------------------------+



More information about the mapserver-dev mailing list