Skip to content
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

Merged
merged 2 commits into from
Jan 20, 2025
Merged

Conversation

afs
Copy link
Contributor

@afs afs commented Jan 19, 2025

Reword function definitions for a more consistent style.

Links to RDF Concept for language tag and base direction in lang-related functions.


Preview | Diff

@afs afs self-assigned this Jan 19, 2025
@afs afs added Editorial Errata management: this erratum is editorial spec:editorial Minor change in the specification (markup, typo, informative text; class 1 or 2) and removed Editorial Errata management: this erratum is editorial labels Jan 19, 2025
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
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

spec/index.html Outdated Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
@afs afs requested review from kasei, rubensworks and Tpt January 19, 2025 17:44
@kasei
Copy link
Contributor

kasei commented Jan 19, 2025

Looks good beyond the issues @hartig has already called out.

@afs afs merged commit c073717 into main Jan 20, 2025
2 checks passed
@afs afs deleted the lang-editorial branch January 20, 2025 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec:editorial Minor change in the specification (markup, typo, informative text; class 1 or 2)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants