Closed wouterbeek closed 6 years ago
It is possible to parsing an RDFa file by first opening a read stream on it. However, when the source to read_rdfa/3 is a stream, the base/1 option is neglected. This means that the name of the file is used as the base URI:
read_rdfa/3
base/1
:- use_module(library(semweb/rdfa)). test(Triples) :- setup_call_cleanup( open('test.html', read, In), read_rdfa(In, Triples, [base('http://hdl.handle.net/1902.1/18959')]), close(In) ).
results in the following Triples:
Triples
X = [rdf('http:test.html', 'http://www.w3.org/1999/xhtml/vocab#stylesheet', 'http:/javax.faces.resource/theme.css.xhtml?ln=primefaces-bootstrap'), ...].
It is possible to parsing an RDFa file by first opening a read stream on it. However, when the source to
read_rdfa/3
is a stream, thebase/1
option is neglected. This means that the name of the file is used as the base URI:results in the following
Triples
: