1501{
1502 xmlNodePtr xa;
1503 int patch;
1505 bool found=false;
1506
1508 if (xnode == NULL)
1510
1511
1512 for (xa = xnode->children ; xa != NULL ; xa = xa->next)
1513 {
1514 if (xa->type != XML_ELEMENT_NODE) continue;
1517 {
1518 found = true;
1519 break;
1520 }
1521 }
1522 if (!found)
gml_lwpgerror(
"invalid GML representation", 51);
1523
1524
1525 for (patch=0, xa = xa->children ; xa != NULL ; xa = xa->next)
1526 {
1527 if (xa->type != XML_ELEMENT_NODE) continue;
1530 patch++;
1531
1532
1533
1534 if (patch > 1)
gml_lwpgerror(
"invalid GML representation", 52);
1535
1537 }
1538
1539 if (!patch)
gml_lwpgerror(
"invalid GML representation", 53);
1540
1541 return geom;
1542}
static xmlNodePtr get_xlink_node(xmlNodePtr xnode)
Return a xmlNodePtr on a node referenced by a XLink or NULL otherwise.
static bool is_xlink(xmlNodePtr node)
Return true if current node contains a simple XLink Return false otherwise.
static LWGEOM * parse_gml_patch(xmlNodePtr xnode, bool *hasz, int *root_srid)
Parse GML PolygonPatch (3.1.1)
static bool is_gml_namespace(xmlNodePtr xnode, bool is_strict)
Return false if current element namespace is not a GML one Return true otherwise.
static void gml_lwpgerror(char *msg, __attribute__((__unused__)) int error_code)
static bool is_gml_element(xmlNodePtr xn, const char *gml_name)