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

Add optional direction for literals #175

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rubensworks
Copy link
Member

As mentioned in #172, RDF 1.2 is scheduled to introduce the base direction concept for literals.

This PR proposes a backwards-compatible addition to the data model spec to handle this addition in RDF.

The literal interface change is quite straightforward, I don't expect much discussion on this.

The data factory on the other hand might deserve some discussion. I went for extending the types of the second optional argument of the literal() method. An alternative might have been to add a third optional argument, but I didn't go for that in this PR due to the possibility of defining a direction in combination with a datatype (which is illegal according to the RDF 1.2 spec).

@rubensworks rubensworks requested a review from a team as a code owner October 25, 2023 10:48
Copy link
Member

@bergos bergos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we define that direction must be falsy instead of undefined for other kinds of literals? That would allow aligning direction to language with an empty string and still be backward compatible.

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
@rubensworks
Copy link
Member Author

Can we define that direction must be falsy instead of undefined for other kinds of literals? That would allow aligning direction to language with an empty string and still be backward compatible.

Yes, agreed, that makes sense :-)

Co-authored-by: Thomas Bergwinkl <[email protected]>
Copy link
Member

@bergos bergos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants