MongoDB datastore: attribute names should not contain dot nor colon characters

Description

The default schema mapper maps nested properties to attribute names using the dot-notation, so, for example, a collection containing documents with the following
structure:

would correspond to a schema with three attributes, "data.intProperty", "data.doubleProperty" and "data.stringProperty". This however raises issues when a CQL filter on the attribute is added to e.g. a WMS request, because the attribute name is translated to an XPath expression and thus the dots (.) become forward slashes (/) and attribute lookup fails.

Similarly, if the field name in mongo contains a colon (:), WFS will generate invalid XML, since the XML element corresponding to such attribute will contain a colon character after the namespace separator.
E.g., field "xsi:type" would become in XML <[namespace]:xsi:type>, which is invalid.

Environment

Linux Fedora 21 64-bit
Oracle JDK 1.8.0.45
MongoDB 2.6.10
GeoTools/GeoServer 14-SNAPSHOT

Status

Assignee

Unassigned

Reporter

Stefano Costa

Triage

None

Components

Fix versions

Affects versions

14-M0

Priority

Medium
Configure