ソースを参照

fixed p5:namespace for elements in wfs describe

Piotr Labudda 9 年 前
コミット
19c8444065
1 ファイル変更6 行追加1 行削除
  1. 6 1
      SE/se-lib/Api/WfsServerBase.php

+ 6 - 1
SE/se-lib/Api/WfsServerBase.php

@@ -1507,7 +1507,12 @@ if($DBG){echo 'L.' . __LINE__ . ' $validateConvertedTransactionXsdString:';print
 						$rootNode->appendChild($elNode);
 						$elNode->setAttribute('name', $ssName);
 						$elNode->setAttribute('type', "{$tnsPrefix}:{$ssName}Type");
-						if (!$simple) $elNode->setAttributeNS($rootWfsNsUri, "{$rootWfsNs}:namespace", $aclNamespaceUri);
+						if (!$simple) {
+							if (!empty($schema['@namespace'])) {// TODO: @namespace is required?
+								list($nsUri, $prefix, $name) = Api_WfsNs::parseObjectNsUri($schema['@namespace']);
+								$elNode->setAttributeNS($rootWfsNsUri, "{$rootWfsNs}:namespace", '{' . $nsUri . '}' . $name);
+							}
+						}
 					}
 				}