Open rajaram5 opened 6 years ago
Hi,
The following mapping works and should achieve what you want. More specific, I changed the iterator and the template. Now you iterate over all notes instead of only the notebooks and I use the ancestor to get the id of the notebook.
<#FromToMaps>
rml:logicalSource [
rml:source "input.xml";
rml:referenceFormulation ql:XPath;
rml:iterator "/notes/note";
];
rr:subjectMap [
rr:template "http://www.example.com/note/{ancestor::notes/@id}/{@id}";
rr:class mail:note;
].
Hi Pieter,
Thank you for your reply, but the proposed solution is not working for me. I am using RMLMapper v0.3.1
Indeed, apparently the ancestor
operator is not supported. I'll have a closer look.
Apparently the XML/XPath library that we are using does not supported the ancestor
operator. If you by any chance know about a Java library that does we can help in replacing the current one with the new one.
I don't work much with XML library but I can have a look
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)