LOADSTYLE.php
WIKINDX : Bibliographic Management system.
Tags
Table of Contents
Functions
- loadDir() : array<string|int, mixed>
- Read ROOT_DIR directory for XML style files and return an associative array. Each XML file should be within its own folder within ROOT_DIR. This folder name should match the first part of the XML file name e.g.
- loadStyleInfo() : associative
- Extract info entries from a XML bibliographic style file and return an associative array of childnode's value of 'info' node.
Functions
loadDir()
Read ROOT_DIR directory for XML style files and return an associative array. Each XML file should be within its own folder within ROOT_DIR. This folder name should match the first part of the XML file name e.g.
loadDir([bool $all = FALSE ]) : array<string|int, mixed>
apa/apa.xml or chicago/chicago.xml.
CONSTANTS.php stores WIKINDX_COMPONENTS_COMPATIBLE_VERSION["style"] -- the osbibVersion field of the style XML file must equal this.
Parameters
- $all : bool = FALSE
-
If TRUE, force the loading of all styles
Return values
array<string|int, mixed> —Sorted associative array - keys = filename (less '.xml'), values = Style description.
loadStyleInfo()
Extract info entries from a XML bibliographic style file and return an associative array of childnode's value of 'info' node.
loadStyleInfo(string $file) : associative
This function is taylored by hand to replace the generic parser simplexml_load_file. SimpleXml is very simple to use, but is so slow that parse each style file of WIKINDX implies a waste of 100 ms in each load.
This function is closed to a determined tree node as showed below:
<style xml:lang="en">Parameters
- $file : string
-
Location of a StyleFile
Return values
associative —array - keys = name, description, language, osbibversion