Hi everyone I'm not sure what I am doing wrong here, but no matter what I try I can't get around it.
Using the EarthResourceML 2.0 schema - http://schemas.earthresourceml.org/2.0/earthresourceml.xsd - http://www.earthresourceml.org/earthresourceml/2.0/doc/ERML_HTML_Documentation/ The problem I'm having is that in my er:MineralOccurrence mapping file, I have potentially multiple er:sourceReference attributes (which are by reference as xlink:href) with parent-child relationships between er:MineralOccurrence feature types. The table I have made de-normalises the former so there are multiple rows: Relevant snippets of code follow (full code attached in er_MineralOccurrence_mapping.xml). For feature chaining parent-child: <AttributeMapping> <targetAttribute>er:child</targetAttribute> <sourceExpression> <OCQL>CHILDREN_PARENT</OCQL> <linkElement>er:MineralOccurrence</linkElement> <linkField>FEATURE_LINK[1]</linkField> </sourceExpression> </AttributeMapping> <AttributeMapping> <targetAttribute>FEATURE_LINK[1]</targetAttribute> <sourceExpression> <OCQL>PARENT</OCQL> </sourceExpression> </AttributeMapping> For the multi value sourceReference mapping: <AttributeMapping> <targetAttribute>er:sourceReference</targetAttribute> <isMultiple>true</isMultiple> <ClientProperty> <name>xlink:href</name> <value>SOURCEREF_HREF</value> </ClientProperty> <ClientProperty> <name>xlink:title</name> <value>SOURCEREF_TITLE</value> </ClientProperty> </AttributeMapping> What happens is that the parent feature maps the correct number of sourceReference attributes (in this case four distinct values) but the child feature, which has only a single sourceReference, also maps it four times. It's as if the feature chain cascades the duplicate relations in the parent to the child. See bethanga_erml_output.xml attached. I'm not sure how to prevent this from happening Requesting the child feature alone results in a single sourceReference as expected, so it isn't a problem when a feature is mapped by itself (see bethanga_erml_child_output.xml) I've attached an extract of the relevant data (bethanga_data.csv) Any help would be greatly appreciated. Thanks Michael Sexton Geoscience Australia Disclaimer: This e-mail (and files transmitted with it) is intended only for the person or entity to which it is addressed. If you are not the intended recipient, then you have received this e-mail by mistake and any use, dissemination, forwarding, printing or copying of this e-mail and its file attachments is prohibited. The security of emails transmitted cannot be guaranteed; by forwarding or replying to this email, you acknowledge and accept these risks. -------------------------------------------------------------------------------------------------------------------------
bethanga_erml_output.xml
Description: bethanga_erml_output.xml
bethanga_data.csv
Description: bethanga_data.csv
er_MineralOccurrence _mapping.xml
Description: er_MineralOccurrence _mapping.xml
bethanga_erml_child_output.xml
Description: bethanga_erml_child_output.xml
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users