Open tbonfort opened 12 years ago
Author: assefa Date: 2007/08/02 - 21:20 daniel, all 4 comments make sense. I will do the corrections before beta3.
This issue has been closed due to lack of activity. This doesn't mean the issue is invalid, it simply got no attention within the last year. Please reopen if still valid.
Reporter: dmorissette Date: 2007/08/02 - 20:16 The following code in msWFSDescribeFeatureType() was introduced in 1ca8d3601abf89681eb2e987bc3dd11f4796baaf (r2435) and is intended to strip namespaces in the list of typenames provided by the caller but it seems to have a few problems listed below:
1- We check only layers[0] to decide if we are going to strip namespaces. What if layer[0] doesn't contain a namespace and layer[1] does contain a namespace? Should we not strip namespaces anyway?
2- I guess the conclusion from the question above is that we should loop on all layers and try each layer name with msGetLayerIndex() and if they fail try removing the namespace prefix? Would that be better?
3- Doing a msStringSplit() to look for a ':' delimiter is expensive. Would it not be better to use " if (strchr( string, ':') != NULL) ... " instead?
4- Since we have very similar code in msWFSGetFeature(), should we not move that to a function and reuse it?
Assefa, what would you think of using the following (untested code) and moving it to a function?