perl.perl4lib http://www.nntp.perl.org/group/perl.perl4lib/ ... Copyright 1998-2008 perl.org Tue, 07 Oct 2008 23:39:17 +0000 ask@perl.org RE: Regular Expression for non-Roman characters by Jacobs, Jane W Firstly thanks to Michael for solving my problem of locating non-Roman characters in Marc Texts. It works like a charm!<br/><br/> <br/><br/>Our ILS wonks out if it gets the new Authority Records with cross-references from non-Roman Scripts. For example:<br/><br/>010 n 99034155 &Ccedil;&#130;z no2005062324<br/><br/>040 DLC &Ccedil;&#130;b eng &Ccedil;&#130;c DLC &Ccedil;&#130;d OCoLC &Ccedil;&#130;d DLC &Ccedil;&#130;d OCoLC<br/><br/>100 1 Guo, Fucheng, &Ccedil;&#130;d 1965-<br/><br/>400 1 Kuo, Fu-ch&Ecirc;&raquo;eng, &Ccedil;&#130;c singer &Ccedil;&#130;w nne<br/><br/>400 1 Kwok, Arron, &Ccedil;&#130;d 1965-<br/><br/>400 1 Kwok, Aaron, &Ccedil;&#130;d 1965-<br/><br/>400 1 Kwok, Fu Shing, &Ccedil;&#130;d 1965-<br/><br/>400 1 Gwok, Fu Sing, &Ccedil;&#130;d 1965-<br/><br/>400 1 &eacute;&#131;&shy;&aring;&macr;&#140;&aring;&#159;&#142;, &Ccedil;&#130;d 1965-<br/><br/> <br/><br/><br/>Our vendor sensibly recommends that we change 4XX to 5XX. This works fine for a manual load, but in a batch load context one would anticipate problems. Hence the program. Michael has encouraged me to share my result with my result with the group, even though I have my doubts about whether any of you couldn&acirc;&#128;&#153;t crank out something better off the top of your heads. However, I&acirc;&#128;&#153;m offering it up with the caveats that it is somewhat inelegant and contains at least a few steps I&acirc;&#128;&#153;m sure are not necessary except that I can&acirc;&#128;&#153;t figure out the right way to pull them out. It is slavishly derivative of the MARC::DOC::Tutorial &acirc;&#128;&#156;Updating subject subfield x to subfield v&acirc;&#128;&#157;. As far as I can tell it does the job but any bugs are no doubt mine. I added a $9 to my non-Latin headings to distinguish them from other &acirc;&#128;&#156;legitimate&acirc;&#128;&#157; 5XX tags and that, of course, can be knocked out. That said, here it is for anyone who wants it:<br/><br/><br/> <br/><br/><br/>use strict;<br/><br/> <br/><br/> <br/><br/> use MARC::Batch;<br/><br/> <br/><br/> my $batch = MARC::Batch-&gt;new(&#39;USMARC&#39;,&#39;VerAuthtest.mrc&#39;);<br/><br/> open( OUT, &#39;&gt;VerAuthtest.dat&#39; ) or die $1;<br/><br/> while ( my $record = $batch-&gt;next() ) {<br/><br/> <br/><br/> my $leader = $record-&gt;leader();<br/><br/> my $Charset = substr($leader,9,1);<br/><br/> my $Type = substr($leader,6,1);<br/><br/> <br/><br/> # go through all 4XX fields in the record.<br/><br/> foreach my $Xref ( $record-&gt;field( &#39;4..&#39; ) ) {<br/><br/> <br/><br/> <br/><br/> # extract subfields as an array of array refs.<br/><br/> my @subfields = $Xref-&gt;subfields();<br/><br/> <br/><br/> # setup an array to store our new field.<br/><br/> my @newSubfields = ();<br/><br/> <br/><br/> <br/><br/> my $newtag = $Xref-&gt;tag();<br/><br/> $newtag =~ s/^4/5/;<br/><br/> <br/><br/> # use pop() to read the subfields backwards.<br/><br/> while ( my $subfield = pop( @subfields ) ) {<br/><br/> <br/><br/> # for convenience, pull out the subfield<br/><br/> # code and data from the array ref.<br/><br/> my ($code,$data) = @$subfield;<br/><br/> <br/><br/> unshift( @newSubfields, $code, $data );<br/><br/> <br/><br/> }<br/><br/> my $Xrefstring = $Xref -&gt;as_string( &#39;abcq&#39; );<br/><br/> <br/><br/> <br/><br/> if (!($Xrefstring =~ m/\p{Latin}/) &amp;&amp; (($Type eq &#39;z&#39;) &amp;&amp; ($Charset eq &#39;a&#39;))) { <br/><br/> my $newXref = MARC::Field-&gt;new( <br/><br/> $newtag,<br/><br/> $Xref-&gt;indicator(1),<br/><br/> $Xref-&gt;indicator(2),<br/><br/> @newSubfields,<br/><br/> 9=&gt;&#39;Non-Latin&#39;<br/><br/> );<br/><br/> $Xref-&gt;replace_with( $newXref );<br/><br/> ##my $escape = &#39;_(&#39;;<br/><br/> } elsif (($Xrefstring =~ m/_\(/) &amp;&amp; (($Type eq &#39;z&#39;) &amp;&amp; ($Charset eq &#39; &#39;))) { <br/><br/> my $newXref = MARC::Field-&gt;new( <br/><br/> $newtag,<br/><br/> $Xref-&gt;indicator(1),<br/><br/> $Xref-&gt;indicator(2),<br/><br/> @newSubfields,<br/><br/> 9=&gt;&#39;Non-Latin&#39;<br/><br/> );<br/><br/> $Xref-&gt;replace_with( $newXref );<br/><br/> }<br/><br/> <br/><br/> }<br/><br/> <br/><br/> # output the potentially changed record as MARC.<br/><br/> print OUT $record-&gt;as_usmarc();<br/><br/> }<br/><br/><br/> <br/><br/><br/> <br/><br/><br/> <br/><br/><br/> <br/><br/> <br/><br/> <br/><br/> <br/><br/>**Views expressed by the author do not necessarily represent those of the Queens Library.**<br/><br/> <br/><br/>Jane Jacobs<br/><br/>Asst. Coord., Catalog Division<br/><br/>Queens Borough Public Library<br/><br/>89-11 Merrick Blvd.<br/><br/>Jamaica, NY 11432<br/><br/>tel.: (718) 990-0804<br/><br/>e-mail: Jane.W.Jacobs@queenslibrary.org<br/><br/>FAX. (718) 990-8566<br/><br/> <br/><br/><br/><br/>The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer.-----Original Message-----<br/>From: Doran, Michael D [mailto:doran@uta.edu] <br/>Sent: Thursday, September 25, 2008 5:54 PM<br/>To: Jacobs, Jane W<br/>Cc: perl4lib@perl.org<br/>Subject: RE: Regular Expression for non-Roman characters<br/><br/> <br/><br/>Hi Jane,<br/><br/> <br/><br/>In a MARC-8 character set environment, I would assume that the key to detecting non-Latin characters would be the presence of an escape sequence to indicate a switch to an alternate character set (e.g. Arabic, Greek, Cyrillic, etc) [1]. Everything from that point on would be non-Latin until there was an escape sequence back to Latin.<br/><br/> <br/><br/>In a MARC Unicode character set environment, if you are using Perl for your regular expression matching, you can probably take advantage of the Unicode \p{} constructs [2]. Something along the lines of...<br/><br/> <br/><br/> \P{Latin}<br/><br/> <br/><br/>..which means doesn&#39;t belong to the Latin script (lowercase &#39;p&#39; = belongs to, uppercase &#39;P&#39; = does not belong to).<br/><br/> <br/><br/>For more info on the regular expression Unicode scripts/blocks see this tutorial:<br/><br/>http://www.regular-expressions.info/unicode.html<br/><br/> <br/><br/>I&#39;ll point out that when I&#39;ve used Unicode \p{} constructs in a program, it was necessary to explicitly label strings as being Unicode (assuming they are, natch) before regex matching, using...<br/><br/> <br/><br/> decode(&#39;UTF-8&#39;,$string_tobe_matched);<br/><br/> <br/><br/>I know that&#39;s not exactly what you asked for, but (assuming I didn&#39;t misunderstand your question) it may suggest some approaches should you end up tackling it yourself.<br/><br/> <br/><br/>-- Michael<br/><br/> <br/><br/>[1] MARC 21 Specification &gt; ACCESSING ALTERNATE GRAPHIC CHARACTER SETS<br/><br/> http://www.loc.gov/marc/specifications/speccharmarc8.html#alternative<br/><br/> <br/><br/>[2] Perl &gt; Unicode Regular Expression Support Level<br/><br/> http://perldoc.perl.org/perlunicode.html#Unicode-Regular-Expression-Support-Level<br/><br/> <br/><br/># Michael Doran, Systems Librarian<br/><br/># University of Texas at Arlington<br/><br/># 817-272-5326 office<br/><br/># 817-688-1926 mobile<br/><br/># doran@uta.edu<br/><br/># http://rocky.uta.edu/doran/<br/><br/> <br/><br/> <br/><br/>&gt; -----Original Message-----<br/><br/>&gt; From: Jacobs, Jane W [mailto:Jane.W.Jacobs@queenslibrary.org] <br/><br/>&gt; Sent: Thursday, September 25, 2008 1:24 PM<br/><br/>&gt; To: perl4lib@perl.org<br/><br/>&gt; Subject: Regular Expression for non-Roman characters<br/><br/>&gt; <br/><br/>&gt; Hi folks,<br/><br/>&gt; <br/><br/>&gt; I&#39;m wondering if anyone has codified a regular expression that would<br/><br/>&gt; indicate the presence of non-Latin characters. I want to detect the<br/><br/>&gt; presence of non-Roman letters in authority records. Currently<br/><br/>&gt; Authorities with non-Roman forms of name place these in the <br/><br/>&gt; 4XX fields.<br/><br/>&gt; Our system can&#39;t handle that so I want to flip them to 5XX <br/><br/>&gt; and possibly<br/><br/>&gt; add a subfield to note what they but first I need something to detect<br/><br/>&gt; them<br/><br/>&gt; <br/><br/>&gt; I had in mind something like \xE0-\xFE which detects <br/><br/>&gt; diacritics nicely.<br/><br/>&gt; I&#39;d prefer not to figure it out for myself if someone else has already<br/><br/>&gt; done it.<br/><br/>&gt; Thanks in advance.<br/><br/>&gt; JJ <br/><br/>&gt; <br/><br/>&gt; **Views expressed by the author do not necessarily represent those of<br/><br/>&gt; the Queens Library.**<br/><br/>&gt; <br/><br/>&gt; Jane Jacobs<br/><br/>&gt; Asst. Coord., Catalog Division<br/><br/>&gt; Queens Borough Public Library<br/><br/>&gt; 89-11 Merrick Blvd.<br/><br/>&gt; Jamaica, NY 11432<br/><br/>&gt; tel.: (718) 990-0804<br/><br/>&gt; e-mail: Jane.W.Jacobs@queenslibrary.org<br/><br/>&gt; FAX. (718) 990-8566<br/><br/>&gt; <br/><br/>&gt; <br/><br/>&gt; <br/><br/>&gt; <br/><br/>&gt; <br/><br/>&gt; The information contained in this message may be privileged <br/><br/>&gt; and confidential and protected from disclosure. If the reader <br/><br/>&gt; of this message is not the intended recipient, or an employee <br/><br/>&gt; or agent responsible for delivering this message to the <br/><br/>&gt; intended recipient, you are hereby notified that any <br/><br/>&gt; dissemination, distribution or copying of this communication <br/><br/>&gt; is strictly prohibited. If you have received this <br/><br/>&gt; communication in error, please notify us immediately by <br/><br/>&gt; replying to the message and deleting it from your computer.<br/><br/>&gt; <br/><br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/10/msg2671.html Thu, 02 Oct 2008 05:24:18 +0000 RE: Regular Expression for non-Roman characters by Doran, Michael D Hi Jane,<br/><br/>In a MARC-8 character set environment, I would assume that the key to detecting non-Latin characters would be the presence of an escape sequence to indicate a switch to an alternate character set (e.g. Arabic, Greek, Cyrillic, etc) [1]. Everything from that point on would be non-Latin until there was an escape sequence back to Latin.<br/><br/>In a MARC Unicode character set environment, if you are using Perl for your regular expression matching, you can probably take advantage of the Unicode \p{} constructs [2]. Something along the lines of...<br/><br/> \P{Latin}<br/><br/>...which means doesn&#39;t belong to the Latin script (lowercase &#39;p&#39; = belongs to, uppercase &#39;P&#39; = does not belong to).<br/><br/>For more info on the regular expression Unicode scripts/blocks see this tutorial:<br/>http://www.regular-expressions.info/unicode.html<br/><br/>I&#39;ll point out that when I&#39;ve used Unicode \p{} constructs in a program, it was necessary to explicitly label strings as being Unicode (assuming they are, natch) before regex matching, using...<br/><br/> decode(&#39;UTF-8&#39;,$string_tobe_matched);<br/><br/>I know that&#39;s not exactly what you asked for, but (assuming I didn&#39;t misunderstand your question) it may suggest some approaches should you end up tackling it yourself.<br/><br/>-- Michael<br/><br/>[1] MARC 21 Specification &gt; ACCESSING ALTERNATE GRAPHIC CHARACTER SETS<br/> http://www.loc.gov/marc/specifications/speccharmarc8.html#alternative<br/><br/>[2] Perl &gt; Unicode Regular Expression Support Level<br/> http://perldoc.perl.org/perlunicode.html#Unicode-Regular-Expression-Support-Level<br/><br/># Michael Doran, Systems Librarian<br/># University of Texas at Arlington<br/># 817-272-5326 office<br/># 817-688-1926 mobile<br/># doran@uta.edu<br/># http://rocky.uta.edu/doran/<br/> <br/><br/>&gt; -----Original Message-----<br/>&gt; From: Jacobs, Jane W [mailto:Jane.W.Jacobs@queenslibrary.org] <br/>&gt; Sent: Thursday, September 25, 2008 1:24 PM<br/>&gt; To: perl4lib@perl.org<br/>&gt; Subject: Regular Expression for non-Roman characters<br/>&gt; <br/>&gt; Hi folks,<br/>&gt; <br/>&gt; I&#39;m wondering if anyone has codified a regular expression that would<br/>&gt; indicate the presence of non-Latin characters. I want to detect the<br/>&gt; presence of non-Roman letters in authority records. Currently<br/>&gt; Authorities with non-Roman forms of name place these in the <br/>&gt; 4XX fields.<br/>&gt; Our system can&#39;t handle that so I want to flip them to 5XX <br/>&gt; and possibly<br/>&gt; add a subfield to note what they but first I need something to detect<br/>&gt; them<br/>&gt; <br/>&gt; I had in mind something like \xE0-\xFE which detects <br/>&gt; diacritics nicely.<br/>&gt; I&#39;d prefer not to figure it out for myself if someone else has already<br/>&gt; done it.<br/>&gt; Thanks in advance.<br/>&gt; JJ <br/>&gt; <br/>&gt; **Views expressed by the author do not necessarily represent those of<br/>&gt; the Queens Library.**<br/>&gt; <br/>&gt; Jane Jacobs<br/>&gt; Asst. Coord., Catalog Division<br/>&gt; Queens Borough Public Library<br/>&gt; 89-11 Merrick Blvd.<br/>&gt; Jamaica, NY 11432<br/>&gt; tel.: (718) 990-0804<br/>&gt; e-mail: Jane.W.Jacobs@queenslibrary.org<br/>&gt; FAX. (718) 990-8566<br/>&gt; <br/>&gt; <br/>&gt; <br/>&gt; <br/>&gt; <br/>&gt; The information contained in this message may be privileged <br/>&gt; and confidential and protected from disclosure. If the reader <br/>&gt; of this message is not the intended recipient, or an employee <br/>&gt; or agent responsible for delivering this message to the <br/>&gt; intended recipient, you are hereby notified that any <br/>&gt; dissemination, distribution or copying of this communication <br/>&gt; is strictly prohibited. If you have received this <br/>&gt; communication in error, please notify us immediately by <br/>&gt; replying to the message and deleting it from your computer.<br/>&gt; <br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/09/msg2670.html Thu, 25 Sep 2008 14:54:02 +0000 Regular Expression for non-Roman characters by Jacobs, Jane W Hi folks,<br/><br/>I&#39;m wondering if anyone has codified a regular expression that would<br/>indicate the presence of non-Latin characters. I want to detect the<br/>presence of non-Roman letters in authority records. Currently<br/>Authorities with non-Roman forms of name place these in the 4XX fields.<br/>Our system can&#39;t handle that so I want to flip them to 5XX and possibly<br/>add a subfield to note what they but first I need something to detect<br/>them<br/><br/>I had in mind something like \xE0-\xFE which detects diacritics nicely.<br/>I&#39;d prefer not to figure it out for myself if someone else has already<br/>done it.<br/>Thanks in advance.<br/>JJ <br/><br/>**Views expressed by the author do not necessarily represent those of<br/>the Queens Library.**<br/><br/>Jane Jacobs<br/>Asst. Coord., Catalog Division<br/>Queens Borough Public Library<br/>89-11 Merrick Blvd.<br/>Jamaica, NY 11432<br/>tel.: (718) 990-0804<br/>e-mail: Jane.W.Jacobs@queenslibrary.org<br/>FAX. (718) 990-8566<br/><br/><br/><br/><br/><br/>The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer.<br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/09/msg2669.html Thu, 25 Sep 2008 11:27:14 +0000 Position Announcement: Evergreen Systems Developer by Bill Erickson * Apologies for cross-posting *<br/><br/>Equinox Software, Inc. / The Evergreen Experts / http://esilibrary.com<br/><br/>Systems Developer, Library Automation Applications<br/><br/>Does working with a small, agile team of software designers and developers<br/>to create unique and successful solutions to interesting problems sound more<br/>like a hobby than a job?<br/><br/>Equinox is looking for self-motivated, enthusiastic software developers to<br/>join the Equinox development team. If you&#39;re a programmer with at least 2<br/>years of systems (non-web) development experience then you may be that<br/>person.<br/><br/>Preferred skill set:<br/><br/> * Experience with Perl a must, additional experience with C, Javascript,<br/>Python, and/or Java a plus.<br/> * Experience with RDBMS-backed systems software<br/> * Experience with Linux<br/> * Experience working with a development team<br/> * Experience contributing to Open Source projects is a plus<br/> * Familiarity with the Evergreen ILS is a plus<br/><br/>This is a full-time salaried position. Benefits include full company-paid<br/>medical, dental, and vision insurance; paid sick and vacation time; and a<br/>401k plan with matching company contribution.<br/><br/>Equinox Software, Inc. is located in Norcross, GA. Atlanta area locals<br/>preferred, but teleworking is possible for the right set of candidates.<br/><br/>Evergreen (http://evergreen-ils.org/) is an enterprise-class, open-source,<br/>integrated library system.<br/><br/>Please send r&eacute;sum&eacute; or c.v. with cover letter to careers@esilibrary.com.<br/>Please see http://esilibrary.com for more information about Equinox<br/>Software, Inc.<br/><br/>-bill<br/><br/>--<br/>Bill Erickson<br/>| VP, Software Development &amp; Integration<br/>| Equinox Software, Inc. / The Evergreen Experts<br/>| phone: 877-OPEN-ILS (673-6457)<br/>| email: erickson@esilibrary.com<br/>| web: http://esilibrary.com<br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/09/msg2668.html Thu, 25 Sep 2008 09:57:54 +0000 Where's the support for Unimarc? by Emanuele Venezia Hello everybody,<br/>I&#39;m about to use MARC::Record for the first time, and I&#39;ve found nothing <br/>on CPAN about Unimarc. Did I do a wrong search? I happened to read about <br/>something some times ago, but I don&#39;t remember where.<br/>I&#39;ve tried to use it step by step by simply creating an empty record and <br/>filling it field by field while reading a file (line by line). It almost <br/>worked, but it seems USMARC has some functions that could ease my work <br/>if they existed for Unimarc.<br/><br/>Can someone address me please?<br/><br/>Another question: is there a way to import from an Aleph sequential file?<br/><br/>Thanks in advance,<br/>Emanuele<br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/09/msg2667.html Tue, 16 Sep 2008 23:48:31 +0000 Re: MARC.pm - Perl extension to manipulate MAchine Readable Cataloging records. by Dan Scott 2008/9/9 &lt;Bbirthisel@aol.com&gt;:<br/>&gt; Hi Jeffrey,<br/>&gt;<br/>&gt; In a message dated 9/9/2008 10:09:39 AM Eastern Daylight Time,<br/>&gt; Jeffrey.Lewis@proquest.com writes:<br/>&gt;<br/>&gt;&gt; I was looking over this perl module and am curious if there is an support<br/>&gt;&gt; for MARC to Unicode character conversions. A prompt response would be much<br/>&gt;&gt; appreciated.<br/>&gt;<br/>&gt; Unicode was not supported in the original MARC.pm and related code. We had<br/>&gt; limited XML support and some character mappings to maintain compatibility with<br/>&gt; the older MS-DOS based USMARC programs. I think the later MARC::Record family<br/>&gt; of modules does have at least some Unicode support.<br/>&gt;<br/>&gt; The place to ask is the perl_for_librarians mailing list, so I have copied my<br/>&gt; reply to them.<br/><br/>In a nutshell, MARC8 to UTF8 (Unicode) conversions are supported by<br/>MARC::Charset (http://search.cpan.org/dist/MARC-Charset/)<br/><br/>-- <br/>Dan Scott<br/>Laurentian University<br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/09/msg2666.html Tue, 09 Sep 2008 17:48:21 +0000 Re: MARC.pm - Perl extension to manipulate MAchine Readable Cataloging records. by Bbirthisel Hi Jeffrey,<br/><br/>In a message dated 9/9/2008 10:09:39 AM Eastern Daylight Time, <br/>Jeffrey.Lewis@proquest.com writes:<br/><br/>&gt; I was looking over this perl module and am curious if there is an support <br/>&gt; for MARC to Unicode character conversions. A prompt response would be much <br/>&gt; appreciated.<br/><br/>Unicode was not supported in the original MARC.pm and related code. We had <br/>limited XML support and some character mappings to maintain compatibility with <br/>the older MS-DOS based USMARC programs. I think the later MARC::Record family <br/>of modules does have at least some Unicode support.<br/><br/>The place to ask is the perl_for_librarians mailing list, so I have copied my <br/>reply to them.<br/><br/>-bill<br/><br/><br/><br/>**************<br/>Psssst...Have you heard the news? There&#39;s a new fashion blog, <br/>plus the latest fall trends and hair styles at StyleList.com.<br/> <br/>(http://www.stylelist.com/trends?ncid=aolsty00050000000014)<br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/09/msg2665.html Tue, 09 Sep 2008 14:38:04 +0000 Position announcement - Koha application developer (US or Canada) by Galen Charlton [Apologies for cross-posting]<br/><br/>LibLime has a full-time Perl application developer position that we&#39;re<br/>looking to fill immediately. The responsibilities will center on<br/>adding new features to the Koha ILS (http://www.koha.org/), but may<br/>include working on other open-source library projects such as the<br/>&Dagger;biblios metadata editor (http://www.biblios.org/).<br/><br/>Applicants should be based in the United States or Canada.<br/><br/>REASONS YOU&#39;LL LOVE WORKING AT LIBLIME<br/><br/>1. Our customers. Working at LibLime you&#39;ll have the opportunity to<br/>work directly with libraries who have a real vision for where they<br/>want their library technology to go, and the resources to take it<br/>there.<br/><br/>2. Flexible, distributed environment. We have a central management<br/>office, but most of our employees work from home offices. Hours are<br/>flexible; you can listen to your own music and work in your pajamas<br/>(if you want to!).<br/><br/>3. It&#39;s all Open Source. We&#39;re geeks about open source; every piece of<br/>code you create is licensed under the GPL. We tell our customers that<br/>means no vendor lock-in, but it applies to employees too -- your code<br/>follows you to your next job.<br/><br/>4. Competitive compensation and benefits package. Excellent group<br/>health plan, 401(k) retirement account with employer matching, and<br/>support for travel to professional development opportunities such as<br/>the Code4Lib conference.<br/><br/>5. Upward mobility. LibLime is a growing company with lots of<br/>opportunities to advance your career.<br/><br/>QUALIFICATIONS<br/><br/>4+ years of application development experience in Perl including SQL<br/>and web services.<br/><br/>Experience working with an existing codebase, including good refactoring skills.<br/><br/>Experience on the command line in Unix/Linux environment.<br/><br/>PREFERRED QUALIFICATIONS<br/><br/>Domain knowledge in library workflow in one or more areas such as<br/>acquisitions, authority control, serials, cataloging, or circulation.<br/><br/>Knowledge of library-speci&#xFB01;c standards/protocols such as MARC, MODS,<br/>Dublin Core, Z39.50, other Z39.* standards, NCIP, SIP2.<br/><br/>JOB DESCRIPTION<br/><br/>The complete job description and qualifications can be found at<br/><br/>http://liblime.com/about/careers/software_engineer_koha<br/><br/>HOW TO APPLY<br/><br/>Send a resume and cover letter to careers@liblime.com.<br/><br/>-- <br/>Galen Charlton<br/>VP, Research &amp; Development, LibLime<br/>galen.charlton@liblime.com<br/>p: 1-888-564-2457 x709<br/>skype: gmcharlt<br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/09/msg2664.html Mon, 08 Sep 2008 10:22:01 +0000 Re: How convert data from USMARC to MARCXML using MARC::Record and it's derivatives? MARC.pm vs. MARC::Record.pm by Dmitry Arsentiev Galen, I&#39;m sorry, It works correctly.<br/><br/>I made mistake with typing in the name of the source file.<br/><br/>I&#39;ve just changed it<br/>from 01al2008.mrf<br/> to 01al2007.mrf<br/>and script became ready.<br/><br/>Thank you!<br/><br/><br/>2008/9/2 Galen Charlton &lt;galen.charlton@liblime.com&gt;:<br/>&gt; Hi,<br/>&gt;<br/>&gt; On Tue, Sep 2, 2008 at 5:33 AM, Dmitry Arsentiev &lt;dmarsentev@gmail.com&gt; wrote:<br/>&gt;&gt; The question #1: Would it be right to develop my scripts with MARC.pm<br/>&gt;&gt; and MARC::XML.pm,<br/>&gt;&gt; or I should to develop only with MARC::Record<br/>&gt;<br/>&gt; I&#39;d recommend using MARC::Record and MARC::File::XML.<br/>&gt;<br/>&gt;&gt; The question #2: If I should to develop MARC::Record-based script,<br/>&gt;&gt; can I easy convert from MARC to MARCXML,<br/>&gt;&gt; or I&#39;ve to write handler for each field I got<br/>&gt;&gt; from MARC?<br/>&gt;<br/>&gt; It can be as easy as loading a MARC record into a MARC::Record object<br/>&gt; (e.g., $marc), then using the output of $marc-&gt;as_xml() or<br/>&gt; $marc-&gt;as_xml_record().<br/>&gt;<br/>&gt; Regards,<br/>&gt;<br/>&gt; Galen<br/>&gt; --<br/>&gt; Galen Charlton<br/>&gt; VP, Research &amp; Development, LibLime<br/>&gt; galen.charlton@liblime.com<br/>&gt; p: 1-888-564-2457 x709<br/>&gt; skype: gmcharlt<br/>&gt;<br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/09/msg2663.html Wed, 03 Sep 2008 10:02:44 +0000 Re: How convert data from USMARC to MARCXML using MARC::Record and it's derivatives? MARC.pm vs. MARC::Record.pm by Dmitry Arsentiev Thank you for your forewarning, Bill.<br/><br/>I hadn&#39;t grow up enough to get this error yet.<br/><br/><br/>2008/9/2 Bill Dueber &lt;dueberb@umich.edu&gt;:<br/>&gt; Note that if you&#39;re working with XML at the record level that<br/>&gt; MARC::File::XML has a bug (the logic for the &#39;as_xml_record&#39; method is<br/>&gt; reversed with respect to outputting XML headers).<br/>&gt;<br/>&gt; See this:<br/>&gt;<br/>&gt; http://rt.cpan.org/Public/Bug/Display.html?id=34082<br/>&gt;<br/>&gt; It won&#39;t affect simple conversion, but is worth knowing about and fixing.<br/>&gt;<br/>&gt;<br/>&gt; On 9/2/08 11:04 AM, &quot;Galen Charlton&quot; &lt;galen.charlton@liblime.com&gt; wrote:<br/>&gt;<br/>&gt;&gt; Hi,<br/>&gt;&gt;<br/>&gt;&gt; On Tue, Sep 2, 2008 at 5:33 AM, Dmitry Arsentiev &lt;dmarsentev@gmail.com&gt; wrote:<br/>&gt;&gt;&gt; The question #1: Would it be right to develop my scripts with MARC.pm<br/>&gt;&gt;&gt; and MARC::XML.pm,<br/>&gt;&gt;&gt; or I should to develop only with MARC::Record<br/>&gt;&gt;<br/>&gt;&gt; I&#39;d recommend using MARC::Record and MARC::File::XML.<br/>&gt;&gt;<br/>&gt;&gt;&gt; The question #2: If I should to develop MARC::Record-based script,<br/>&gt;&gt;&gt; can I easy convert from MARC to MARCXML,<br/>&gt;&gt;&gt; or I&#39;ve to write handler for each field I got<br/>&gt;&gt;&gt; from MARC?<br/>&gt;&gt;<br/>&gt;&gt; It can be as easy as loading a MARC record into a MARC::Record object<br/>&gt;&gt; (e.g., $marc), then using the output of $marc-&gt;as_xml() or<br/>&gt;&gt; $marc-&gt;as_xml_record().<br/>&gt;&gt;<br/>&gt;&gt; Regards,<br/>&gt;&gt;<br/>&gt;&gt; Galen<br/>&gt;<br/>&gt; --<br/>&gt; Bill Dueber<br/>&gt; Library Systems Programmer<br/>&gt; University Library, University of Michigan<br/>&gt; 734.615.0412<br/>&gt;<br/>&gt;<br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/09/msg2662.html Wed, 03 Sep 2008 09:44:27 +0000 Re: How convert data from USMARC to MARCXML using MARC::Record and it's derivatives? MARC.pm vs. MARC::Record.pm by Dmitry Arsentiev Thank you for your answer, Galen.<br/><br/>Unfortunately, my simple script does not work.<br/>Here it is.<br/>----------------------------------------------------------<br/>#!/usr/bin/perl<br/>use MARC::Record;<br/>use MARC::Batch;<br/>use MARC::File::XML ( BinaryEncoding =&gt; &#39;utf8&#39;, RecordFormat =&gt; &#39;USMARC&#39; );<br/><br/> my $filename = &quot;01al2008.mrf&quot;;<br/> my $batch = MARC::Batch-&gt;new(&#39;USMARC&#39;, $filename );<br/> my $record = $batch-&gt;next();<br/> print $record-&gt;as_xml().&quot;\n&quot;;<br/>----------------------------------------------------------<br/>The error returned by my script is:<br/>Can&#39;t call method &quot;as_xml&quot; on an undefined value at try.pl line 9.<br/><br/>I got the same result with the as_record_xml()<br/><br/>I suppose, $batch-&gt;next() does not return MARC::Record object.<br/><br/><br/><br/><br/>2008/9/2 Galen Charlton &lt;galen.charlton@liblime.com&gt;:<br/>&gt; Hi,<br/>&gt;<br/>&gt; On Tue, Sep 2, 2008 at 5:33 AM, Dmitry Arsentiev &lt;dmarsentev@gmail.com&gt; wrote:<br/>&gt;&gt; The question #1: Would it be right to develop my scripts with MARC.pm<br/>&gt;&gt; and MARC::XML.pm,<br/>&gt;&gt; or I should to develop only with MARC::Record<br/>&gt;<br/>&gt; I&#39;d recommend using MARC::Record and MARC::File::XML.<br/>&gt;<br/>&gt;&gt; The question #2: If I should to develop MARC::Record-based script,<br/>&gt;&gt; can I easy convert from MARC to MARCXML,<br/>&gt;&gt; or I&#39;ve to write handler for each field I got<br/>&gt;&gt; from MARC?<br/>&gt;<br/>&gt; It can be as easy as loading a MARC record into a MARC::Record object<br/>&gt; (e.g., $marc), then using the output of $marc-&gt;as_xml() or<br/>&gt; $marc-&gt;as_xml_record().<br/>&gt;<br/>&gt; Regards,<br/>&gt;<br/>&gt; Galen<br/>&gt; --<br/>&gt; Galen Charlton<br/>&gt; VP, Research &amp; Development, LibLime<br/>&gt; galen.charlton@liblime.com<br/>&gt; p: 1-888-564-2457 x709<br/>&gt; skype: gmcharlt<br/>&gt;<br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/09/msg2661.html Wed, 03 Sep 2008 09:37:57 +0000 Re: How convert data from USMARC to MARCXML using MARC::Record andit's derivatives? MARC.pm vs. MARC::Record.pm by Bill Dueber Note that if you&#39;re working with XML at the record level that<br/>MARC::File::XML has a bug (the logic for the &#39;as_xml_record&#39; method is<br/>reversed with respect to outputting XML headers).<br/><br/>See this:<br/><br/> http://rt.cpan.org/Public/Bug/Display.html?id=34082<br/><br/>It won&#39;t affect simple conversion, but is worth knowing about and fixing.<br/><br/><br/>On 9/2/08 11:04 AM, &quot;Galen Charlton&quot; &lt;galen.charlton@liblime.com&gt; wrote:<br/><br/>&gt; Hi,<br/>&gt; <br/>&gt; On Tue, Sep 2, 2008 at 5:33 AM, Dmitry Arsentiev &lt;dmarsentev@gmail.com&gt; wrote:<br/>&gt;&gt; The question #1: Would it be right to develop my scripts with MARC.pm<br/>&gt;&gt; and MARC::XML.pm,<br/>&gt;&gt; or I should to develop only with MARC::Record<br/>&gt; <br/>&gt; I&#39;d recommend using MARC::Record and MARC::File::XML.<br/>&gt; <br/>&gt;&gt; The question #2: If I should to develop MARC::Record-based script,<br/>&gt;&gt; can I easy convert from MARC to MARCXML,<br/>&gt;&gt; or I&#39;ve to write handler for each field I got<br/>&gt;&gt; from MARC?<br/>&gt; <br/>&gt; It can be as easy as loading a MARC record into a MARC::Record object<br/>&gt; (e.g., $marc), then using the output of $marc-&gt;as_xml() or<br/>&gt; $marc-&gt;as_xml_record().<br/>&gt; <br/>&gt; Regards,<br/>&gt; <br/>&gt; Galen<br/><br/>-- <br/>Bill Dueber<br/>Library Systems Programmer<br/>University Library, University of Michigan<br/>734.615.0412<br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/09/msg2660.html Tue, 02 Sep 2008 09:13:52 +0000 Re: How convert data from USMARC to MARCXML using MARC::Record and it's derivatives? MARC.pm vs. MARC::Record.pm by Galen Charlton Hi,<br/><br/>On Tue, Sep 2, 2008 at 5:33 AM, Dmitry Arsentiev &lt;dmarsentev@gmail.com&gt; wrote:<br/>&gt; The question #1: Would it be right to develop my scripts with MARC.pm<br/>&gt; and MARC::XML.pm,<br/>&gt; or I should to develop only with MARC::Record<br/><br/>I&#39;d recommend using MARC::Record and MARC::File::XML.<br/><br/>&gt; The question #2: If I should to develop MARC::Record-based script,<br/>&gt; can I easy convert from MARC to MARCXML,<br/>&gt; or I&#39;ve to write handler for each field I got<br/>&gt; from MARC?<br/><br/>It can be as easy as loading a MARC record into a MARC::Record object<br/>(e.g., $marc), then using the output of $marc-&gt;as_xml() or<br/>$marc-&gt;as_xml_record().<br/><br/>Regards,<br/><br/>Galen<br/>-- <br/>Galen Charlton<br/>VP, Research &amp; Development, LibLime<br/>galen.charlton@liblime.com<br/>p: 1-888-564-2457 x709<br/>skype: gmcharlt<br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/09/msg2659.html Tue, 02 Sep 2008 08:04:27 +0000 How convert data from USMARC to MARCXML using MARC::Record and it's derivatives? MARC.pm vs. MARC::Record.pm by Dmitry Arsentiev Hi.<br/><br/>I need help to get perl way to convert USMARC to MARCXML.<br/><br/><br/>1. I found MARC::XML<br/>http://search.cpan.org/~bbirth/MARC-XML-0.4/XML.pm<br/>This module seems to be able to convert MARC&lt;=&gt;XML<br/><br/><br/>2. But in the tutorial for MARC::Record<br/>http://search.cpan.org/~mikery/MARC-Record-2.0.0/lib/MARC/Doc/Tutorial.pod<br/>I&#39;ve read the &quot;History of MARC on CPAN&quot; and I&#39;ve make conclusions:<br/> - MARC.pm is dead, it is not supported;<br/> - MARC::Record and it&#39;s derivatives (MARC::Batch, MARC::File)<br/> are supported and developed nowadays.<br/><br/>The question #1: Would it be right to develop my scripts with MARC.pm<br/>and MARC::XML.pm,<br/> or I should to develop only with MARC::Record<br/><br/>The question #2: If I should to develop MARC::Record-based script,<br/> can I easy convert from MARC to MARCXML,<br/> or I&#39;ve to write handler for each field I got<br/>from MARC?<br/><br/>Thanks.<br/><br/>Dmitry<br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/09/msg2658.html Tue, 02 Sep 2008 03:33:10 +0000 Requesting help with simple MARC::File::XML program -- SOLVED by Anne L. Highsmith Thanks to suggestions from Michael Kreyche &amp; Bill Dueber, I have been able to solve the problem with using the &quot;file&quot; command on my usmarc to marcxml program. <br/><br/>It was the perl version. We were running on 5.8.7, which threw the error. Once we upgraded to 5.8.8, program ran just fine.<br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/07/msg2657.html Tue, 29 Jul 2008 07:40:54 +0000 Requesting help with simple MARC::File::XML program by Anne L. Highsmith I have a file of usmarc records which I want to read into a program and print to a file as MARC xml. Here&#39;s my program so far:<br/><br/>#########################################################<br/>#!/usr/local/bin/perl<br/>use strict;<br/>use warnings;<br/>use MARC::Record;<br/>use MARC::Batch;<br/>use MARC::File::XML;<br/><br/>my $infile = &#39;updated_dissertation_records&#39;;<br/>my $file = MARC::File::XML-&gt;out(&#39;updated_dissertation_records.xml&#39;, &#39;UTF-8&#39; );<br/><br/>my $batch = MARC::Batch-&gt;new( &#39;USMARC&#39;, $infile);<br/>for (my $i = 0; $i &lt; 3; $i++) {<br/> my $record = $batch-&gt;next();<br/> $file-&gt;write($record);<br/>}<br/>#########################################################<br/><br/>First question -- I can&#39;t get past the my $file = MARC::File::XML-&gt;out(&#39;updated_dissertation_records.xml&#39;, &#39;UTF-8&#39; );<br/>statement. When I run the program, that line gets the error:<br/>usage $fh-&gt;binmode([LAYER]) at /usr/local/perl/5.8/lib/site_perl/5.8.7/MARC/File/XML.pm line 195<br/><br/>Two -- does the &quot;$file-&gt;write()&quot; statement expect a MARC::Record object, an XML stream, or a marc record string? I&#39;ve assumed a MARC::Record object. If it expects an XML stream, what is the best method for what I&#39;m trying to do to get my marc record into an appropriate XML stream?<br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/07/msg2656.html Sun, 20 Jul 2008 20:20:05 +0000 Re: Biblio::Isis and character encoding by Dobrica Pavlinusic On Mon, Jul 14, 2008 at 09:14:50AM +0200, Emmanuel Di Pretoro wrote:<br/>&gt; Hi,<br/>&gt; <br/>&gt; Currently I&#39;m trying to convert an ISIS database to MARC21. So I use<br/>&gt; Biblio::Isis and MARC::Record to do that. No problem with this conversion,<br/>&gt; except for some weird character encoding problems. Some bibliographic<br/>&gt; records are in written in french, and accentuated characters like &#39;&eacute;&#39; are<br/>&gt; display as &#39;&lt;82&gt;&#39;.<br/>&gt; <br/>&gt; I&#39;ve tried to use some Encode::* modules (Encode, Encode::Guess,<br/>&gt; Encode::Detec, Encode::First), but without success.<br/>&gt; <br/>&gt; Is there anybody who have this kind of problem? Is there a solution?<br/><br/>Biblio::Isis doesn&#39;t have any support for encoding. It will return<br/>content with original encoding from ISIS. This is intentional, because our<br/>local encoding was really wired.<br/><br/>In our project WebPAC (which was reason to write Biblio::Isis in the<br/>first place :-) we are using Encode&#39;s from_to and/or decode to convert our local<br/>encoding to utf-8 which MARC::Record (2.0 and newer) handles well.<br/><br/>See http://webpac.us/ for documentation or this snippet:<br/>http://svn.rot13.org/index.cgi/webpac2/view/trunk/lib/WebPAC/Output/MARC.pm<br/><br/>p.s. WebPAC(2) is really universal conversion tool (data mangler :-) but<br/>it might be overkill for your purpose (or not). It also includes<br/>several DSL [domain specific languages] based on perl to massage data<br/>before producing output.<br/><br/>HTH.<br/><br/>-- <br/>Dobrica Pavlinusic 2share!2flame dpavlin@rot13.org<br/>Unix addict. Internet consultant. http://www.rot13.org/~dpavlin<br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/07/msg2655.html Tue, 15 Jul 2008 02:41:26 +0000 RE: Biblio::Isis and character encoding by Doran, Michael D Hi Emmanuel, <br/> <br/>&gt; I&#39;m trying to convert an ISIS database to MARC21 <br/> <br/>What is the character set encoding of the data in the ISIS database? <br/> <br/>What is the desired character set encoding for the MARC21 records? I.e. MARC-8 or MARC Unicode(UTF-8)? <br/> <br/>If they are dissimilar character encodings, is the data undergoing a character set conversion? <br/> <br/>-- Michael <br/> <br/># Michael Doran, Systems Librarian <br/># University of Texas at Arlington <br/># 817-272-5326 office <br/># 817-688-1926 mobile <br/># doran@uta.edu <br/># http://rocky.uta.edu/doran/ <br/> <br/> <br/>&gt; -----Original Message----- <br/>&gt; From: Emmanuel Di Pretoro [mailto:edipretoro@gmail.com] <br/>&gt; Sent: Monday, July 14, 2008 2:15 AM <br/>&gt; To: perl4lib@perl.org <br/>&gt; Subject: Biblio::Isis and character encoding <br/>&gt; <br/>&gt; Hi, <br/>&gt; <br/>&gt; Currently I&#39;m trying to convert an ISIS database to MARC21. So I use <br/>&gt; Biblio::Isis and MARC::Record to do that. No problem with this conversion, <br/>&gt; except for some weird character encoding problems. Some bibliographic <br/>&gt; records are in written in french, and accentuated characters like &#39;&Atilde;&copy;&#39; are <br/>&gt; display as &#39;&lt;82&gt;&#39;. <br/>&gt; <br/>&gt; I&#39;ve tried to use some Encode::* modules (Encode, Encode::Guess, <br/>&gt; Encode::Detec, Encode::First), but without success. <br/>&gt; <br/>&gt; Is there anybody who have this kind of problem? Is there a solution? <br/>&gt; <br/>&gt; Thanks in advance. <br/>&gt; <br/>&gt; Regards, <br/>&gt; <br/>&gt; Emmanuel Di Pretoro <br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/07/msg2654.html Mon, 14 Jul 2008 12:44:07 +0000 Biblio::Isis and character encoding by Emmanuel Di Pretoro Hi,<br/><br/>Currently I&#39;m trying to convert an ISIS database to MARC21. So I use<br/>Biblio::Isis and MARC::Record to do that. No problem with this conversion,<br/>except for some weird character encoding problems. Some bibliographic<br/>records are in written in french, and accentuated characters like &#39;&eacute;&#39; are<br/>display as &#39;&lt;82&gt;&#39;.<br/><br/>I&#39;ve tried to use some Encode::* modules (Encode, Encode::Guess,<br/>Encode::Detec, Encode::First), but without success.<br/><br/>Is there anybody who have this kind of problem? Is there a solution?<br/><br/>Thanks in advance.<br/><br/>Regards,<br/><br/>Emmanuel Di Pretoro<br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/07/msg2653.html Mon, 14 Jul 2008 00:14:57 +0000 Problems installing Yaz 3.0.34 prior to installing pazpar2 by Christopher Morgan Sorry - This isn&#39;t a Perl issue - I have posted it to the Yaz list instead.<br/>- Chris<br/><br/>I installed Yaz 3.0.34 today and I got the following configuration:<br/><br/>YAZ Package: yaz<br/> YAZ Version: 3.0.34<br/> Bugreport: yaz-help@indexdata.dk<br/> Source code location: .<br/> C Preprocessor: gcc -E<br/> C Preprocessor flags:<br/> C Compiler: gcc<br/> C Compiler flags: -g -O2<br/> Linker flags:<br/> Linked libs: -L/usr/lib -lxslt -lxml2 -lz -lpthread -lm<br/> Host System Type: i686-pc-linux-gnu<br/> Install path: /usr/local<br/> Automake: ${SHELL}<br/>/home/webadmin/yaz-3.0.34/config/missing --run automake-1.10<br/> Archiver: ar<br/> Ranlib: ranlib<br/><br/>However, I got this error message:<br/><br/>configure: WARNING: libEXSLT development libraries not found. <br/><br/>Since I want to try installing pazpar2 -- and I believe these libraries are<br/>necessary to do that --(?), I uninstalled Yaz using &quot;make uninstall&quot;,<br/>removed the remaining yaz directories, and then tried installing<br/>libxslt-devel and libxml2-devel via rpms, but was unable to. libxml2 seemed<br/>to install correctly, for example, but libxml2-devel wouldn&#39;t install,<br/>complaining that I hadn&#39;t installed libxml2 (!)<br/><br/>When I tried to reinstall Yaz, I got this error message during make:<br/><br/>marcdump.o(.text+0x12d): In function `marcdump_read_xml&#39;:<br/>/home/webadmin/yaz-3.0.34/util/marcdump.c:112: undefined reference to<br/>`xmlReaderForFile&#39;<br/>collect2: ld returned 1 exit status<br/>make[1]: *** [yaz-marcdump] Error 1<br/>make[1]: Leaving directory `/home/webadmin/yaz-3.0.34/util&#39;<br/>make: *** [all-recursive] Error 1<br/><br/>I suspect something got corrupted, so I am going to reset the VPS and try<br/>again. Does anyone have any suggestions about which development libraries to<br/>install before installing Yaz, if you plan to install pazpar2? Are there any<br/>tarballs of the libraries available online rather than rpms? I&#39;m also not<br/>clear about which versions of the development libraries to install -- there<br/>are many different versions available.<br/><br/>Thanks!<br/><br/>- Chris Morgan<br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/07/msg2652.html Thu, 10 Jul 2008 11:58:15 +0000 Problems installing Yaz 3.0.34 prior to installing pazpar2 by Christopher Morgan <br/>I installed Yaz 3.0.34 today and I got the following configuration:<br/><br/>YAZ Package: yaz<br/> YAZ Version: 3.0.34<br/> Bugreport: yaz-help@indexdata.dk<br/> Source code location: .<br/> C Preprocessor: gcc -E<br/> C Preprocessor flags:<br/> C Compiler: gcc<br/> C Compiler flags: -g -O2<br/> Linker flags:<br/> Linked libs: -L/usr/lib -lxslt -lxml2 -lz -lpthread -lm<br/> Host System Type: i686-pc-linux-gnu<br/> Install path: /usr/local<br/> Automake: ${SHELL}<br/>/home/webadmin/yaz-3.0.34/config/missing --run automake-1.10<br/> Archiver: ar<br/> Ranlib: ranlib<br/><br/>However, I got this error message:<br/><br/>configure: WARNING: libEXSLT development libraries not found. <br/><br/>Since I want to try installing pazpar2 -- and I believe these libraries are<br/>necessary to do that --(?), I uninstalled Yaz using &quot;make uninstall&quot;,<br/>removed the remaining yaz directories, and then tried installing<br/>libxslt-devel and libxml2-devel via rpms, but was unable to. libxml2 seemed<br/>to install correctly, for example, but libxml2-devel wouldn&#39;t install,<br/>complaining that I hadn&#39;t installed libxml2 (!)<br/><br/>When I tried to reinstall Yaz, I got this error message during make:<br/><br/>marcdump.o(.text+0x12d): In function `marcdump_read_xml&#39;:<br/>/home/webadmin/yaz-3.0.34/util/marcdump.c:112: undefined reference to<br/>`xmlReaderForFile&#39;<br/>collect2: ld returned 1 exit status<br/>make[1]: *** [yaz-marcdump] Error 1<br/>make[1]: Leaving directory `/home/webadmin/yaz-3.0.34/util&#39;<br/>make: *** [all-recursive] Error 1<br/><br/>I suspect something got corrupted, so I am going to reset the VPS and try<br/>again. Does anyone have any suggestions about which development libraries to<br/>install before installing Yaz, if you plan to install pazpar2? Are there any<br/>tarballs of the libraries available online rather than rpms? I&#39;m also not<br/>clear about which versions of the development libraries to install -- there<br/>are many different versions available.<br/><br/>Thanks!<br/><br/>- Chris Morgan<br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/07/msg2651.html Wed, 09 Jul 2008 12:57:58 +0000 Re: Problem installing MARC::Record 2.0.0 under perl 5.8.0 by Brad Baxter On Tue, Jul 8, 2008 at 4:11 PM, Christopher Morgan &lt;morgan@acm.org&gt; wrote:<br/><br/>&gt; So there is hope! But, yes, I see the need to get to 5.8.2 asap!<br/>&gt;<br/><br/>or 5.10.0 :-)<br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/07/msg2650.html Tue, 08 Jul 2008 14:00:37 +0000 RE: Problem installing MARC::Record 2.0.0 under perl 5.8.0 by Christopher Morgan Brian,<br/><br/>Thanks very much. I&#39;ll try that version.<br/><br/>- Chris<br/><br/><br/>-----Original Message-----<br/>From: Bryan Baldus [mailto:bryan.baldus@quality-books.com] <br/>Sent: Tuesday, July 08, 2008 2:31 PM<br/>To: Christopher Morgan; perl4lib@perl.org<br/>Subject: RE: Problem installing MARC::Record 2.0.0 under perl 5.8.0<br/><br/> On Tuesday, July 08, 2008 12:35 PM, Christopher Morgan wrote:<br/>&gt;I am in the process of rebuilding my web site after a phishing site <br/>&gt;break-in (yikes!). The site is fine now, and secure, but for some <br/>&gt;reason I can&#39;t get MARC::Record-2.0.0 to install. I get an error <br/>&gt;message saying that perl 5.8.2 is required, but that I only have perl <br/>&gt;5.8.0. (And indeed I do have perl<br/>5.8.0) But I&#39;m pretty sure this version of MARC::Record *did* install under<br/>perl 5.8.0 that last time I tried.&lt;<br/><br/>MARC::Record 1.39_02 appears to be the latest version on CPAN that would<br/>work on 5.8.0. MARC::Record 2.x is incompatible with pre-5.8.2 versions of<br/>Perl due to Unicode-related changes. The change was announced in a Perl4Lib<br/>message &quot;MARC::Record v2.0 RC1&quot;, sent Fri 5/20/2005 2:35 PM, by Ed Summers.<br/>[1]<br/><br/>[1] &lt;http://www.nntp.perl.org/group/perl.perl4lib/2005/05/msg2070.html&gt;<br/><br/>I hope this helps,<br/><br/>Bryan Baldus<br/>bryan.baldus@quality-books.com<br/>eijabb@cpan.org<br/>http://home.inwave.com/eija<br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/07/msg2649.html Tue, 08 Jul 2008 13:26:21 +0000 RE: Problem installing MARC::Record 2.0.0 under perl 5.8.0 by Christopher Morgan &gt;I sure hope you meant upgrading to Perl 5.8.2 (or higher) rather than<br/>downgrading to <br/>&gt;MARC::Record 1.39_02. ;-)<br/><br/>Michael,<br/><br/>I wish (:-&gt;)! Unfortunately, I&#39;m stuck with Perl 5.8.0 because my VPS<br/>(virtual private server) at Apollo doesn&#39;t offer 5.8.2 - yet. Oh well. I had<br/>been succesfully using MARC::Charset with MARC::Record 1.39_2 up until my<br/>web site implosion, and the Unicode was working fine, including the marc8 -&gt;<br/>utf8 conversions from Marc records and their subsequent display in browsers.<br/>So there is hope! But, yes, I see the need to get to 5.8.2 asap!<br/><br/>- Chris<br/><br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/07/msg2648.html Tue, 08 Jul 2008 13:14:33 +0000 RE: Problem installing MARC::Record 2.0.0 under perl 5.8.0 by Christopher Morgan Bryan,<br/><br/>Problem solved. At your suggestion, I installed MARC::Record 1.39_02, and<br/>it&#39;s working fine. <br/><br/>I was wrong about having installed version 2.0 in the past. When I looked at<br/>my old notes, I saw that I wasn&#39;t able to install version 2.0 because of<br/>Perl 5.8.0. - which makes sense. That&#39;s what I get for leaving a tarball of<br/>Marc::Record 2.0 in my backup directory (:-&gt;)<br/><br/>Thanks again for your help!<br/><br/>- Chris<br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/07/msg2647.html Tue, 08 Jul 2008 12:52:20 +0000 RE: Problem installing MARC::Record 2.0.0 under perl 5.8.0 by Doran, Michael D Hi Chris, <br/> <br/>&gt; I&#39;ll try that version. <br/> <br/>I sure hope you meant upgrading to Perl 5.8.2 (or higher) rather than downgrading to MARC::Record 1.39_02. ;-) <br/> <br/>This is just my un-asked for 2 cents, but I wouldn&#39;t stint on anything that will make the processing of Unicode-encoded text easier. Last December seemed to mark a tipping point for Unicode, both on the internet: <br/> <br/> &quot;Just last December [2007] there was an interesting milestone <br/> on the web. For the first time, we found that Unicode was the <br/> most frequent encoding found on web pages, overtaking both <br/> ASCII and Western European encodings&quot; [1] <br/> <br/>...as well as for its use in MARC records: <br/> <br/> &quot;To facilitate the movement of records between MARC-8 and Unicode <br/> environments, it was recommended for an initial period that the use of <br/> Unicode be restricted to a repertoire identical in extent to the MARC-8 <br/> repertoire. [...] however, such a restriction is no longer appropriate. <br/> The full UCS repertoire, as currently defined at the Unicode web site, <br/> is valid for encoding MARC 21 records subject only to the constraints <br/> described [in the current MARC 21 Specifications].&quot; [2] <br/> <br/>-- Michael <br/> <br/>[1] The Official Google Blog: &quot;Moving to Unicode 5.1&quot; <br/> http://googleblog.blogspot.com/2008/05/moving-to-unicode-51.html <br/> <br/>[2] MARC 21 Specifications: Unicode Encoding Environment <br/> (revised December 2007) <br/> http://www.loc.gov/marc/specifications/speccharucs.html <br/> <br/># Michael Doran, Systems Librarian <br/># University of Texas at Arlington <br/># 817-272-5326 office <br/># 817-688-1926 mobile <br/># doran@uta.edu <br/># http://rocky.uta.edu/doran/ <br/> <br/> <br/>&gt; -----Original Message----- <br/>&gt; From: Christopher Morgan [mailto:morgan@acm.org] <br/>&gt; Sent: Tuesday, July 08, 2008 2:12 PM <br/>&gt; To: &#39;Bryan Baldus&#39;; perl4lib@perl.org <br/>&gt; Subject: RE: Problem installing MARC::Record 2.0.0 under perl 5.8.0 <br/>&gt; <br/>&gt; Brian, <br/>&gt; <br/>&gt; Thanks very much. I&#39;ll try that version. <br/>&gt; <br/>&gt; - Chris <br/>&gt; <br/>&gt; <br/>&gt; -----Original Message----- <br/>&gt; From: Bryan Baldus [mailto:bryan.baldus@quality-books.com] <br/>&gt; Sent: Tuesday, July 08, 2008 2:31 PM <br/>&gt; To: Christopher Morgan; perl4lib@perl.org <br/>&gt; Subject: RE: Problem installing MARC::Record 2.0.0 under perl 5.8.0 <br/>&gt; <br/>&gt; On Tuesday, July 08, 2008 12:35 PM, Christopher Morgan wrote: <br/>&gt; &gt;I am in the process of rebuilding my web site after a phishing site <br/>&gt; &gt;break-in (yikes!). The site is fine now, and secure, but for some <br/>&gt; &gt;reason I can&#39;t get MARC::Record-2.0.0 to install. I get an error <br/>&gt; &gt;message saying that perl 5.8.2 is required, but that I only have perl <br/>&gt; &gt;5.8.0. (And indeed I do have perl <br/>&gt; 5.8.0) But I&#39;m pretty sure this version of MARC::Record *did* install <br/>&gt; under <br/>&gt; perl 5.8.0 that last time I tried.&lt; <br/>&gt; <br/>&gt; MARC::Record 1.39_02 appears to be the latest version on CPAN that would <br/>&gt; work on 5.8.0. MARC::Record 2.x is incompatible with pre-5.8.2 versions of <br/>&gt; Perl due to Unicode-related changes. The change was announced in a <br/>&gt; Perl4Lib <br/>&gt; message &quot;MARC::Record v2.0 RC1&quot;, sent Fri 5/20/2005 2:35 PM, by Ed <br/>&gt; Summers. <br/>&gt; [1] <br/>&gt; <br/>&gt; [1] &lt;http://www.nntp.perl.org/group/perl.perl4lib/2005/05/msg2070.html&gt; <br/>&gt; <br/>&gt; I hope this helps, <br/>&gt; <br/>&gt; Bryan Baldus <br/>&gt; bryan.baldus@quality-books.com <br/>&gt; eijabb@cpan.org <br/>&gt; http://home.inwave.com/eija <br/> <br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/07/msg2646.html Tue, 08 Jul 2008 12:49:48 +0000 RE: Problem installing MARC::Record 2.0.0 under perl 5.8.0 by Christopher Morgan Brian,<br/><br/>Thanks very much. I&#39;ll try that version.<br/><br/>- Chris<br/><br/><br/>-----Original Message-----<br/>From: Bryan Baldus [mailto:bryan.baldus@quality-books.com] <br/>Sent: Tuesday, July 08, 2008 2:31 PM<br/>To: Christopher Morgan; perl4lib@perl.org<br/>Subject: RE: Problem installing MARC::Record 2.0.0 under perl 5.8.0<br/><br/> On Tuesday, July 08, 2008 12:35 PM, Christopher Morgan wrote:<br/>&gt;I am in the process of rebuilding my web site after a phishing site <br/>&gt;break-in (yikes!). The site is fine now, and secure, but for some <br/>&gt;reason I can&#39;t get MARC::Record-2.0.0 to install. I get an error <br/>&gt;message saying that perl 5.8.2 is required, but that I only have perl <br/>&gt;5.8.0. (And indeed I do have perl<br/>5.8.0) But I&#39;m pretty sure this version of MARC::Record *did* install under<br/>perl 5.8.0 that last time I tried.&lt;<br/><br/>MARC::Record 1.39_02 appears to be the latest version on CPAN that would<br/>work on 5.8.0. MARC::Record 2.x is incompatible with pre-5.8.2 versions of<br/>Perl due to Unicode-related changes. The change was announced in a Perl4Lib<br/>message &quot;MARC::Record v2.0 RC1&quot;, sent Fri 5/20/2005 2:35 PM, by Ed Summers.<br/>[1]<br/><br/>[1] &lt;http://www.nntp.perl.org/group/perl.perl4lib/2005/05/msg2070.html&gt;<br/><br/>I hope this helps,<br/><br/>Bryan Baldus<br/>bryan.baldus@quality-books.com<br/>eijabb@cpan.org<br/>http://home.inwave.com/eija<br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/07/msg2645.html Tue, 08 Jul 2008 12:20:00 +0000 RE: Problem installing MARC::Record 2.0.0 under perl 5.8.0 by Bryan Baldus On Tuesday, July 08, 2008 12:35 PM, Christopher Morgan wrote:<br/>&gt;I am in the process of rebuilding my web site after a phishing site break-in (yikes!). The site is fine now, and secure, but for some reason I can&#39;t get MARC::Record-2.0.0 to install. I get an error message saying that perl 5.8.2 is required, but that I only have perl 5.8.0. (And indeed I do have perl<br/>5.8.0) But I&#39;m pretty sure this version of MARC::Record *did* install under perl 5.8.0 that last time I tried.&lt;<br/><br/>MARC::Record 1.39_02 appears to be the latest version on CPAN that would work on 5.8.0. MARC::Record 2.x is incompatible with pre-5.8.2 versions of Perl due to Unicode-related changes. The change was announced in a Perl4Lib message &quot;MARC::Record v2.0 RC1&quot;, sent Fri 5/20/2005 2:35 PM, by Ed Summers. [1]<br/><br/>[1] &lt;http://www.nntp.perl.org/group/perl.perl4lib/2005/05/msg2070.html&gt;<br/><br/>I hope this helps,<br/><br/>Bryan Baldus<br/>bryan.baldus@quality-books.com<br/>eijabb@cpan.org<br/>http://home.inwave.com/eija<br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/07/msg2644.html Tue, 08 Jul 2008 11:35:31 +0000 Problem installing MARC::Record 2.0.0 under perl 5.8.0 by Christopher Morgan I am in the process of rebuilding my web site after a phishing site break-in<br/>(yikes!). The site is fine now, and secure, but for some reason I can&#39;t get<br/>MARC::Record-2.0.0 to install. I get an error message saying that perl 5.8.2<br/>is required, but that I only have perl 5.8.0. (And indeed I do have perl<br/>5.8.0) But I&#39;m pretty sure this version of MARC::Record *did* install under<br/>perl 5.8.0 that last time I tried.<br/> <br/>I cheated by changing line 2 in the Makefile.PL file to read &quot;require<br/>perl-5.8.0&quot; instead of &quot;5.8.2&quot;. It installed, but it only passed about 20%<br/>of the tests during make test. Am I asking for trouble here? Will it work,<br/>or should I try installing an earlier version? (If so, which earlier<br/>version, and where should I get it?) Also, I saw a patch somewhere that you<br/>could use if you&#39;re installing into systems that use Perl 5.00xxx or earlier<br/>(or something to that effect).<br/><br/>Any thoughts from anyone on this?<br/> <br/>Many thanks!<br/><br/>- Chris<br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/07/msg2643.html Tue, 08 Jul 2008 10:37:42 +0000 Cleaning MARC file by Emmanuel Di Pretoro Hi,<br/><br/>Is there anybody who is already involved in the process of cleaning a MARC<br/>file. This means:<br/>- fusion multiple records into one single record;<br/>- or keep one record, and delete the others.<br/><br/>Can you describe your methodology, as well as used algorithms.<br/><br/>Thanks in advance.<br/><br/>Regards,<br/><br/>Emmanuel Di Pretoro<br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/06/msg2642.html Thu, 26 Jun 2008 02:04:10 +0000 The Berman Catalog by md I have the raw data files of the former Hennepin County Library <br/>catalog and authority files. <br/><br/>This is the innovative, unique catalog created<br/>by Sandy Berman. 1970s-2002.<br/><br/>I would like to import the data into a MYSQL database. I assume<br/>this can be done with Perl, but don&#39;t know if an existing parser<br/>would work or if a custom program would be needed.<br/><br/>I have no programming skills. There must be someone...<br/>here who knows and values Berman&#39;s work and is ready, <br/>willing and able to devote their knowledge<br/>and skills to making it accessible once again.<br/><br/>Please contact me with questions on or off list.<br/><br/>Thank You!<br/><br/>Madeline Douglass<br/>mdougla@pclink.com<br/><br/>http://www.sanfordberman.org <br/><br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/06/msg2641.html Sun, 22 Jun 2008 17:56:19 +0000 RE: Practicality of using DB_File on a Perl-based book site? by Christopher Morgan Harrison,<br/><br/>That&#39;s useful information. Yes, I&#39;ll only be doing lookups, which simplifies<br/>things quite a bit. Given what you said about the Movable Type software, I<br/>assume DB_FILE would be a good way to keep track of website user names,<br/>passwords, cookies, and the like?<br/><br/>- Chris <br/><br/>-----Original Message-----<br/>From: vagrantscholar@gmail.com [mailto:vagrantscholar@gmail.com] On Behalf<br/>Of Harrison Dekker<br/>Sent: Friday, June 20, 2008 2:19 PM<br/>To: Christopher Morgan<br/>Subject: Re: Practicality of using DB_File on a Perl-based book site?<br/><br/>Chris,<br/><br/>I&#39;m no expert, but it seems to me, that there should be less overhead using<br/>Berkeley DB compared to a relational DB, assuming that all you&#39;re doing is<br/>lookups. If you&#39;ve got a bunch of post processing going on involving<br/>multiple large retrieval sets then you&#39;ll probably lose that edge, but<br/>that&#39;s only because your perl code would be doing the work that a more<br/>optimized SQL engine could be doing. SQL doesn&#39;t give you any improvement,<br/>however, when all you&#39;re doing is a key/value type lookup.<br/><br/>Movable Type blog software uses BDB, at least it did in the past, and as far<br/>as I know it&#39;s quite reliable/scalable. I use BDB for one web servicey type<br/>application and I do have to throttle my requests if I&#39;m sending them in<br/>batch, but the db isn&#39;t the bottleneck, it&#39;s apache or the php xml functions<br/>I use.<br/><br/>-Harrison<br/><br/>On Fri, Jun 20, 2008 at 10:42 AM, Christopher Morgan &lt;morgan@acm.org&gt; wrote:<br/>&gt;<br/>&gt; I&#39;m designing a web site that will display MARC authority files <br/>&gt; onscreen. I use a Perl hash that&#39;s tied to a (read-only) Berkeley <br/>&gt; DB_file, and it works nicely. How practical is this approach if <br/>&gt; there&#39;s going to be moderate traffic on a site?<br/>&gt;<br/>&gt; My DB_FILE is about 200MB, but of course Perl brings only small pieces <br/>&gt; of the database into memory at any one time. Would the site bog down <br/>&gt; if people were accessing records at the rate of, say, every few <br/>&gt; seconds? Should I consider mySQL instead? I&#39;d prefer to stick to <br/>&gt; DB_FILE, since it&#39;s so easy and elegant -- and I can easily create complex<br/>data structures.<br/>&gt;<br/>&gt; What if one of my data files was significantly bigger (say, a GB or <br/>&gt; two of MARC book records)? I don&#39;t have a feel for the pros and cons <br/>&gt; of the various approaches to accessing large databases using Perl, but <br/>&gt; tied hashes are pretty fast! In any case, I know I&#39;ll have to lock the <br/>&gt; file during each read, via &quot;flock&quot; or the like. I haven&#39;t tried<br/>implementing the latter yet.<br/>&gt;<br/>&gt; Does anyone have any ideas about this? Are there other Perl forums I <br/>&gt; should investigate regarding this topic?<br/>&gt;<br/>&gt; Many thanks!<br/>&gt;<br/>&gt; - Chris Morgan<br/>&gt;<br/>&gt;<br/><br/><br/><br/>--<br/>Harrison Dekker -- Coordinator of Data Services -- UC Berkeley Libraries<br/>510-642-8095 :: GTalk:vagrantscholar :: AIM:hdekker :: Meebo:ucbdekker<br/>http://sunsite.berkeley.edu/wikis/datalab/<br/>------------------------<br/>Q: Why is this email 5 sentences or less?<br/>A: http://five.sentenc.es<br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/06/msg2640.html Fri, 20 Jun 2008 11:40:08 +0000 Practicality of using DB_File on a Perl-based book site? by Christopher Morgan <br/>I&#39;m designing a web site that will display MARC authority files onscreen. I<br/>use a Perl hash that&#39;s tied to a (read-only) Berkeley DB_file, and it works<br/>nicely. How practical is this approach if there&#39;s going to be moderate<br/>traffic on a site?<br/><br/>My DB_FILE is about 200MB, but of course Perl brings only small pieces of<br/>the database into memory at any one time. Would the site bog down if people<br/>were accessing records at the rate of, say, every few seconds? Should I<br/>consider mySQL instead? I&#39;d prefer to stick to DB_FILE, since it&#39;s so easy<br/>and elegant -- and I can easily create complex data structures. <br/><br/>What if one of my data files was significantly bigger (say, a GB or two of<br/>MARC book records)? I don&#39;t have a feel for the pros and cons of the various<br/>approaches to accessing large databases using Perl, but tied hashes are<br/>pretty fast! In any case, I know I&#39;ll have to lock the file during each<br/>read, via &quot;flock&quot; or the like. I haven&#39;t tried implementing the latter yet.<br/><br/>Does anyone have any ideas about this? Are there other Perl forums I should<br/>investigate regarding this topic?<br/><br/>Many thanks!<br/><br/>- Chris Morgan<br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/06/msg2639.html Fri, 20 Jun 2008 10:43:19 +0000 Re: Can't parse MARC Authority XML files with mx: prefixes in their tags by Mike Rylander On Wed, Jun 18, 2008 at 1:12 PM, Christopher Morgan &lt;morgan@acm.org&gt; wrote:<br/>&gt; Mike,<br/>&gt;<br/>&gt; I tried both of your suggested fixes (changing Name to LocalName, and<br/>&gt; running the updated patch), but no luck. I still get no error messages in<br/>&gt; the error log, but the program silently fails to print a report. If I<br/>&gt; manually remove the &quot;mx:&quot; namespace strings from all the tags, I can process<br/>&gt; the files with no problem. (So one quick fix would be to simply run these<br/>&gt; records through a quick search and replace routine.)<br/>&gt;<br/>&gt; Regarding the problem name authority files. They&#39;re all available on the web<br/>&gt; from OCLC&#39;s experimental name authority service, at<br/>&gt; http://alcme.oclc.org/eprintsUK/index.html<br/>&gt;<br/>&gt; You enter an author name (I entered &quot;Robert Benchley&quot;). Then I clicked on<br/>&gt; the first link at http://errol.oclc.org/laf/n50-7168.html<br/>&gt;<br/>&gt; Finally, I clicked on the second link (&quot;XML Record&quot;) to get this link:<br/>&gt; http://errol.oclc.org/laf/n50-7168.MarcXML All of these have the &quot;mx:&quot;<br/>&gt; namespace notation in their tags.<br/><br/>Thanks. I will see if I can fix this on my installation, but since<br/>the LocalName (only) change did not work for you I have suspicions<br/>about the particular XML parser that&#39;s being chosen for the SAX part<br/>on your system. The pure-perl parser (in some versions) did not<br/>support namespaces well, and expat can be quirky as well.<br/><br/>I&#39;ll let you know what I find, and thanks for testing.<br/><br/>-- <br/>Mike Rylander<br/> | VP, Research and Design<br/> | Equinox Software, Inc. / The Evergreen Experts<br/> | phone: 1-877-OPEN-ILS (673-6457)<br/> | email: miker@esilibrary.com<br/> | web: http://www.esilibrary.com<br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/06/msg2638.html Wed, 18 Jun 2008 11:56:02 +0000 RE: Can't parse MARC Authority XML files with mx: prefixes in theirtags by Christopher Morgan Mike,<br/><br/>I tried both of your suggested fixes (changing Name to LocalName, and<br/>running the updated patch), but no luck. I still get no error messages in<br/>the error log, but the program silently fails to print a report. If I<br/>manually remove the &quot;mx:&quot; namespace strings from all the tags, I can process<br/>the files with no problem. (So one quick fix would be to simply run these<br/>records through a quick search and replace routine.)<br/><br/>Regarding the problem name authority files. They&#39;re all available on the web<br/>from OCLC&#39;s experimental name authority service, at<br/>http://alcme.oclc.org/eprintsUK/index.html <br/><br/>You enter an author name (I entered &quot;Robert Benchley&quot;). Then I clicked on<br/>the first link at http://errol.oclc.org/laf/n50-7168.html <br/><br/>Finally, I clicked on the second link (&quot;XML Record&quot;) to get this link: <br/>http://errol.oclc.org/laf/n50-7168.MarcXML All of these have the &quot;mx:&quot;<br/>namespace notation in their tags.<br/><br/>- Chris<br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/06/msg2637.html Wed, 18 Jun 2008 10:13:03 +0000 Re: Can't parse MARC Authority XML files with mx: prefixes in their tags by Mike Rylander On Tue, Jun 10, 2008 at 1:18 PM, Christopher Morgan &lt;morgan@acm.org&gt; wrote:<br/>&gt; Mike,<br/>&gt;<br/>&gt; Sorry. Since my last post, I did find out how to use the UNIX patch command,<br/>&gt; and applied your patch to SAX.pm. My script still doesn&#39;t work, and there<br/>&gt; are no error messages. My earlier script (which worked on the subject<br/>&gt; authority file) now does not work, so I&#39;m wondering if something in the<br/>&gt; patch may be causing this. I have a backup of the SAX.pm file in any case.<br/>&gt;<br/><br/>Well, it turns out I left something out of the patch I sent before.<br/>In the end_element sub, the second line should be<br/><br/> my $name = $element-&gt;{ LocalName };<br/><br/>instead of<br/><br/> my $name = $element-&gt;{ Name };<br/><br/>If you would, you can just edit the installed version of the patched<br/>SAX.pm to test.<br/><br/>The next thing to try would be to remove the namespace test, but leave<br/>the LocalName changes in place. Anecdotal evidence suggests that some<br/>of the more popular XML parsing engines, or at least the Perl bindings<br/>for them, have problems with namespaces. I&#39;ve attached a (complete,<br/>arg!) patch that implements just the LocalName changes and would be<br/>applied to the original version of SAX.pm.<br/><br/>If you don&#39;t have time to test all this that&#39;s fined, but if not would<br/>you be willing to send a couple of your problem records?<br/><br/>Thanks Christopher,<br/><br/>-- <br/>Mike Rylander<br/> | VP, Research and Design<br/> | Equinox Software, Inc. / The Evergreen Experts<br/> | phone: 1-877-OPEN-ILS (673-6457)<br/> | email: miker@esilibrary.com<br/> | web: http://www.esilibrary.com<br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/06/msg2636.html Thu, 12 Jun 2008 06:54:22 +0000 RE: Can't parse MARC Authority XML files with mx: prefixes in theirtags by Christopher Morgan Mike,<br/><br/>Many thanks. My apologies, but I&#39;ve never applied a Perl patch before, so<br/>I&#39;m not sure of the correct procedure. I did locate the SAX.pm file.<br/><br/>- Chris <br/><br/>-----Original Message-----<br/>From: Mike Rylander [mailto:mrylander@gmail.com] <br/>Sent: Tuesday, June 10, 2008 11:57 AM<br/>To: Christopher Morgan<br/>Cc: jtgorman@uiuc.edu; perl4lib@perl.org<br/>Subject: Re: Can&#39;t parse MARC Authority XML files with mx: prefixes in their<br/>tags<br/><br/>On Mon, Jun 9, 2008 at 5:39 PM, Christopher Morgan &lt;morgan@acm.org&gt; wrote:<br/>&gt; Jonathan,<br/>&gt;<br/>&gt; Many thanks. I get no errors on the command line or in the error log <br/>&gt; when I run the script. The file just executes with no output. If you <br/>&gt; have the time to run it, I&#39;ve included the scriupt below, and have <br/>&gt; attached the name authority record it tries to process:<br/><br/>The problem is that the SAX parser is looking for the element Name instead<br/>of LocalName. I&#39;ve attached a patch that tests both LocalName and<br/>NamespaceURI. If you could apply this to your version of MARC/File/SAX.pm<br/>and give it a test, and it works for you, I&#39;ll commit it to the CVS repo.<br/><br/>--miker<br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/06/msg2635.html Tue, 10 Jun 2008 10:51:40 +0000 RE: Can't parse MARC Authority XML files with mx: prefixes in theirtags by Christopher Morgan Mike,<br/><br/>Sorry. Since my last post, I did find out how to use the UNIX patch command,<br/>and applied your patch to SAX.pm. My script still doesn&#39;t work, and there<br/>are no error messages. My earlier script (which worked on the subject<br/>authority file) now does not work, so I&#39;m wondering if something in the<br/>patch may be causing this. I have a backup of the SAX.pm file in any case.<br/><br/>- Chris<br/><br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/06/msg2634.html Tue, 10 Jun 2008 10:20:17 +0000 Re: Can't parse MARC Authority XML files with mx: prefixes in their tags by Mike Rylander On Mon, Jun 9, 2008 at 5:39 PM, Christopher Morgan &lt;morgan@acm.org&gt; wrote:<br/>&gt; Jonathan,<br/>&gt;<br/>&gt; Many thanks. I get no errors on the command line or in the error log when I<br/>&gt; run the script. The file just executes with no output. If you have the time<br/>&gt; to run it, I&#39;ve included the scriupt below, and have attached the name<br/>&gt; authority record it tries to process:<br/><br/>The problem is that the SAX parser is looking for the element Name<br/>instead of LocalName. I&#39;ve attached a patch that tests both LocalName<br/>and NamespaceURI. If you could apply this to your version of<br/>MARC/File/SAX.pm and give it a test, and it works for you, I&#39;ll commit<br/>it to the CVS repo.<br/><br/>--miker<br/><br/>&gt;<br/>&gt; #! /usr/bin/perl<br/>&gt; use strict;<br/>&gt;<br/>&gt; use MARC::Record;<br/>&gt; use MARC::Batch;<br/>&gt; use MARC::File::XML;<br/>&gt; use constant MAX =&gt; 20;<br/>&gt;<br/>&gt; MARC::File::XML-&gt;default_record_format(&#39;UNIMARCAUTH&#39;);<br/>&gt; my $batch = MARC::Batch-&gt;new( &#39;XML&#39;, &#39;name_authority_file&#39;);<br/>&gt; while (my $record = $batch-&gt;next()) {<br/>&gt; for my $field ($record-&gt;field(&quot;100&quot;)){<br/>&gt; my $name= $field-&gt;subfield(&#39;a&#39;);<br/>&gt; print &quot;$name&quot;, &quot;\n&quot;;<br/>&gt; }<br/>&gt; }<br/>&gt;<br/>&gt; I think you&#39;re right about the LOC files -- they probably got the extra<br/>&gt; spaces by accident. That&#39;s easy enough to fix.<br/>&gt;<br/>&gt; As far as the name authorities go, if I can&#39;t get MARC::File::XML to process<br/>&gt; them, I can always use XML::Tokeparser. Not as elegant, but it would get the<br/>&gt; job done.<br/>&gt;<br/>&gt; - Chris<br/>&gt;<br/>&gt; -----Original Message-----<br/>&gt; From: Jonathan Gorman [mailto:jtgorman@uiuc.edu]<br/>&gt; Sent: Monday, June 09, 2008 4:43 PM<br/>&gt; To: Christopher Morgan; perl4lib@perl.org<br/>&gt; Subject: Re: Can&#39;t parse MARC Authority XML files with mx: prefixes in their<br/>&gt; tags<br/>&gt;<br/>&gt;<br/>&gt;<br/>&gt;&gt;However, I&#39;m having trouble parsing the name authority records online<br/>&gt;&gt;at http://alcme.oclc.org/eprintsUK/index.html<br/>&gt;<br/>&gt; [snipped code examples]<br/>&gt;&gt;<br/>&gt;&gt;There are &quot;mx:&quot; prefixes in all the tags. What format is this? Is there<br/>&gt;&gt;any way I can get MARC::File::XML to parse these files?<br/>&gt;<br/>&gt; The prefixes are the namespace. The parser should be able to handle this,<br/>&gt; but I don&#39;t honestly know if it does it correctly. What also might be the<br/>&gt; problem is the second namespace in there. It might help us if you included<br/>&gt; some information about what is not working (what error are you getting etc).<br/>&gt; I don&#39;t have the time right now to run my own test, but actual error<br/>&gt; messages might provide some clue.<br/>&gt;<br/>&gt;&gt;A related question: When I first tried to process the subject authority<br/>&gt;&gt;files from the LOC (in my first example, above), the program complained<br/>&gt;&gt;that the &quot;Leader must be 24 bytes long&quot;.<br/>&gt;<br/>&gt; Right, that comes from the MARC specification, there are 24 bytes.<br/>&gt;<br/>&gt;&gt;XML files are five years old. I wonder if the XML spec has changed<br/>&gt;&gt;since<br/>&gt;&gt;then?)<br/>&gt;<br/>&gt; Doubt it, again it doesn&#39;t have anything really to do with the XML spec but<br/>&gt; the underlying xml record. More likely it is some error in creating the<br/>&gt; files. Can&#39;t give any more info though, sorry.<br/>&gt;<br/>&gt; Jon Gorman<br/>&gt;<br/><br/><br/><br/>-- <br/>Mike Rylander<br/> | VP, Research and Design<br/> | Equinox Software, Inc. / The Evergreen Experts<br/> | phone: 1-877-OPEN-ILS (673-6457)<br/> | email: miker@esilibrary.com<br/> | web: http://www.esilibrary.com<br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/06/msg2633.html Tue, 10 Jun 2008 08:57:28 +0000 RE: Can't parse MARC Authority XML files with mx: prefixes in theirtags by Christopher Morgan Jonathan,<br/><br/>Many thanks. I get no errors on the command line or in the error log when I<br/>run the script. The file just executes with no output. If you have the time<br/>to run it, I&#39;ve included the scriupt below, and have attached the name<br/>authority record it tries to process:<br/><br/>#! /usr/bin/perl<br/>use strict;<br/><br/>use MARC::Record;<br/>use MARC::Batch;<br/>use MARC::File::XML;<br/>use constant MAX =&gt; 20;<br/><br/>MARC::File::XML-&gt;default_record_format(&#39;UNIMARCAUTH&#39;);<br/>my $batch = MARC::Batch-&gt;new( &#39;XML&#39;, &#39;name_authority_file&#39;);<br/>while (my $record = $batch-&gt;next()) { <br/> for my $field ($record-&gt;field(&quot;100&quot;)){<br/> my $name= $field-&gt;subfield(&#39;a&#39;); <br/> print &quot;$name&quot;, &quot;\n&quot;;<br/> }<br/>}<br/><br/>I think you&#39;re right about the LOC files -- they probably got the extra<br/>spaces by accident. That&#39;s easy enough to fix. <br/><br/>As far as the name authorities go, if I can&#39;t get MARC::File::XML to process<br/>them, I can always use XML::Tokeparser. Not as elegant, but it would get the<br/>job done.<br/><br/>- Chris<br/><br/>-----Original Message-----<br/>From: Jonathan Gorman [mailto:jtgorman@uiuc.edu] <br/>Sent: Monday, June 09, 2008 4:43 PM<br/>To: Christopher Morgan; perl4lib@perl.org<br/>Subject: Re: Can&#39;t parse MARC Authority XML files with mx: prefixes in their<br/>tags<br/><br/><br/><br/>&gt;However, I&#39;m having trouble parsing the name authority records online <br/>&gt;at http://alcme.oclc.org/eprintsUK/index.html<br/><br/>[snipped code examples]<br/>&gt;<br/>&gt;There are &quot;mx:&quot; prefixes in all the tags. What format is this? Is there <br/>&gt;any way I can get MARC::File::XML to parse these files?<br/><br/>The prefixes are the namespace. The parser should be able to handle this,<br/>but I don&#39;t honestly know if it does it correctly. What also might be the<br/>problem is the second namespace in there. It might help us if you included<br/>some information about what is not working (what error are you getting etc).<br/>I don&#39;t have the time right now to run my own test, but actual error<br/>messages might provide some clue.<br/><br/>&gt;A related question: When I first tried to process the subject authority <br/>&gt;files from the LOC (in my first example, above), the program complained <br/>&gt;that the &quot;Leader must be 24 bytes long&quot;.<br/><br/>Right, that comes from the MARC specification, there are 24 bytes.<br/><br/>&gt;XML files are five years old. I wonder if the XML spec has changed <br/>&gt;since<br/>&gt;then?)<br/><br/>Doubt it, again it doesn&#39;t have anything really to do with the XML spec but<br/>the underlying xml record. More likely it is some error in creating the<br/>files. Can&#39;t give any more info though, sorry.<br/><br/>Jon Gorman<br/><br/> http://www.nntp.perl.org/group/perl.perl4lib/2008/06/msg2632.html Mon, 09 Jun 2008 14:39:34 +0000