Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support for rdf:dirLangString and format versioning #54

Merged
merged 9 commits into from
Feb 27, 2025
Merged

Conversation

gkellogg
Copy link
Member

@gkellogg gkellogg commented Jan 31, 2025

Still a Work in Progress, more work needed on the event definitions.

Fixes #50.


Preview | Diff

@gkellogg gkellogg added the spec:new-feature Change adding new functionality (class 4) label Jan 31, 2025
@gkellogg gkellogg requested review from afs, domel and pchampin January 31, 2025 23:42
@domel
Copy link
Contributor

domel commented Feb 1, 2025

@gkellogg why the rdf:dirLangString section is non-normative?

@gkellogg
Copy link
Member Author

gkellogg commented Feb 1, 2025

@gkellogg why the rdf:dirLangString section is non-normative?

Those sections are all explanatory. Normative behavior is defined in the events and processing rules.

class="termref"><span
class="arrow">·</span>literal-direction<span
class="arrow">·</span></a> is the empty string,
the value is the concatenation of "&quot;" (1 double quote),
Copy link
Member

Choose a reason for hiding this comment

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

"&quot;" (1 double quote) gets rendered as """ (1 double quote). There are a number of possible ways to better present this (which should be applied to all similar instances). Probably the simplest would be <code>&quot;</code> (one double-quote).

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not happy with this general way of emitting triples (see #55), and more could be done on character presentation, similar to how it's done in Turtle. This just adapts the existing pattern; I think another pass is needed separately to clean up these things. Just changing one of them because it happened to be touched by this PR doesn't really address the problem.

Copy link
Member

Choose a reason for hiding this comment

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

Pick up in w3c/rdf-star-wg#146

@@ -1140,7 +1199,10 @@ <h2>RDF/XML Internet Media Type, File Extension, and Macintosh File Type</h2>
systems be given a file type of <code>"rdf&nbsp;"</code>
(all lowercase, with a space character as the fourth letter).</p>

<p>The `application/rdf+xml` media type has been registered at IANA as [[RFC3870]].</p>
<p>Features introduced in RDF 1.2 require a version announcement in the
Copy link
Contributor

Choose a reason for hiding this comment

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

That's an independent decision?

I think "required" is a burden because to stream the whole data must be seen. Therefore, I think the version should be optional.

The majority of RDF 1.2 data will be legal RDF 1.1 .

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with @afs. This should be part of the more general conversation on how we handle versioning in concrete syntaxes.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is just the PR which introduces versioning.

Copy link
Member Author

Choose a reason for hiding this comment

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

The wording says that using 1.2 features requires a version announcement, not that any use of RDF/XML requires a version announcement.

spec/index.html Outdated
@@ -1867,9 +1980,12 @@ <h3>Plain Literal Event</h3>

<p class="note">RDF/XML plain literals are in RDF 1.2 treated as
Copy link
Contributor

Choose a reason for hiding this comment

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

"plain literals" went away with RDF 1.1.

We can define "plain literal" for the purposes of RDF/XML as "no given rdf:datatype".
It does not have to be a full <dfn>.

Digression 😀
It may be useful to define "string literal" in RDF Concepts with alt "RDF string literal".

SPARQL has one because the grouping of xsd:string, rdf:langString and now rdf:dirLangString comes up repeated.

Copy link
Member Author

Choose a reason for hiding this comment

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

I updated the language, although it may not flow quite as well. Suggestions are welcome.

@@ -1140,7 +1199,10 @@ <h2>RDF/XML Internet Media Type, File Extension, and Macintosh File Type</h2>
systems be given a file type of <code>"rdf&nbsp;"</code>
(all lowercase, with a space character as the fourth letter).</p>

<p>The `application/rdf+xml` media type has been registered at IANA as [[RFC3870]].</p>
<p>Features introduced in RDF 1.2 require a version announcement in the
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with @afs. This should be part of the more general conversation on how we handle versioning in concrete syntaxes.

Comment on lines +1983 to +1985
<code>xsd:string</code> (when no language tag is present),
as a literal with datatype <code>rdf:langString</code> (when
a language tag is present and a direction is not present),
or as a literal with datatype <code>rdf:dirLangString</code>
(when both a language tag and a direction are present).
Copy link
Contributor

Choose a reason for hiding this comment

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

That does not tell us what to do if we have a direction but no language tag...

Copy link
Member Author

Choose a reason for hiding this comment

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

The result would be illegal according to Concepts, but the triple generation wording in this spec is archaic and should be taken up separately.

@pchampin pchampin changed the title WIP: Support for rdf:dirLangString. WIP: Support for rdf:dirLangString and format versioning Feb 20, 2025
@pchampin
Copy link
Contributor

I edited the title of this issue to reflect the actual content:
I understand that the format versioning is somehow linked to directional language strings (which would break old parsers), so I don't object to bundling those changes together, but I find it clearer to mention it in the issue title.

@gkellogg gkellogg changed the title WIP: Support for rdf:dirLangString and format versioning Support for rdf:dirLangString and format versioning Feb 24, 2025
@gkellogg gkellogg marked this pull request as ready for review February 24, 2025 00:38
@gkellogg gkellogg requested review from afs, TallTed and pchampin February 24, 2025 00:38
Copy link
Member

@TallTed TallTed left a comment

Choose a reason for hiding this comment

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

Small stuff

Copy link
Contributor

@pchampin pchampin left a comment

Choose a reason for hiding this comment

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

LGTM

gkellogg and others added 7 commits February 26, 2025 10:58
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Andy Seaborne <andy@apache.org>
…k, and re-number examples to be consistent with the added example for dirLangString.
gkellogg and others added 2 commits February 26, 2025 10:58
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
@gkellogg gkellogg merged commit 766f5f7 into main Feb 27, 2025
2 checks passed
@gkellogg gkellogg deleted the dirLangString branch February 27, 2025 18:02
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
spec:new-feature Change adding new functionality (class 4)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Triple Terms
5 participants