W3C home > Mailing lists > Public > public-rdf-ruby@w3.org > September 2010

Spira: adding gratitious separators to URIs

From: Christoph Badura <bad@bsd.de>
Date: Tue, 28 Sep 2010 22:50:52 +0200
To: public-rdf-ruby@w3.org
Message-ID: <20100928205052.GV573@irregular-apocalypse.k.bsd.de>
I'm trying to model some RDF data that makes use of URIs of the following
form:

  urn:x-domain:example.com:id:12345
  http://example.com/ns/urn:x-domain:example.com:id:12345

Using either "urn:x-domain:example.com:id:" or
"http://example.com/ns/urn:x-domain:example.com:id:" as base_uri causes
the resulting URI to acquire a gratitous "/".

E.g. the follwoing script

require 'spira'

class C
	include Spira::Resource
	base_uri "urn:x-domain:example.com:id:"
	property :foo, :predicate => DC["whatever"]
end

c = C.for("12345")
puts c.inspect

produces:

<C:-576321418 @subject: urn:x-domain:example.com:id:/12345>

Would it be possible to get rid of that annoying behaviour?

--chb
Received on Tuesday, 28 September 2010 22:52:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 28 September 2010 22:52:03 GMT