Re: [External] : Can a triple-term in an N-Triple 1.2 statement have "infinite" number of atomic terms?

On 24/01/2025 17:31, Souripriya Das wrote:
> In N-Triple 1.1 syntax, a statement consists of exactly three (atomic) 
> terms and I am hoping that N-Triple 1.2 will be a simple extension 
> that will allow 5-term statements as well, subject to the restriction 
> that the predicate for such 5-term statements will always be rdf:reifies.
>
> Thus, the following statement in Turtle 1.2:
>     :s :believes << :s2 :believes << :s3 :p3 :o3 ~ :r3 >> ~ :r2 >> .
> will be written in N-Triple 1.2 as follows:
>     :s believes :r2 .
>     :r2 rdf:reifies <<( :s2 :believes :r3 )>> .
>     :r3 rdf:reifies <<( :s3 :p3 :o3 )>> .
>
> Is this aligned with the current thinking in the WG?

That's the N-Triples that I'm getting for that Turtle example.
It does not have a nested triple term.

>
> Thanks,
> Souri.
> ------------------------------------------------------------------------
> *From:* Souripriya Das <souripriya.das@oracle.com>
> *Sent:* Thursday, January 23, 2025 11:59 AM
> *To:* RDF-star WG <public-rdf-star-wg@w3.org>
> *Subject:* [External] : Can a triple-term in an N-Triple 1.2 statement 
> have "infinite" number of atomic terms?
> Would the following be a valid N-Triple 1.2 statement, where n can be, 
> say, 1000?
> (There will be a total of 2*1000 + 1 = 2001 "atomic" terms in the 
> triple-term used as the object.)
>
>     :s :p <<( :s1 :p1 <<( :s2 :p2 <<( ... <<(  :sn :pn :on )>> )>> )>> 
> )>> .

The RDF Abstract Syntax allows it and N-triples has concrete syntax for it.
https://www.w3.org/TR/rdf12-concepts/#section-triples
https://www.w3.org/TR/rdf12-concepts/#section-triple-terms (2nd point)

Personally, I think nesting in triple terms will not be common, and many 
levels very, very uncommon.
But the ability to create triple terms for any triple data does lead to 
providing for nesting.

     Andy


>
> Thanks,
> Souri.
>

Received on Saturday, 25 January 2025 12:10:05 UTC