NAME
rdf/parser/xhtml_rdfa - XHTML+RDFa 1.1 parser.
SYNOPSIS
from rdf/parser/xhtml_rdfa import XhtmlRdfaParser;
let parser := new XhtmlRdfaParser();
let quads := parser.parse_file(
new Path("page.xhtml"),
base: "http://example.com/page.xhtml",
);
DESCRIPTION
XhtmlRdfaParser implements W3C XHTML+RDFa 1.1 (Third Edition). The input is assumed to be well-formed XML and is parsed with std/data/xml.
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 (alternate, next, license, ...) are recognised in @rel and @rev; language comes from xml:lang (preferred) or lang.
Accepts the standard base and into parser options plus vocab_expansion and vocab_loader (see rdf/parser/rdfa_core).
EXPORTS
Classes
XhtmlRdfaParserThe parser class; composes the
RdfParsertrait soparse_string,parse_file,parse_lines, andparse_chunksare all available.XhtmlRdfaHostThe XHTML host-language configuration, extending
RdfaHost.
COPYRIGHT AND LICENCE
rdf/parser/xhtml_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.