|
|
@@ -1374,7 +1374,7 @@ if($DBG){echo 'L.' . __LINE__ . ' $validateConvertedTransactionXsdString:';print
|
|
|
$rootNode->setAttributeNS('http://www.w3.org/2000/xmlns/', "xmlns:{$prefix}", $uri);
|
|
|
}
|
|
|
$rootNode->setAttribute('elementFormDefault', 'qualified');
|
|
|
- $rootNode->setAttribute('targetNamespace', Api_WfsNs::getNsUri('p5_default_db'));// TODO:? what targetNamespace if showing types from p5_objects and p5_default_db
|
|
|
+ // $rootNode->setAttribute('targetNamespace', Api_WfsNs::getNsUri('p5_default_db'));// TODO:? what targetNamespace if showing types from p5_objects and p5_default_db
|
|
|
{// <xsd:import namespace="http://www.opengis.net/gml" schemaLocation="...../gml/2.1.2/feature.xsd"/>
|
|
|
$elNode = $dom->createElementNS('http://www.w3.org/2001/XMLSchema', 'xsd:import');
|
|
|
$rootNode->appendChild($elNode);
|
|
|
@@ -1388,6 +1388,7 @@ if($DBG){echo 'L.' . __LINE__ . ' $validateConvertedTransactionXsdString:';print
|
|
|
|
|
|
$typeName = "{$nsPrefix}:{$type}";
|
|
|
$acl = $this->getAclFromTypeName($typeName);
|
|
|
+ $rootNode->setAttribute('targetNamespace', Api_WfsNs::getNsUri($acl->getSourceName()));
|
|
|
$typeName = $type . 'Type';
|
|
|
$fldList = $this->_getFieldListFromAcl($acl);
|
|
|
|
|
|
@@ -1420,7 +1421,6 @@ if($DBG){echo 'L.' . __LINE__ . ' $validateConvertedTransactionXsdString:';print
|
|
|
}
|
|
|
$elNode->setAttribute('minOccurs', $minOccurs);
|
|
|
$elNode->setAttribute('maxOccurs', '1');
|
|
|
- $elNode->setAttribute('nillable', 'true');
|
|
|
$fldType = $acl->getXsdFieldType($fldName);
|
|
|
if (!$simple && $acl->isEnumerationField($fldName)) {
|
|
|
$fldType = "{$nsPrefix}:{$fldName}Type";
|
|
|
@@ -1437,6 +1437,7 @@ if($DBG){echo 'L.' . __LINE__ . ' $validateConvertedTransactionXsdString:';print
|
|
|
} else {
|
|
|
$elNode->setAttribute('name', $fldName);
|
|
|
$elNode->setAttribute('type', $fldType);
|
|
|
+ $elNode->setAttribute('nillable', 'true');// nillable not allowed in ref
|
|
|
}
|
|
|
|
|
|
if (!$simple) {
|
|
|
@@ -1456,11 +1457,7 @@ if($DBG){echo 'L.' . __LINE__ . ' $validateConvertedTransactionXsdString:';print
|
|
|
$rootNode->appendChild($elNode);
|
|
|
$elNode->setAttribute('name', $type);
|
|
|
$elNode->setAttribute('type', $nsPrefix . ':' . $typeName);// TODO: $acl->getSourceName() != $nsPrefix
|
|
|
- if ($simple) {
|
|
|
- $elNode->setAttribute('substitutionGroup', 'gml:_Feature');
|
|
|
- } else {
|
|
|
- $elNode->setAttribute('substitutionGroup', 'gml:AbstractFeature');
|
|
|
- }
|
|
|
+ $elNode->setAttribute('substitutionGroup', 'gml:_Feature');// gml:AbstractFeature in gml 3
|
|
|
|
|
|
foreach ($fldList as $fldName) {
|
|
|
$fldType = $acl->getXsdFieldType($fldName);
|