You are here

public function views_oai_pmh_xml_node::process_tag_name in Views OAI-PMH 7.2

Removes unwanted characters from an XML tag name, usually so that multiple versions of the same tag can get the correct output. E.g. 'description*1' and 'description*2' will both become 'description'.

Parameters

string $tag The XML tag to process.:

Return value

string The XML tag name, without any info that should be hidden.

1 call to views_oai_pmh_xml_node::process_tag_name()
views_oai_pmh_xml_node::draw in plugins/includes/views_oai_pmh_xml_node.inc
Creates the XML for this node. If the object's $value property is an array, this method recursively calls the draw() method on each of the views_oai_pmh_xml_node objects in the $value array and returns the combined XML output.

File

plugins/includes/views_oai_pmh_xml_node.inc, line 245
Definition of the views_oai_pmh_xml_node class.

Class

views_oai_pmh_xml_node
A class designed to represent an XML node, specially designed to help the Views OAI PMH module render OAI fields as XML elements.

Code

public function process_tag_name($tag) {
  if (strpos($this->key, '*') !== FALSE) {
    $tag = substr($tag, 0, strpos($this->key, '*'));
  }
  return $tag;
}