Which embedded citation metadata format should we use in W3C specs?

Hi all,

I am currently writing specifications for a protocol using the W3C's ReSpec tool (https://github.com/w3c/respec), which makes it easy to cite other specs. This generates an HTML document with a references section, which looks like this:
https://reconciliation-api.github.io/specs/#b-references

I would like to make sure that these citations are machine-readable using some embedded metadata format. As a Zotero user I thought about embedding COinS markup there, which works great, but ReSpec's maintainer is not very keen to have that upstream since the COinS format is not exactly pretty:

https://github.com/w3c/respec/issues/2570

Is there any modern alternative to COinS we could consider instead (supported by Zotero or not)? His main concern seems to be around the duplication of the metadata (in rendered and machine-readable formats): are you aware of any standard that addresses this issue?

Thank you!
  • The general information about exposing metadata can be found here: https://www.zotero.org/support/dev/exposing_metadata#using_an_open_standard_for_exposing_metadata . As for general metadata formats there are JSON-LD, RDF, microdata, microformats. Unfortunately, most of these formats are not yet supported in Zotero, also there are several attempts in this directions. But Zotero already supports vocabularies like schema.org, DublinCore, or CodeMeta.

    Yes, COinS would work for Zotero but also for other reference management systems.

    For "avoiding duplication" is maybe microdata the best approach to follow, also it can become more complicated then expected first (also I am not convinced that this should be the main reason to follow).

    In the linked issue I have read that there is already JSON-LD but I couldn't find it in the example document. How will this look exactly?

  • One other option that might be useful if the site wants to avoid duplication would be to use CSL JSON to store the metadata and then citation.js to format the user-viewable references.
  • Hi both, thanks very much for your replies.

    @zuphilip : I have just enabled JSON-LD generation for https://reconciliation-api.github.io/specs/ (it is generated by Javascript so you have to inspect the DOM with your browser's dev tools).

    The page you linked focuses on embedded metadata to describe the web page itself, whereas I am looking for ways to embed metadata about other resources cited by that web page.

    Could JSON-LD also store metadata about the references cited in the page?

    I struggle to find concrete examples of how any of the COinS alternatives would look like in practice to represent citations.

    Say I want to cite "Doe, John. A Survey of Foo Bars, in Journal of Stuff, Predatory Publishers Inc., 2019". What would this concretely look like in HTML with microdata? JSON-LD? others?

    @bwiernik interesting! how would you expose the CSL JSON in the web page?
  • Actually, I just figured out that JSON-LD can indeed encode citations - in fact this is already the case for the JSON-LD that is generated by ReSpec. Fantastic!
  • Ah, it is about citations given on a website. Sorry, I missed that.

    For dynamic references with CSL-JSON there are also some examples by Frank which can be found here: https://citeproc-js.readthedocs.io/en/latest/demos.html

    Your JSON-LD already has the most citations saved. However, the two journal articles are missing and also the data for the others look a little sparse.

    Related to your question are also RASH framework using the FABIO ontology or dokieli. For both you should be able to find examples on the web. As mentioned before, such formats are not (yet) supported by Zotero. But if you have some nicely structured data in a standardized format then also an individual translator might be easily done.
  • > Your JSON-LD already has the most citations saved. However, the two journal articles are missing and also the data for the others look a little sparse.

    Yes indeed! I have fleshed them out a bit: https://github.com/w3c/respec/pull/2585

    Now it looks a bit better: https://reconciliation-api.github.io/specs/

    Thanks for your help with this!
Sign In or Register to comment.