[postgis-devel] ST_asGML strictness
strk
strk at keybit.net
Mon Mar 22 16:30:33 PDT 2010
On Mon, Mar 22, 2010 at 11:56:47PM +0100, Olivier Courtin wrote:
>
> On Mar 22, 2010, at 11:00 PM, strk wrote:
>
> Hi,
>
> >I'm in the process of adding optional 'prefix' parameter
> >to the ST_asGML family of functions.
>
> Well i was also curently working on it...
>
> Still have to debug/cunit and document it
Oops, I've already committed the liblwgeom/ part and cunit.
Sorry if I didn't announce the start of this.
> >In doing so, I was thinking to just add the new parameter
> >to the end of the existing ones, but that would force anyone
> >willing to add a prefix to specify all args.
>
> Same, same...
>
> Except that this parameter is optional,
> so it keep the compatibilty with older versions
>
> It becomes:
> -> a specific option (4 th parameter) to remove ns prefix
> if we want/need no prefix at all
>
> -> the 5th optional parameter to specify something else
> than ns prefix: gml
>
> -> in any other cases (so like now), prefix is: gml
>
>
> Thoughts ?
I kind of don't like the fact it would then be possible to say
"no prefix" with 4th arg and still pass a 5th arg with another
prefix. Also I don't find the 'options' parameter very friendly
to use.
But anyway my solution also doesn't convince me much, it being:
omitted or null prefix : <prefix> == "gml"
non-empty prefix : <prefix> + :
empty prefix : no prefix (and no colon)
what doesn't convince me much with this is the impossibility
to get a prefix consisting of an empty string + a ':' character.
So all in all I'm happy if you take care of the interface part
and am fine with your solution.
--strk;
() Free GIS & Flash consultant/developer
/\ http://strk.keybit.net/services.html
More information about the postgis-devel
mailing list