[GRASS-SVN] r44328 - grass/trunk/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Nov 15 11:43:46 EST 2010
Author: huhabla
Date: 2010-11-15 08:43:46 -0800 (Mon, 15 Nov 2010)
New Revision: 44328
Modified:
grass/trunk/lib/gis/parser_wps.c
Log:
Check for Identifier and description. In some modules the description is
missing, but the label is defined.
Modified: grass/trunk/lib/gis/parser_wps.c
===================================================================
--- grass/trunk/lib/gis/parser_wps.c 2010-11-15 12:51:46 UTC (rev 44327)
+++ grass/trunk/lib/gis/parser_wps.c 2010-11-15 16:43:46 UTC (rev 44328)
@@ -452,11 +452,13 @@
int i;
fprintf(stdout,"\t<ProcessDescription wps:processVersion=\"1\" storeSupported=\"%s\" statusSupported=\"%s\">\n", (store?"true":"false"), (status?"true":"false"));
- if(identifier)
+ if(identifier)
{
fprintf(stdout,"\t\t<ows:Identifier>");
print_escaped_for_xml(stdout, identifier);
fprintf(stdout,"</ows:Identifier>\n");
+ } else {
+ G_fatal_error("Identifier not defined");
}
if(title)
@@ -464,8 +466,14 @@
fprintf(stdout,"\t\t<ows:Title>");
print_escaped_for_xml(stdout, title);
fprintf(stdout, "</ows:Title>\n");
+ } else {
+ G_warning("Title not defined!");
+ fprintf(stdout,"\t\t<ows:Title>");
+ print_escaped_for_xml(stdout, "No title available");
+ fprintf(stdout, "</ows:Title>\n");
}
+
if(abstract)
{
fprintf(stdout,"\t\t<ows:Abstract>");
@@ -621,6 +629,8 @@
fprintf(stdout,"\t\t\t\t<ows:Identifier>");
print_escaped_for_xml(stdout, identifier);
fprintf(stdout,"</ows:Identifier>\n");
+ } else {
+ G_fatal_error("Identifier not defined");
}
if(title)
@@ -628,6 +638,11 @@
fprintf(stdout,"\t\t\t\t<ows:Title>");
print_escaped_for_xml(stdout, title);
fprintf(stdout, "</ows:Title>\n");
+ } else {
+ G_warning("Title not defined!");
+ fprintf(stdout,"\t\t\t\t<ows:Title>");
+ print_escaped_for_xml(stdout, "No title available");
+ fprintf(stdout, "</ows:Title>\n");
}
if(abstract)
More information about the grass-commit
mailing list