Просмотр исходного кода

fixed featureId pattern in wfs server qgis

Piotr Labudda 10 лет назад
Родитель
Сommit
967d6fe695
1 измененных файлов с 5 добавлено и 5 удалено
  1. 5 5
      SE/se-lib/Api/WfsServerBase.php

+ 5 - 5
SE/se-lib/Api/WfsServerBase.php

@@ -736,7 +736,7 @@ if($DBG){echo '$convertedTransaction:';print_r($convertedTransaction);echo "\n";
 						//throw new Exception("TODO: Insert #" . __LINE__ . ": Create new record");
 					}
 				}
-				if($DBG){echo "TODO update itemPatch:\n";print_r($itemPatch);}
+				if($DBG){echo "TODO '" . ($itemPatchInfo['tag'])? 'Insert' : 'Update' . "' itemPatch:\n";print_r($itemPatch);}
 				if ('Insert' == $itemPatchInfo['tag'] && empty($itemPatch[$acl->getPrimaryKeyField()])) {
 					$newId = $acl->addItem($itemPatch);
 					$changesList[$newId] = array('Status'=>(($newId > 0)? 'SUCCESS' : 'FAILED'), 'Message'=>"created {$newId}.");
@@ -1171,7 +1171,7 @@ if($DBG){echo 'sourceNsList:';print_r($sourceNsList);echo "\n";}
 							$resNode->setAttribute('base', 'xsd:string');
 								$patternNode = $dom->createElementNS('http://www.w3.org/2001/XMLSchema', 'xsd:pattern');
 								$resNode->appendChild($patternNode);
-								$patternNode->setAttribute('value', '[a-zA-Z_]*\.[0-9]*');
+								$patternNode->setAttribute('value', '[a-zA-Z_][a-zA-Z0-9_]*\.[0-9]*');
 				}
 			}
 		}
@@ -1245,7 +1245,7 @@ if($DBG){echo '$validateConvertedTransactionXsdString:';print_r($validateConvert
 			<xsd:attribute name="featureId" use="required">
 				<xsd:simpleType>
 					<xsd:restriction base="xsd:string">
-						<xsd:pattern value="[a-zA-Z_]*\.[0-9]*"/>
+						<xsd:pattern value="[a-zA-Z_][a-zA-Z0-9_]*\.[0-9]*"/>
 					</xsd:restriction>
 				</xsd:simpleType>
 			</xsd:attribute>
@@ -1267,7 +1267,7 @@ if($DBG){echo '$validateConvertedTransactionXsdString:';print_r($validateConvert
 				$restrNode->setAttribute('base', 'xsd:string');
 					$patternNode = $dom->createElementNS('http://www.w3.org/2001/XMLSchema', 'xsd:pattern');
 					$restrNode->appendChild($patternNode);
-					$patternNode->setAttribute('value', '[a-zA-Z_]*\.[0-9]*');
+					$patternNode->setAttribute('value', '[a-zA-Z_][a-zA-Z0-9_]*\.[0-9]*');
 
 		return $dom->saveXml($cTypeNode);
 
@@ -1280,7 +1280,7 @@ if($DBG){echo '$validateConvertedTransactionXsdString:';print_r($validateConvert
 			<xsd:attribute name="featureId" use="required">
 				<xsd:simpleType>
 					<xsd:restriction base="xsd:string">
-						<xsd:pattern value="[a-zA-Z_]*\.[0-9]*"/>
+						<xsd:pattern value="[a-zA-Z_][a-zA-Z0-9_]*\.[0-9]*"/>
 					</xsd:restriction>
 				</xsd:simpleType>
 			</xsd:attribute>