<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?action=history&amp;feed=atom&amp;title=Autocompletion</id>
	<title>Autocompletion - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?action=history&amp;feed=atom&amp;title=Autocompletion"/>
	<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Autocompletion&amp;action=history"/>
	<updated>2026-05-10T11:19:33Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Autocompletion&amp;diff=13274&amp;oldid=prev</id>
		<title>Th.lauke@arcor.de: typos corrected, links added, &#039;== romeo ==&#039; removed</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Autocompletion&amp;diff=13274&amp;oldid=prev"/>
		<updated>2019-09-17T17:29:09Z</updated>

		<summary type="html">&lt;p&gt;typos corrected, links added, &amp;#039;== romeo ==&amp;#039; removed&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:29, 17 September 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For a how-to, please see [[Autocompletion and Authority Files (Romeo Autocomplete)]] or [[Adding an Auto-Completer to a non-workflow page]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For a how-to, please see [[Autocompletion and Authority Files (Romeo Autocomplete)]] or [[Adding an Auto-Completer to a non-workflow page]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Autocompletion in EPrints 3 consists of &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;serveral &lt;/del&gt;stages.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Autocompletion in EPrints 3 consists of &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;several &lt;/ins&gt;stages.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* A field in the workflow is configured to say what autocompletion URL to use, plus any additional parameters to pass to the script. This URL must be on the same server (&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;eg&lt;/del&gt;. foo.eprints.org) but does not have to be part of the EPrints system.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* A field in the workflow is configured to say what autocompletion URL to use, plus any additional parameters to pass to the script. This URL must be on the same server (&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;e.g&lt;/ins&gt;. foo.eprints.org) but does not have to be part of the EPrints system.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The autocomplete script takes the text typed so far (and maybe the additional parameters) and returns a chunk of XML describing possible autocomplete options. This XML consists of a number of rows (how many is up to the script).  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The autocomplete script takes the text typed so far (and maybe the additional parameters) and returns a chunk of XML describing possible autocomplete options. This XML consists of a number of rows (how many is up to the script).  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Each row contains some HTML to show the person viewing plus a magic &amp;lt;nowiki&amp;gt;&amp;lt;ul&amp;gt;&amp;lt;/nowiki&amp;gt; block which is hidden from display, but is used by the autocomplete &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;javascript &lt;/del&gt;to autocomplete the page.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Each row contains some HTML to show the person viewing plus a magic &amp;lt;nowiki&amp;gt;&amp;lt;ul&amp;gt;&amp;lt;/nowiki&amp;gt; block which is hidden from display, but is used by the autocomplete &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;JavaScript &lt;/ins&gt;to autocomplete the page.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Autocomplete Scripts ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Autocomplete Scripts ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l48&quot;&gt;Line 48:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 48:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== simple_file ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== simple_file ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;File needs an additional parameter to be passed to it. This is configured in the workflow. This parameter is the name of a file in the cfg/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;autocompete &lt;/del&gt;directory. This file contains a list of values which are searched (case insensitively) and matches returned. A second parameter of &quot;mode=prefix&quot; can be set to only match values which start with the text being typed, rather than contain it. Add a second and subsequent parameter by using a semi-colon ( ; ) as delimiter (tested in 3.3.10)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;File needs an additional parameter to be passed to it. This is configured in the workflow. This parameter is the name of a file in the cfg/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;autocomplete &lt;/ins&gt;directory. This file contains a list of values which are searched (case insensitively) and matches returned. A second parameter of &quot;mode=prefix&quot; can be set to only match values which start with the text being typed, rather than contain it. Add a second and subsequent parameter by using a semi-colon ( ; ) as delimiter (tested in 3.3.10)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== simple_sql ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== simple_sql ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l54&quot;&gt;Line 54:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 54:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Similar to simple_file but gets its values from a database table.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Similar to simple_file but gets its values from a database table.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The table must be in the eprints database used by this repository and start with &quot;ac_&quot;. The script needs a param. passed from workflow to indicate the name of the table WITHOUT the ac_ prefix. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Eg&lt;/del&gt;. if the table was &quot;ac_badgers&quot; the parameter would be &quot;table=badgers&quot;. The only field used is &quot;value&quot; which works like the lines in the text file. If you want this to be blindingly fast you can make sure &quot;value&quot; is indexed, and set mode=prefix. With those set autocompleting from a dictionary of half a million words worked cheerfully&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The table must be in the eprints database used by this repository and start with &quot;ac_&quot;. The script needs a param. passed from workflow to indicate the name of the table WITHOUT the ac_ prefix. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;E.g&lt;/ins&gt;. if the table was &quot;ac_badgers&quot; the parameter would be &quot;table=badgers&quot;. The only field used is &quot;value&quot; which works like the lines in the text file. If you want this to be blindingly fast you can make sure &quot;value&quot; is indexed, and set mode=prefix. With those set autocompleting from a dictionary of half a million words worked cheerfully.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=== romeo ===&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(not included in 3.0, expected in 3.1) This script uses the EPrints/Romeo data to provide journal autocomplete data. Should be attached to the publication field. This is almost identical to file, but inserts the required Powered by Sherpa note&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== url_name_value ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== url_name_value ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l66&quot;&gt;Line 66:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 62:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== file ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== file ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is for more complex autocompletion authority files. It works like simple_file except that the file format is more complicated.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is for more complex autocompletion authority files. It works like simple_file except that the file format is more complicated. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;For a how-to, please see [https://wiki.eprints.org/w/Autocompletion_and_Authority_Files_(Romeo_Autocomplete)#Creating_Your_Own_Authority_File_.28complex.29 Autocompletion and Authority Files (Romeo Autocomplete)]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The file consists of lines which contain:  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The file consists of lines which contain:  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* a value to search, (&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;eg&lt;/del&gt;. &quot;African Journal of Agricultural Research&quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* a value to search, (&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;e.g&lt;/ins&gt;. &quot;African Journal of Agricultural Research&quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* a tab&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* a tab&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* a &amp;lt;nowiki&amp;gt;&amp;lt;li&amp;gt;&amp;lt;/nowiki&amp;gt; autocomplete chunk. (with no line breaks) &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;eg&lt;/del&gt;.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* a &amp;lt;nowiki&amp;gt;&amp;lt;li&amp;gt;&amp;lt;/nowiki&amp;gt; autocomplete chunk. (with no line breaks) &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;e.g&lt;/ins&gt;.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;nowiki&amp;gt; &amp;lt;li style=&amp;#039;border-right: solid 50px #30FF30&amp;#039; &amp;gt;&amp;lt;/nowiki&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;nowiki&amp;gt; &amp;lt;li style=&amp;#039;border-right: solid 50px #30FF30&amp;#039; &amp;gt;&amp;lt;/nowiki&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Th.lauke@arcor.de</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Autocompletion&amp;diff=11000&amp;oldid=prev</id>
		<title>Alan.stiles@open.ac.uk: /* simple_file */</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Autocompletion&amp;diff=11000&amp;oldid=prev"/>
		<updated>2014-10-08T12:58:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;simple_file&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:58, 8 October 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l48&quot;&gt;Line 48:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 48:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== simple_file ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== simple_file ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;File needs an additional parameter to be passed to it. This is configured in the workflow. This parameter is the name of a file in the cfg/autocompete directory. This file contains a list of values which are searched (case insensitively) and matches returned. A second parameter of &quot;mode=prefix&quot; can be set to only match values which start with the text being typed, rather than contain it.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;File needs an additional parameter to be passed to it. This is configured in the workflow. This parameter is the name of a file in the cfg/autocompete directory. This file contains a list of values which are searched (case insensitively) and matches returned. A second parameter of &quot;mode=prefix&quot; can be set to only match values which start with the text being typed, rather than contain it. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Add a second and subsequent parameter by using a semi-colon ( ; ) as delimiter (tested in 3.3.10)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== simple_sql ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== simple_sql ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Alan.stiles@open.ac.uk</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Autocompletion&amp;diff=10627&amp;oldid=prev</id>
		<title>Adb1a11@ecs.soton.ac.uk: Typo fixes</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Autocompletion&amp;diff=10627&amp;oldid=prev"/>
		<updated>2012-08-13T07:16:04Z</updated>

		<summary type="html">&lt;p&gt;Typo fixes&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 07:16, 13 August 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l14&quot;&gt;Line 14:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There are several kinds of autocomplete scripts:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There are several kinds of autocomplete scripts:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;thoses &lt;/del&gt;that just use the existing data in your repository &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/del&gt;(these are dead easy as they work out of the box)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;those &lt;/ins&gt;that just use the existing data in your repository (these are dead easy as they work out of the box)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* ones which use a file which you place in your &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;repositories &lt;/del&gt;cfg/autocomplete/ directory.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* ones which use a file which you place in your &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;repository&#039;s &lt;/ins&gt;cfg/autocomplete/ directory.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* more clever ones.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* more clever ones.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You may be able to find new autocomplete scripts and authority files on http://files.eprints.org/&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You may be able to find new autocomplete scripts and authority files on http://files.eprints.org/&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Scripts are in (rough) order of complexity to use &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;...&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Scripts are in (rough) order of complexity to use&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== journal_by_name ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== journal_by_name ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l36&quot;&gt;Line 36:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 36:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== name ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== name ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Attached to a multiple compound name/id field (&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;eg&lt;/del&gt;. creators) looks up the name in the existing list in the repository. Can match on any id or given or family. Populates all parts of the current row it can.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Attached to a multiple compound name/id field (&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;e.g&lt;/ins&gt;. creators) looks up the name in the existing list in the repository. Can match on any id or given or family &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;name&lt;/ins&gt;. Populates all parts of the current row it can.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== title_duplicates ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== title_duplicates ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l42&quot;&gt;Line 42:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 42:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is a slightly odd script as it doesn&amp;#039;t actually provide any autocomplete data. What it does is search the list of existing titles to see if there is a match. It only searches if there are 5 or more characters entered so far.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is a slightly odd script as it doesn&amp;#039;t actually provide any autocomplete data. What it does is search the list of existing titles to see if there is a match. It only searches if there are 5 or more characters entered so far.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If it finds any matches it lists them with a warning that they might be a problem, but does not assist autocompletion. If many matches are made then a short title only is shown, if the list is only 4 or &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;lest &lt;/del&gt;then a full citation is shown.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If it finds any matches it lists them with a warning that they might be a problem, but does not assist autocompletion. If many matches are made then a short title only is shown, if the list is only 4 or &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;fewer &lt;/ins&gt;then a full citation is shown.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is set to &amp;quot;on&amp;quot; by default in the hope that it will reduce duplicate submissions.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is set to &amp;quot;on&amp;quot; by default in the hope that it will reduce duplicate submissions.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Adb1a11@ecs.soton.ac.uk</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Autocompletion&amp;diff=9552&amp;oldid=prev</id>
		<title>Th.lauke@arcor.de: typos corrected</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Autocompletion&amp;diff=9552&amp;oldid=prev"/>
		<updated>2010-10-22T08:14:45Z</updated>

		<summary type="html">&lt;p&gt;typos corrected&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:14, 22 October 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l20&quot;&gt;Line 20:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You may be able to find new autocomplete scripts and authority files on http://files.eprints.org/&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You may be able to find new autocomplete scripts and authority files on http://files.eprints.org/&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Scripts are in (rough) order of complexity to use...&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Scripts are in (rough) order of complexity to use ...&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== journal_by_name ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== journal_by_name ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l68&quot;&gt;Line 68:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 68:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is for more complex autocompletion authority files. It works like simple_file except that the file format is more complicated.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is for more complex autocompletion authority files. It works like simple_file except that the file format is more complicated.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The file &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;constists &lt;/del&gt;of lines which &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;contan&lt;/del&gt;:  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The file &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;consists &lt;/ins&gt;of lines which &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;contain&lt;/ins&gt;:  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* a value to search, (eg. &amp;quot;African Journal of Agricultural Research&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* a value to search, (eg. &amp;quot;African Journal of Agricultural Research&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* a tab&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* a tab&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Th.lauke@arcor.de</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Autocompletion&amp;diff=9078&amp;oldid=prev</id>
		<title>Kiz at 09:00, 12 April 2010</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Autocompletion&amp;diff=9078&amp;oldid=prev"/>
		<updated>2010-04-12T09:00:41Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:00, 12 April 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{reference}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{reference}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For a how-to, please see [[Autocompletion and Authority Files (Romeo Autocomplete)]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For a how-to, please see [[Autocompletion and Authority Files (Romeo Autocomplete)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]] or [[Adding an Auto-Completer to a non-workflow page&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Autocompletion in EPrints 3 consists of serveral stages.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Autocompletion in EPrints 3 consists of serveral stages.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Kiz</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Autocompletion&amp;diff=5239&amp;oldid=prev</id>
		<title>WikiSysop: Reverted edit of AvuPhu, changed back to last version by WikiSysop</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Autocompletion&amp;diff=5239&amp;oldid=prev"/>
		<updated>2007-08-24T13:29:12Z</updated>

		<summary type="html">&lt;p&gt;Reverted edit of AvuPhu, changed back to last version by WikiSysop&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{reference}}&lt;br /&gt;
&lt;br /&gt;
For a how-to, please see [[Autocompletion and Authority Files (Romeo Autocomplete)]]&lt;br /&gt;
&lt;br /&gt;
Autocompletion in EPrints 3 consists of serveral stages.&lt;br /&gt;
&lt;br /&gt;
* A field in the workflow is configured to say what autocompletion URL to use, plus any additional parameters to pass to the script. This URL must be on the same server (eg. foo.eprints.org) but does not have to be part of the EPrints system. &lt;br /&gt;
* The autocomplete script takes the text typed so far (and maybe the additional parameters) and returns a chunk of XML describing possible autocomplete options. This XML consists of a number of rows (how many is up to the script). &lt;br /&gt;
* Each row contains some HTML to show the person viewing plus a magic &amp;lt;nowiki&amp;gt;&amp;lt;ul&amp;gt;&amp;lt;/nowiki&amp;gt; block which is hidden from display, but is used by the autocomplete javascript to autocomplete the page.&lt;br /&gt;
&lt;br /&gt;
== Autocomplete Scripts ==&lt;br /&gt;
&lt;br /&gt;
EPrints autocomplete scripts live in /opt/eprints3/cgi/users/lookup/ you can add your own here, or maybe elsewhere if, for example, you needed to use PHP.&lt;br /&gt;
&lt;br /&gt;
There are several kinds of autocomplete scripts:&lt;br /&gt;
* thoses that just use the existing data in your repository  (these are dead easy as they work out of the box)&lt;br /&gt;
* ones which use a file which you place in your repositories cfg/autocomplete/ directory.&lt;br /&gt;
* more clever ones.&lt;br /&gt;
&lt;br /&gt;
You may be able to find new autocomplete scripts and authority files on http://files.eprints.org/&lt;br /&gt;
&lt;br /&gt;
Scripts are in (rough) order of complexity to use...&lt;br /&gt;
&lt;br /&gt;
=== journal_by_name ===&lt;br /&gt;
&lt;br /&gt;
Can only be used on the &amp;quot;publication&amp;quot; field. Looks up the publication in the existing publications in the repository and autocompletes the publication. If ISSN and/or publisher exist in the same input component as the journal field they will also be completed if data is available.&lt;br /&gt;
&lt;br /&gt;
=== journal_by_issn ===&lt;br /&gt;
&lt;br /&gt;
As above, but attached to the ISSN field.&lt;br /&gt;
&lt;br /&gt;
=== event_by_name ===&lt;br /&gt;
&lt;br /&gt;
Similar to journal_by_name. Is attached to the event_title field and autocompletes from existing repository data. If they are in the same (multi) input component it will also try and autocomplete event_location, event_dates and event_type.&lt;br /&gt;
&lt;br /&gt;
=== name ===&lt;br /&gt;
&lt;br /&gt;
Attached to a multiple compound name/id field (eg. creators) looks up the name in the existing list in the repository. Can match on any id or given or family. Populates all parts of the current row it can. &lt;br /&gt;
&lt;br /&gt;
=== title_duplicates ===&lt;br /&gt;
&lt;br /&gt;
This is a slightly odd script as it doesn&amp;#039;t actually provide any autocomplete data. What it does is search the list of existing titles to see if there is a match. It only searches if there are 5 or more characters entered so far.&lt;br /&gt;
&lt;br /&gt;
If it finds any matches it lists them with a warning that they might be a problem, but does not assist autocompletion. If many matches are made then a short title only is shown, if the list is only 4 or lest then a full citation is shown.&lt;br /&gt;
&lt;br /&gt;
This is set to &amp;quot;on&amp;quot; by default in the hope that it will reduce duplicate submissions.&lt;br /&gt;
&lt;br /&gt;
=== simple_file ===&lt;br /&gt;
&lt;br /&gt;
File needs an additional parameter to be passed to it. This is configured in the workflow. This parameter is the name of a file in the cfg/autocompete directory. This file contains a list of values which are searched (case insensitively) and matches returned. A second parameter of &amp;quot;mode=prefix&amp;quot; can be set to only match values which start with the text being typed, rather than contain it.&lt;br /&gt;
&lt;br /&gt;
=== simple_sql ===&lt;br /&gt;
&lt;br /&gt;
Similar to simple_file but gets its values from a database table.&lt;br /&gt;
&lt;br /&gt;
The table must be in the eprints database used by this repository and start with &amp;quot;ac_&amp;quot;. The script needs a param. passed from workflow to indicate the name of the table WITHOUT the ac_ prefix. Eg. if the table was &amp;quot;ac_badgers&amp;quot; the parameter would be &amp;quot;table=badgers&amp;quot;. The only field used is &amp;quot;value&amp;quot; which works like the lines in the text file. If you want this to be blindingly fast you can make sure &amp;quot;value&amp;quot; is indexed, and set mode=prefix. With those set autocompleting from a dictionary of half a million words worked cheerfully.&lt;br /&gt;
&lt;br /&gt;
=== romeo ===&lt;br /&gt;
&lt;br /&gt;
(not included in 3.0, expected in 3.1) This script uses the EPrints/Romeo data to provide journal autocomplete data. Should be attached to the publication field. This is almost identical to file, but inserts the required Powered by Sherpa note.&lt;br /&gt;
&lt;br /&gt;
=== url_name_value ===&lt;br /&gt;
&lt;br /&gt;
This works like simple_sql except for the fact it uses three columns. url, name and value. It searches and autocompletes using value, but the human-readable description is supplied by &amp;quot;name&amp;quot; and if url is set then a (more info) link is shown. The link opens a new window to avoid mid-form trauma.&lt;br /&gt;
&lt;br /&gt;
=== file ===&lt;br /&gt;
&lt;br /&gt;
This is for more complex autocompletion authority files. It works like simple_file except that the file format is more complicated.&lt;br /&gt;
&lt;br /&gt;
The file constists of lines which contan: &lt;br /&gt;
* a value to search, (eg. &amp;quot;African Journal of Agricultural Research&amp;quot;)&lt;br /&gt;
* a tab&lt;br /&gt;
* a &amp;lt;nowiki&amp;gt;&amp;lt;li&amp;gt;&amp;lt;/nowiki&amp;gt; autocomplete chunk. (with no line breaks) eg. &lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;li style=&amp;#039;border-right: solid 50px #30FF30&amp;#039; &amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== external source ===&lt;br /&gt;
&lt;br /&gt;
This takes all the ideas above, and extends them to make an API call to an external data source.  This has the advantage that you are always referring to the authoritative source, but the disadvantage that you are reliant on both the network being up and the external source being available.&lt;br /&gt;
&lt;br /&gt;
It breaks down into two parts:&lt;br /&gt;
* the autocompleter call in the web page&lt;br /&gt;
* the script being called&lt;br /&gt;
&lt;br /&gt;
For an example, here is one way to query the RoMEO data directly:&lt;br /&gt;
&lt;br /&gt;
First, set the autocompleter in the eprints workflow:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     &amp;lt;component type=&amp;quot;Field::Multi&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;title&amp;gt;Article Publication Details&amp;lt;/title&amp;gt;&lt;br /&gt;
        &amp;lt;field ref=&amp;quot;publication&amp;quot; input_lookup_url=&amp;quot;{$config{perl_url}}/get_journals&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;field ref=&amp;quot;publisher&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;field ref=&amp;quot;issn&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;/component&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next have the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use strict;&lt;br /&gt;
use HTTP::Request;&lt;br /&gt;
use LWP::UserAgent;&lt;br /&gt;
use XML::Twig;&lt;br /&gt;
&lt;br /&gt;
use Data::Dumper;&lt;br /&gt;
use EPrints;&lt;br /&gt;
&lt;br /&gt;
my $journal_data = {};&lt;br /&gt;
&lt;br /&gt;
sub urldecode{&lt;br /&gt;
  my ($url) = @_;&lt;br /&gt;
  $url =~ s/%([0-9a-f][0-9a-f])/pack(&amp;quot;C&amp;quot;,hex($1))/egi;&lt;br /&gt;
  $url =~ s/\x2B/ /; # swap &amp;#039;+&amp;#039; for &amp;#039; &amp;#039;&lt;br /&gt;
  return $url;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# XML::Twig&amp;#039;s routine for dealing with a journal entry&lt;br /&gt;
sub process_journal {&lt;br /&gt;
  my ( $twig, $journal ) = @_;&lt;br /&gt;
&lt;br /&gt;
  # get the components&lt;br /&gt;
  my $title = urldecode( $journal-&amp;gt;first_child(&amp;#039;jtitle&amp;#039;)-&amp;gt;text );&lt;br /&gt;
&lt;br /&gt;
  my $zetoc = urldecode( $journal-&amp;gt;first_child(&amp;#039;zetocpub&amp;#039;)-&amp;gt;text ) &lt;br /&gt;
                  if $journal-&amp;gt;first_child(&amp;#039;zetocpub&amp;#039;);&lt;br /&gt;
  my $romeo = urldecode( $journal-&amp;gt;first_child(&amp;#039;romeopub&amp;#039;)-&amp;gt;text )&lt;br /&gt;
                  if $journal-&amp;gt;first_child(&amp;#039;romeopub&amp;#039;);&lt;br /&gt;
  my $issn  = urldecode( $journal-&amp;gt;first_child(&amp;#039;issn&amp;#039;)-&amp;gt;text )&lt;br /&gt;
                  if $journal-&amp;gt;first_child(&amp;#039;issn&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
  my $publisher = $romeo;&lt;br /&gt;
  $publisher = $zetoc if (not $publisher &amp;amp;&amp;amp; $zetoc);&lt;br /&gt;
  &lt;br /&gt;
  # build a lub of html based on the components&lt;br /&gt;
  my $html .= &amp;quot;&amp;lt;li&amp;gt;$title&amp;quot;;&lt;br /&gt;
  $html .= &amp;quot;&amp;lt;br /&amp;gt;published by $publisher&amp;quot; if $publisher;&lt;br /&gt;
  &lt;br /&gt;
  $html .= &amp;quot;&amp;lt;ul&amp;gt;&amp;quot;;&lt;br /&gt;
  if ($title) {&lt;br /&gt;
      $html .= &amp;quot;&amp;lt;li id=&amp;#039;for:value:component:_publication&amp;#039;&amp;gt;$title&amp;lt;/li&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
  if ($publisher) {&lt;br /&gt;
      $html .= &amp;quot;&amp;lt;li id=&amp;#039;for:value:component:_publisher&amp;#039;&amp;gt;$publisher&amp;lt;/li&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
  if ($issn) {&lt;br /&gt;
    $html .= &amp;quot;&amp;lt;li id=&amp;#039;for:value:component:_issn&amp;#039;&amp;gt;$issn&amp;lt;/li&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
  $html .= &amp;quot;&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;\n&amp;quot;;&lt;br /&gt;
  warn &amp;quot;\n\n$html\n\n&amp;quot;;&lt;br /&gt;
  # save the html&lt;br /&gt;
  $journal_data-&amp;gt;{$title} = $html;&lt;br /&gt;
&lt;br /&gt;
  1; &lt;br /&gt;
} ## end process_journal&lt;br /&gt;
&lt;br /&gt;
# get a list of journals that match the query&lt;br /&gt;
sub get_journals {&lt;br /&gt;
  my $journal = shift;&lt;br /&gt;
  my @html = ();&lt;br /&gt;
&lt;br /&gt;
  if ($journal) {&lt;br /&gt;
    return (&amp;quot;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;keep typing....&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&amp;quot;) if (length($journal) &amp;lt; 3);&lt;br /&gt;
&lt;br /&gt;
    $journal =~ s/\s+/\+/;&lt;br /&gt;
    my $query = &amp;quot;http://www.sherpa.ac.uk/romeoapi.php?qtype=starts&amp;amp;jtitle=$journal&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    my $request = HTTP::Request-&amp;gt;new( GET =&amp;gt; &amp;quot;$query&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
    my $ua = LWP::UserAgent-&amp;gt;new();&lt;br /&gt;
    my $response = $ua-&amp;gt;request($request);&lt;br /&gt;
    my $content = $response-&amp;gt;content();&lt;br /&gt;
&lt;br /&gt;
    my $twig = XML::Twig-&amp;gt;new(&lt;br /&gt;
                       &amp;#039;keep_encoding&amp;#039; =&amp;gt; 1,&lt;br /&gt;
                       &amp;#039;TwigRoots&amp;#039; =&amp;gt; { &amp;#039;journals&amp;#039; =&amp;gt; 1 },&lt;br /&gt;
                       &amp;#039;TwigHandlers&amp;#039; =&amp;gt; { &amp;#039;journal&amp;#039; =&amp;gt; \&amp;amp;process_journal, }&lt;br /&gt;
                      );&lt;br /&gt;
    $twig-&amp;gt;parse($content);&lt;br /&gt;
    if (scalar keys %{$journal_data}) {&lt;br /&gt;
      push @html, &amp;quot;&amp;lt;ul class=&amp;#039;journals&amp;#039;&amp;gt;\n&amp;quot;;&lt;br /&gt;
      foreach my $title (sort keys %{$journal_data}) {&lt;br /&gt;
        push @html, &amp;quot;$journal_data-&amp;gt;{$title}\n&amp;quot;;&lt;br /&gt;
      } ## end of  foreach my $title (sort keys %{$journal_data})&lt;br /&gt;
      push @html, &amp;quot;&amp;lt;/ul&amp;gt;\n&amp;quot;;&lt;br /&gt;
    } ## end of if (scalar keys %{$journal_data}) ...&lt;br /&gt;
  } else {&lt;br /&gt;
    push @html, &amp;quot;&amp;lt;!-- No journal name supplied --&amp;gt;\n&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  return (join &amp;quot;\n&amp;quot;, @html)&lt;br /&gt;
&lt;br /&gt;
} ## end get_journals&lt;br /&gt;
&lt;br /&gt;
my $session = EPrints::Session-&amp;gt;new();&lt;br /&gt;
&lt;br /&gt;
# we need the send an initial content-type&lt;br /&gt;
print &amp;lt;&amp;lt;END;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
# then we send the fragment of html for the autocompleter&lt;br /&gt;
print get_journals( lc $session-&amp;gt;param( &amp;quot;q&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
$session-&amp;gt;terminate;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Autocompletion&amp;diff=5118&amp;oldid=prev</id>
		<title>WikiSysop: Reverted edit of AvuPhu, changed back to last version by Kiz</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Autocompletion&amp;diff=5118&amp;oldid=prev"/>
		<updated>2007-08-22T11:45:28Z</updated>

		<summary type="html">&lt;p&gt;Reverted edit of AvuPhu, changed back to last version by Kiz&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{reference}}&lt;br /&gt;
&lt;br /&gt;
For a how-to, please see [[Autocompletion and Authority Files (Romeo Autocomplete)]]&lt;br /&gt;
&lt;br /&gt;
Autocompletion in EPrints 3 consists of serveral stages.&lt;br /&gt;
&lt;br /&gt;
* A field in the workflow is configured to say what autocompletion URL to use, plus any additional parameters to pass to the script. This URL must be on the same server (eg. foo.eprints.org) but does not have to be part of the EPrints system. &lt;br /&gt;
* The autocomplete script takes the text typed so far (and maybe the additional parameters) and returns a chunk of XML describing possible autocomplete options. This XML consists of a number of rows (how many is up to the script). &lt;br /&gt;
* Each row contains some HTML to show the person viewing plus a magic &amp;lt;nowiki&amp;gt;&amp;lt;ul&amp;gt;&amp;lt;/nowiki&amp;gt; block which is hidden from display, but is used by the autocomplete javascript to autocomplete the page.&lt;br /&gt;
&lt;br /&gt;
== Autocomplete Scripts ==&lt;br /&gt;
&lt;br /&gt;
EPrints autocomplete scripts live in /opt/eprints3/cgi/users/lookup/ you can add your own here, or maybe elsewhere if, for example, you needed to use PHP.&lt;br /&gt;
&lt;br /&gt;
There are several kinds of autocomplete scripts:&lt;br /&gt;
* thoses that just use the existing data in your repository  (these are dead easy as they work out of the box)&lt;br /&gt;
* ones which use a file which you place in your repositories cfg/autocomplete/ directory.&lt;br /&gt;
* more clever ones.&lt;br /&gt;
&lt;br /&gt;
You may be able to find new autocomplete scripts and authority files on http://files.eprints.org/&lt;br /&gt;
&lt;br /&gt;
Scripts are in (rough) order of complexity to use...&lt;br /&gt;
&lt;br /&gt;
=== journal_by_name ===&lt;br /&gt;
&lt;br /&gt;
Can only be used on the &amp;quot;publication&amp;quot; field. Looks up the publication in the existing publications in the repository and autocompletes the publication. If ISSN and/or publisher exist in the same input component as the journal field they will also be completed if data is available.&lt;br /&gt;
&lt;br /&gt;
=== journal_by_issn ===&lt;br /&gt;
&lt;br /&gt;
As above, but attached to the ISSN field.&lt;br /&gt;
&lt;br /&gt;
=== event_by_name ===&lt;br /&gt;
&lt;br /&gt;
Similar to journal_by_name. Is attached to the event_title field and autocompletes from existing repository data. If they are in the same (multi) input component it will also try and autocomplete event_location, event_dates and event_type.&lt;br /&gt;
&lt;br /&gt;
=== name ===&lt;br /&gt;
&lt;br /&gt;
Attached to a multiple compound name/id field (eg. creators) looks up the name in the existing list in the repository. Can match on any id or given or family. Populates all parts of the current row it can. &lt;br /&gt;
&lt;br /&gt;
=== title_duplicates ===&lt;br /&gt;
&lt;br /&gt;
This is a slightly odd script as it doesn&amp;#039;t actually provide any autocomplete data. What it does is search the list of existing titles to see if there is a match. It only searches if there are 5 or more characters entered so far.&lt;br /&gt;
&lt;br /&gt;
If it finds any matches it lists them with a warning that they might be a problem, but does not assist autocompletion. If many matches are made then a short title only is shown, if the list is only 4 or lest then a full citation is shown.&lt;br /&gt;
&lt;br /&gt;
This is set to &amp;quot;on&amp;quot; by default in the hope that it will reduce duplicate submissions.&lt;br /&gt;
&lt;br /&gt;
=== simple_file ===&lt;br /&gt;
&lt;br /&gt;
File needs an additional parameter to be passed to it. This is configured in the workflow. This parameter is the name of a file in the cfg/autocompete directory. This file contains a list of values which are searched (case insensitively) and matches returned. A second parameter of &amp;quot;mode=prefix&amp;quot; can be set to only match values which start with the text being typed, rather than contain it.&lt;br /&gt;
&lt;br /&gt;
=== simple_sql ===&lt;br /&gt;
&lt;br /&gt;
Similar to simple_file but gets its values from a database table.&lt;br /&gt;
&lt;br /&gt;
The table must be in the eprints database used by this repository and start with &amp;quot;ac_&amp;quot;. The script needs a param. passed from workflow to indicate the name of the table WITHOUT the ac_ prefix. Eg. if the table was &amp;quot;ac_badgers&amp;quot; the parameter would be &amp;quot;table=badgers&amp;quot;. The only field used is &amp;quot;value&amp;quot; which works like the lines in the text file. If you want this to be blindingly fast you can make sure &amp;quot;value&amp;quot; is indexed, and set mode=prefix. With those set autocompleting from a dictionary of half a million words worked cheerfully.&lt;br /&gt;
&lt;br /&gt;
=== romeo ===&lt;br /&gt;
&lt;br /&gt;
(not included in 3.0, expected in 3.1) This script uses the EPrints/Romeo data to provide journal autocomplete data. Should be attached to the publication field. This is almost identical to file, but inserts the required Powered by Sherpa note.&lt;br /&gt;
&lt;br /&gt;
=== url_name_value ===&lt;br /&gt;
&lt;br /&gt;
This works like simple_sql except for the fact it uses three columns. url, name and value. It searches and autocompletes using value, but the human-readable description is supplied by &amp;quot;name&amp;quot; and if url is set then a (more info) link is shown. The link opens a new window to avoid mid-form trauma.&lt;br /&gt;
&lt;br /&gt;
=== file ===&lt;br /&gt;
&lt;br /&gt;
This is for more complex autocompletion authority files. It works like simple_file except that the file format is more complicated.&lt;br /&gt;
&lt;br /&gt;
The file constists of lines which contan: &lt;br /&gt;
* a value to search, (eg. &amp;quot;African Journal of Agricultural Research&amp;quot;)&lt;br /&gt;
* a tab&lt;br /&gt;
* a &amp;lt;nowiki&amp;gt;&amp;lt;li&amp;gt;&amp;lt;/nowiki&amp;gt; autocomplete chunk. (with no line breaks) eg. &lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;li style=&amp;#039;border-right: solid 50px #30FF30&amp;#039; &amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== external source ===&lt;br /&gt;
&lt;br /&gt;
This takes all the ideas above, and extends them to make an API call to an external data source.  This has the advantage that you are always referring to the authoritative source, but the disadvantage that you are reliant on both the network being up and the external source being available.&lt;br /&gt;
&lt;br /&gt;
It breaks down into two parts:&lt;br /&gt;
* the autocompleter call in the web page&lt;br /&gt;
* the script being called&lt;br /&gt;
&lt;br /&gt;
For an example, here is one way to query the RoMEO data directly:&lt;br /&gt;
&lt;br /&gt;
First, set the autocompleter in the eprints workflow:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     &amp;lt;component type=&amp;quot;Field::Multi&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;title&amp;gt;Article Publication Details&amp;lt;/title&amp;gt;&lt;br /&gt;
        &amp;lt;field ref=&amp;quot;publication&amp;quot; input_lookup_url=&amp;quot;{$config{perl_url}}/get_journals&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;field ref=&amp;quot;publisher&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;field ref=&amp;quot;issn&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;/component&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next have the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use strict;&lt;br /&gt;
use HTTP::Request;&lt;br /&gt;
use LWP::UserAgent;&lt;br /&gt;
use XML::Twig;&lt;br /&gt;
&lt;br /&gt;
use Data::Dumper;&lt;br /&gt;
use EPrints;&lt;br /&gt;
&lt;br /&gt;
my $journal_data = {};&lt;br /&gt;
&lt;br /&gt;
sub urldecode{&lt;br /&gt;
  my ($url) = @_;&lt;br /&gt;
  $url =~ s/%([0-9a-f][0-9a-f])/pack(&amp;quot;C&amp;quot;,hex($1))/egi;&lt;br /&gt;
  $url =~ s/\x2B/ /; # swap &amp;#039;+&amp;#039; for &amp;#039; &amp;#039;&lt;br /&gt;
  return $url;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# XML::Twig&amp;#039;s routine for dealing with a journal entry&lt;br /&gt;
sub process_journal {&lt;br /&gt;
  my ( $twig, $journal ) = @_;&lt;br /&gt;
&lt;br /&gt;
  # get the components&lt;br /&gt;
  my $title = urldecode( $journal-&amp;gt;first_child(&amp;#039;jtitle&amp;#039;)-&amp;gt;text );&lt;br /&gt;
&lt;br /&gt;
  my $zetoc = urldecode( $journal-&amp;gt;first_child(&amp;#039;zetocpub&amp;#039;)-&amp;gt;text ) &lt;br /&gt;
                  if $journal-&amp;gt;first_child(&amp;#039;zetocpub&amp;#039;);&lt;br /&gt;
  my $romeo = urldecode( $journal-&amp;gt;first_child(&amp;#039;romeopub&amp;#039;)-&amp;gt;text )&lt;br /&gt;
                  if $journal-&amp;gt;first_child(&amp;#039;romeopub&amp;#039;);&lt;br /&gt;
  my $issn  = urldecode( $journal-&amp;gt;first_child(&amp;#039;issn&amp;#039;)-&amp;gt;text )&lt;br /&gt;
                  if $journal-&amp;gt;first_child(&amp;#039;issn&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
  my $publisher = $romeo;&lt;br /&gt;
  $publisher = $zetoc if (not $publisher &amp;amp;&amp;amp; $zetoc);&lt;br /&gt;
  &lt;br /&gt;
  # build a lub of html based on the components&lt;br /&gt;
  my $html .= &amp;quot;&amp;lt;li&amp;gt;$title&amp;quot;;&lt;br /&gt;
  $html .= &amp;quot;&amp;lt;br /&amp;gt;published by $publisher&amp;quot; if $publisher;&lt;br /&gt;
  &lt;br /&gt;
  $html .= &amp;quot;&amp;lt;ul&amp;gt;&amp;quot;;&lt;br /&gt;
  if ($title) {&lt;br /&gt;
      $html .= &amp;quot;&amp;lt;li id=&amp;#039;for:value:component:_publication&amp;#039;&amp;gt;$title&amp;lt;/li&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
  if ($publisher) {&lt;br /&gt;
      $html .= &amp;quot;&amp;lt;li id=&amp;#039;for:value:component:_publisher&amp;#039;&amp;gt;$publisher&amp;lt;/li&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
  if ($issn) {&lt;br /&gt;
    $html .= &amp;quot;&amp;lt;li id=&amp;#039;for:value:component:_issn&amp;#039;&amp;gt;$issn&amp;lt;/li&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
  $html .= &amp;quot;&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;\n&amp;quot;;&lt;br /&gt;
  warn &amp;quot;\n\n$html\n\n&amp;quot;;&lt;br /&gt;
  # save the html&lt;br /&gt;
  $journal_data-&amp;gt;{$title} = $html;&lt;br /&gt;
&lt;br /&gt;
  1; &lt;br /&gt;
} ## end process_journal&lt;br /&gt;
&lt;br /&gt;
# get a list of journals that match the query&lt;br /&gt;
sub get_journals {&lt;br /&gt;
  my $journal = shift;&lt;br /&gt;
  my @html = ();&lt;br /&gt;
&lt;br /&gt;
  if ($journal) {&lt;br /&gt;
    return (&amp;quot;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;keep typing....&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&amp;quot;) if (length($journal) &amp;lt; 3);&lt;br /&gt;
&lt;br /&gt;
    $journal =~ s/\s+/\+/;&lt;br /&gt;
    my $query = &amp;quot;http://www.sherpa.ac.uk/romeoapi.php?qtype=starts&amp;amp;jtitle=$journal&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    my $request = HTTP::Request-&amp;gt;new( GET =&amp;gt; &amp;quot;$query&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
    my $ua = LWP::UserAgent-&amp;gt;new();&lt;br /&gt;
    my $response = $ua-&amp;gt;request($request);&lt;br /&gt;
    my $content = $response-&amp;gt;content();&lt;br /&gt;
&lt;br /&gt;
    my $twig = XML::Twig-&amp;gt;new(&lt;br /&gt;
                       &amp;#039;keep_encoding&amp;#039; =&amp;gt; 1,&lt;br /&gt;
                       &amp;#039;TwigRoots&amp;#039; =&amp;gt; { &amp;#039;journals&amp;#039; =&amp;gt; 1 },&lt;br /&gt;
                       &amp;#039;TwigHandlers&amp;#039; =&amp;gt; { &amp;#039;journal&amp;#039; =&amp;gt; \&amp;amp;process_journal, }&lt;br /&gt;
                      );&lt;br /&gt;
    $twig-&amp;gt;parse($content);&lt;br /&gt;
    if (scalar keys %{$journal_data}) {&lt;br /&gt;
      push @html, &amp;quot;&amp;lt;ul class=&amp;#039;journals&amp;#039;&amp;gt;\n&amp;quot;;&lt;br /&gt;
      foreach my $title (sort keys %{$journal_data}) {&lt;br /&gt;
        push @html, &amp;quot;$journal_data-&amp;gt;{$title}\n&amp;quot;;&lt;br /&gt;
      } ## end of  foreach my $title (sort keys %{$journal_data})&lt;br /&gt;
      push @html, &amp;quot;&amp;lt;/ul&amp;gt;\n&amp;quot;;&lt;br /&gt;
    } ## end of if (scalar keys %{$journal_data}) ...&lt;br /&gt;
  } else {&lt;br /&gt;
    push @html, &amp;quot;&amp;lt;!-- No journal name supplied --&amp;gt;\n&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  return (join &amp;quot;\n&amp;quot;, @html)&lt;br /&gt;
&lt;br /&gt;
} ## end get_journals&lt;br /&gt;
&lt;br /&gt;
my $session = EPrints::Session-&amp;gt;new();&lt;br /&gt;
&lt;br /&gt;
# we need the send an initial content-type&lt;br /&gt;
print &amp;lt;&amp;lt;END;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
# then we send the fragment of html for the autocompleter&lt;br /&gt;
print get_journals( lc $session-&amp;gt;param( &amp;quot;q&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
$session-&amp;gt;terminate;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Autocompletion&amp;diff=4769&amp;oldid=prev</id>
		<title>Kiz: Add in an example for an external data source</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Autocompletion&amp;diff=4769&amp;oldid=prev"/>
		<updated>2007-08-13T15:20:16Z</updated>

		<summary type="html">&lt;p&gt;Add in an example for an external data source&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{reference}}&lt;br /&gt;
&lt;br /&gt;
For a how-to, please see [[Autocompletion and Authority Files (Romeo Autocomplete)]]&lt;br /&gt;
&lt;br /&gt;
Autocompletion in EPrints 3 consists of serveral stages.&lt;br /&gt;
&lt;br /&gt;
* A field in the workflow is configured to say what autocompletion URL to use, plus any additional parameters to pass to the script. This URL must be on the same server (eg. foo.eprints.org) but does not have to be part of the EPrints system. &lt;br /&gt;
* The autocomplete script takes the text typed so far (and maybe the additional parameters) and returns a chunk of XML describing possible autocomplete options. This XML consists of a number of rows (how many is up to the script). &lt;br /&gt;
* Each row contains some HTML to show the person viewing plus a magic &amp;lt;nowiki&amp;gt;&amp;lt;ul&amp;gt;&amp;lt;/nowiki&amp;gt; block which is hidden from display, but is used by the autocomplete javascript to autocomplete the page.&lt;br /&gt;
&lt;br /&gt;
== Autocomplete Scripts ==&lt;br /&gt;
&lt;br /&gt;
EPrints autocomplete scripts live in /opt/eprints3/cgi/users/lookup/ you can add your own here, or maybe elsewhere if, for example, you needed to use PHP.&lt;br /&gt;
&lt;br /&gt;
There are several kinds of autocomplete scripts:&lt;br /&gt;
* thoses that just use the existing data in your repository  (these are dead easy as they work out of the box)&lt;br /&gt;
* ones which use a file which you place in your repositories cfg/autocomplete/ directory.&lt;br /&gt;
* more clever ones.&lt;br /&gt;
&lt;br /&gt;
You may be able to find new autocomplete scripts and authority files on http://files.eprints.org/&lt;br /&gt;
&lt;br /&gt;
Scripts are in (rough) order of complexity to use...&lt;br /&gt;
&lt;br /&gt;
=== journal_by_name ===&lt;br /&gt;
&lt;br /&gt;
Can only be used on the &amp;quot;publication&amp;quot; field. Looks up the publication in the existing publications in the repository and autocompletes the publication. If ISSN and/or publisher exist in the same input component as the journal field they will also be completed if data is available.&lt;br /&gt;
&lt;br /&gt;
=== journal_by_issn ===&lt;br /&gt;
&lt;br /&gt;
As above, but attached to the ISSN field.&lt;br /&gt;
&lt;br /&gt;
=== event_by_name ===&lt;br /&gt;
&lt;br /&gt;
Similar to journal_by_name. Is attached to the event_title field and autocompletes from existing repository data. If they are in the same (multi) input component it will also try and autocomplete event_location, event_dates and event_type.&lt;br /&gt;
&lt;br /&gt;
=== name ===&lt;br /&gt;
&lt;br /&gt;
Attached to a multiple compound name/id field (eg. creators) looks up the name in the existing list in the repository. Can match on any id or given or family. Populates all parts of the current row it can. &lt;br /&gt;
&lt;br /&gt;
=== title_duplicates ===&lt;br /&gt;
&lt;br /&gt;
This is a slightly odd script as it doesn&amp;#039;t actually provide any autocomplete data. What it does is search the list of existing titles to see if there is a match. It only searches if there are 5 or more characters entered so far.&lt;br /&gt;
&lt;br /&gt;
If it finds any matches it lists them with a warning that they might be a problem, but does not assist autocompletion. If many matches are made then a short title only is shown, if the list is only 4 or lest then a full citation is shown.&lt;br /&gt;
&lt;br /&gt;
This is set to &amp;quot;on&amp;quot; by default in the hope that it will reduce duplicate submissions.&lt;br /&gt;
&lt;br /&gt;
=== simple_file ===&lt;br /&gt;
&lt;br /&gt;
File needs an additional parameter to be passed to it. This is configured in the workflow. This parameter is the name of a file in the cfg/autocompete directory. This file contains a list of values which are searched (case insensitively) and matches returned. A second parameter of &amp;quot;mode=prefix&amp;quot; can be set to only match values which start with the text being typed, rather than contain it.&lt;br /&gt;
&lt;br /&gt;
=== simple_sql ===&lt;br /&gt;
&lt;br /&gt;
Similar to simple_file but gets its values from a database table.&lt;br /&gt;
&lt;br /&gt;
The table must be in the eprints database used by this repository and start with &amp;quot;ac_&amp;quot;. The script needs a param. passed from workflow to indicate the name of the table WITHOUT the ac_ prefix. Eg. if the table was &amp;quot;ac_badgers&amp;quot; the parameter would be &amp;quot;table=badgers&amp;quot;. The only field used is &amp;quot;value&amp;quot; which works like the lines in the text file. If you want this to be blindingly fast you can make sure &amp;quot;value&amp;quot; is indexed, and set mode=prefix. With those set autocompleting from a dictionary of half a million words worked cheerfully.&lt;br /&gt;
&lt;br /&gt;
=== romeo ===&lt;br /&gt;
&lt;br /&gt;
(not included in 3.0, expected in 3.1) This script uses the EPrints/Romeo data to provide journal autocomplete data. Should be attached to the publication field. This is almost identical to file, but inserts the required Powered by Sherpa note.&lt;br /&gt;
&lt;br /&gt;
=== url_name_value ===&lt;br /&gt;
&lt;br /&gt;
This works like simple_sql except for the fact it uses three columns. url, name and value. It searches and autocompletes using value, but the human-readable description is supplied by &amp;quot;name&amp;quot; and if url is set then a (more info) link is shown. The link opens a new window to avoid mid-form trauma.&lt;br /&gt;
&lt;br /&gt;
=== file ===&lt;br /&gt;
&lt;br /&gt;
This is for more complex autocompletion authority files. It works like simple_file except that the file format is more complicated.&lt;br /&gt;
&lt;br /&gt;
The file constists of lines which contan: &lt;br /&gt;
* a value to search, (eg. &amp;quot;African Journal of Agricultural Research&amp;quot;)&lt;br /&gt;
* a tab&lt;br /&gt;
* a &amp;lt;nowiki&amp;gt;&amp;lt;li&amp;gt;&amp;lt;/nowiki&amp;gt; autocomplete chunk. (with no line breaks) eg. &lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;li style=&amp;#039;border-right: solid 50px #30FF30&amp;#039; &amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== external source ===&lt;br /&gt;
&lt;br /&gt;
This takes all the ideas above, and extends them to make an API call to an external data source.  This has the advantage that you are always referring to the authoritative source, but the disadvantage that you are reliant on both the network being up and the external source being available.&lt;br /&gt;
&lt;br /&gt;
It breaks down into two parts:&lt;br /&gt;
* the autocompleter call in the web page&lt;br /&gt;
* the script being called&lt;br /&gt;
&lt;br /&gt;
For an example, here is one way to query the RoMEO data directly:&lt;br /&gt;
&lt;br /&gt;
First, set the autocompleter in the eprints workflow:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     &amp;lt;component type=&amp;quot;Field::Multi&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;title&amp;gt;Article Publication Details&amp;lt;/title&amp;gt;&lt;br /&gt;
        &amp;lt;field ref=&amp;quot;publication&amp;quot; input_lookup_url=&amp;quot;{$config{perl_url}}/get_journals&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;field ref=&amp;quot;publisher&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;field ref=&amp;quot;issn&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;/component&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next have the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use strict;&lt;br /&gt;
use HTTP::Request;&lt;br /&gt;
use LWP::UserAgent;&lt;br /&gt;
use XML::Twig;&lt;br /&gt;
&lt;br /&gt;
use Data::Dumper;&lt;br /&gt;
use EPrints;&lt;br /&gt;
&lt;br /&gt;
my $journal_data = {};&lt;br /&gt;
&lt;br /&gt;
sub urldecode{&lt;br /&gt;
  my ($url) = @_;&lt;br /&gt;
  $url =~ s/%([0-9a-f][0-9a-f])/pack(&amp;quot;C&amp;quot;,hex($1))/egi;&lt;br /&gt;
  $url =~ s/\x2B/ /; # swap &amp;#039;+&amp;#039; for &amp;#039; &amp;#039;&lt;br /&gt;
  return $url;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# XML::Twig&amp;#039;s routine for dealing with a journal entry&lt;br /&gt;
sub process_journal {&lt;br /&gt;
  my ( $twig, $journal ) = @_;&lt;br /&gt;
&lt;br /&gt;
  # get the components&lt;br /&gt;
  my $title = urldecode( $journal-&amp;gt;first_child(&amp;#039;jtitle&amp;#039;)-&amp;gt;text );&lt;br /&gt;
&lt;br /&gt;
  my $zetoc = urldecode( $journal-&amp;gt;first_child(&amp;#039;zetocpub&amp;#039;)-&amp;gt;text ) &lt;br /&gt;
                  if $journal-&amp;gt;first_child(&amp;#039;zetocpub&amp;#039;);&lt;br /&gt;
  my $romeo = urldecode( $journal-&amp;gt;first_child(&amp;#039;romeopub&amp;#039;)-&amp;gt;text )&lt;br /&gt;
                  if $journal-&amp;gt;first_child(&amp;#039;romeopub&amp;#039;);&lt;br /&gt;
  my $issn  = urldecode( $journal-&amp;gt;first_child(&amp;#039;issn&amp;#039;)-&amp;gt;text )&lt;br /&gt;
                  if $journal-&amp;gt;first_child(&amp;#039;issn&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
  my $publisher = $romeo;&lt;br /&gt;
  $publisher = $zetoc if (not $publisher &amp;amp;&amp;amp; $zetoc);&lt;br /&gt;
  &lt;br /&gt;
  # build a lub of html based on the components&lt;br /&gt;
  my $html .= &amp;quot;&amp;lt;li&amp;gt;$title&amp;quot;;&lt;br /&gt;
  $html .= &amp;quot;&amp;lt;br /&amp;gt;published by $publisher&amp;quot; if $publisher;&lt;br /&gt;
  &lt;br /&gt;
  $html .= &amp;quot;&amp;lt;ul&amp;gt;&amp;quot;;&lt;br /&gt;
  if ($title) {&lt;br /&gt;
      $html .= &amp;quot;&amp;lt;li id=&amp;#039;for:value:component:_publication&amp;#039;&amp;gt;$title&amp;lt;/li&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
  if ($publisher) {&lt;br /&gt;
      $html .= &amp;quot;&amp;lt;li id=&amp;#039;for:value:component:_publisher&amp;#039;&amp;gt;$publisher&amp;lt;/li&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
  if ($issn) {&lt;br /&gt;
    $html .= &amp;quot;&amp;lt;li id=&amp;#039;for:value:component:_issn&amp;#039;&amp;gt;$issn&amp;lt;/li&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
  $html .= &amp;quot;&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;\n&amp;quot;;&lt;br /&gt;
  warn &amp;quot;\n\n$html\n\n&amp;quot;;&lt;br /&gt;
  # save the html&lt;br /&gt;
  $journal_data-&amp;gt;{$title} = $html;&lt;br /&gt;
&lt;br /&gt;
  1; &lt;br /&gt;
} ## end process_journal&lt;br /&gt;
&lt;br /&gt;
# get a list of journals that match the query&lt;br /&gt;
sub get_journals {&lt;br /&gt;
  my $journal = shift;&lt;br /&gt;
  my @html = ();&lt;br /&gt;
&lt;br /&gt;
  if ($journal) {&lt;br /&gt;
    return (&amp;quot;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;keep typing....&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&amp;quot;) if (length($journal) &amp;lt; 3);&lt;br /&gt;
&lt;br /&gt;
    $journal =~ s/\s+/\+/;&lt;br /&gt;
    my $query = &amp;quot;http://www.sherpa.ac.uk/romeoapi.php?qtype=starts&amp;amp;jtitle=$journal&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    my $request = HTTP::Request-&amp;gt;new( GET =&amp;gt; &amp;quot;$query&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
    my $ua = LWP::UserAgent-&amp;gt;new();&lt;br /&gt;
    my $response = $ua-&amp;gt;request($request);&lt;br /&gt;
    my $content = $response-&amp;gt;content();&lt;br /&gt;
&lt;br /&gt;
    my $twig = XML::Twig-&amp;gt;new(&lt;br /&gt;
                       &amp;#039;keep_encoding&amp;#039; =&amp;gt; 1,&lt;br /&gt;
                       &amp;#039;TwigRoots&amp;#039; =&amp;gt; { &amp;#039;journals&amp;#039; =&amp;gt; 1 },&lt;br /&gt;
                       &amp;#039;TwigHandlers&amp;#039; =&amp;gt; { &amp;#039;journal&amp;#039; =&amp;gt; \&amp;amp;process_journal, }&lt;br /&gt;
                      );&lt;br /&gt;
    $twig-&amp;gt;parse($content);&lt;br /&gt;
    if (scalar keys %{$journal_data}) {&lt;br /&gt;
      push @html, &amp;quot;&amp;lt;ul class=&amp;#039;journals&amp;#039;&amp;gt;\n&amp;quot;;&lt;br /&gt;
      foreach my $title (sort keys %{$journal_data}) {&lt;br /&gt;
        push @html, &amp;quot;$journal_data-&amp;gt;{$title}\n&amp;quot;;&lt;br /&gt;
      } ## end of  foreach my $title (sort keys %{$journal_data})&lt;br /&gt;
      push @html, &amp;quot;&amp;lt;/ul&amp;gt;\n&amp;quot;;&lt;br /&gt;
    } ## end of if (scalar keys %{$journal_data}) ...&lt;br /&gt;
  } else {&lt;br /&gt;
    push @html, &amp;quot;&amp;lt;!-- No journal name supplied --&amp;gt;\n&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  return (join &amp;quot;\n&amp;quot;, @html)&lt;br /&gt;
&lt;br /&gt;
} ## end get_journals&lt;br /&gt;
&lt;br /&gt;
my $session = EPrints::Session-&amp;gt;new();&lt;br /&gt;
&lt;br /&gt;
# we need the send an initial content-type&lt;br /&gt;
print &amp;lt;&amp;lt;END;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
# then we send the fragment of html for the autocompleter&lt;br /&gt;
print get_journals( lc $session-&amp;gt;param( &amp;quot;q&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
$session-&amp;gt;terminate;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kiz</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Autocompletion&amp;diff=4236&amp;oldid=prev</id>
		<title>WikiSysop: Reverted edit of QomIba, changed back to last version by Sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Autocompletion&amp;diff=4236&amp;oldid=prev"/>
		<updated>2007-04-11T15:53:33Z</updated>

		<summary type="html">&lt;p&gt;Reverted edit of QomIba, changed back to last version by Sp&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{reference}}&lt;br /&gt;
&lt;br /&gt;
For a how-to, please see [[Autocompletion and Authority Files (Romeo Autocomplete)]]&lt;br /&gt;
&lt;br /&gt;
Autocompletion in EPrints 3 consists of serveral stages.&lt;br /&gt;
&lt;br /&gt;
* A field in the workflow is configured to say what autocompletion URL to use, plus any additional parameters to pass to the script. This URL must be on the same server (eg. foo.eprints.org) but does not have to be part of the EPrints system. &lt;br /&gt;
* The autocomplete script takes the text typed so far (and maybe the additional parameters) and returns a chunk of XML describing possible autocomplete options. This XML consists of a number of rows (how many is up to the script). &lt;br /&gt;
* Each row contains some HTML to show the person viewing plus a magic &amp;lt;nowiki&amp;gt;&amp;lt;ul&amp;gt;&amp;lt;/nowiki&amp;gt; block which is hidden from display, but is used by the autocomplete javascript to autocomplete the page.&lt;br /&gt;
&lt;br /&gt;
== Autocomplete Scripts ==&lt;br /&gt;
&lt;br /&gt;
EPrints autocomplete scripts live in /opt/eprints3/cgi/users/lookup/ you can add your own here, or maybe elsewhere if, for example, you needed to use PHP.&lt;br /&gt;
&lt;br /&gt;
There are several kinds of autocomplete scripts:&lt;br /&gt;
* thoses that just use the existing data in your repository  (these are dead easy as they work out of the box)&lt;br /&gt;
* ones which use a file which you place in your repositories cfg/autocomplete/ directory.&lt;br /&gt;
* more clever ones.&lt;br /&gt;
&lt;br /&gt;
You may be able to find new autocomplete scripts and authority files on http://files.eprints.org/&lt;br /&gt;
&lt;br /&gt;
Scripts are in (rough) order of complexity to use...&lt;br /&gt;
&lt;br /&gt;
=== journal_by_name ===&lt;br /&gt;
&lt;br /&gt;
Can only be used on the &amp;quot;publication&amp;quot; field. Looks up the publication in the existing publications in the repository and autocompletes the publication. If ISSN and/or publisher exist in the same input component as the journal field they will also be completed if data is available.&lt;br /&gt;
&lt;br /&gt;
=== journal_by_issn ===&lt;br /&gt;
&lt;br /&gt;
As above, but attached to the ISSN field.&lt;br /&gt;
&lt;br /&gt;
=== event_by_name ===&lt;br /&gt;
&lt;br /&gt;
Similar to journal_by_name. Is attached to the event_title field and autocompletes from existing repository data. If they are in the same (multi) input component it will also try and autocomplete event_location, event_dates and event_type.&lt;br /&gt;
&lt;br /&gt;
=== name ===&lt;br /&gt;
&lt;br /&gt;
Attached to a multiple compound name/id field (eg. creators) looks up the name in the existing list in the repository. Can match on any id or given or family. Populates all parts of the current row it can. &lt;br /&gt;
&lt;br /&gt;
=== title_duplicates ===&lt;br /&gt;
&lt;br /&gt;
This is a slightly odd script as it doesn&amp;#039;t actually provide any autocomplete data. What it does is search the list of existing titles to see if there is a match. It only searches if there are 5 or more characters entered so far.&lt;br /&gt;
&lt;br /&gt;
If it finds any matches it lists them with a warning that they might be a problem, but does not assist autocompletion. If many matches are made then a short title only is shown, if the list is only 4 or lest then a full citation is shown.&lt;br /&gt;
&lt;br /&gt;
This is set to &amp;quot;on&amp;quot; by default in the hope that it will reduce duplicate submissions.&lt;br /&gt;
&lt;br /&gt;
=== simple_file ===&lt;br /&gt;
&lt;br /&gt;
File needs an additional parameter to be passed to it. This is configured in the workflow. This parameter is the name of a file in the cfg/autocompete directory. This file contains a list of values which are searched (case insensitively) and matches returned. A second parameter of &amp;quot;mode=prefix&amp;quot; can be set to only match values which start with the text being typed, rather than contain it.&lt;br /&gt;
&lt;br /&gt;
=== simple_sql ===&lt;br /&gt;
&lt;br /&gt;
Similar to simple_file but gets its values from a database table.&lt;br /&gt;
&lt;br /&gt;
The table must be in the eprints database used by this repository and start with &amp;quot;ac_&amp;quot;. The script needs a param. passed from workflow to indicate the name of the table WITHOUT the ac_ prefix. Eg. if the table was &amp;quot;ac_badgers&amp;quot; the parameter would be &amp;quot;table=badgers&amp;quot;. The only field used is &amp;quot;value&amp;quot; which works like the lines in the text file. If you want this to be blindingly fast you can make sure &amp;quot;value&amp;quot; is indexed, and set mode=prefix. With those set autocompleting from a dictionary of half a million words worked cheerfully.&lt;br /&gt;
&lt;br /&gt;
=== romeo ===&lt;br /&gt;
&lt;br /&gt;
(not included in 3.0, expected in 3.1) This script uses the EPrints/Romeo data to provide journal autocomplete data. Should be attached to the publication field. This is almost identical to file, but inserts the required Powered by Sherpa note.&lt;br /&gt;
&lt;br /&gt;
=== url_name_value ===&lt;br /&gt;
&lt;br /&gt;
This works like simple_sql except for the fact it uses three columns. url, name and value. It searches and autocompletes using value, but the human-readable description is supplied by &amp;quot;name&amp;quot; and if url is set then a (more info) link is shown. The link opens a new window to avoid mid-form trauma.&lt;br /&gt;
&lt;br /&gt;
=== file ===&lt;br /&gt;
&lt;br /&gt;
This is for more complex autocompletion authority files. It works like simple_file except that the file format is more complicated.&lt;br /&gt;
&lt;br /&gt;
The file constists of lines which contan: &lt;br /&gt;
* a value to search, (eg. &amp;quot;African Journal of Agricultural Research&amp;quot;)&lt;br /&gt;
* a tab&lt;br /&gt;
* a &amp;lt;nowiki&amp;gt;&amp;lt;li&amp;gt;&amp;lt;/nowiki&amp;gt; autocomplete chunk. (with no line breaks) eg. &lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;li style=&amp;#039;border-right: solid 50px #30FF30&amp;#039; &amp;gt;&amp;amp;quot;African Journal of Agricultural &lt;br /&gt;
 Research&amp;amp;quot; published by &amp;amp;quot;Academic Publishers&amp;amp;quot;&amp;lt;br /&amp;gt;&amp;lt;small&amp;gt;(a Green &lt;br /&gt;
 publisher)&amp;lt;/small&amp;gt;ISSN: 1991-637X&amp;lt;ul&amp;gt;&amp;lt;li id=&amp;quot;for:value:component:_publication&amp;quot;&amp;gt;African &lt;br /&gt;
 Journal of Agricultural Research&amp;lt;/li&amp;gt;&amp;lt;li id=&amp;quot;for:value:component:_publisher&amp;quot;&amp;gt;Academic &lt;br /&gt;
 Publishers&amp;lt;/li&amp;gt;&amp;lt;li id=&amp;quot;for:value:component:_issn&amp;quot;&amp;gt;1991-637X&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See below for more information on the meaning of this arcane chunk!&lt;br /&gt;
&lt;br /&gt;
=== sql ===&lt;br /&gt;
&lt;br /&gt;
As for simple_sql except that a second column named &amp;quot;xml&amp;quot; is used to provide the actual results returned (value is still searched).&lt;br /&gt;
&lt;br /&gt;
The xml column contains data in the autocomplete &amp;lt;nowiki&amp;gt;&amp;lt;li&amp;gt;&amp;lt;/nowiki&amp;gt; format described below.&lt;br /&gt;
&lt;br /&gt;
= Making a custom script =&lt;br /&gt;
&lt;br /&gt;
Autocompletion scripts are configured to eprint fields within the workflow. If the field is multiple then the same script is attached to each input row. &lt;br /&gt;
&lt;br /&gt;
The only parameter you need to look at is &amp;quot;q&amp;quot; which contains the text being autocompleted. For simple fields (eg. text), that is ones which only have one input-box per value. Not names, compound or pagerange etc.. the response should be of the format:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li class=&amp;quot;ep_first&amp;quot;&amp;gt;Human Friendly Text &amp;lt;ul&amp;gt;&amp;lt;li id=&amp;#039;for:value:relative:&amp;#039;&amp;gt;text-to-insert&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Human Friendly Text &amp;lt;ul&amp;gt;&amp;lt;li id=&amp;#039;for:value:relative:&amp;#039;&amp;gt;text-to-insert&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Human Friendly Text &amp;lt;ul&amp;gt;&amp;lt;li id=&amp;#039;for:value:relative:&amp;#039;&amp;gt;text-to-insert&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Human Friendly Text &amp;lt;ul&amp;gt;&amp;lt;li id=&amp;#039;for:value:relative:&amp;#039;&amp;gt;text-to-insert&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
  etc.&lt;br /&gt;
 &amp;lt;/ul&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ep_first isn&amp;#039;t really needed, but it makes the rendering look a little nicer.&lt;br /&gt;
&lt;br /&gt;
== Other useful CGI parameters ==&lt;br /&gt;
&lt;br /&gt;
All parts of the field (or field row in multiple fields) get sent as CGI parameters. The name of these parameters is the ID of the HTML input element itself, but with the relative prefix removed (phew!).&lt;br /&gt;
&lt;br /&gt;
Simple example: title field. One single value. It&amp;#039;s not relevant, just use &amp;quot;q&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
More complex example: pagerange field. While you were typing in the &amp;quot;to&amp;quot; box (the second one). It would send &amp;quot;?q=45&amp;amp;_from=12&amp;amp;_to=45&amp;quot;. Obviously the numbers are made up. q= will always be the same as one of the values. &lt;br /&gt;
&lt;br /&gt;
Even more complex example: creators field. Which is a multiple compound field. Parts sent would be q, _id, _name_given and _name_family.&lt;br /&gt;
&lt;br /&gt;
For an explanation of how the id&amp;#039;s are generated, and what a relative prefix is, see [[Understanding IDs in Workflow Forms]].&lt;br /&gt;
&lt;br /&gt;
== The autocompletion instructions ==&lt;br /&gt;
&lt;br /&gt;
The instructions for &amp;#039;&amp;#039;what&amp;#039;&amp;#039; to autocomplete if the row is selected is contained in the &amp;amp;lt;ul&amp;amp;gt; list inside the &amp;amp;lt;li&amp;amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Each item in the list is a single instruction.&lt;br /&gt;
&lt;br /&gt;
Each item in the list has an id attribute containing instructions on what to autocomplete. (yes that means repeated id values which is bad XML and we&amp;#039;ll fix it in a later version...)&lt;br /&gt;
&lt;br /&gt;
The value inside the item describes what to insert, the id describes where and how.&lt;br /&gt;
&lt;br /&gt;
The id looks like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;for:&amp;quot; + (&amp;quot;block&amp;quot; or &amp;quot;value&amp;quot;) + &amp;quot;:&amp;quot; + (&amp;quot;relative&amp;quot; or &amp;quot;component&amp;quot; or &amp;quot;absolute&amp;quot;) + &amp;quot;:&amp;quot; + freetext&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
 id=&amp;quot;for:value:relative:&amp;quot;&lt;br /&gt;
 id=&amp;quot;for:value:relative:_name_family&amp;quot;&lt;br /&gt;
 id=&amp;quot;for:value:component:_issn&amp;quot;&lt;br /&gt;
 id=&amp;quot;for:block:absolute:my_special_id&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;value&amp;quot; means insert the value into an &amp;amp;lt;input&amp;amp;gt; element (with the indicated id). &lt;br /&gt;
&lt;br /&gt;
&amp;quot;block&amp;quot; means replace the block with the indicated id.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;component&amp;quot; means that the freetext is the ID to modify, but missing the component prefix. For example &amp;quot;_issn&amp;quot; gives &amp;quot;id7_issn&amp;quot; (assuming id7 is the current component)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;relative&amp;quot; means the freetext is the ID to modify but missing the row prefix. For example in a multiple text field (foo) using &amp;quot;&amp;quot; for the free text would give an id of something like &amp;quot;id3_foo_4&amp;quot;. For a single date field (birthday) a freetext of &amp;quot;_year&amp;quot; would give an id looking something like &amp;quot;id2_birthday_year&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;absolute&amp;quot; means that the freetext is the ID to modify. Absolute is a bit risky, as you can&amp;#039;t rely on getting the same component prefix every time. It does, however, give you the chance to do Cool Stuff&amp;lt;sup&amp;gt;TM&amp;lt;/sup&amp;gt;. For example add a XHTML input compontent just containing: &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;div id=&amp;quot;special_comments&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt; and then make part of the autocomplete &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;li id=&amp;quot;for:block:absolute:special_comments&amp;quot;&amp;gt;&amp;lt;p&amp;gt;Hi Mom!&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt; (but something more relevant, obviously)&lt;br /&gt;
&lt;br /&gt;
=== How are these ID&amp;#039;s generated anyway? ===&lt;br /&gt;
&lt;br /&gt;
See [[Understanding IDs in Workflow Forms]].&lt;br /&gt;
&lt;br /&gt;
=== What happens if the ID doesn&amp;#039;t exist? ===&lt;br /&gt;
&lt;br /&gt;
Nothing, the autocompleter does not raise an error. It just autocompletes all the things it can. This is handy if the workflow changes slightly, but makes debugging a bit trickier.&lt;br /&gt;
&lt;br /&gt;
=== Some examples ===&lt;br /&gt;
&lt;br /&gt;
Please note these examples have line breaks in which is illegal in the &amp;quot;file&amp;quot; script files (but not in SQL or in custom scripts).&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;li style=&amp;#039;border-right: solid 50px #30FF30&amp;#039;&amp;gt;&lt;br /&gt;
  &amp;amp;quot;African Journal of Biotechnology&amp;amp;quot; published by &amp;amp;quot;Academic Publishers&amp;amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;small&amp;gt;(a Green publisher)&amp;lt;/small&amp;gt;ISSN: 1684-5315&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li id=&amp;quot;for:value:component:_publication&amp;quot;&amp;gt;African Journal of Biotechnology&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li id=&amp;quot;for:value:component:_publisher&amp;quot;&amp;gt;Academic Publishers&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li id=&amp;quot;for:value:component:_issn&amp;quot;&amp;gt;1684-5315&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example autocompletes the issn, publication and publisher (text) fields in the current component.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
  B. Draut&lt;br /&gt;
  &amp;lt;small&amp;gt;(author of 3 items in this repository)&amp;lt;/small&amp;gt;&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li id=&amp;quot;for:value:relative:_name_family&amp;quot;&amp;gt;Draut&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li id=&amp;quot;for:value:relative:_name_given&amp;quot;&amp;gt;B.&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li id=&amp;quot;for:value:relative:_name_honourific&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;li id=&amp;quot;for:value:relative:_name_lineage&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;li id=&amp;quot;for:value:relative:_id&amp;quot;&amp;gt;434533X&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This completes relative to the current row of a compound field the compound is a name field (called name) and a text field (called id). This is the config. for the creators and editors fields by default. Note that it tries to autocomplete the honourific field even though it doesn&amp;#039;t exist and it&amp;#039;s got no value to autocomplete. This means that if it happens to exist, this autocompletion will remove any text from the field.&lt;br /&gt;
&lt;br /&gt;
= Don&amp;#039;t Forget to Share! =&lt;br /&gt;
&lt;br /&gt;
If you write a really useful autocomplete script, or a useful data file for &amp;quot;file&amp;quot; or &amp;quot;simple_file&amp;quot;, why not upload it to http://files.eprints.org/ so lots more people can benefit!&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Autocompletion&amp;diff=3959&amp;oldid=prev</id>
		<title>Sp: /* The autocompletion instructions */ typo</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Autocompletion&amp;diff=3959&amp;oldid=prev"/>
		<updated>2007-02-13T23:53:07Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;The autocompletion instructions: &lt;/span&gt; typo&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:53, 13 February 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l117&quot;&gt;Line 117:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 117:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== The autocompletion instructions ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== The autocompletion instructions ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The instructions for &#039;&#039;what&#039;&#039; to autocomplete if the row is selected is contained in the &amp;amp;lt;ul&amp;amp;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;gtl &lt;/del&gt;list inside the &amp;amp;lt;li&amp;amp;gt;.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The instructions for &#039;&#039;what&#039;&#039; to autocomplete if the row is selected is contained in the &amp;amp;lt;ul&amp;amp;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;gt; &lt;/ins&gt;list inside the &amp;amp;lt;li&amp;amp;gt;.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Each item in the list is a single instruction.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Each item in the list is a single instruction.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sp</name></author>
	</entry>
</feed>