Hello,
I’m not sure if this is the correct forum to post a code patch to, however I’m confident someone on this list will be able to evaluate my patch and determine its usefullness.
I’m currently using the geoserver application with a postGIS datastore. The schema that I’m using has a bit of a hierarchy to it, such as:
data for a
data for b
Metadata for x
When inserting this feature, WFS translated this into data for 3 different columns within postgis:
data/a
data/b
data/metadata/x
What it should have been was:
data/a
data/b
metadata/x
Alternatively if I changed the order of the XML, it changed the columns it was looking for, for instance given the following XML:
Metadata for x data for a data for bWhen inserting this feature it would look for:
metadata/x
metadata/data/a
metadata/data/b
The solution is fairly straightforward. On one of the endElement calls, it seems that the attName was not being reset back to an empty string. The patch is below, thanks for a great tool to use and test against.
— geoserver/src/org/vfny/geoserver/wfs/requests/TransactionFeatureHandler.java 2005-05-23 11:25:06.000000000 -0400
+++ /tmphome/bretth/src/geoserver/src/org/vfny/geoserver/wfs/requests/TransactionFeatureHandler.java 2005-05-25 14:05:58.000000000 -0400
@@ -331,6 +331,7 @@
LOGGER.finer("attName now equals " + attName);
insideAttribute = false;
} else {
- attName = “”;
parent.endElement(namespaceURI, localName, qName);
LOGGER.finest(“end - inside feature”);
–
Brett Humphreys
Senior Software Engineer
Applied Innovation
Office: 614-923-1340
Fax: 614-798-1770