[Activerdf] read scrapbook.rdf files

Eyal Oren eyal.oren at deri.org
Thu Apr 5 15:51:06 IST 2007


On 04/05/07/04/07 21:52 +0800, J2F wrote:
>The second line raises an error because the URI does not end in "/" or
>"#". Unfortunately, if I ended it with "#" or "/", I will encounter the
>following problem, I'm guessing it will not point to the correct URI,
>i.e. it will be 'urn:scrapbook:item#20070405010733'
yeah, I added the check for namespaces to end on # or / because I (and many 
other people) often make typo's leading to strange behaviour. But 
technically it should be a warning and not an error message, since 
namespace prefixes can have arbitrary endings.

I'll change that for the next release, for now you can indeed not use this.  
Sorry.

>first_item = ITEM::20070405010733
>raises an 'unexpected tINETEGER' syntax error 
thanks, that's a bug, I didn't think about it, but it will be hard to fix.  
The problem is that our meta-programming catches these invocations and 
tries to do something special with it, but this invocation is not a method 
in Ruby terms (methods cannot start with numbers) so the statement is 
treated quite differently than usual.

>Your alternative seems better to work with. I couldn't get pass around
>the syntax problems, though.
Yeah. You'll just have to create the resources using the most basic syntax: 
RDFS::Resource.new('urn:...:...'), i.e. using their full URI. The namespace 
syntax is only a shortcut but as you figured out, it won't work right now.

 -eyal


More information about the ActiveRDF mailing list