From: Antony C. [awc] <aw...@ab...> - 2008-02-15 09:18:49
|
> -----Original Message----- > From: own...@ec... [mailto:owner-eprints- > te...@ec...] On Behalf Of Ian Stuart > Sent: 14 February 2008 16:23 > To: EPrints.org Technical List > Subject: Re: [EP-tech] RE: [sword-app-tech] SWORD ingest error > > *** > http://www.eprints.org/tech.php/id/%3C47B46ADA.6040001%40ed.ac.uk%3E > *** EPrints community wiki - http://wiki.eprints.org/ > > Antony Corfield [awc] wrote: > > It seems that this problem is caused by check for mime types in > > perl_lib/EPrints/Sword/Utils.pm > > > > Any type that is text/xml (found via xml declaration) is assumed to > be > > the mets metadata file so an attempt is made to parse it. > Are you sure that this only happens if the "format namespace" is not > defined? > > > This means that xml files (which include an xml declaration) can not > be > > ingested by Eprints via SWORD. > Not really - what it means is that the sampler code is very > simplistic/naive in its assumptions :-) Yep at present it fails to ingest xml files :-) As a temporary fix I've added the following to perl_lib/EPrints/Sword/Utils.pm It assumes that the metadata file is named mets.xml foreach(keys %$mimes) { if( $$mimes{$_} eq $mime_type && $_ =~ /mets.xml/ ) { push @candidates, $_; } } > > I'm working on a more complete SWORD import function (probably using > MODS rather than epdcx), and this will (of necessity) do more > checking... but don't expect anything Real Soon Now: I've got some > major > social hurdles to address first :-( > -- > > Ian Stuart. > Bibliographics and Multimedia Service Delivery team, > EDINA, > The University of Edinburgh. > > http://edina.ac.uk/ |