-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Align descriptions of lang functions. Link to RDF Concepts. #179
Conversation
The function `hasLANG` returns <code>true</code> if the | ||
argument is a literal with a language | ||
tag. Otherwise, the function returns <code>false</code>. | ||
Returns `true` if the RDF term argument is a literal with a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems somewhat inconsistent to me that the argument of LANG
and of LANGDIR
is explicitly a literal whereas the argument of this function (and the next) is an RDF term. Do you remember whether there was a reason for this difference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The is*
functions have a signature of (RDF term)
.
These two (hasLANG
, hasLANGDIR
) are similar. Earlier, they were is*
but I think that has*
reads better for these accessors because it is not "is this term a language?", it is "does this term have a language component?" and the question can be extends to any RDF term.
(Un-)language ""
is sort of special (due in part to XML). We can use that to separate "" and error.
LANG(<notALiteral>)
returning ""
does not make sense and should be an error. "" (no language tag : literals may have a language tag) and error (it's not a literal -- wrong question) can be different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation. Makes sense.
Looks good beyond the issues @hartig has already called out. |
Co-authored-by: Olaf Hartig <[email protected]>
Reword function definitions for a more consistent style.
Links to RDF Concept for language tag and base direction in lang-related functions.
Preview | Diff