Skip to content

RMLMapper throws error on any notice with expected but absent language tag #121

@schivmeister

Description

@schivmeister

Problem

This is related to #98 in that, for any notice with an expected but absent languageID attribute on any element, RMLMapper will throw an error.

Pass

<cbc:Description languageID="SWE">Publikationsbyråns lokaler i Luxemburg.</cbc:Description>

Fail

<cbc:Description>Premises of the Publications Office in LUXEMBOURG.</cbc:Description>

Cause

This is due to an exception for the function being used to transform the attribute to a BCP 47 language tag, as it expects and misses the languageID, but RMLMapper does not have the facility to ignore and skip in such a case. Ideally, RMLMapper should throw a warning instead, but this is a matter for discussion upstream.

SDK Versions

While we detected this issue when an SDK 1.3 example was updated to the latest patch version (later retracted along with the fix so as to not infringe upon pre-existing production mappings), this issue applies to all eForms SDK versions.

Potential Fix

Guarding for the absence of the languageID should be enough to prevent the RMLMapper error. Note that this fix is not the same as that for #98, as this is an issue of RMLMapper, whereas #98 is an issue with the mapping, which could manifest even without this error.

Side Effects

RMLMapper would continue to produce valid output despite this error (simply ignoring the absent data), meaning any tool calling RMLMapper and not treating exceptions in any special way may fail to produce a file even if there is output.

Data Impact

Both this and #98 may currently only manifest in and be demonstrable using SDK example data. There is no known live sample or production data that exhibits the conditions required for this issue to be triggered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdeferredDeferred for implementation in the future

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions