modules/rdf/parser/xhtml_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/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

  • XhtmlRdfaParser

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

  • XhtmlRdfaHost

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