Closed ericprud closed 5 years ago
(response moved from #78)
I had an action item to draft a proposal for an intuitive token for "any language-tagged string". I ended up using @~
instead of @*
(see shex.js example). This worked in shex.js
with fewer than 10 changed lines.
<#LangString> rdf:langString
<#LangStem> [@en~]
<#Empty> [@~]
<#EmptyExclEN> [@~ - @en] # rejects "ab"@en
<#EmptyExclFR> [@~ - @fr]
# <#EmptyExclEmpty> [@~ - @~] <-- not valid in grammar
# <#DotExclEmpty> [. - @~] <-- not valid in grammar
PROPOSE: add this to grammar, add appropriate explanatory text to spec, and close accepting the langString-ATstar
proposal:
PRs:
TODO: someone should look at 5.4.6 Values Constraint and decide whether there needs to be more explanatory text for an empty stem.
We don't have a way to specify any literal with a language tag. The closest we have is rather arcane by ruling out only unlikely language tags:
which would not match
<s>
in<s> :p "asdf"@en .
but not any of these graphs:<s> :p <o> .
<s> :p _:foo .
<s> :p "asdf" .
<s> :p "asdf"@notalanguage .
Correction: one could also used a
rdf:langString
Exclusions become awkward: