So I agree that we should allow property names that match to database column 
names; or we need a way to encode/decode xml safe names folded into the jdbc 
datastores?

I have not been able to think of a good way to fix the propertyPattern 
provided; could we turn the problem around the other way and detect an obvious 
xpath expression? 

if( isFullXPath( xpath )){
   return null; // another accessor will need to handle the full xpath 
expression
}
String attributeName = xpath.trim();

Jody

On 07/05/2010, at 11:59 PM, Andrea Aime wrote:

> Hi,
> say one has a table or a view that contains charaters that are invalid
> xml tag wise, such as spaces. For example, "My name".
> 
> That makes it impossible to use that layer for WFS purposes for sure,
> but I've found that it makes it impossible to use the attribute for
> other things as well. For example, I cannot use it in SLD as a source
> of labels, or as a size, and so on.
> 
> This is probably because the property accessors check for "word chars
> only" regexp before stating they can actually handle the value:
> 
> static Pattern propertyPattern = Pattern.compile("(\\w+:)?(\\w+)");
> 
> I would say this is a case of being overzealous, since XML output
> is not the only possible use of the data.
> However, how can we tell apart that from a full xpath?
> I guess we could decide to let go a little and assume there are other
> chars past the word ones that make up a simple feature attribute?
> 
> What do you think?
> 
> 
> Cheers
> Andrea
> 
> -- 
> Andrea Aime
> OpenGeo - http://opengeo.org
> Expert service straight from the developers.
> 
> ------------------------------------------------------------------------------
> 
> _______________________________________________
> Geotools-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-devel


------------------------------------------------------------------------------

_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to