The returned error message of the GetFeatureInfo request:
error:Translator error Translator error Error reading Features Could not transform 'bfs nr': org.w3c.dom.DOMException: INVALID CHARACTER ERR: An invalid or illegal XML character is specified. An invalid or illegal XML character iS specified.
Should/could the aliasing only be included in the output for humans (text/plain, text/html) and be ignored in the output for machines (other mime types)?
I’m afraid you’re misunderstanding the feature type customization… it’s not some light aliasing that is randomly pickedby some formats and not others, it’s a wholesale redefinition of the data structure, that will be then used in all outputs.
It’s your job to make sure the names are valid for all formats… in your case I’m guessing it’s not working because GetFeatureInfo is being requested as GML?
For sure a space in names will break all WFS usage, and in general, anything that generates XML outputs (which is probably GetFeatureInfo in your case).
Yep - Requested as application/vnd.ogc.gml and “bfs nr” has space in name. Wholesale change of the datamodel is way to deep for our use case, we would just like to define attribute alias for humans.
As feature type customization goes “to deep”, this can not be achieved through “easy configuration”, correct?
It can work, but the setup is pretty heavy, it’s not meant to be a simple aliasing for some of the GetFeatureInfo output formats… though it can be used that way, if one wants.
Yep - Requested as application/vnd.ogc.gml and “bfs nr” has space in name.
Wholesale change of the datamodel is way to deep for our use case, we would
just like to define attribute alias for humans.
As feature type customization goes “to deep”, this can not be achieved
through “easy configuration”, correct?
Hi Jody,
it’s true that one can set up a description for each attribute (but not a title).
This description is only visible if one uses the WFS DescribeFeatureType output for that layer, as an annotation in the generated GML schema.
Point in case, here is an example of FeatureInfo output:
As you can see, I’ve customized the description of “STATE_NAME” to be “Name of the state”. So, one could maybe use this as an aliasing mechanism, if they wanted to.