You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Looser Dominic <Do...@scch.at> on 2012/04/30 14:02:53 UTC
Local part of uri containing just digits
Dear Jena Community
I want to mint uri's of the form http://foo/123 <http://foo/123> .
If I set the prefix with
model.setNsPrefix("foo", "http://foo/)
and serialize into turtle, the uris stay like the are.
model.shortForm(http://foo/123) gives the expected foo:123.
Why does Jena behave that way and is there a way to circumvent it?
Best,
Dominic
Re: Local part of uri containing just digits
Posted by Andy Seaborne <an...@apache.org>.
On 30/04/12 19:45, Dominic Looser wrote:
> Thanks for the helpful information!
> I need these data just locally, so interoperability with
> other systems is not an issue. I'm just not sure if I should
> leave it this way, live with the slithly uglier turtle-file and wait
> for a jena adaptation. Or make some compromise like http://foo/s123
> which is also slithly ugly. It's important for me that I don't have to
> change the uri's afterwards. So, what's your opinion about that?
If you are that desperate, run a perl script on the output!
> Can somebody estimate, if and when that will be a feature in jena?
That's not how it works - please make a contribution
What would be good is maturing the new Turtle writer started in:
https://svn.apache.org/repos/asf/incubator/jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_writer/TurtleWriter2.java
It's time to clear up, go a bit fatser (it's more streaming) and make
ready for TriG (can embed in a TriG writer).
Currently it writes - it's less tested and the layout is less
sophisticated but maybe that is a good thing!
> On 30.04.2012, at 17:50, Robert Vesse wrote:
>
>> Sarven is correct in that Turtle as currently specified does not permit
>> leading digits in the local part of a Qname
>>
>> The in progress Turtle standardization effort of the W3C RDF Working Group
>> (http://www.w3.org/TR/turtle/) is proposing revisions to the Turtle spec
>> that will eventually allow this.
>>
>> I don't believe we have a writer currently that can write Turtle in the
>> new format - can you confirm this Andy?
>>
>> Even if we did I suspect it would not be the default as for backwards
>> compatibility and maximum interoperability of systems it will make sense
>> to consume the new standard by default on reads but respect the old
>> standard on writes (Postel's law in action)
Exactly - the writer is conservative.
Rather than dribbling out incompatibilities, I think making sure the
formats are formally fixed (they are not at the moment) and doing with
other RDF 1.1 changes makes sense.
We may need to ensure various compatibility aspects with RDF 1.0.
Andy
>>
>> Rob
>>
>> Rob Vesse -- YarcData.com -- A Division of Cray Inc
>> Software Engineer, Bay Area
>> m: 925.960.3941 | o: 925.264.4729 | @: rvesse@yarcdata.com | Skype:
>> rvesse
>> 6210 Stoneridge Mall Rd | Suite 120 | Pleasanton CA, 94588
>>
>>
>>
>>
>>
>>
>> On 4/30/12 5:42 AM, "Sarven Capadisli"<in...@csarven.ca> wrote:
>>
>>> On 12-04-30 01:02 PM, Looser Dominic wrote:
>>>> Dear Jena Community
>>>>
>>>>
>>>>
>>>> I want to mint uri's of the form http://foo/123<http://foo/123> .
>>>>
>>>> If I set the prefix with
>>>>
>>>> model.setNsPrefix("foo", "http://foo/)
>>>>
>>>> and serialize into turtle, the uris stay like the are.
>>>>
>>>> model.shortForm(http://foo/123) gives the expected foo:123.
>>>>
>>>> Why does Jena behave that way and is there a way to circumvent it?
>>>>
>>>>
>>>>
>>>> Best,
>>>>
>>>> Dominic
>>>
>>> I don't know the inner workings of Jena, however,
>>>
>>> http://www.w3.org/TeamSubmission/turtle/#name states that the name part
>>> of a QName can't start with a digit.
>>>
>>> -Sarven
>>>
>>
>
Re: Local part of uri containing just digits
Posted by Dominic Looser <do...@gmail.com>.
Thanks for the helpful information!
I need these data just locally, so interoperability with
other systems is not an issue. I'm just not sure if I should
leave it this way, live with the slithly uglier turtle-file and wait
for a jena adaptation. Or make some compromise like http://foo/s123
which is also slithly ugly. It's important for me that I don't have to
change the uri's afterwards. So, what's your opinion about that?
Can somebody estimate, if and when that will be a feature in jena?
On 30.04.2012, at 17:50, Robert Vesse wrote:
> Sarven is correct in that Turtle as currently specified does not permit
> leading digits in the local part of a Qname
>
> The in progress Turtle standardization effort of the W3C RDF Working Group
> (http://www.w3.org/TR/turtle/) is proposing revisions to the Turtle spec
> that will eventually allow this.
>
> I don't believe we have a writer currently that can write Turtle in the
> new format - can you confirm this Andy?
>
> Even if we did I suspect it would not be the default as for backwards
> compatibility and maximum interoperability of systems it will make sense
> to consume the new standard by default on reads but respect the old
> standard on writes (Postel's law in action)
>
> Rob
>
> Rob Vesse -- YarcData.com -- A Division of Cray Inc
> Software Engineer, Bay Area
> m: 925.960.3941 | o: 925.264.4729 | @: rvesse@yarcdata.com | Skype:
> rvesse
> 6210 Stoneridge Mall Rd | Suite 120 | Pleasanton CA, 94588
>
>
>
>
>
>
> On 4/30/12 5:42 AM, "Sarven Capadisli" <in...@csarven.ca> wrote:
>
>> On 12-04-30 01:02 PM, Looser Dominic wrote:
>>> Dear Jena Community
>>>
>>>
>>>
>>> I want to mint uri's of the form http://foo/123<http://foo/123> .
>>>
>>> If I set the prefix with
>>>
>>> model.setNsPrefix("foo", "http://foo/)
>>>
>>> and serialize into turtle, the uris stay like the are.
>>>
>>> model.shortForm(http://foo/123) gives the expected foo:123.
>>>
>>> Why does Jena behave that way and is there a way to circumvent it?
>>>
>>>
>>>
>>> Best,
>>>
>>> Dominic
>>
>> I don't know the inner workings of Jena, however,
>>
>> http://www.w3.org/TeamSubmission/turtle/#name states that the name part
>> of a QName can't start with a digit.
>>
>> -Sarven
>>
>
Re: Local part of uri containing just digits
Posted by Robert Vesse <rv...@yarcdata.com>.
Sarven is correct in that Turtle as currently specified does not permit
leading digits in the local part of a Qname
The in progress Turtle standardization effort of the W3C RDF Working Group
(http://www.w3.org/TR/turtle/) is proposing revisions to the Turtle spec
that will eventually allow this.
I don't believe we have a writer currently that can write Turtle in the
new format - can you confirm this Andy?
Even if we did I suspect it would not be the default as for backwards
compatibility and maximum interoperability of systems it will make sense
to consume the new standard by default on reads but respect the old
standard on writes (Postel's law in action)
Rob
Rob Vesse -- YarcData.com -- A Division of Cray Inc
Software Engineer, Bay Area
m: 925.960.3941 | o: 925.264.4729 | @: rvesse@yarcdata.com | Skype:
rvesse
6210 Stoneridge Mall Rd | Suite 120 | Pleasanton CA, 94588
On 4/30/12 5:42 AM, "Sarven Capadisli" <in...@csarven.ca> wrote:
>On 12-04-30 01:02 PM, Looser Dominic wrote:
>> Dear Jena Community
>>
>>
>>
>> I want to mint uri's of the form http://foo/123<http://foo/123> .
>>
>> If I set the prefix with
>>
>> model.setNsPrefix("foo", "http://foo/)
>>
>> and serialize into turtle, the uris stay like the are.
>>
>> model.shortForm(http://foo/123) gives the expected foo:123.
>>
>> Why does Jena behave that way and is there a way to circumvent it?
>>
>>
>>
>> Best,
>>
>> Dominic
>
>I don't know the inner workings of Jena, however,
>
>http://www.w3.org/TeamSubmission/turtle/#name states that the name part
>of a QName can't start with a digit.
>
>-Sarven
>
Re: Local part of uri containing just digits
Posted by Sarven Capadisli <in...@csarven.ca>.
On 12-04-30 01:02 PM, Looser Dominic wrote:
> Dear Jena Community
>
>
>
> I want to mint uri's of the form http://foo/123<http://foo/123> .
>
> If I set the prefix with
>
> model.setNsPrefix("foo", "http://foo/)
>
> and serialize into turtle, the uris stay like the are.
>
> model.shortForm(http://foo/123) gives the expected foo:123.
>
> Why does Jena behave that way and is there a way to circumvent it?
>
>
>
> Best,
>
> Dominic
I don't know the inner workings of Jena, however,
http://www.w3.org/TeamSubmission/turtle/#name states that the name part
of a QName can't start with a digit.
-Sarven