$_xslt = new XML::LibXSLT;
# parse the MODS xslt ...
+ my $mods3_xslt = $_parser->parse_file(
+ OpenSRF::Utils::SettingsClient
+ ->new
+ ->config_value( dirs => 'xsl' ).
+ "/MARC21slim2MODS3.xsl"
+ );
+ # and stash a transformer
+ $record_xslt{mods3}{xslt} = $_xslt->parse_stylesheet( $mods3_xslt );
+ $record_xslt{mods3}{namespace_uri} = 'http://www.loc.gov/mods/v3';
+ $record_xslt{mods3}{docs} = 'http://www.loc.gov/mods/';
+ $record_xslt{mods3}{schema_location} = 'http://www.loc.gov/standards/mods/v3/mods-3-1.xsd';
+
+ # parse the MODS xslt ...
my $mods_xslt = $_parser->parse_file(
OpenSRF::Utils::SettingsClient
->new
template="$base/1.1/$lib/atom/$class/{searchTerms}?startPage={startPage?}&startIndex={startIndex?}&count={count?}&language={language?}"/>
<Url type="application/rss+xml"
template="$base/1.1/$lib/rss2/$class/{searchTerms}?startPage={startPage?}&startIndex={startIndex?}&count={count?}&language={language?}"/>
+ <Url type="application/mods3+xml"
+ template="$base/1.1/$lib/mods3/$class/{searchTerms}?startPage={startPage?}&startIndex={startIndex?}&count={count?}&language={language?}"/>
<Url type="application/mods+xml"
template="$base/1.1/$lib/mods/$class/{searchTerms}?startPage={startPage?}&startIndex={startIndex?}&count={count?}&language={language?}"/>
<Url type="application/marcxml+xml"
#----------------------------------------------------------
+package OpenILS::WWW::SuperCat::Feed::mods3;
+use base 'OpenILS::WWW::SuperCat::Feed';
+
+sub new {
+ my $class = shift;
+ my $self = $class->SUPER::build('<mods:modsCollection version="3.0" xmlns:mods="http://www.loc.gov/mods/v3"/>');
+ $self->{type} = 'application/xml';
+ $self->{item_xpath} = '/mods:modsCollection';
+ return $self;
+}
+
+package OpenILS::WWW::SuperCat::Feed::mods3::item;
+use base 'OpenILS::WWW::SuperCat::Feed::mods3';
+
+sub new {
+ my $class = shift;
+ my $xml = shift;
+ my $self = $class->SUPER::build($xml);
+ $self->{doc}->documentElement->setNamespace('http://www.loc.gov/mods/v3', 'mods');
+ $self->{type} = 'application/xml';
+ return $self;
+}
+
+
+#----------------------------------------------------------
+
package OpenILS::WWW::SuperCat::Feed::marcxml;
use base 'OpenILS::WWW::SuperCat::Feed';