You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Mikael Pesonen <mi...@lingsoft.fi> on 2023/02/15 14:05:17 UTC

Minus in shortened URL

This works:
<https://www.example.com/-30>

but this results error Expected IRI for predicate: got: [INTEGER:-30]:

@prefix id: <https://www.example.com/> .
id:-30 a skos:Concept

Latter should be legal?

Re: Minus in shortened URL

Posted by Mikael Pesonen <mi...@lingsoft.fi>.
Thanks!

On Wed, 15 Feb 2023 at 21:08, Andy Seaborne <an...@apache.org> wrote:

>
>
> On 15/02/2023 14:05, Mikael Pesonen wrote:
> >
> > This works:
> > <https://www.example.com/-30>
> >
> > but this results error Expected IRI for predicate: got: [INTEGER:-30]:
> >
> > @prefix id: <https://www.example.com/> .
> > id:-30 a skos:Concept
> >
> > Latter should be legal?
>
> No.
>
> https://www.w3.org/TR/turtle/#grammar-production-PN_LOCAL
>
> Minus can not be the first character.
>
> use an escape:
>
> id:\-30 a skos:Concept
>

Re: Minus in shortened URL

Posted by Andy Seaborne <an...@apache.org>.

On 15/02/2023 14:05, Mikael Pesonen wrote:
> 
> This works:
> <https://www.example.com/-30>
> 
> but this results error Expected IRI for predicate: got: [INTEGER:-30]:
> 
> @prefix id: <https://www.example.com/> .
> id:-30 a skos:Concept
> 
> Latter should be legal?

No.

https://www.w3.org/TR/turtle/#grammar-production-PN_LOCAL

Minus can not be the first character.

use an escape:

id:\-30 a skos:Concept