MCPcopy Index your code
hub / github.com/MapServer/MapServer / msWCSWriteDocument20

Function msWCSWriteDocument20

mapwcs20.c:1911–1940  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1909/************************************************************************/
1910
1911static int msWCSWriteDocument20(mapObj* map, xmlDocPtr psDoc)
1912{
1913 xmlChar *buffer = NULL;
1914 int size = 0;
1915 msIOContext *context = NULL;
1916
1917 const char *encoding = msOWSLookupMetadata(&(map->web.metadata), "CO", "encoding");
1918
1919 if( msIO_needBinaryStdout() == MS_FAILURE )
1920 {
1921 return MS_FAILURE;
1922 }
1923
1924 if (encoding)
1925 {
1926 msIO_printf("Content-type: text/xml; charset=%s%c%c", encoding,10,10);
1927 }
1928 else
1929 {
1930 msIO_printf("Content-type: text/xml%c%c",10,10);
1931 }
1932
1933 context = msIO_getHandler(stdout);
1934
1935 xmlDocDumpFormatMemoryEnc(psDoc, &buffer, &size, (encoding ? encoding : "ISO-8859-1"), 1);
1936 msIO_contextWrite(context, buffer, size);
1937 xmlFree(buffer);
1938
1939 return MS_SUCCESS;
1940}
1941
1942/************************************************************************/
1943/* msWCSWriteFile20() */

Callers 3

msWCSGetCapabilities20Function · 0.85
msWCSDescribeCoverage20Function · 0.85
msWCSGetCoverage20Function · 0.85

Calls 5

msOWSLookupMetadataFunction · 0.85
msIO_needBinaryStdoutFunction · 0.85
msIO_printfFunction · 0.85
msIO_getHandlerFunction · 0.85
msIO_contextWriteFunction · 0.85

Tested by

no test coverage detected