NAME
rdf/parser/html_rdfa - HTML+RDFa 1.1 parser.
SYNOPSIS
from rdf/parser/html_rdfa import HtmlRdfaParser;
let parser := new HtmlRdfaParser();
let quads := parser.parse_file(
new Path("page.html"),
base: "http://example.com/page.html",
);
DESCRIPTION
HtmlRdfaParser implements W3C HTML+RDFa 1.1 (Second Edition). The input is parsed with the html/parser HTML5 parser, so it accepts real-world tag soup.
Host language behaviour on top of RDFa Core 1.1: the base element sets the base IRI; head and body inherit the parent object as subject when no resource attributes are present; the XHTML vocabulary terms are recognised in @rel and @rev; with @property present, plain terms in @rel/@rev are ignored; language comes from lang or xml:lang; @datetime (and time element content) produce typed date/time literals; rdfa:copy/rdfa:Pattern property copying is applied.
Accepts the standard base and into parser options plus vocab_expansion and vocab_loader (see rdf/parser/rdfa_core).
EXPORTS
Classes
HtmlRdfaParserThe parser class; composes the
RdfParsertrait soparse_string,parse_file,parse_lines, andparse_chunksare all available.HtmlRdfaHostThe HTML host-language configuration, extending
RdfaHost.
COPYRIGHT AND LICENCE
rdf/parser/html_rdfa is copyright Toby Inkster.
It is free software; you may redistribute it and/or modify it under the terms of either the Artistic License 1.0 or the GNU General Public License version 2.