Justin Deoliveira wrote:
> Ben Caradoc-Davies wrote:
>> Would this be an opportunity to trim whitespace from strings in 
>> datastore.xml connectionParameters/entry elements?
> Hmmm... I am still not sure I think this is such a great idea. I still 
> stand by" whatever you put into the config you should get out exactly 
> that". If for some reason a datastore relied on whitespace they would be 
> screwed.
> That said I don't have an example of where this would be problematic, so 
> I don't have a strong case, just a gut feeling. Can you job my memory as 
> to why the entity creating the entries can't do the trim? It is because 
> it comes from formatted XML which looks like this:
> <a>
>    the value
> </a>

Yes, hand editing of datastore.xml in an XML-aware editor, while 
configuring an app-schema data store. I can fix it for app-schema, but 
any other datastore with a long path may be vulnerable.

 From the last time we discussed this:

******

The end user is editing the XML and formats the file before saving,
introducing whitespace.

(Note: this will be a bit mangled by email:)

This works:

<dataStore>
        <id>gsml_MappedFeature_datastore</id>
        <name>gsml_MappedFeature</name>
        <enabled>true</enabled>
        <workspace>
                <id>gsml_workspace</id>
        </workspace>
        <connectionParameters>
                <entry key="namespace">urn:cgi:xmlns:CGI:GeoSciML:2.0
                </entry>
                <entry
key="url">file:workspaces/gsml/gsml_MappedFeature/gsml_MappedFeature.xml</entry>
                <entry key="dbtype">app-schema</entry>
        </connectionParameters>
</dataStore>

This does not:

<dataStore>
        <id>gsml_MappedFeature_datastore</id>
        <name>gsml_MappedFeature</name>
        <enabled>true</enabled>
        <workspace>
                <id>gsml_workspace</id>
        </workspace>
        <connectionParameters>
                <entry key="namespace">urn:cgi:xmlns:CGI:GeoSciML:2.0
                </entry>
                <entry key="url">
                        
file:workspaces/gsml/gsml_MappedFeature/gsml_MappedFeature.xml
                </entry>
                <entry key="dbtype">app-schema</entry>
        </connectionParameters>
</dataStore>


******


-- 
Ben Caradoc-Davies <ben.caradoc-dav...@csiro.au>
Software Engineer, CSIRO Exploration and Mining
Australian Resources Research Centre
26 Dick Perry Ave, Kensington WA 6151, Australia

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to