\LOADSTYLE

Functions

_loadStyleInfo()

_loadStyleInfo(  file) : \LOADSTYLE\associative

Extract info entries from a XML bibliographic style file and return an associative array of childnode's value of 'info' node.

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:

<?xml version="1.0" encoding="utf-8"?>

Parameters

file

Location of a StyleFile

Returns

\LOADSTYLE\associative —

array - keys = name, description, language, osbibversion

loadDir()

loadDir(  compatibilityCheck = TRUE) : mixed||string|int

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.

apa/APA.xml or chicago/CHICAGO.xml.

CONSTANTS.php stores OSBIB_VERSION -- the osbibVersion field of the style XML file must equal this.

Parameters

compatibilityCheck

If TRUE (default), return only files compatible with OSBIB_VERSION

Returns

mixed||string|int —

Sorted associative array - keys = filename (less '.xml'), values = Style description.