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

Function msOWSPrintMetadataList

mapows.c:1263–1288  ·  view source on GitHub ↗

msOWSPrintMetadataList() ** ** Prints comma-separated lists metadata. (e.g. keywordList) **/

Source from the content-addressed store, hash-verified

1261** Prints comma-separated lists metadata. (e.g. keywordList)
1262**/
1263int msOWSPrintMetadataList(FILE *stream, hashTableObj *metadata,
1264 const char *namespaces, const char *name,
1265 const char *startTag,
1266 const char *endTag, const char *itemFormat,
1267 const char *default_value)
1268{
1269 const char *value;
1270 if((value = msOWSLookupMetadata(metadata, namespaces, name)) ||
1271 (value = default_value) != NULL )
1272 {
1273 char **keywords;
1274 int numkeywords;
1275
1276 keywords = msStringSplit(value, ',', &numkeywords);
1277 if(keywords && numkeywords > 0) {
1278 int kw;
1279 if(startTag) msIO_fprintf(stream, "%s", startTag);
1280 for(kw=0; kw<numkeywords; kw++)
1281 msIO_fprintf(stream, itemFormat, keywords[kw]);
1282 if(endTag) msIO_fprintf(stream, "%s", endTag);
1283 msFreeCharArray(keywords, numkeywords);
1284 }
1285 return MS_TRUE;
1286 }
1287 return MS_FALSE;
1288}
1289
1290/* msOWSPrintEncodeMetadataList()
1291**

Callers

nothing calls this directly

Calls 4

msOWSLookupMetadataFunction · 0.85
msStringSplitFunction · 0.85
msIO_fprintfFunction · 0.85
msFreeCharArrayFunction · 0.85

Tested by

no test coverage detected