Refbase update_2021-01-28_15_58
This commit is contained in:
42
export/bibutils/export_xml2ads.php
Normal file
42
export/bibutils/export_xml2ads.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
// Project: Web Reference Database (refbase) <http://www.refbase.net>
|
||||
// Copyright: Matthias Steffens <mailto:refbase@extracts.de> and the file's
|
||||
// original author(s).
|
||||
//
|
||||
// This code is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY. Please see the GNU General Public
|
||||
// License for more details.
|
||||
//
|
||||
// File: ./export/bibutils/export_xml2ads.php
|
||||
// Repository: $HeadURL$
|
||||
// Author(s): Matthias Steffens <mailto:refbase@extracts.de>
|
||||
//
|
||||
// Created: 04-Jun-08, 21:15
|
||||
// Modified: $Date: 2008-06-19 17:47:19 +0000 (Thu, 19 Jun 2008) $
|
||||
// $Author$
|
||||
// $Revision: 1143 $
|
||||
|
||||
// This is an export format file (which must reside within the 'export/' sub-directory of your refbase root directory). It contains a version of the
|
||||
// 'exportRecords()' function that outputs records according to the export format used by the SAO/NASA Astrophysics Data System (http://adsabs.harvard.edu/).
|
||||
// This function is basically a wrapper for the bibutils 'xml2ads' command line tool (http://www.scripps.edu/~cdputnam/software/bibutils/bibutils.html).
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
// --- BEGIN EXPORT FORMAT ---
|
||||
|
||||
// Export found records in 'ADS' format:
|
||||
|
||||
// Requires the following packages (available under the GPL):
|
||||
// - bibutils v3.40 or greater <http://www.scripps.edu/~cdputnam/software/bibutils/bibutils.html>
|
||||
// - ActiveLink PHP XML Package <http://www.active-link.com/software/>
|
||||
|
||||
function exportRecords($result, $rowOffset, $showRows, $exportStylesheet, $displayType)
|
||||
{
|
||||
// function 'exportBibutils()' is defined in 'execute.inc.php'
|
||||
return exportBibutils($result,"xml2ads");
|
||||
}
|
||||
|
||||
// --- END EXPORT FORMAT ---
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
?>
|
45
export/bibutils/export_xml2bib.php
Normal file
45
export/bibutils/export_xml2bib.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
// Project: Web Reference Database (refbase) <http://www.refbase.net>
|
||||
// Copyright: Matthias Steffens <mailto:refbase@extracts.de> and the file's
|
||||
// original author(s).
|
||||
//
|
||||
// This code is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY. Please see the GNU General Public
|
||||
// License for more details.
|
||||
//
|
||||
// File: ./export/bibutils/export_xml2bib.php
|
||||
// Repository: $HeadURL: file:///svn/p/refbase/code/branches/bleeding-edge/export/bibutils/export_xml2bib.php $
|
||||
// Author(s): Matthias Steffens <mailto:refbase@extracts.de>
|
||||
//
|
||||
// Created: 28-Sep-04, 22:14
|
||||
// Modified: $Date: 2007-02-17 01:10:14 +0000 (Sat, 17 Feb 2007) $
|
||||
// $Author: msteffens $
|
||||
// $Revision: 894 $
|
||||
|
||||
// This is an export format file (which must reside within the 'export/' sub-directory of your refbase root directory). It contains a version of the
|
||||
// 'exportRecords()' function that outputs records according to the export format used by 'BibTeX', the bibliographic companion to the LaTeX macro package.
|
||||
// This function is basically a wrapper for the bibutils 'xml2bib' command line tool (http://www.scripps.edu/~cdputnam/software/bibutils/bibutils.html).
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
// --- BEGIN EXPORT FORMAT ---
|
||||
|
||||
// Export found records in 'BibTeX' format:
|
||||
|
||||
// Requires the following packages (available under the GPL):
|
||||
// - bibutils <http://www.scripps.edu/~cdputnam/software/bibutils/bibutils.html>
|
||||
// - ActiveLink PHP XML Package <http://www.active-link.com/software/>
|
||||
|
||||
function exportRecords($result, $rowOffset, $showRows, $exportStylesheet, $displayType)
|
||||
{
|
||||
// function 'exportBibutils()' is defined in 'execute.inc.php'
|
||||
$bibtexSourceText = exportBibutils($result,"xml2bib");
|
||||
|
||||
// function 'standardizeBibtexOutput()' is defined in 'export.inc.php'
|
||||
return standardizeBibtexOutput($bibtexSourceText);
|
||||
}
|
||||
|
||||
// --- END EXPORT FORMAT ---
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
?>
|
42
export/bibutils/export_xml2end.php
Normal file
42
export/bibutils/export_xml2end.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
// Project: Web Reference Database (refbase) <http://www.refbase.net>
|
||||
// Copyright: Matthias Steffens <mailto:refbase@extracts.de> and the file's
|
||||
// original author(s).
|
||||
//
|
||||
// This code is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY. Please see the GNU General Public
|
||||
// License for more details.
|
||||
//
|
||||
// File: ./export/bibutils/export_xml2end.php
|
||||
// Repository: $HeadURL: file:///svn/p/refbase/code/branches/bleeding-edge/export/bibutils/export_xml2end.php $
|
||||
// Author(s): Matthias Steffens <mailto:refbase@extracts.de>
|
||||
//
|
||||
// Created: 28-Sep-04, 22:14
|
||||
// Modified: $Date: 2007-02-17 01:10:14 +0000 (Sat, 17 Feb 2007) $
|
||||
// $Author: msteffens $
|
||||
// $Revision: 894 $
|
||||
|
||||
// This is an export format file (which must reside within the 'export/' sub-directory of your refbase root directory). It contains a version of the
|
||||
// 'exportRecords()' function that outputs records according to the export format used by the commercial bibliographic package 'Endnote' (http://www.endnote.com).
|
||||
// This function is basically a wrapper for the bibutils 'xml2end' command line tool (http://www.scripps.edu/~cdputnam/software/bibutils/bibutils.html).
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
// --- BEGIN EXPORT FORMAT ---
|
||||
|
||||
// Export found records in 'Endnote' format:
|
||||
|
||||
// Requires the following packages (available under the GPL):
|
||||
// - bibutils <http://www.scripps.edu/~cdputnam/software/bibutils/bibutils.html>
|
||||
// - ActiveLink PHP XML Package <http://www.active-link.com/software/>
|
||||
|
||||
function exportRecords($result, $rowOffset, $showRows, $exportStylesheet, $displayType)
|
||||
{
|
||||
// function 'exportBibutils()' is defined in 'execute.inc.php'
|
||||
return exportBibutils($result,"xml2end");
|
||||
}
|
||||
|
||||
// --- END EXPORT FORMAT ---
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
?>
|
42
export/bibutils/export_xml2isi.php
Normal file
42
export/bibutils/export_xml2isi.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
// Project: Web Reference Database (refbase) <http://www.refbase.net>
|
||||
// Copyright: Matthias Steffens <mailto:refbase@extracts.de> and the file's
|
||||
// original author(s).
|
||||
//
|
||||
// This code is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY. Please see the GNU General Public
|
||||
// License for more details.
|
||||
//
|
||||
// File: ./export/bibutils/export_xml2isi.php
|
||||
// Repository: $HeadURL$
|
||||
// Author(s): Matthias Steffens <mailto:refbase@extracts.de>
|
||||
//
|
||||
// Created: 21-Mar-07, 23:17
|
||||
// Modified: $Date: 2007-03-21 22:36:40 +0000 (Wed, 21 Mar 2007) $
|
||||
// $Author$
|
||||
// $Revision: 908 $
|
||||
|
||||
// This is an export format file (which must reside within the 'export/' sub-directory of your refbase root directory). It contains a version of the
|
||||
// 'exportRecords()' function that outputs records according to the export format used by the ISI Web of Science Internet Database Service (http://scientific.thomson.com/products/wos/).
|
||||
// This function is basically a wrapper for the bibutils 'xml2isi' command line tool (http://www.scripps.edu/~cdputnam/software/bibutils/bibutils.html).
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
// --- BEGIN EXPORT FORMAT ---
|
||||
|
||||
// Export found records in 'ISI' format:
|
||||
|
||||
// Requires the following packages (available under the GPL):
|
||||
// - bibutils <http://www.scripps.edu/~cdputnam/software/bibutils/bibutils.html>
|
||||
// - ActiveLink PHP XML Package <http://www.active-link.com/software/>
|
||||
|
||||
function exportRecords($result, $rowOffset, $showRows, $exportStylesheet, $displayType)
|
||||
{
|
||||
// function 'exportBibutils()' is defined in 'execute.inc.php'
|
||||
return exportBibutils($result,"xml2isi");
|
||||
}
|
||||
|
||||
// --- END EXPORT FORMAT ---
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
?>
|
48
export/bibutils/export_xml2ris.php
Normal file
48
export/bibutils/export_xml2ris.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
// Project: Web Reference Database (refbase) <http://www.refbase.net>
|
||||
// Copyright: Matthias Steffens <mailto:refbase@extracts.de> and the file's
|
||||
// original author(s).
|
||||
//
|
||||
// This code is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY. Please see the GNU General Public
|
||||
// License for more details.
|
||||
//
|
||||
// File: ./export/bibutils/export_xml2ris.php
|
||||
// Repository: $HeadURL: file:///svn/p/refbase/code/branches/bleeding-edge/export/bibutils/export_xml2ris.php $
|
||||
// Author(s): Matthias Steffens <mailto:refbase@extracts.de>
|
||||
//
|
||||
// Created: 28-Sep-04, 22:14
|
||||
// Modified: $Date: 2008-08-19 17:13:01 +0000 (Tue, 19 Aug 2008) $
|
||||
// $Author: msteffens $
|
||||
// $Revision: 1198 $
|
||||
|
||||
// This is an export format file (which must reside within the 'export/' sub-directory of your refbase root directory). It contains a version of the
|
||||
// 'exportRecords()' function that outputs records according to the standard export format used e.g. by commercial bibliographic packages like 'Reference Manager' (http://www.refman.com).
|
||||
// This function is basically a wrapper for the bibutils 'xml2ris' command line tool (http://www.scripps.edu/~cdputnam/software/bibutils/bibutils.html).
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
// --- BEGIN EXPORT FORMAT ---
|
||||
|
||||
// Export found records in 'RIS' format:
|
||||
|
||||
// Requires the following packages (available under the GPL):
|
||||
// - bibutils <http://www.scripps.edu/~cdputnam/software/bibutils/bibutils.html>
|
||||
// - ActiveLink PHP XML Package <http://www.active-link.com/software/>
|
||||
|
||||
function exportRecords($result, $rowOffset, $showRows, $exportStylesheet, $displayType)
|
||||
{
|
||||
// function 'exportBibutils()' is defined in 'execute.inc.php'
|
||||
$risSourceText = exportBibutils($result,"xml2ris");
|
||||
|
||||
// NOTE: the 'exec()' command that is used in function 'execute()' in file 'execute.inc.php'
|
||||
// does not include trailing whitespace in its '$output' array [*]; since this would
|
||||
// chop off trailing whitespace from closing RIS 'ER - ' tags, we add it back here
|
||||
// [*] see <http://www.php.net/manual/en/function.exec.php>
|
||||
return preg_replace("/^ER -$/m", "ER - ", $risSourceText);
|
||||
}
|
||||
|
||||
// --- END EXPORT FORMAT ---
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
?>
|
44
export/bibutils/export_xml2word.php
Normal file
44
export/bibutils/export_xml2word.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
// Project: Web Reference Database (refbase) <http://www.refbase.net>
|
||||
// Copyright: Matthias Steffens <mailto:refbase@extracts.de> and the file's
|
||||
// original author(s).
|
||||
//
|
||||
// This code is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY. Please see the GNU General Public
|
||||
// License for more details.
|
||||
//
|
||||
// File: ./export/bibutils/export_xml2word.php
|
||||
// Repository: $HeadURL$
|
||||
// Author(s): Matthias Steffens <mailto:refbase@extracts.de>
|
||||
//
|
||||
// Created: 21-Mar-07, 23:17
|
||||
// Modified: $Date: 2008-04-14 17:00:27 +0000 (Mon, 14 Apr 2008) $
|
||||
// $Author$
|
||||
// $Revision: 1075 $
|
||||
|
||||
// This is an export format file (which must reside within the 'export/' sub-directory of your refbase root directory). It contains a version of the
|
||||
// 'exportRecords()' function that outputs records according to the Word 2007 bibliography XML format (http://office.microsoft.com/word/).
|
||||
// This function is basically a wrapper for the bibutils 'xml2wordbib' command line tool (http://www.scripps.edu/~cdputnam/software/bibutils/bibutils.html).
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
// --- BEGIN EXPORT FORMAT ---
|
||||
|
||||
// Export found records in Word 2007 bibliography format:
|
||||
|
||||
// Requires the following packages (available under the GPL):
|
||||
// - bibutils <http://www.scripps.edu/~cdputnam/software/bibutils/bibutils.html>
|
||||
// - ActiveLink PHP XML Package <http://www.active-link.com/software/>
|
||||
|
||||
function exportRecords($result, $rowOffset, $showRows, $exportStylesheet, $displayType)
|
||||
{
|
||||
// function 'exportBibutils()' is defined in 'execute.inc.php'
|
||||
// NOTE: if you're using a Bibutils version prior to Bibutils v3.40,
|
||||
// you must rename "xml2wordbib" to "xml2word" in the line below
|
||||
return exportBibutils($result,"xml2wordbib");
|
||||
}
|
||||
|
||||
// --- END EXPORT FORMAT ---
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
?>
|
52
export/export_atomxml.php
Normal file
52
export/export_atomxml.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
// Project: Web Reference Database (refbase) <http://www.refbase.net>
|
||||
// Copyright: Matthias Steffens <mailto:refbase@extracts.de> and the file's
|
||||
// original author(s).
|
||||
//
|
||||
// This code is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY. Please see the GNU General Public
|
||||
// License for more details.
|
||||
//
|
||||
// File: ./export/export_atomxml.php
|
||||
// Repository: $HeadURL$
|
||||
// Author(s): Matthias Steffens <mailto:refbase@extracts.de>
|
||||
//
|
||||
// Created: 08-Jan-08, 22:00
|
||||
// Modified: $Date: 2008-04-04 08:12:54 +0000 (Fri, 04 Apr 2008) $
|
||||
// $Author$
|
||||
// $Revision: 1026 $
|
||||
|
||||
// This exports OpenSearch Atom XML. This file must reside in the 'export' directory of the refbase root directory.
|
||||
// It uses functions from include files 'opensearch.inc.php' and 'atomxml.inc.php' that require the ActiveLink PHP XML Package,
|
||||
// which is available under the GPL from: <http://www.active-link.com/software/>
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
// --- BEGIN EXPORT FORMAT ---
|
||||
|
||||
// Export found records as OpenSearch Atom XML:
|
||||
function exportRecords($result, $rowOffset, $showRows, $exportStylesheet, $displayType)
|
||||
{
|
||||
global $rowsFound;
|
||||
|
||||
if ($rowsFound > 0 && ($rowOffset + 1) > $rowsFound) // Invalid offset for current MySQL result set, error with an appropriate diagnostics response:
|
||||
{
|
||||
if ($rowsFound == 1)
|
||||
$recordString = "record";
|
||||
else
|
||||
$recordString = "records";
|
||||
|
||||
$recordCollection = openSearchDiagnostics(61, "Record offset " . ($rowOffset + 1) . " is invalid for current result set (" . $rowsFound . " " . $recordString . " found)", $exportStylesheet); // function 'openSearchDiagnostics()' is defined in 'opensearch.inc.php'
|
||||
}
|
||||
else // Generate and serve an OpenSearch Atom XML file of ALL records:
|
||||
{
|
||||
$recordCollection = atomCollection($result, $rowOffset, $showRows, $exportStylesheet, $displayType); // function 'atomCollection()' is defined in 'atomxml.inc.php'
|
||||
}
|
||||
|
||||
return $recordCollection;
|
||||
}
|
||||
|
||||
// --- END EXPORT FORMAT ---
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
?>
|
39
export/export_modsxml.php
Normal file
39
export/export_modsxml.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
// Project: Web Reference Database (refbase) <http://www.refbase.net>
|
||||
// Copyright: Matthias Steffens <mailto:refbase@extracts.de> and the file's
|
||||
// original author(s).
|
||||
//
|
||||
// This code is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY. Please see the GNU General Public
|
||||
// License for more details.
|
||||
//
|
||||
// File: ./export/export_modsxml.php
|
||||
// Repository: $HeadURL: file:///svn/p/refbase/code/branches/bleeding-edge/export/export_modsxml.php $
|
||||
// Author(s): Richard Karnesky <mailto:karnesky@gmail.com>
|
||||
//
|
||||
// Created: 02-Oct-04, 12:00
|
||||
// Modified: $Date: 2007-02-17 01:10:14 +0000 (Sat, 17 Feb 2007) $
|
||||
// $Author: msteffens $
|
||||
// $Revision: 894 $
|
||||
|
||||
// This exports MODS XML. This file must reside in the 'export' directory of the refbase root directory.
|
||||
// It uses functions from include file 'modsxml.inc.php' that requires the ActiveLink PHP XML Package,
|
||||
// which is available under the GPL from: <http://www.active-link.com/software/>
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
// --- BEGIN EXPORT FORMAT ---
|
||||
|
||||
// Export found records as MODS XML:
|
||||
function exportRecords($result, $rowOffset, $showRows, $exportStylesheet, $displayType)
|
||||
{
|
||||
// Generate and serve a MODS XML file of ALL records:
|
||||
$recordCollection = modsCollection($result); // function 'modsCollection()' is defined in 'modsxml.inc.php'
|
||||
|
||||
return $recordCollection;
|
||||
}
|
||||
|
||||
// --- END EXPORT FORMAT ---
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
?>
|
39
export/export_oaidcxml.php
Normal file
39
export/export_oaidcxml.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
// Project: Web Reference Database (refbase) <http://www.refbase.net>
|
||||
// Copyright: Matthias Steffens <mailto:refbase@extracts.de> and the file's
|
||||
// original author(s).
|
||||
//
|
||||
// This code is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY. Please see the GNU General Public
|
||||
// License for more details.
|
||||
//
|
||||
// File: ./export/export_oaidcxml.php
|
||||
// Repository: $HeadURL$
|
||||
// Author(s): Matthias Steffens <mailto:refbase@extracts.de>
|
||||
//
|
||||
// Created: 08-Jan-08, 22:00
|
||||
// Modified: $Date: 2008-04-04 08:14:28 +0000 (Fri, 04 Apr 2008) $
|
||||
// $Author$
|
||||
// $Revision: 1027 $
|
||||
|
||||
// This exports OAI_DC XML. This file must reside in the 'export' directory of the refbase root directory.
|
||||
// It uses functions from include file 'oaidcxml.inc.php' that requires the ActiveLink PHP XML Package,
|
||||
// which is available under the GPL from: <http://www.active-link.com/software/>
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
// --- BEGIN EXPORT FORMAT ---
|
||||
|
||||
// Export found records as OAI_DC XML:
|
||||
function exportRecords($result, $rowOffset, $showRows, $exportStylesheet, $displayType)
|
||||
{
|
||||
// Generate and serve a OAI_DC XML file of ALL records:
|
||||
$recordCollection = oaidcCollection($result); // function 'oaidcCollection()' is defined in 'oaidcxml.inc.php'
|
||||
|
||||
return $recordCollection;
|
||||
}
|
||||
|
||||
// --- END EXPORT FORMAT ---
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
?>
|
39
export/export_odfxml.php
Normal file
39
export/export_odfxml.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
// Project: Web Reference Database (refbase) <http://www.refbase.net>
|
||||
// Copyright: Matthias Steffens <mailto:refbase@extracts.de> and the file's
|
||||
// original author(s).
|
||||
//
|
||||
// This code is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY. Please see the GNU General Public
|
||||
// License for more details.
|
||||
//
|
||||
// File: ./export/export_odfxml.php
|
||||
// Repository: $HeadURL: file:///svn/p/refbase/code/branches/bleeding-edge/export/export_odfxml.php $
|
||||
// Author(s): Matthias Steffens <mailto:refbase@extracts.de>
|
||||
//
|
||||
// Created: 01-Jun-06, 13:57
|
||||
// Modified: $Date: 2007-02-17 01:10:14 +0000 (Sat, 17 Feb 2007) $
|
||||
// $Author: msteffens $
|
||||
// $Revision: 894 $
|
||||
|
||||
// This exports ODF XML. This file must reside in the 'export' directory of the refbase root directory.
|
||||
// It uses functions from include file 'odfxml.inc.php' that requires the ActiveLink PHP XML Package,
|
||||
// which is available under the GPL from: <http://www.active-link.com/software/>
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
// --- BEGIN EXPORT FORMAT ---
|
||||
|
||||
// Export found records as ODF XML:
|
||||
function exportRecords($result, $rowOffset, $showRows, $exportStylesheet, $displayType)
|
||||
{
|
||||
// Generate and serve an ODF XML file of ALL records:
|
||||
$recordCollection = odfDocument($result, "spreadsheet"); // function 'odfDocument()' is defined in 'odfxml.inc.php'
|
||||
|
||||
return $recordCollection;
|
||||
}
|
||||
|
||||
// --- END EXPORT FORMAT ---
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
?>
|
52
export/export_srwxml.php
Normal file
52
export/export_srwxml.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
// Project: Web Reference Database (refbase) <http://www.refbase.net>
|
||||
// Copyright: Matthias Steffens <mailto:refbase@extracts.de> and the file's
|
||||
// original author(s).
|
||||
//
|
||||
// This code is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY. Please see the GNU General Public
|
||||
// License for more details.
|
||||
//
|
||||
// File: ./export/export_srwxml.php
|
||||
// Repository: $HeadURL: file:///svn/p/refbase/code/branches/bleeding-edge/export/export_srwxml.php $
|
||||
// Author(s): Matthias Steffens <mailto:refbase@extracts.de>
|
||||
//
|
||||
// Created: 17-May-05, 16:31
|
||||
// Modified: $Date: 2008-04-14 17:02:24 +0000 (Mon, 14 Apr 2008) $
|
||||
// $Author: msteffens $
|
||||
// $Revision: 1076 $
|
||||
|
||||
// This exports SRW XML. This file must reside in the 'export' directory of the refbase root directory.
|
||||
// It uses functions from include files 'srwxml.inc.php', 'modsxml.inc.php' and 'oaidcxml.inc.php' that require
|
||||
// the ActiveLink PHP XML Package, which is available under the GPL from: <http://www.active-link.com/software/>
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
// --- BEGIN EXPORT FORMAT ---
|
||||
|
||||
// Export found records as SRW XML:
|
||||
function exportRecords($result, $rowOffset, $showRows, $exportStylesheet, $displayType)
|
||||
{
|
||||
global $rowsFound;
|
||||
|
||||
if ($rowsFound > 0 && ($rowOffset + 1) > $rowsFound) // Invalid offset for current MySQL result set, error with an appropriate diagnostics response:
|
||||
{
|
||||
if ($rowsFound == 1)
|
||||
$recordString = "record";
|
||||
else
|
||||
$recordString = "records";
|
||||
|
||||
$recordCollection = srwDiagnostics(61, "Record offset " . ($rowOffset + 1) . " is invalid for current result set (" . $rowsFound . " " . $recordString . " found)", $exportStylesheet); // function 'srwDiagnostics()' is defined in 'srwxml.inc.php'
|
||||
}
|
||||
else // Generate and serve a SRW XML file of ALL records:
|
||||
{
|
||||
$recordCollection = srwCollection($result, $rowOffset, $showRows, $exportStylesheet, $displayType); // function 'srwCollection()' is defined in 'srwxml.inc.php'
|
||||
}
|
||||
|
||||
return $recordCollection;
|
||||
}
|
||||
|
||||
// --- END EXPORT FORMAT ---
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
?>
|
Reference in New Issue
Block a user