Hello,
I was trying to generate subject url with IDs from two different nodes (Child and parent node). For example, lets say that I want to generate url of this pattern <http://www.example.com/note/{notes id}/{note id}> is it possible to generate this url pattern in RML? I also tried using ancestor:: option in the RML but, it didn't work.
Example XML:
<?xml version="1.0" encoding="UTF-8"?>
<notes id="Notebook2">
<note id="M17" day="10" month="01" year="2008">
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
<note id="M18" day="10" month="02" year="2008">
<to>Chris</to>
<from>Rick</from>
<heading>Update</heading>
<body>We now leave at six</body>
</note>
</notes>
Example RML (Not working)
@prefix rr: <http://www.w3.org/ns/r2rml#>.
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix mail: <http://example.com/mail#>.
@base <http://example.com/base> .
<#FromToMaps>
rml:logicalSource [
rml:source "/home/rajaram/work/zin-byod/rr-work/test.xml";
rml:referenceFormulation ql:XPath;
rml:iterator "/notes";
];
rr:subjectMap [
rr:template "http://www.example.com/note/{@id}/{/note/@id}";
rr:class mail:note;
].
Hello,
I was trying to generate subject url with IDs from two different nodes (Child and parent node). For example, lets say that I want to generate url of this pattern
<http://www.example.com/note/{notes id}/{note id}>is it possible to generate this url pattern in RML? I also tried using ancestor:: option in the RML but, it didn't work.Example XML:
Example RML (Not working)