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

Bug complex reference using XPath #24

Closed
ghsnd opened this issue Feb 25, 2021 · 1 comment
Closed

Bug complex reference using XPath #24

ghsnd opened this issue Feb 25, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@ghsnd
Copy link
Contributor

ghsnd commented Feb 25, 2021

Description

Some XPath expressions involving attribute names used in references lead to errors.

Example

Input

<?xml version="1.0" encoding="UTF-8"?>

<products>
  <product>
    <id>1</id>
    <Property Name="1">
      <String>1</String>
    </Property>
  </product>
</products>

Mapping:

Mind the reference in the rr:ObjectMap

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "input.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "//product"
  ];

  rr:subjectMap [ rr:template "http://example.org/products/{id}" ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ; 
    rr:objectMap    [ 
      rml:reference "Property[@Name='1']/String";
    ]
  ].

Expected output:

<http://example.org/products/1> <http://example.com/id> "1".

Actual output:

Empty graph.

@ghsnd ghsnd added the bug Something isn't working label Feb 25, 2021
@ghsnd
Copy link
Contributor Author

ghsnd commented Mar 18, 2021

Hi, this issue is fixed with the new release.

@ghsnd ghsnd closed this as completed Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant