Templatizing RDF import
Opened this issue · 1 comments
I am able to use RDF Import feature easily. As, This import feature by default creates a Wiki page for each Subject defined in RDF. Now want these imported wiki page to be created on my Template page so that other stuffs can be embedded.
I referred 'https://jbiomedsem.biomedcentral.com/track/pdf/10.1186/s13326-017-0136-y' for understanding details of RDFIO which says:
Optionally, the facts can be converted into a MediaWiki template call, if there is a template available that will write the corresponding fact, by the use of its parameter values.
But I couldn't get the proper way to do it.
If you can please guide me in achieving this it would be helpful to me.
Thanks
Hi @sanjar and thanks for your question!
Sorry for the lack of documentation of this issue. I actually had to fire up the Virtual machine to check this for myself.
It seems (to my surprise and worry) that this actually only works for updating pages that are already tagged with a template, not currently for creating new pages.
So what works for me is to create the following pages with the corresponding content:
India
{{Country}}
Property:Has capital
[[Equivalent URI::http://example.org/hasCapital]]
Template:Country
[[Has capital::{{{capital}}}]]
... and then importing the following turtle content:
"India" <http://ex.org/hasCapital> "New Delhi" .
Then, in the page "India", I see the following content:
{{Country|capital=New Delhi
}}
[[Equivalent URI::India]]
... where the first two lines show that the "Country" template call has been updated with the parameter "capital", which is then setting the "Has capital" property via the Country template.
So, unfortunately, I realize that this does not work unless the "India" article is not already created and tagged with the "Country" template.
This is a bug. Not sure when I will be able to work on it though, due to way too little time.
Contributions welcome!