Open Ostrzyciel opened 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.
Thank you for the quick reply!
Not really needed urgently... I can kind of manage without it for now.
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: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:
DatatypeLiteralPlaceholder
, a subclass ofLiteralPlaceholder
hasRegex
, but then each template creator would have to come up with their own regexes for datatypes (assuming one could even express this using a regex... well, we don't need to be perfect).Mockup of how the user would see this:
Note that this proposal is based on the understanding that there is no other way to have datatype literals in Nanodash.