You are here

protected function views_oai_pmh_plugin_style::append_oai_identifier_description in Views OAI-PMH 7.3

1 call to views_oai_pmh_plugin_style::append_oai_identifier_description()
views_oai_pmh_plugin_style::identify_render in plugins/views_oai_pmh_plugin_style.inc
Renders a response to the 'identify' OAI-PMH request.

File

plugins/views_oai_pmh_plugin_style.inc, line 418
Contains the base OAI-PMH style plugin.

Class

views_oai_pmh_plugin_style
Views OAI-PMH_plugin style.

Code

protected function append_oai_identifier_description($parent) {
  $description_element = $this->xml
    ->createElement('description');
  $parent
    ->appendChild($description_element);
  $oai_identifier_element = $this->xml
    ->createElementNS('http://www.openarchives.org/OAI/2.0/oai-identifier', 'oai-identifier');
  $oai_identifier_attributes = array(
    'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
    'xsi:schemaLocation' => 'http://www.openarchives.org/OAI/2.0/oai-identifier  http://www.openarchives.org/OAI/2.0/oai-identifier.xsd',
  );
  $this
    ->xml_set_attributes($oai_identifier_element, $oai_identifier_attributes);
  $description_element
    ->appendChild($oai_identifier_element);
  $elements = array(
    'scheme' => 'oai',
    'repositoryIdentifier' => $this->request
      ->get_host(),
    'delimiter' => ':',
    'sampleIdentifier' => $this
      ->make_record_identifier(VIEWS_OAI_PMH_SAMPLE_IDENTIFIER),
  );
  $this
    ->xml_append_children($oai_identifier_element, $elements);
}