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

Function msOWSPrintMetadata

mapows.c:787–812  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

785*/
786
787int msOWSPrintMetadata(FILE *stream, hashTableObj *metadata,
788 const char *namespaces, const char *name,
789 int action_if_not_found, const char *format,
790 const char *default_value)
791{
792 const char *value = NULL;
793 int status = MS_NOERR;
794
795 if((value = msOWSLookupMetadata(metadata, namespaces, name)) != NULL)
796 {
797 msIO_fprintf(stream, format, value);
798 }
799 else
800 {
801 if (action_if_not_found == OWS_WARN)
802 {
803 msIO_fprintf(stream, "<!-- WARNING: Mandatory metadata '%s%s' was missing in this context. -->\n", (namespaces?"..._":""), name);
804 status = action_if_not_found;
805 }
806
807 if (default_value)
808 msIO_fprintf(stream, format, default_value);
809 }
810
811 return status;
812}
813
814
815/*

Callers 2

msGMLWriteQueryFunction · 0.85
msWriteMapContextFunction · 0.85

Calls 2

msOWSLookupMetadataFunction · 0.85
msIO_fprintfFunction · 0.85

Tested by

no test coverage detected