knowledgepixels / nanodash

A web client to browse and publish nanopublications.
GNU Affero General Public License v3.0
27 stars 2 forks source link

Nanopub templates: support datatype literals #152

Open Ostrzyciel opened 2 months ago

Ostrzyciel commented 2 months ago

I may be wrong here, but as far as I understand, there is currently no way to specify a placeholder in a Nanopub template that would correspond to a datatype literal (e.g., a literal with type xsd:int). When I use the "Literal placeholder" type and put (for example) "2024-08-14"^^xsd:date in the template, the entire thing (including the quotes and the datatype annotation) is used as the lexical value of the literal. When I use the "URI/literal placeholder" type and do the same, I get an "invalid literal value" error:

image image

So, I have no way of obtaining a triple like _:s _:p "2024-08-14"^^xsd:date.

What I think would be perfect for this:

Mockup of how the user would see this: image

Note that this proposal is based on the understanding that there is no other way to have datatype literals in Nanodash.

tkuhn commented 2 months ago

Yes, exactly, that is what I plan to do, but it's not yet implemented. There is this other ticket about this too: https://github.com/knowledgepixels/nanodash/issues/14

It would then also be good to have a nice date picker for dates, and possibly other GUI elements for the other datatypes.

Is this something you would need urgently? I cannot promise too much, but I can give it higher priority.

Ostrzyciel commented 2 months ago

Thank you for the quick reply!

Not really needed urgently... I can kind of manage without it for now.