About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
indexing:xml

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
indexing:xml [2018/12/19 19:04] demiankatzindexing:xml [2023/11/02 13:16] (current) – [The Basics] demiankatz
Line 1: Line 1:
 ====== XML Records ====== ====== XML Records ======
  
-If the data you want to import is not available in MARC format, chances are that you can access it in some flavor of XML.  Fortunately, loading XML into VuFind's index is straightforward if you are familiar with the [[http://www.w3.org/TR/xslt|XSLT]] language -- you simply need to translate from the XML format you have available into Solr's [[http://wiki.apache.org/solr/UpdateXmlMessages|XML Message Format]], then post the result to the Solr server.+If the data you want to import is not available in MARC format, chances are that you can access it in some flavor of XML.  Fortunately, loading XML into VuFind®'s index is straightforward if you are familiar with the [[http://www.w3.org/TR/xslt|XSLT]] language -- you simply need to translate from the XML format you have available into Solr's [[http://wiki.apache.org/solr/UpdateXmlMessages|XML Message Format]], then post the result to the Solr server.
  
  
 ===== Importing with XSLT ===== ===== Importing with XSLT =====
  
-// The XSLT tool described in this section was added in VuFind 1.1. // +VuFind®'s XSLT tool is designed to make posting XSLT-transformed documents to the Solr index simple while offering flexibility for extending XSLT and applying local customizations.
- +
-VuFind's XSLT tool is designed to make posting XSLT-transformed documents to the Solr index simple while offering flexibility for extending XSLT and applying local customizations.+
  
  
Line 19: Line 17:
   * Any custom values you want to pass in as parameters to the XSLT file (i.e. local institution names, ID prefixes, etc.)   * Any custom values you want to pass in as parameters to the XSLT file (i.e. local institution names, ID prefixes, etc.)
  
-You can see an example properties file [[https://github.com/vufind-org/vufind/blob/master/import/ojs.properties|here]].  The comments in this example file explain the available settings.+You can see an example properties file [[https://github.com/vufind-org/vufind/blob/dev/import/ojs.properties|here]].  The comments in this example file explain the available settings.
  
-Once a properties file is set up, you can import an XML file by switching to the import subdirectory of your VuFind installation and typing:+Once a properties file is set up, you can import an XML file by switching to the import subdirectory of your VuFind® installation and typing:
  
 <code> <code>
Line 29: Line 27:
 (substituting the appropriate XML and properties files as needed). (substituting the appropriate XML and properties files as needed).
  
 +=== Note on Local Overrides ===
 +
 +Note that you do not need to provide the full path to the properties file -- the tool will first search your [[configuration:local_settings_directory|local settings directory]] and then use the core default file if no customizations are found. You can also optionally override the XSLT file in your [[configuration:local_settings_directory|local settings directory]] as needed.
  
 +=== Troubleshooting ===
  
 +The import-xsl.php tool supports a ''--test-only'' switch which will show you the result of the XSLT transformation without actually loading any data into your index. This can be helpful for testing and troubleshooting, since it will let you see exactly what is being sent to Solr. To use this, simply insert ''--test-only'' (surrounded by spaces) between ''import-xsl.php'' and ''myFile.xml'' in the example above.
 ==== Full Text ==== ==== Full Text ====
  
-VuFind's XSLT tool includes support for extracting full text from external documents (PDF, Word, etc.).  In order to take advantage of this, you need to install and configure [[indexing:full_text_tools|a full-text extraction tool]].+VuFind®'s XSLT tool includes support for extracting full text from external documents (PDF, Word, etc.).  In order to take advantage of this, you need to install and configure [[indexing:full_text_tools|a full-text extraction tool]].
  
-For an example of full text extraction in action in VuFind, see the full text settings near the bottom of the [[https://github.com/vufind-org/vufind/blob/master/import/xsl/vudl_FOXML.xsl|VuDL Sample XSLT File]].+For an example of full text extraction in action in VuFind®, see the full text settings near the bottom of the [[https://github.com/vufind-org/vufind/blob/dev/import/xsl/vudl_FOXML.xsl|VuDL Sample XSLT File]].
  
 ==== Batch Importing ==== ==== Batch Importing ====
  
-If you need to load a number of XML files at once, you can load them into a subdirectory under the harvest subdirectory of your VuFind installation and use the batch-import-xsl.sh script to load them all.  This is commonly used in combination with [[indexing:oai-pmh|OAI-PMH harvesting]].+If you need to load a number of XML files at once, you can load them into a subdirectory under the harvest subdirectory of your VuFind® installation and use the batch-import-xsl.sh script to load them all.  This is commonly used in combination with [[indexing:oai-pmh|OAI-PMH harvesting]].
  
 +===== Related Video =====
  
 +You can learn more about XML indexing through the [[videos:indexing_xml_records|Indexing XML Records video]].
 ---- struct data ---- ---- struct data ----
 +properties.Page Owner : 
 ---- ----
  
indexing/xml.1545246276.txt.gz · Last modified: 2018/12/19 19:04 by demiankatz