request for comment: adding xslt processing to mapserver

Daniel Morissette dmorissette at MAPGEARS.COM
Wed Mar 28 14:26:15 EDT 2007


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/

Daniel
-- 
Daniel Morissette
http://www.mapgears.com/



More information about the mapserver-dev mailing list