modules/rdf/parser/html_rdfa.zzm

rdf-rdfa-0.0.1 documentation

Package

Name
rdf-rdfa
Version
0.0.1
Uploaded
2026-06-13 00:17:04
Repository
https://github.com/tobyink/zuzu-rdf-rdfa
Dependencies
Metadata
zuzu-distribution.json
Archive
Download .tar.gz

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

  • HtmlRdfaParser

    The parser class; composes the RdfParser trait so parse_string, parse_file, parse_lines, and parse_chunks are all available.

  • HtmlRdfaHost

    The 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.