Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message aggregation #87

Open
jonherrmann opened this issue Mar 27, 2017 · 0 comments
Open

Message aggregation #87

jonherrmann opened this issue Mar 27, 2017 · 0 comments
Assignees
Labels
Type: create EIP Create an EIP for this Enhancement Type: Discussion Input is required. Requirements and/or importance may be unclear

Comments

@jonherrmann
Copy link
Collaborator

Some basic thoughts about inspire-eu-validation/ets-repository#48

Example structures of the translation templates in the 2.0.0-beta:

<message ref="TR.xmlSchemaError">
<translationArguments>
<argument token="filename">ES_AD_50.xml</argument>
<argument token="error">
4:389: cvc-complex-type.2.4.a: Invalid content was found starting with element '{"http://inspire.ec.europa.eu/schemas/ad/4.0":situatedWithin}'. One of '{"http://www.opengis.net/gml/3.2":metaDataProperty, "http://www.opengis.net/gml/3.2":description, "http://www.opengis.net/gml/3.2":descriptionReference, "http://www.opengis.net/gml/3.2":identifier, "http://www.opengis.net/gml/3.2":name, "http://www.opengis.net/gml/3.2":boundedBy, "http://www.opengis.net/gml/3.2":location, "http://inspire.ec.europa.eu/schemas/ad/4.0":inspireId, "http://inspire.ec.europa.eu/schemas/ad/4.0":alternativeIdentifier, "http://inspire.ec.europa.eu/schemas/ad/4.0":beginLifespanVersion}' is expected.
</argument>
</translationArguments>
</message>

<message ref="TR.xmlSchemaError">
<translationArguments>
<argument token="filename">ES_AD_50.xml</argument>
<argument token="error">
7:24: cvc-complex-type.2.4.a: Invalid content was found starting with element '{"http://inspire.ec.europa.eu/schemas/gn/4.0":spelling}'. One of '{"http://inspire.ec.europa.eu/schemas/gn/4.0":language}' is expected.
</argument>
</translationArguments>
</message>

and

<LangTranslationTemplateCollection name="TR.xmlSchemaError">
<translationTemplates>
<TranslationTemplate language="en" name="TR.xmlSchemaError">XML document '{filename}': {error}</TranslationTemplate>
</translationTemplates>
</LangTranslationTemplateCollection>

we could change it to:

<message ref="TR.xmlSchemaError">
<translationArguments>
<!-- Note the optional target="header" attribute and the aggregated "error" arguments -->
<argument token="filename" target="header">ES_AD_50.xml</argument>
<argument token="error">
4:389: cvc-complex-type.2.4.a: Invalid content was found starting with element '{"http://inspire.ec.europa.eu/schemas/ad/4.0":situatedWithin}'. One of '{"http://www.opengis.net/gml/3.2":metaDataProperty, "http://www.opengis.net/gml/3.2":description, "http://www.opengis.net/gml/3.2":descriptionReference, "http://www.opengis.net/gml/3.2":identifier, "http://www.opengis.net/gml/3.2":name, "http://www.opengis.net/gml/3.2":boundedBy, "http://www.opengis.net/gml/3.2":location, "http://inspire.ec.europa.eu/schemas/ad/4.0":inspireId, "http://inspire.ec.europa.eu/schemas/ad/4.0":alternativeIdentifier, "http://inspire.ec.europa.eu/schemas/ad/4.0":beginLifespanVersion}' is expected.
</argument>
<argument token="error">
7:24: cvc-complex-type.2.4.a: Invalid content was found starting with element '{"http://inspire.ec.europa.eu/schemas/gn/4.0":spelling}'. One of '{"http://inspire.ec.europa.eu/schemas/gn/4.0":language}' is expected.
</argument>
</translationArguments>
</message>

and

<LangTranslationTemplateCollection name="TR.xmlSchemaError">
<translationTemplates>
<!-- Note the optional header attribute. -->
<TranslationTemplate language="en" name="TR.xmlSchemaError" header="XML document '{filename}': ">{error}</TranslationTemplate>
</translationTemplates>
</LangTranslationTemplateCollection>

in order to support the message aggregation.

In the core the TestResultCollector interface must be changed from

	void addMessage(final String translationTemplateId, final String... tokensAndValues);
	void addMessage(final String[] headerTokensAndValues, final String translationTemplateId, final String... tokensAndValues);

One more note: The change in the TranslationTemplates and the ETS would make them no longer backwards compatible with 2.0.0-beta.

@jonherrmann jonherrmann added arch Type: create EIP Create an EIP for this Enhancement labels Mar 27, 2017
@jonherrmann jonherrmann added the Type: Discussion Input is required. Requirements and/or importance may be unclear label Apr 3, 2017
@jonherrmann jonherrmann changed the title Message aggregration Message aggregation Mar 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: create EIP Create an EIP for this Enhancement Type: Discussion Input is required. Requirements and/or importance may be unclear
Projects
None yet
Development

No branches or pull requests

2 participants