Priority: Normal
Current State: New
Released In: n/a
Target Release: n/a
Working on the
BibtexFormfieldPlugin I would like to be able to do the following using the
SemanticLinksPlugin:
I have written a Cite topic, so that if I do:
Cite::Bibliography.AnArticleBibtexEntry2011
it will get the information using AJAX from the reference-topic (here: "AnArticleBibtexEntry2011") and show that information in a modal dialog box, when I click on the link.
As a next step I would like to be able to add PDFs to the reference-topic and do something like:
Cite::Bibliography.AnArticleBibtexEntry2011{file::main}{page::1}{search::some third search string}
Cite::Bibliography.AnArticleBibtexEntry2011{file::suppl1}{page::3}{search::some third search string}
so that I can query the nested properties (e.g. file, page, search) from the Cite topic and use it to create a link to the page of the PDF (and even give a search term to search the PDF).
ATM I am having two problems trying to realize this using the
SemanticLinksPlugin:
1) It does not provide a
unique way of identifying a semantic link and it's meta-data. In order to query the meta-information created by doing
Cite::topic{someProperty::val} the SLP needs to provide an identifier that can be used in AJAX to query the corresponding meta-data. There is the value '$property(seq)' which however only changes for different reference-topics. For the two calls above it would be the same and thus it cannot be used to identify the links and their corresponding meta-data during a query.
NOTE: I resolved this (sort of) using
JavaScript with a counter and comparing to the meta-data property 'propertyseq' which is increased by 1 for each link. (As opposed to the meta-data property 'ofpropertyseq' which only increases by 1 if the reference-topic changes and thus corresponds to the value obtained through '$property(seq)' from inside Cite.)
2) The nested properties are not saved on a per-link basis and redundancies are removed from the meta-data even though they belong to
different links. What this means for the two links above is that since the second search-string is the same as the first, the SLP will only save that property
once to the meta-data even though they belong to
different links. This happens even if the reference topic is
not the same. This makes it impossible to get at the nested property of a certain link, if the same porperty-value was used with a different link before, since it will not exist for the following link.