Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Issue with language-tagged literals in nested XML using languageMap #262

Copy link
Copy link
@marianna-tselepi

Description

@marianna-tselepi
Issue body actions

I'm working with nested XML input where elements like <title> contain a language attribute, e.g.:

<myElement>
  <title language="fi">Automaalari</title>
  <title language="sv">Billackerare</title>
</myElement>

In the past, I successfully used this mapping to generate properly language-tagged literals:

rr:predicate dc:title ;
rr:objectMap [
  rml:reference "./*[local-name()='title']" ;
  rr:termType rr:Literal ;
  rml:languageMap [
    rr:class rdf:langString ;
    rml:reference "./@*[local-name()='language']"
  ]
] .

However, in the latest version of RMLMapper that I tried (currently using the cli jar), all language literals that are using this kind of mapping are missing from the output.

I have tried to modify the mapping based on the test case
as follows:

rr:predicate dc:title ;
rr:objectMap [
  rml:reference "./title" ;
  rr:termType rr:Literal ;
  rml:languageMap [
    rr:class rdf:langString ;
    rml:reference "./title/@language"
  ]
] .

but all language values appear to be taken from the first <title>, resulting in:
dc:title "Automaalari"@fi , "Billackerare"@fi .

This seems to indicate that rml:languageMap does not correctly align language attributes with their respective values when dealing with sibling elements in XML.

I've tried adjusting the reference paths and iterators, but results didn't change. Either the attribute was missing completely or all attributes were getting the same language tag.

Is this a known regression or change in how rml:languageMap is evaluated with sibling XML elements?
What is the recommended way to generate correct language-tagged literals from repeated XML child elements like <title> in the current version of RMLMapper?

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.