Index: trunk/zoo-project/zoo-kernel/ZOOMakefile.opts.in
===================================================================
--- trunk/zoo-project/zoo-kernel/ZOOMakefile.opts.in	(revision 853)
+++ trunk/zoo-project/zoo-kernel/ZOOMakefile.opts.in	(revision 866)
@@ -101,5 +101,5 @@
 MONO_FILE=@MONO_FILE@
 
-CFLAGS=@RELY_ON_DB@ @DEB_DEF@ -fpic @OPENSSL_CFLAGS@ ${FCGI_CFLAGS} ${YAML_CFLAGS} ${MACOS_CFLAGS} ${MS_CFLAGS} -I../../thirds/cgic206 -I. -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF
+CFLAGS=-Wdeclaration-after-statement @RELY_ON_DB@ @DEB_DEF@ -fpic @OPENSSL_CFLAGS@ ${FCGI_CFLAGS} ${YAML_CFLAGS} ${MACOS_CFLAGS} ${MS_CFLAGS} -I../../thirds/cgic206 -I. -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF
 LDFLAGS=-lzoo_service @DEFAULT_LIBS@ -L../../thirds/cgic206 -lcgic ${GDAL_LIBS} ${XML2LDFLAGS} ${PYTHONLDFLAGS} ${PERLLDFLAGS}  ${PHPLDFLAGS} ${JAVALDFLAGS} ${JSLDFLAGS}  ${FCGI_LDFLAGS} @OPENSSL_LDFLAGS@ -luuid ${MS_LDFLAGS} ${MACOS_LD_FLAGS} ${MACOS_LD_NET_FLAGS} ${YAML_LDFLAGS} ${OTBLDFLAGS} ${SAGA_LDFLAGS} ${MONO_LDFLAGS}
 
Index: trunk/zoo-project/zoo-kernel/request_parser.c
===================================================================
--- trunk/zoo-project/zoo-kernel/request_parser.c	(revision 853)
+++ trunk/zoo-project/zoo-kernel/request_parser.c	(revision 866)
@@ -997,4 +997,5 @@
 							     &buffersize,
 							     "utf-8", 0);
+				  xmlFreeDoc (doc1);
 				}
 			      else
@@ -1012,14 +1013,26 @@
 			      addIntToMap (tmpmaps->content, "size",
 					   buffersize);
-			      xmlFreeDoc (doc1);
 			    }else{
-			    xmlNodePtr cur5 = cur4->children;
-			    while (cur5 != NULL
-				   && cur5->type != XML_CDATA_SECTION_NODE)
-			      cur5 = cur5->next;
-			    if (cur5 != NULL
-				&& cur5->type == XML_CDATA_SECTION_NODE){
-			      xmlFree(mv);
-			      mv=xmlStrdup(cur5->content);
+			    if(xmlStrcasecmp
+			       (cur4->name, BAD_CAST "BoundingBoxData") == 0){
+			      xmlDocPtr doc1 = xmlNewDoc(BAD_CAST "1.0");
+			      int buffersize;
+			      xmlDocSetRootElement(doc1,cur4);
+			      xmlDocDumpFormatMemoryEnc(doc1,&mv,
+							&buffersize,
+							"utf-8",0);
+			      addIntToMap (tmpmaps->content, "size",
+					   buffersize);
+			      xmlParseBoundingBox(main_conf,&tmpmaps->content,doc1);
+			    }else{
+			      xmlNodePtr cur5 = cur4->children;
+			      while (cur5 != NULL
+				     && cur5->type != XML_CDATA_SECTION_NODE)
+				cur5 = cur5->next;
+			      if (cur5 != NULL
+				  && cur5->type == XML_CDATA_SECTION_NODE){
+				xmlFree(mv);
+				mv=xmlStrdup(cur5->content);
+			      }
 			    }
 			  }
@@ -1092,4 +1105,41 @@
     }
   return 1;
+}
+
+/**
+ * Parse a BoundingBoxData node
+ *
+ * http://schemas.opengis.net/ows/1.1.0/owsCommon.xsd: BoundingBoxType
+ * 
+ * A map to store boundingbox information will contain:
+ *  - LowerCorner : double double (minimum within this bounding box)
+ *  - UpperCorner : double double (maximum within this bounding box)
+ *  - crs : URI (Reference to definition of the CRS)
+ *  - dimensions : int 
+ *
+ * @param main_conf the conf maps containing the main.cfg settings
+ * @param request_inputs the map storing KVP raw value 
+ * @param doc the xmlDocPtr containing the BoudingoxData node
+ * @return a map containing all the bounding box keys
+ */
+int xmlParseBoundingBox(maps** main_conf,map** current_input,xmlDocPtr doc){
+  xmlNode *root_element = xmlDocGetRootElement(doc);
+  for(xmlAttrPtr attr = root_element->properties; NULL != attr; attr = attr->next){
+    xmlChar *val = xmlGetProp (root_element, BAD_CAST attr->name);
+    addToMap(*current_input,(char*)attr->name,(char*)val);
+    xmlFree(val);
+    xmlNodePtr cur = root_element->children;
+    while(cur!=NULL && cur->type != XML_ELEMENT_NODE)
+      cur=cur->next;
+    while(cur!=NULL && cur->type==XML_ELEMENT_NODE){
+      xmlChar *val =
+	xmlNodeListGetString (doc, cur->xmlChildrenNode, 1);
+      addToMap(*current_input,(char*)cur->name,(char*)val);
+      cur=cur->next;
+      xmlFree(val);
+      while(cur!=NULL && cur->type != XML_ELEMENT_NODE)
+	cur=cur->next;
+    }
+  }
 }
 
Index: trunk/zoo-project/zoo-kernel/request_parser.h
===================================================================
--- trunk/zoo-project/zoo-kernel/request_parser.h	(revision 853)
+++ trunk/zoo-project/zoo-kernel/request_parser.h	(revision 866)
@@ -42,4 +42,5 @@
   void ensureDecodedBase64(maps**);
   int kvpParseInputs(maps**,service*,map*,maps**,HINTERNET*);
+  int xmlParseBoundingBox(maps**,map**,xmlDocPtr);
   int kvpParseOutputs(maps**,map *,maps**);
   int xmlParseInputs(maps**,service*,maps**,xmlDocPtr,xmlNodeSet*,HINTERNET*);
