The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

RDF::RDFa::Template::Document - A parsed Template document

SYNOPSIS

  my $parser = RDF::RDFa::Parser->new($xhtml, 'http://example.org/foo/', {use_rtnlx => 1});
  $parser->named_graphs('http://example.org/graph#', 'graph');
  $parser->consume;
  my $doc = RDF::RDFa::Template::Document->($parser);
  $doc->extract;

METHODS

It implements the following methods:

new

The constructor. An RDF::RDFa::Parser object is a required argument.

extract

Extracts the Basic Graph Patterns from the parsed document. Returns the number of patterns extracted.

unit( $graph_name )

Returns a RDF::RDFa::Template::Unit for the specified graph name.

units

Returns an array of RDF::RDFa::Template::Unit objects

dom

Return an XML::LibXML::Document of the parsed source document.

AUTHOR

Kjetil Kjernsmo, <kjetilk at cpan.org>

COPYRIGHT & LICENSE

Copyright 2010 Kjetil Kjernsmo.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.