You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Martynas Jusevičius <ma...@atomgraph.com> on 2021/01/02 17:48:59 UTC
TriX default
Hi,
some time ago we had an issue re. TriX:
https://issues.apache.org/jira/browse/JENA-1211
I was looking at the W3C DTD again, specifically for <graph> elements:
<!ELEMENT graph (uri, triple*)>
This made me wonder how the default graph should be represented if it
has no URI.
My understanding was that the default <graph> should have no <uri>,
but the W3C DTD contradicts this.
I was probably thinking about the HP's DTD version [1] where the
<graph> definition was different (though still looks wrong with an
unbounded number of URIs):
<!ELEMENT graph (uri*, triple*)>
A quick test with riot CLI converts N-Triples
<http://s> <http://b> <http://c> .
to
<trix xmlns="http://www.w3.org/2004/03/trix/trix-1/">
<graph>
<triple>
<uri>http://s</uri>
<uri>http://b</uri>
<uri>http://c</uri>
</triple>
</graph>
</trix>
Isn't this invalid in respect to the W3C DTD?
It's quite unfortunate that we have those 2 incompatible versions and
neither of them seems to get it right...
[1] https://www.hpl.hp.com/techreports/2004/HPL-2004-56.pdf
Martynas
atomgraph.com
Re: TriX default
Posted by Andy Seaborne <an...@apache.org>.
On 03/01/2021 11:25, Martynas Jusevičius wrote:
> I’ll see what RDF4J does.
>
> I think ultimately the reasonable solution would be to have
>
> <!ELEMENT graph (uri?, triple*)>
>
> as the DTD.
Indeed - that's what's implemented!
Andy
>
> On Sun, 3 Jan 2021 at 11.38, Andy Seaborne <an...@apache.org> wrote:
>
>> What do other systems do?
>>
>> Everything else is secondary given that (W3C|HPLB)-trix is not a working
>> group, or community group, consensus.
>>
>> (IIRC the Jena reader doesn't care about namespaces)
>>
>> Andy
>>
>> On 02/01/2021 17:48, Martynas Jusevičius wrote:
>>> Hi,
>>>
>>> some time ago we had an issue re. TriX:
>>> https://issues.apache.org/jira/browse/JENA-1211
>>>
>>> I was looking at the W3C DTD again, specifically for <graph> elements:
>>>
>>> <!ELEMENT graph (uri, triple*)>
>>>
>>> This made me wonder how the default graph should be represented if it
>>> has no URI.
>>>
>>> My understanding was that the default <graph> should have no <uri>,
>>> but the W3C DTD contradicts this.
>>> I was probably thinking about the HP's DTD version [1] where the
>>> <graph> definition was different (though still looks wrong with an
>>> unbounded number of URIs):
>>>
>>> <!ELEMENT graph (uri*, triple*)>
>>>
>>> A quick test with riot CLI converts N-Triples
>>>
>>> <http://s> <http://b> <http://c> .
>>>
>>> to
>>>
>>> <trix xmlns="http://www.w3.org/2004/03/trix/trix-1/">
>>> <graph>
>>> <triple>
>>> <uri>http://s</uri>
>>> <uri>http://b</uri>
>>> <uri>http://c</uri>
>>> </triple>
>>> </graph>
>>> </trix>
>>>
>>> Isn't this invalid in respect to the W3C DTD?
>>>
>>> It's quite unfortunate that we have those 2 incompatible versions and
>>> neither of them seems to get it right...
>>>
>>> [1] https://www.hpl.hp.com/techreports/2004/HPL-2004-56.pdf
>>>
>>>
>>> Martynas
>>> atomgraph.com
>>>
>>
>
Re: TriX default
Posted by Martynas Jusevičius <ma...@atomgraph.com>.
I’ll see what RDF4J does.
I think ultimately the reasonable solution would be to have
<!ELEMENT graph (uri?, triple*)>
as the DTD.
On Sun, 3 Jan 2021 at 11.38, Andy Seaborne <an...@apache.org> wrote:
> What do other systems do?
>
> Everything else is secondary given that (W3C|HPLB)-trix is not a working
> group, or community group, consensus.
>
> (IIRC the Jena reader doesn't care about namespaces)
>
> Andy
>
> On 02/01/2021 17:48, Martynas Jusevičius wrote:
> > Hi,
> >
> > some time ago we had an issue re. TriX:
> > https://issues.apache.org/jira/browse/JENA-1211
> >
> > I was looking at the W3C DTD again, specifically for <graph> elements:
> >
> > <!ELEMENT graph (uri, triple*)>
> >
> > This made me wonder how the default graph should be represented if it
> > has no URI.
> >
> > My understanding was that the default <graph> should have no <uri>,
> > but the W3C DTD contradicts this.
> > I was probably thinking about the HP's DTD version [1] where the
> > <graph> definition was different (though still looks wrong with an
> > unbounded number of URIs):
> >
> > <!ELEMENT graph (uri*, triple*)>
> >
> > A quick test with riot CLI converts N-Triples
> >
> > <http://s> <http://b> <http://c> .
> >
> > to
> >
> > <trix xmlns="http://www.w3.org/2004/03/trix/trix-1/">
> > <graph>
> > <triple>
> > <uri>http://s</uri>
> > <uri>http://b</uri>
> > <uri>http://c</uri>
> > </triple>
> > </graph>
> > </trix>
> >
> > Isn't this invalid in respect to the W3C DTD?
> >
> > It's quite unfortunate that we have those 2 incompatible versions and
> > neither of them seems to get it right...
> >
> > [1] https://www.hpl.hp.com/techreports/2004/HPL-2004-56.pdf
> >
> >
> > Martynas
> > atomgraph.com
> >
>
Re: TriX default
Posted by Andy Seaborne <an...@apache.org>.
What do other systems do?
Everything else is secondary given that (W3C|HPLB)-trix is not a working
group, or community group, consensus.
(IIRC the Jena reader doesn't care about namespaces)
Andy
On 02/01/2021 17:48, Martynas Jusevičius wrote:
> Hi,
>
> some time ago we had an issue re. TriX:
> https://issues.apache.org/jira/browse/JENA-1211
>
> I was looking at the W3C DTD again, specifically for <graph> elements:
>
> <!ELEMENT graph (uri, triple*)>
>
> This made me wonder how the default graph should be represented if it
> has no URI.
>
> My understanding was that the default <graph> should have no <uri>,
> but the W3C DTD contradicts this.
> I was probably thinking about the HP's DTD version [1] where the
> <graph> definition was different (though still looks wrong with an
> unbounded number of URIs):
>
> <!ELEMENT graph (uri*, triple*)>
>
> A quick test with riot CLI converts N-Triples
>
> <http://s> <http://b> <http://c> .
>
> to
>
> <trix xmlns="http://www.w3.org/2004/03/trix/trix-1/">
> <graph>
> <triple>
> <uri>http://s</uri>
> <uri>http://b</uri>
> <uri>http://c</uri>
> </triple>
> </graph>
> </trix>
>
> Isn't this invalid in respect to the W3C DTD?
>
> It's quite unfortunate that we have those 2 incompatible versions and
> neither of them seems to get it right...
>
> [1] https://www.hpl.hp.com/techreports/2004/HPL-2004-56.pdf
>
>
> Martynas
> atomgraph.com
>