File
- drupal/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Rdfa.php, line 77
Class
- EasyRdf_Parser_Rdfa
- Class to parse RDFa 1.1 with no external dependancies.
Code
protected function generateList($subject, $property, $list) {
$current = $subject;
$prop = $property;
foreach ($list as $item) {
$newNode = $this->graph
->newBNodeId();
$this
->addTriple($current, $prop, array(
'type' => 'bnode',
'value' => $newNode,
));
$this
->addTriple($newNode, 'rdf:first', $item);
$current = $newNode;
$prop = 'rdf:rest';
}
$this
->addTriple($current, $prop, array(
'type' => 'uri',
'value' => EasyRdf_Namespace::expand('rdf:nil'),
));
}