You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
2.3 KiB

  1. <?php
  2. // Project: Web Reference Database (refbase) <http://www.refbase.net>
  3. // Copyright: Matthias Steffens <mailto:refbase@extracts.de> and the file's
  4. // original author(s).
  5. //
  6. // This code is distributed in the hope that it will be useful,
  7. // but WITHOUT ANY WARRANTY. Please see the GNU General Public
  8. // License for more details.
  9. //
  10. // File: ./import/bibutils/import_endx2refbase.php
  11. // Repository: $HeadURL$
  12. // Author(s): Matthias Steffens <mailto:refbase@extracts.de>
  13. //
  14. // Created: 21-Mar-07, 22:57
  15. // Modified: $Date: 2007-09-27 14:11:28 +0000 (Thu, 27 Sep 2007) $
  16. // $Author$
  17. // $Revision: 992 $
  18. // This is an import format file (which must reside within the 'import/' sub-directory of your refbase root directory). It contains a version of the
  19. // 'importRecords()' function that imports records from 'Endnote XML'-formatted data, i.e. data that were formatted according to the XML export format
  20. // used by the commercial bibliographic package 'Endnote' (http://www.endnote.com).
  21. // --------------------------------------------------------------------
  22. // --- BEGIN IMPORT FORMAT ---
  23. // Import records from Endnote XML-formatted source data:
  24. // Requires the following packages (available under the GPL):
  25. // - bibutils <http://www.scripps.edu/~cdputnam/software/bibutils/bibutils.html>
  26. function importRecords($sourceText, $importRecordsRadio, $importRecordNumbersArray)
  27. {
  28. // convert Endnote XML text style markup into proper refbase markup:
  29. $sourceText = standardizeEndnoteXMLInput($sourceText); // function 'standardizeEndnoteXMLInput()' is defined in 'import.inc.php'
  30. // convert Endnote format to MODS XML format:
  31. $sourceText = importBibutils($sourceText,"endx2xml"); // function 'importBibutils()' is defined in 'execute.inc.php'
  32. // convert MODS XML format to RIS format:
  33. $sourceText = importBibutils($sourceText,"xml2ris"); // function 'importBibutils()' is defined in 'execute.inc.php'
  34. // parse RIS format:
  35. return risToRefbase($sourceText, $importRecordsRadio, $importRecordNumbersArray); // function 'risToRefbase()' is defined in 'import.inc.php'
  36. }
  37. // --- END IMPORT FORMAT ---
  38. // --------------------------------------------------------------------
  39. ?>