From: Eric Prud'h. <er...@w3...> - 2013-08-13 10:55:00
|
* Ruben Verborgh <rub...@ug...> [2013-08-10 20:06+0200] > Dear all, > > SWObjects [1] incorrectly interprets hashes. > It prepends the current filename before them, while it shouldn’t. > > $ echo "<http://ex.org#a> <http://ex.org#b> <http://ex.org#c>." > hash.ttl > $ sparql -d hash.ttl > { > <http://ex.orghash.ttl#a> <http://ex.orghash.ttl#b> <http://ex.orghash.ttl#c> . > } > > The expected output is instead > { > <http://ex.org#a> <http://ex.org#b> <http://ex.org#c>. > } > > Something similar happens when we use a prefix that doesn’t end in a slash: > $ echo "@prefix ex: <http://ex.org>. ex:a ex:b ex:c." > hash2.ttl > $ sparql -d hash2.ttl > { > <http://ex.orghash2.ttlahash2.ttl> <http://ex.orghash2.ttlbhash2.ttl> <http://ex.orghash2.ttlchash2.ttl> . > } I haven't done sufficient research to figure out what are the specified requirements for deciding that something is an absolute URI. libwww, from which I stole the URL parsing library, doesn't consider something absolute if it doesn't have a '/' after the hostname. I poked around with perl's URI::URL lib and it produces the results expected by Ruben. Attached is a patch which considers …://…#… an absolute based on the "://" and the '#'. I haven't rolled that back into the sparql11 branch yet. Other opinions? > Best, > > Ruben > > [1] commit 4283bf306 from sparql11 branch https://github.com/ericprud/SWObjects/commit/4283bf306 > compiled on OSX with https://github.com/RubenVerborgh/SWObjects/commit/1a3a9a02f > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite! > It's a free troubleshooting tool designed for production. > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > _______________________________________________ > SWObjects-devel mailing list > SWO...@li... > https://lists.sourceforge.net/lists/listinfo/swobjects-devel -- -ericP |