[openbiblio-dev] model.base.local_path

William Waites ww at styx.org
Thu Mar 10 00:16:34 UTC 2011

I just "fixed" this function to handle blank nodes.
This function tries to strip off the hostname from
graph identifiers. I understand why that was done,
working in a local environment with URLs pointing
out onto the internet can be a bit annoying. However
most of our data from the BL is in bnb.bibliographica.org
and our local data is in bibliographica.org. 

So the first part of the fix, to follow blank nodes
to their sameAs pointers was easy but it meant that
when local data (e.g. deduped authors) is referenced
from BL data, the authors start appearing under
bnb.bibliographica.org. Follow that, 404. As makes
sense because there is no graph by that name and
no URIs with that name in the store. So fix to
not localise blank nodes which means that the 
authors and publishers are still annoying to work
with on localhost.

So how do you fix this?

echo localhost bibliographica.org bnb.bibliographica.org >> /etc/hosts

that's it. No need to write a function. To write 
this function correctly would need a bunch of special
cases and would be error prone (see above).

Can we remove this local_path function please? Or
at least rethink it a bit?

William Waites                <mailto:ww at styx.org>
http://river.styx.org/ww/        <sip:ww at styx.org>
F4B3 39BF E775 CF42 0BAB  3DF0 BE40 A6DF B06F FD45

More information about the openbiblio-dev mailing list