semsol/arc2 — Issue #17: problem with relative path on windows eg $parser->parse('a/file.ttl')
Author: jeanmariefavre
Created: 2011-12-31 01:04:20+00:00
State: open

Bonjour,
when running arc2 on a windows system (for instance for testing on localhost with windows&xampp), the relative filename are not handled properly, files are therefore not found.

For instance the following statement returns error
$parser->parse('a/file1.ttl')
$parser->parse('file2.ttl')
although the file exist.

According to a first investigation, the problem seems to be in
ARC2_Class::calcURI or ARC2_Class::calcBase
In particular the php function realpath($r) returns path like c:\xampp\xxx etc. on windows

A workaround is to provide the absolute path and use "file:"
The examples below work properly
$parser->parse('file:C:\xampp\dir\a/file1.ttl')
$parser->parse('file:".dirname(__FILE__).'/a/file1.ttl')