This module implements extraction of RDFa triples from parsed XML or
HTML documents. It has two interfaces: read_rdfa/3 to read triples from
some input (stream, file, URL) and xml_rdfa/3 to extract triples from an
HTML or XML document that is already parsed with load_html/3 or
load_xml/3.
- See also
- - http://www.w3.org/TR/2013/REC-rdfa-core-20130822/
- - http://www.w3.org/TR/html-rdfa/
- read_rdfa(+Input, -Triples, +Options) is det
- True when Triples is a list of
rdf(S,P,O)
triples extracted from
Input. Input is either a stream, a file name, a URL referencing
a file name or a URL that is valid for http_open/3. Options are
passed to open/4, http_open/3 and xml_rdfa/3. If no base is
provided in Options, a base is deduced from Input.
- xml_rdfa(+DOM, -RDF, +Options)
- True when RDF is a list of
rdf(S,P,O)
terms extracted from DOM
according to the RDFa specification. Options processed:
- base(+BaseURI)
- URI to use for ''. Normally set to the document URI.
- anon_prefix(+AnnonPrefix)
- Prefix for blank nodes.
- lang(+Lang)
- Default for
lang
- vocab(+Vocab)
- Default for
vocab
- markup(+Markup)
- Markup language processed (xhtml, xml, ...)
- rdf_db:rdf_load_stream(+Format, +Stream, :Options)[multifile]
- Register library(semweb/rdfa) as loader for HTML RDFa files.
- To be done
- - Which options need to be forwarded to read_rdfa/3?