Thanks to Janet Lefkovitz, a librarian at the Hebrew University of Jerusalem, the LibraryLookup project has added support for a fifteenth class of OPAC (online public access catalog) system: Ex Libris Aleph. This was an interesting collaboration. I'd looked at a few different Aleph systems, and found that their URLs varied from one implementation to the next in ways that I didn't have time to unravel. But Janet was willing to do this research, and she presented me with a set of Aleph URLs that illustrated the variations. I updated the Build your own Bookmarklet (BYOB) script accordingly.
queries['eosQ'] = '/VAR1/search/AdvancedSearch.asp?selectField1=IS&txtSearch1=\'+isbn,';When an OPAC's bookmarklet needs to be parameterized, the form provides fill-in boxes like so:
<input name="eosQ" value="WEBOPAC"/>The script needs to replace VAR1, in the URL template, with the value of the fill-in box. In order to capture that value, it has to choose from a namespace that looks like this:
var1 = eval ( "document.forms['byo']." + vendor + ".value" );Is eval evil? Yeah, I guess, but at times like this I drift over to the dark side. If there's a high road I'm not seeing, let me know and I'll report it.
Update: In swift succession Florian Gross, Sjoerd Visscher, and Simon Willison all pointed out the high road:
var1 = document.forms['byo'][vendor]['value'] or: var1 = document.forms['byo'][vendor].value;Simon adds:
A historical note: Aleph, the first letter of the alphabet for more than three
centuries millenia (thanks, Eric Promislow) is a leading character in a book I just happened to pick up at the library last night: Language Visible: Unraveling the Mystery of the Alphabet from A to Z, by David Sacks. The name 'aleph' meant 'ox' to the Phonecians, and the letterform evolved from a picture of an ox's head.
The book is full of fascinating bits of trivia like that. What really grabbed me, though, was this discussion of the portability of alphabets:
Even if two languages are totally unlike, letters often can make the transition. Because their core selection of sounds (inherited from the alphabet's earliest stages) is close to being universal, letters usually can be adapted to a different tongue through only a few changes: three or four letters revalued to new sounds, a letter or two invented, unneeded letters discarded.Amazing. I knew, of course, that the family tree of alphabets is far simpler than the family tree of languages. But the portability of alphabets, with respect to languages, just never occurred to me. Live and learn.
The newly independent countries of Azerbaijan, Turkmenistan, and Uzbekistan have not altered their spoken languages, which are Turkish tongues. But the governments have moved to replace Cyrillic street signs, textbooks, tax forms, etc., with new ones printed in a modified, 29-letter Roman alphabet. Elementary schools now teach Roman letters. The massive, disruptive changeover -- inspired by westward trade ambitions and hatred of the Soviet memory -- was declared officially complete in Azerbaijan, at least, in 2001. The new alphabet is modeled on that of modern Turkey, which switched from Arabic to Roman letters in 1928, under the westernizing regime of Kemal Atatürk.
Prior to 1940, Azerbaijan, Turkmenistan, and Uzbekistan used the Arabic alphabet, until the early Soviets imposed the Roman one in the 1920s. Thus the three regions have seen all three major alphabets in the last 80 years: Arabic, Cyrillic, and (twice) Roman. Although the languages of the three countries are unrelated to Arabic, Russian, or Latin, each alphabet has taken hold in turn.
Former URL: http://weblog.infoworld.com/udell/2004/07/22.html#a1046