public function csl_locale::set_style_locale in Bibliography Module 7
Same name and namespace in other branches
- 6.2 modules/CiteProc/CSL.inc \csl_locale::set_style_locale()
- 7.2 modules/CiteProc/CSL.inc \csl_locale::set_style_locale()
File
- modules/
CiteProc/ CSL.inc, line 2225 - CiteProc-PHP.
Class
Code
public function set_style_locale($csl_doc) {
$xml = '';
$locale_nodes = $csl_doc
->getElementsByTagName('locale');
if ($locale_nodes) {
$xml_open = '<style-locale>';
$xml_close = '</style-locale>';
foreach ($locale_nodes as $key => $locale_node) {
$xml .= $csl_doc
->saveXML($locale_node);
}
if (!empty($xml)) {
$this->style_locale = new SimpleXMLElement($xml_open . $xml . $xml_close);
}
}
}