Skip to content

Triple terms and annotations #61

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Triple terms and annotations #61

wants to merge 6 commits into from

Conversation

gkellogg
Copy link
Member

@gkellogg gkellogg commented May 29, 2025


Preview | Diff

@gkellogg gkellogg requested review from niklasl and domel May 29, 2025 01:21
@gkellogg gkellogg added the spec:substantive Change in the spec affecting its normative content (class 3) –see also spec:bug, spec:new-feature label May 29, 2025
@gkellogg
Copy link
Member Author

Some tests:

Ignored Triple Term (no rdf:version)

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
            xmlns:ex="http://example.org/stuff/1.0/"
            xml:base="http://example.org/triples/">
  <rdf:Description rdf:about="http://example.org/">
    <ex:prop rdf:parseType="Triple">
      <rdf:Description rdf:about="http://example.org/stuff/1.0/s">
        <ex:p rdf:resource="http://example.org/stuff/1.0/o" />
      </rdf:Description>
    </ex:prop>
  </rdf:Description>
</rdf:RDF>

Triple term having IRI subject

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
            xmlns:ex="http://example.org/stuff/1.0/"
            xml:base="http://example.org/triples/"
            rdf:version="1.2">
  <rdf:Description rdf:about="http://example.org/">
    <ex:prop rdf:parseType="Triple">
      <rdf:Description rdf:about="http://example.org/stuff/1.0/s">
        <ex:p rdf:resource="http://example.org/stuff/1.0/o" />
      </rdf:Description>
    </ex:prop>
  </rdf:Description>
</rdf:RDF>

Results in:

<http://example.org/> <http://example.org/stuff/1.0/prop> <<(<http://example.org/stuff/1.0/s> <http://example.org/stuff/1.0/p> <http://example.org/stuff/1.0/o>)>> .

Recursive triple term

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
            xmlns:ex="http://example.org/stuff/1.0/"
            xml:base="http://example.org/triples/"
            rdf:version="1.2">
  <rdf:Description rdf:about="http://example.org/">
    <ex:prop rdf:parseType="Triple">
      <rdf:Description rdf:about="http://example.org/stuff/1.0/s">
        <ex:p rdf:parseType="Triple">
          <rdf:Description rdf:about="http://example.org/stuff/1.0/s2">
            <ex:p2 rdf:resource="http://example.org/stuff/1.0/o2" />
          </rdf:Description>
        </ex:p>
      </rdf:Description>
    </ex:prop>
  </rdf:Description>
</rdf:RDF>

Results in:

<http://example.org/> <http://example.org/stuff/1.0/prop>
  <<(<http://example.org/stuff/1.0/s> <http://example.org/stuff/1.0/p>
    <<(<http://example.org/stuff/1.0/s2> <http://example.org/stuff/1.0/p2> <http://example.org/stuff/1.0/o2>
    )>>
  )>> .

Annotation on literal with IRI reifier

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:ex="http://example.org/stuff/1.0/"
         xml:base="http://example.org/triples/">
  <rdf:Description rdf:about="http://example.org/">
    <ex:prop rdf:annotation="http://example.org/triple1">blah</ex:prop>
  </rdf:Description>
</rdf:RDF>

Results in:

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.org/stuff/1.0/> .
<http://example.org/> ex:prop "blah" .

<http://example.org/> ex:prop "blah" ~<http://example.org/triple1> .

Annotation on literal with BNode reifier

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:ex="http://example.org/stuff/1.0/"
         xml:base="http://example.org/triples/">
  <rdf:Description rdf:about="http://example.org/">
    <ex:prop rdf:annotationNodeID="triple1">blah</ex:prop>
  </rdf:Description>
</rdf:RDF>

Results in:

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.org/stuff/1.0/> .
<http://example.org/> ex:prop "blah" .

<http://example.org/> ex:prop "blah" ~ _:triple1 .

spec/index.html Outdated
@@ -68,7 +68,16 @@
in terms of Namespaces in XML,
the XML Information Set [[XML-INFOSET]]
and XML Base [[XMLBASE]].</p>
<p>RDF 1.2 XML adds support for

<p>RDF 1.2 XML introduces <a data-cite="RDF12-CONCEPTS#dfn-triple-term">triple terms</a>
Copy link
Member

Choose a reason for hiding this comment

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

The RDF 1.2 XML construction seems odd, given that the serialization is called RDF/XML, not XML.

I would expect either RDF 1.2 XML or, more likely, RDF/XML 1.2.

This might want its own issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

In 1.1, it was "RDF 1.1 XML Syntax", and the title of this version is "RDF 1.2 XML Syntax". We did shorten it to "RDF 1.2 XML" in this one place, and it could be "RDF 1.2 XML Syntax".

Before that, it was "RDF/XML Syntax Specification", so there is precedent for reverting the naming scheme, but I rather prefer it this way. We could change this to "RDF 1.2 XML Syntax", though, to be more consistent.

IRIC, RDF/XML is an informal name for RDF xxx XML Syntax.

Copy link
Member

Choose a reason for hiding this comment

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

I see.

I suggest that (versionless, i.e., including all versions) RDF/XML be treated as an informal/short name for (versionless, i.e., including all versions) RDF xxx XML Syntax, and that (version specific) RDF/XML xxx be treated as an informal/short name for (version specific) RDF xxx XML Syntax.

I feel like without Syntax, RDF xxx XML (which does occur twice in this paragraph, and once circa line 1205) will be more confusing than not.

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'll change to RDF 1.2 XML Syntax throughout, to be consistent. If the group feels like changing the naming scheme, we can come back to that.

@@ -1239,7 +1359,7 @@ <h3>The RDF Namespace and Vocabulary</h3>
<dt>Syntax names &mdash; not concepts</dt>
<dd>
<p>
<code>RDF Description ID about datatype li nodeID parseType resource version</code>
<code>RDF Description ID about annotation annotationNodeID datatype li nodeID parseType resource version</code>
Copy link
Member

Choose a reason for hiding this comment

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

Is there any logic to the order of these "syntax names"? I wonder why not this —

Suggested change
<code>RDF Description ID about annotation annotationNodeID datatype li nodeID parseType resource version</code>
<code>about annotation annotationNodeID datatype Description ID li nodeID parseType RDF resource version</code>

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 didn't see a need to re-do the ordering, just to insert the new terms in an appropriate place. The original authors were probably looking to separate the capitalized terms from the lower-case terms.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I see, it's case-sensitive alpha-ordering. I hate it, but I'll live with it.

Co-authored-by: Ted Thibodeau Jr <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec:substantive Change in the spec affecting its normative content (class 3) –see also spec:bug, spec:new-feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Triple Annotations Support for Triple Terms
3 participants