You are here

function csl_name::__construct in Bibliography Module 6.2

Same name and namespace in other branches
  1. 7 modules/CiteProc/CSL.inc \csl_name::__construct()
  2. 7.2 modules/CiteProc/CSL.inc \csl_name::__construct()

Overrides csl_format::__construct

File

modules/CiteProc/CSL.inc, line 401

Class

csl_name

Code

function __construct($dom_node, $citeproc = NULL) {
  $tags = $dom_node
    ->getElementsByTagName('name-part');
  if ($tags) {
    foreach ($tags as $tag) {
      $name_part = $tag
        ->getAttribute('name');
      $tag
        ->removeAttribute('name');
      for ($i = 0; $i < $tag->attributes->length; $i++) {
        $value = $tag->attributes
          ->item($i)->value;
        $name = str_replace(' ', '_', $tag->attributes
          ->item($i)->name);
        $this->name_parts[$name_part][$name] = $value;
      }
    }
  }
  parent::__construct($dom_node, $citeproc);
}