Larsblog

Previous | Next

More on typed data in tolog

Posted in Technology on 2006-05-13 00:01

After I posted my blog entry on typed data in tolog Geir Ove had an interesting idea: why couldn't the type conversion predicates be dynamic? Dynamic predicates are something that, as far as I know, is unique to tolog. They are not predefined, and they are not user-defined, but are instead dynamically created from the structure of the underlying topic map.

Geir Ove's idea was to do something similar based on the structure of the predicate names. This would require a special conversion module for these predicates, but that's no great loss, really. Thus, the following query:

import "http://something/or/other/conversion/" as conv
conv:string-bar("12", $B)?

would convert the string "12" into a value of type "bar", whatever that might be. This is like the second alternative in the previous posting, but the difference here is that the parses the predicate name to work out which type to convert to and from.

This gets rid of the explosion of predicates as the number of types grows, and gets it back on par with the first solution in terms of implementation complexity. (It's slightly more complex to implement, but in a fun way, so who cares. :)

In short, this leaves us pretty much back where we were. The two proposed solutions are more or less equal, except that one fits somewhat more nicely into the logical approach that tolog takes. The big question then becomes what users find more natural. Well, users?







Similar posts

Typed data in tolog

We've known for a long time that sooner or later we'd have to start supporting data types (numbers, dates, ...) in tolog, but so far we haven't done it

Read | 2006-05-10 23:17

Implementing SPARQL with tolog

I realized quite a while ago (a year ago, maybe) that it's possible to implement SPARQL on top of tolog without too much effort

Read | 2005-12-15 23:03

tolog updates

The tolog query language has been around for a long time, but so far it only does querying, and not updates

Read | 2006-02-21 20:49

Comments

No comments.

Add a comment

Name required
Email optional, not published
URL optional, published
Comment
Spam don't check this if you want to be posted
Not spam do check this if you want to be posted
> Home
> Technology
> Beer
> Personal

> The author .
> On Twitter

RSS

follow us in feedly

Subscribe by email:

My new book


Gårdsøl
det norske ølet

My other book

Guidebook to Lithuanian beer
Rough guide to
Lithuanian beer

Technology blogs

Robert Barta
TopicObserver.Com
Sveins blogg
Stephen Fry
ongoing
Messages in a bottle
Alex Brown
Planet Topic Maps

Last comments
RSS

Lars Marius Garshol on A sudoku solver in P...

Heinz-GŁnter on A sudoku solver in P...

alex bloom on Active learning, alm...

alex bloom on Experiments in genet...

kenneth mwelwa on 10 tips on presentin...

fadirra on 7 tips on writing cl...

Tim on 7 tips on writing cl...

elmarie on What is an informati...

p2r on 7 tips on writing cl...

Jeffrey White on The solera paradox