XML Export Functions (PHP)
Previous Topic  Next Topic 


Functions to export Heurist records in any format and/or filetype


Authors: Marco Springer Eric Baaij Kim Jackson @version 2007-03-28


Procedural Files and Classes List


Publish.php

Published.php

ExportPageFinal.php


Constants:


       MAX_ROWS


Globals:


$DB_CON // the connection with the database

$DB // the database name

$XML //the xml output

$ERROR = // the errors

$RQS // the required detailtypes per referencetype

$DTN // the default names of detailtypes

$LOOP // holds visited record ids for loop detection while going through containers


Functions


This function writes the begin- and endtag to the XML document per reference. This

includes the containers found in records. Between it, it puts the general data

and all details found in bib_detail.

writeReference ($bib_id, $depth, $bd_type, $reftype);        


This function writes the begin- and endtag to the XML document per reference. This

includes the containers found in records. Between it, it puts the general data

and all details found in bib_detail.

writeGeneralData ($bib);


This function writes a tag to the xml doc. It replaces the detailtype number with

the right name for that reference type and checks if the value is empty. If so, it

only writes it if it's a required detail (empty tag).

writeTag ($reftype, $detail, $value, $file_id);        


This function loops through all the occurences in bib_detail for the record.

If one is an author or editor that tag gets three subtags with the firstname,

othernames and surname of that person from the persons table.

If it is a container detail it fires the writing of the container.

writeDetails ($bib, $depth);        


This function writes a person tag to the XML doc. It builds the tag with

the firstname, the othernames and the surname.

writePersonTag ($detail, $firstname, $othernames, $surname);        


This function gets all the records that are the resultset at that moment. It puts all

the biblio ids in an array. return array[] an array with the biblio ids of the resultset

getRecord()